7 #include <TClonesArray.h>
8 #include "AliAODCaloCluster.h"
9 #include "AliAODEvent.h"
10 #include "AliAnalysisManager.h"
11 #include "AliEMCALRecoUtils.h"
12 #include "AliESDCaloCluster.h"
13 #include "AliESDEvent.h"
28 fEnergyTimeHistBefore(0),
31 fEnergyTimeHistAfter(0),
32 fEnergyExoticClusters(0)
40 fOutCaloName(
"EmcClusters"),
46 fEnergyTimeHistBefore(0),
49 fEnergyTimeHistAfter(0),
50 fEnergyExoticClusters(0)
56 fBranchNames=
"ESD:AliESDRun.,AliESDHeader.,PrimaryVertex.";
79 fEnergyDistBefore =
new TH1F(
"hEnergyDistBefore",
"hEnergyDistBefore;E_{clus} (GeV)",1500,0,150);
81 fEtaPhiDistBefore =
new TH2F(
"hEtaPhiDistBefore",
"hEtaPhiDistBefore;#eta;#phi",280,-0.7,0.7,800,1.3,3.3);
83 fEnergyTimeHistBefore =
new TH2F(
"hEnergyTimeDistBefore",
"hEnergyTimeDistBefore;E_{clus} (GeV);time",1500,0,150,500,0,1e-6);
85 fEnergyDistAfter =
new TH1F(
"hEnergyDistAfter",
"hEnergyDistAfter;E_{clus} (GeV)",1500,0,150);
87 fEtaPhiDistAfter =
new TH2F(
"hEtaPhiDistAfter",
"hEtaPhiDistAfter;#eta;#phi",280,-0.7,0.7,800,1.3,3.3);
89 fEnergyTimeHistAfter =
new TH2F(
"hEnergyTimeDistAfter",
"hEnergyTimeDistAfter;E_{clus} (GeV);time",1500,0,150,500,0,1e-6);
91 fEnergyExoticClusters =
new TH1F(
"fEnergyExoticClusters",
"fEnergyExoticClusters;E_{ex clus} (GeV)",1500,0,150);
107 if (dynamic_cast<AliAODEvent*>(InputEvent())) {
126 AliFatal(Form(
"%s: Container with same name %s already present. Aborting", GetName(),
fOutCaloName.Data()));
141 if (!clusters)
return kFALSE;
146 AliVCluster *clus = 0;
147 clusters->ResetCurrentID();
149 if (!clus->IsEMCAL())
continue;
153 Float_t pos[3] = {0.};
154 clus->GetPosition(pos);
160 Bool_t exResult = kFALSE;
164 Bool_t exRemoval =
fRecoUtils->IsRejectExoticCell();
167 if (!exRemoval)
fRecoUtils->SwitchOffRejectExoticCell();
169 clus->SetIsExotic(exResult);
171 if (
fRecoUtils->GetNonLinearityFunction() != AliEMCALRecoUtils::kNoCorrection) {
173 clus->SetNonLinCorrEnergy(energy);
183 Float_t pos[3] = {0.};
184 clus->GetPosition(pos);
191 UInt_t rejectionReason = 0;
196 AliESDCaloCluster *ec =
dynamic_cast<AliESDCaloCluster*
>(clus);
198 oc =
new ((*fOutClusters)[clusCount]) AliESDCaloCluster(*ec);
201 AliAODCaloCluster *ac =
dynamic_cast<AliAODCaloCluster*
>(clus);
203 oc =
new ((*fOutClusters)[clusCount]) AliAODCaloCluster(*ac);
206 oc->SetE(clus->GetNonLinCorrEnergy());
207 oc->SetNonLinCorrEnergy(clus->GetNonLinCorrEnergy());
208 oc->SetHadCorrEnergy(0);
Bool_t fEsdMode
pointer to reco utils
Base task in the EMCAL framework.
TH2F * fEtaPhiDistBefore
!eta/phi distribution before
void UserCreateOutputObjects()
AliClusterContainer * GetClusterContainer(Int_t i=0) const
virtual Bool_t AcceptCluster(Int_t i, UInt_t &rejectionReason) const
AliVCluster * GetNextCluster()
TH2F * fEnergyTimeHistAfter
!energy/time distribution after
AliVCaloCells * fCaloCells
!cells
AliEMCALRecoUtils * fRecoUtils
name of output clusters; if empty updates old clusters instead of creating a new collection ...
TH1F * fEnergyDistBefore
!energy distribution before
AliEmcalList * fOutput
!output list
TH1F * fEnergyDistAfter
!energy distribution after
Bool_t fCreateHisto
whether or not create histograms
void SetMakeGeneralHistograms(Bool_t g)
TH1F * fEnergyExoticClusters
!energy of exotic clusters
void UserCreateOutputObjects()
TH2F * fEtaPhiDistAfter
!eta/phi distribution after
ClassImp(AliEmcalClusterMaker) AliEmcalClusterMaker
Bool_t fInitialized
whether or not the task has been already initialized
Container structure for EMCAL clusters.
TClonesArray * fOutClusters
!output cluster collection
TH2F * fEnergyTimeHistBefore
!energy/time distribution before
virtual ~AliEmcalClusterMaker()