]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/EMCALTasks/AliAnalysisTaskEMCALIsoPhoton.h
including an old fix for EMCal matrices not applied to this code
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / AliAnalysisTaskEMCALIsoPhoton.h
1 #ifndef AliAnalysisTaskEMCALIsoPhoton_h
2 #define AliAnalysisTaskEMCALIsoPhoton_h
3
4 // $Id$
5
6 class TH1F;
7 class TH2F;
8 class TH3F;
9 class THnSparse;
10 class TList;
11 class TObjArray;
12 class AliEMCALGeometry;
13 class AliOADBContainer;
14 class AliESDCaloCells;
15 class AliESDEvent;
16 class AliESDtrack;
17 class AliESDtrackCuts;
18 class AliAODEvent;
19 class AliAODCaloCells;
20 class AliVCluster;
21 class AliMCEvent;
22 class AliStack;
23 class TParticle;
24 class TGeoHMatrix;
25
26 #include "AliAnalysisTaskSE.h"
27
28 class AliAnalysisTaskEMCALIsoPhoton : public AliAnalysisTaskSE {
29  public:
30   AliAnalysisTaskEMCALIsoPhoton();
31   AliAnalysisTaskEMCALIsoPhoton(const char *name);
32   virtual ~AliAnalysisTaskEMCALIsoPhoton() {}
33
34   void                   UserCreateOutputObjects();
35   void                   UserExec(Option_t *option);
36   void                   Terminate(Option_t *);
37
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);
42   void                   FillClusHists();
43   void                   FillMcHists();
44   Float_t                GetClusSource(const AliVCluster *cluster);
45   void                   FollowGamma();
46   void                   GetDaughtersInfo(int firstd, int lastd, int selfid, const char *indputindent);
47   Float_t                GetMcPtSumInCone(Float_t etaclus, Float_t phiclus, Float_t R);
48   void                   SetExotCut(Double_t c)                 { fExoticCut          = c;       }
49   void                   SetGeoName(const char *n)              { fGeoName            = n;       }
50   void                   SetIsoConeR(Double_t r)                { fIsoConeR           = r;       }
51   void                   SetPeriod(const char *n)               { fPeriod             = n;       }
52   void                   SetTriggerBit(const char *tb)          { fTrigBit            = tb;      }
53   void                   SetPrimTrackCuts(AliESDtrackCuts *c)   { fPrTrCuts           = c;       }
54   void                   SetTrainMode(Bool_t t)                 { fIsTrain            = t;       }
55   void                   SetMcMode(Bool_t mc)                   { fIsMc               = mc;      }
56   void                   SetDebugOn(Bool_t d)                   { fDebug              = d;       }
57   void                   SetPathStringSelect(char *p)           { fPathStrOpt         = p;       }
58   void                   SetEtCut(Double_t ec)                  { fECut               = ec;      }
59   void                   SetImportGeometryFromFile(Bool_t  im, 
60                                            TString pa = "")     { fImportGeometryFromFile = im ; 
61                                                                   fImportGeometryFilePath = pa ; }    
62   
63  protected:
64   TObjArray             *fESDClusters;           //!pointer to EMCal clusters
65   TObjArray             *fAODClusters;           //!pointer to EMCal clusters
66   TObjArray             *fSelPrimTracks;         //!pointer to ESD primary tracks
67   TClonesArray          *fTracks;                //!track input array
68   AliESDCaloCells       *fESDCells;              //!pointer to EMCal cells, esd
69   AliAODCaloCells       *fAODCells;              //!pointer to EMCal cells, aod  
70   AliESDtrackCuts       *fPrTrCuts;              //pointer to hold the prim track cuts
71   AliEMCALGeometry      *fGeom;                  // geometry utils
72   TString                fGeoName;               // geometry name (def = EMCAL_FIRSTYEARV1)
73   AliOADBContainer      *fOADBContainer;         //!OADB container used to load misalignment matrices
74   TString                fPeriod;                // string to the LHC period
75   TString                fTrigBit;               // string to the trigger bit name
76   Bool_t                 fIsTrain;               // variable to set train mode
77   Bool_t                 fIsMc;                  // variable to set mc mode
78   Bool_t                 fDebug;                 // variable to set on/off debugging printouts
79   TString                fPathStrOpt;            // variable to set the name of files to be analyzed (MC only)
80   Double_t               fExoticCut;             // variable to set the cut on exotic clusters
81   Double_t               fIsoConeR;              // variable to set the isolation cone radius
82   Int_t                  fNDimensions;           // variable to set the number of dimensions of n-sparse
83   Double_t               fECut;                  // variable to set the minimum E of a cluster
84   Int_t                  fTrackMult;             // global variable with the event multiplicity        
85   TString                fMcIdFamily;            // string that holds the ids of all particles originated from the prompt photon
86   Int_t                  fNClusForDirPho;        // number of clusters from prompt photon per event
87   Float_t                fDirPhoPt;              // prompt photon pt (assumes only one per event)
88   Float_t                fHigherPtCone;          // higher pt inside the cone around the candidate
89   Bool_t                 fImportGeometryFromFile;  // Import geometry settings in geometry.root file
90   TString                fImportGeometryFilePath;  // path fo geometry.root file
91
92   
93  private:
94   AliESDEvent *fESD;      //! ESD object
95   AliAODEvent *fAOD;      //! AOD object
96   AliMCEvent  *fMCEvent;  //! MC event object
97   AliStack    *fStack;    //!MC particles stack object
98   TGeoHMatrix *fGeomMatrix[12];//! Geometry misalignment matrices for EMCal
99   TList       *fOutputList; //! Output list
100   //histograms for events with 1+ track pt>1
101   TH1F        *fEvtSel;                    //!evt selection counter: 0=all trg, 1=pv cut 
102   TH1F        *fNClusEt10;                 //!number of clusters w/ Et>10 in the event
103   TH1F        *fRecoPV;                    //!histogram to record if an event has a prim. vert.
104   TH1F        *fPVtxZ;                     //!primary vertex Z before cut
105   TH1F        *fTrMultDist;                //!track multiplicity distribution
106   TH3F        *fMCDirPhotonPtEtaPhi;       //!direct produced photon pt
107   TH1F        *fDecayPhotonPtMC;           //!decay photon pt
108   TH2F        *fCellAbsIdVsAmpl;           //!cell abs id vs cell amplitude (energy)
109   TH2F        *fNClusHighClusE;            //!total number of clusters vs. highest clus energy in the event
110   TH2F        *fHigherPtConeM02;           //!M02 vs. the higher pt of a track inside the cone
111   TH2F        *fClusEtMcPt;                //!cluster et x mc-pt
112   TH2F        *fClusMcDetaDphi;            //!delta-eta x delta-phi(reco-mc)
113   TH2F        *fNClusPerPho;               //!delta-eta x delta-phi(reco-mc)
114   TH2F        *fMcPtInConeBG;              //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in BG template
115   TH2F        *fMcPtInConeSBG;             //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in SBG range
116   TH2F        *fMcPtInConeBGnoUE;          //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in BG template no UE sub
117   TH2F        *fMcPtInConeSBGnoUE;         //!sum of mc-pt of "primary" particles inside de cone, as a function of NET-ISO in SBG range no UE sub
118   TH2F        *fAllIsoEtMcGamma;           //!all iso distribution vs. Et clus for clusters comming from a MC prompt photon
119   TH2F        *fAllIsoNoUeEtMcGamma;       //!all iso distribution (without UE subtraction) vs. Et clus for clusters comming from a MC prompt photon
120   TH3F        *fMCDirPhotonPtEtaPhiNoClus; //!pt x eta x phi for prompt photons that didn't produce clusters
121   THnSparse   *fHnOutput;                  //!Output matrix with 7 dimensions
122
123   AliAnalysisTaskEMCALIsoPhoton(const AliAnalysisTaskEMCALIsoPhoton&); // not implemented
124   AliAnalysisTaskEMCALIsoPhoton& operator=(const AliAnalysisTaskEMCALIsoPhoton&); // not implemented
125   
126   ClassDef(AliAnalysisTaskEMCALIsoPhoton, 1); // Class to analyse isolated photons
127 };
128 #endif