AliPhysics  ec707b8 (ec707b8)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
AliAnalysisTaskESDfilterEMCALEventSelect.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
7  * Permission to use, copy, modify and distribute this software and its *
8  * documentation strictly for non-commercial purposes is hereby granted *
9  * without fee, provided that the above copyright notice appears in all *
10  * copies and that both the copyright notice and this permission notice *
11  * appear in the supporting documentation. The authors make no claims *
12  * about the suitability of this software for any purpose. It is *
13  * provided "as is" without express or implied warranty. *
14  **************************************************************************/
15 
16 #include "AliESDCaloCluster.h"
17 
19 
23 
27 //____________________________________________________________________________________
29 AliAnalysisTaskESDfilter("ESD Filte : EMCAL selected events"),
30 fEnergyCut(10), fNcellsCut (2),
31 fRecoUtils(0x0),
32 fGeometry(0), fGeoName("EMCAL_COMPLETE12SMV1_DCAL_8SM")
33 {
34  fRecoUtils = new AliEMCALRecoUtils;
35 }
36 
40 //____________________________________________________________________________________________________
42 AliAnalysisTaskESDfilter(name),
43 fEnergyCut(10), fNcellsCut (2),
44 fRecoUtils(0x0),
45 fGeometry(0), fGeoName("EMCAL_COMPLETE12SMV1_DCAL_8SM")
46 {
47  fRecoUtils = new AliEMCALRecoUtils;
48 }
49 
55 //_________________________________________________________________
57 {
58  if(!fGeometry) fGeometry = AliEMCALGeometry::GetInstance(fGeoName);
59 
60  Int_t nCluster = InputEvent() -> GetNumberOfCaloClusters();
61  AliVCaloCells * caloCell = InputEvent() -> GetEMCALCells();
62  Int_t bc = InputEvent() -> GetBunchCrossNumber();
63 
64  for(Int_t icalo = 0; icalo < nCluster; icalo++)
65  {
66  AliESDCaloCluster *clus = (AliESDCaloCluster*) (InputEvent()->GetCaloCluster(icalo));
67 
68  if( ( clus->IsEMCAL() ) && ( clus->GetNCells() > fNcellsCut ) && ( clus->E() > fEnergyCut ) &&
69  fRecoUtils->IsGoodCluster(clus,fGeometry,caloCell,bc))
70  {
71 
72  // printf("Accept event %d, E %2.2f > %2.2f, nCells %d > %d \n",
73  // (Int_t) Entry(),clus->E(), fEnergyCut, clus->GetNCells(), fNcellsCut);
74 
75  return kTRUE;
76  }
77 
78  }// loop
79 
80  return kFALSE;
81 }
82 
88 //_________________________________________________________________
90 {
91  if(!AcceptEventEMCAL()) return ;
92 
93  AliAnalysisTaskESDfilter::UserExec("");
94 }
ClassImp(AliAnalysisTaskTriggerRates) AliAnalysisTaskTriggerRates
Int_t fNcellsCut
At least a cluster with fNCellsCut cells over fEnergyCut.
AliEMCALRecoUtils * fRecoUtils
AliEMCALRecoUtils pointer.
AliEMCALGeometry * fGeometry
Access to EMCAL geometry utils.
Float_t fEnergyCut
At least a cluster with this energy in the event.
Filter ESDs events into AODs with some significant calorimeter signal.