]>
Commit | Line | Data |
---|---|---|
7fac8669 | 1 | #ifndef AliAnalysisTaskGCPartToPWG4Part_cxx |
2 | #define AliAnalysisTaskGCPartToPWG4Part_cxx | |
3 | ||
4 | // example of an analysis task creating a p_t spectrum | |
5 | // Authors: Svein Lindal | |
6 | ||
7 | class TH1F; | |
8 | class AliESDEvent; | |
9 | class AliAODConversionPhoton; | |
10 | class AliAODPWG4ParticleCorrelation; | |
11 | class AliAODPWG4Particle; | |
12 | class TClonesArray; | |
13 | class TString; | |
14 | class AliMCAnalysisUtils; | |
15 | class AliAODMCHeader; | |
16 | ||
17 | #include "AliAnalysisTaskSE.h" | |
18 | ||
19 | class AliAnalysisTaskGCPartToPWG4Part : public AliAnalysisTaskSE { | |
20 | ||
21 | public: | |
22 | ||
23 | AliAnalysisTaskGCPartToPWG4Part(); | |
24 | AliAnalysisTaskGCPartToPWG4Part(const char *name); | |
25 | virtual ~AliAnalysisTaskGCPartToPWG4Part(); | |
26 | ||
27 | virtual void UserCreateOutputObjects(); | |
28 | virtual void UserExec(Option_t *option); | |
29 | virtual void Terminate(Option_t *); | |
30 | ||
31 | void SetDeltaAODFileName(TString string) { fDeltaAODFileName = string;} | |
32 | void SetGammaBranchName(TString string) { fAODBranchName = string; } | |
33 | ||
34 | ||
35 | void SetDebugLevel(Int_t debugLevel) { fDebugLevel = debugLevel; } | |
36 | Int_t GetDebugLevel() const { return fDebugLevel; } | |
37 | ||
38 | void SetGammaCutId(TString cut) { fGammaCutString = Form("GammaConv_%s", cut.Data());} | |
39 | void SetPionCutId(TString cut) { fPionCutString = Form("GammaConv_%s", cut.Data());} | |
40 | ||
41 | ||
42 | private: | |
43 | ||
44 | //Clean up | |
45 | void CleanUp(); | |
46 | ||
47 | //Get the AOD event from whereever it might be accessible | |
48 | AliAODEvent * GetAODEvent(); | |
49 | ||
50 | Bool_t BothTracksPresent(const AliAODConversionPhoton * const photon, const TClonesArray * const tracks) const; | |
51 | Bool_t BothGammaPresent(const AliAODConversionPhoton * const pion, const TClonesArray * const photons, const TClonesArray * const tracks) const; | |
52 | ||
53 | //Get Conversion gammas branch | |
54 | TClonesArray * GetConversionGammas(const AliAODEvent * aodEvent) const; | |
55 | TClonesArray * GetPions(const AliAODEvent * aodEvent) const; | |
56 | TClonesArray * GetAODBranch(const AliAODEvent * aodEvent, TString branchName) const; | |
57 | ||
58 | //Fill AOD tree with PWG4 particles | |
59 | AliAODPWG4ParticleCorrelation * AddToAOD(AliAODConversionPhoton * aodO, TClonesArray * branch, TString detector); | |
60 | AliAODPWG4ParticleCorrelation * AddPionToAOD(AliAODConversionPhoton * pion, TClonesArray * branch, TString detector); | |
61 | //Process conv gamma | |
62 | void ProcessConvGamma( const AliAODEvent * const aodEvent ); | |
63 | ||
64 | TString fDeltaAODFileName;//! File where Gamma Conv AOD is located, if not in default AOD | |
65 | TString fGammaCutString; //! The cut string of the conversion analysis used to produce input AOD | |
66 | TString fPionCutString; //! The cut string of the conversion analysis used to produce input AOD | |
67 | TString fAODBranchName; | |
68 | TClonesArray * fAODPWG4Photons; | |
69 | TClonesArray * fAODPWG4Pi0; | |
70 | ||
71 | ||
72 | Int_t fDebugLevel; | |
73 | ||
74 | ||
75 | AliAnalysisTaskGCPartToPWG4Part(const AliAnalysisTaskGCPartToPWG4Part&); // not implemented | |
76 | AliAnalysisTaskGCPartToPWG4Part& operator=(const AliAnalysisTaskGCPartToPWG4Part&); // not implemented | |
77 | ||
78 | //Int_t CheckTag(AliAODPWG4ParticleCorrelation * particle, TClonesArray * tracks, TClonesArray * arrayMC, AliAODMCHeader * mcHeader); | |
79 | ||
80 | ClassDef(AliAnalysisTaskGCPartToPWG4Part, 1); // example of analysis | |
81 | }; | |
82 | ||
83 | #endif |