1 #ifndef AliAnalysisTaskEMCALIsoPhoton_h
2 #define AliAnalysisTaskEMCALIsoPhoton_h
12 class AliEMCALGeometry;
13 class AliOADBContainer;
14 class AliESDCaloCells;
17 class AliESDtrackCuts;
19 class AliAODCaloCells;
26 #include "AliAnalysisTaskSE.h"
28 class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
30 AliAnalysisTaskEMCALIsoPhoton();
31 AliAnalysisTaskEMCALIsoPhoton(const char *name);
32 virtual ~AliAnalysisTaskEMCALIsoPhoton() {}
34 void UserCreateOutputObjects();
35 void UserExec(Option_t *option);
36 void Terminate(Option_t *);
38 void GetCeIso(TVector3 vec, Int_t maxid, Float_t &iso, Float_t &phiband, Float_t &core);
39 Double_t GetCrossEnergy(const AliVCluster *cluster, Short_t &idmax);
40 Double_t GetMaxCellEnergy(const AliVCluster *cluster, Short_t &id) const;
41 void GetTrIso(TVector3 vec, Float_t &iso, Float_t &phiband, Float_t &core);
45 Float_t GetClusSource(const AliVCluster *cluster);
47 void GetDaughtersInfo(int firstd, int lastd, int selfid, const char *indputindent);
48 Float_t GetMcPtSumInCone(Float_t etaclus, Float_t phiclus, Float_t R);
49 void SetExotCut(Double_t c) { fExoticCut = c; }
50 void SetGeoName(const char *n) { fGeoName = n; }
51 void SetIsoConeR(Double_t r) { fIsoConeR = r; }
52 void SetPeriod(const char *n) { fPeriod = n; }
53 void SetTriggerBit(const char *tb) { fTrigBit = tb; }
54 void SetPrimTrackCuts(AliESDtrackCuts *c) { fPrTrCuts = c; }
55 void SetTrainMode(Bool_t t) { fIsTrain = t; }
56 void SetMcMode(Bool_t mc) { fIsMc = mc; }
57 void SetDebugOn(Bool_t d) { fDebug = d; }
58 void SetPathStringSelect(char *p) { fPathStrOpt = p; }
59 void SetEtCut(Double_t ec) { fECut = ec; }
60 void SetImportGeometryFromFile(Bool_t im,
61 TString pa = "") { fImportGeometryFromFile = im ;
62 fImportGeometryFilePath = pa ; }
65 TObjArray *fESDClusters; //!pointer to EMCal clusters
66 TObjArray *fAODClusters; //!pointer to EMCal clusters
67 TObjArray *fSelPrimTracks; //!pointer to ESD primary tracks
68 TClonesArray *fTracks; //!track input array
69 AliESDCaloCells *fESDCells; //!pointer to EMCal cells, esd
70 AliAODCaloCells *fAODCells; //!pointer to EMCal cells, aod
71 AliESDtrackCuts *fPrTrCuts; //pointer to hold the prim track cuts
72 AliEMCALGeometry *fGeom; // geometry utils
73 TString fGeoName; // geometry name (def = EMCAL_FIRSTYEARV1)
74 AliOADBContainer *fOADBContainer; //!OADB container used to load misalignment matrices
75 TString fPeriod; // string to the LHC period
76 TString fTrigBit; // string to the trigger bit name
77 Bool_t fIsTrain; // variable to set train mode
78 Bool_t fIsMc; // variable to set mc mode
79 Bool_t fDebug; // variable to set on/off debugging printouts
80 TString fPathStrOpt; // variable to set the name of files to be analyzed (MC only)
81 Double_t fExoticCut; // variable to set the cut on exotic clusters
82 Double_t fIsoConeR; // variable to set the isolation cone radius
83 Int_t fNDimensions; // variable to set the number of dimensions of n-sparse
84 Double_t fECut; // variable to set the minimum E of a cluster
85 Int_t fTrackMult; // global variable with the event multiplicity
86 TString fMcIdFamily; // string that holds the ids of all particles originated from the prompt photon
87 Int_t fNClusForDirPho; // number of clusters from prompt photon per event
88 Float_t fDirPhoPt; // prompt photon pt (assumes only one per event)
89 Float_t fHigherPtCone; // higher pt inside the cone around the candidate
90 Bool_t fImportGeometryFromFile; // Import geometry settings in geometry.root file
91 TString fImportGeometryFilePath; // path fo geometry.root file
92 Double_t fMaxPtTrack; //track with highest pt in event
93 Double_t fMaxEClus; //cluster with highest energy in event
97 AliESDEvent *fESD; //! ESD object
98 AliAODEvent *fAOD; //! AOD object
99 AliMCEvent *fMCEvent; //! MC event object
100 AliStack *fStack; //!MC particles stack object
101 TGeoHMatrix *fGeomMatrix[12];//! Geometry misalignment matrices for EMCal
102 TList *fOutputList; //! Output list
103 //histograms for events with 1+ track pt>1
104 TH1F *fEvtSel; //!evt selection counter: 0=all trg, 1=pv cut
105 TH1F *fNClusEt10; //!number of clusters w/ Et>10 in the event
106 TH1F *fRecoPV; //!histogram to record if an event has a prim. vert.
107 TH1F *fPVtxZ; //!primary vertex Z before cut
108 TH1F *fTrMultDist; //!track multiplicity distribution
109 TH3F *fMCDirPhotonPtEtaPhi; //!direct produced photon pt
110 TH1F *fDecayPhotonPtMC; //!decay photon pt
111 TH2F *fCellAbsIdVsAmpl; //!cell abs id vs cell amplitude (energy)
112 TH2F *fNClusHighClusE; //!total number of clusters vs. highest clus energy in the event
113 TH2F *fHigherPtConeM02; //!M02 vs. the higher pt of a track inside the cone
114 TH2F *fClusEtMcPt; //!cluster et x mc-pt
115 TH2F *fClusMcDetaDphi; //!delta-eta x delta-phi(reco-mc)
116 TH2F *fNClusPerPho; //!delta-eta x delta-phi(reco-mc)
117 TH2F *fMcPtInConeBG; //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in BG template
118 TH2F *fMcPtInConeSBG; //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in SBG range
119 TH2F *fMcPtInConeBGnoUE; //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in BG template no UE sub
120 TH2F *fMcPtInConeSBGnoUE; //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in SBG range no UE sub
121 TH2F *fAllIsoEtMcGamma; //!all iso distribution vs. Et clus for clusters comming from a MC prompt photon
122 TH2F *fAllIsoNoUeEtMcGamma; //!all iso distribution (without UE subtraction) vs. Et clus for clusters comming from a MC prompt photon
123 TH3F *fMCDirPhotonPtEtaPhiNoClus; //!pt x eta x phi for prompt photons that didn't produce clusters
124 THnSparse *fHnOutput; //!Output matrix with 7 dimensions
127 TList *fQAList; //!output list holding QA histos
128 TH1F *fNTracks; //!number of tracks from Array->GetEntries()
129 TH1F *fEmcNCells; //!number of emcal cells in the event
130 TH1F *fEmcNClus; //!# of emcal clusters
131 TH1F *fEmcNClusCut; //!# of clusters in an event with at least 1 clus with E > fECut ("triggered event")
132 TH1F *fNTracksECut; //!number of tracks from Array->GetEntries() in "triggered event"
133 TH1F *fEmcNCellsCut; //!number of emcal cells in a in "triggered event"
134 TH1F *fEmcClusE; //!cluster E spectrum
135 TH1F *fEmcClusECut; //!cluster E spectrum in "triggered event"
136 TH1F *fTrackPt; //!selected tracks pt
137 TH1F *fTrackPtCut; //!selected tracks pt in "triggered event"
140 AliAnalysisTaskEMCALIsoPhoton(const AliAnalysisTaskEMCALIsoPhoton&); // not implemented
141 AliAnalysisTaskEMCALIsoPhoton& operator=(const AliAnalysisTaskEMCALIsoPhoton&); // not implemented
143 ClassDef(AliAnalysisTaskEMCALIsoPhoton, 1); // Class to analyse isolated photons