AliPhysics  2c6b7ad (2c6b7ad)
AliAnalysisTaskGCPartToPWG4Part.h
Go to the documentation of this file.
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;
10 class AliAODPWG4ParticleCorrelation;
11 class AliAODPWG4Particle;
12 class TClonesArray;
13 class TString;
14 class AliMCAnalysisUtils;
15 class AliAODMCHeader;
16 
17 #include "AliAnalysisTaskSE.h"
18 
20 
21 public:
22 
24  AliAnalysisTaskGCPartToPWG4Part(const char *name);
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
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, Int_t detector);
60  AliAODPWG4ParticleCorrelation * AddPionToAOD(AliAODConversionPhoton * pion, TClonesArray * branch, Int_t detector);
61  //Process conv gamma
62  void ProcessConvGamma( const AliAODEvent * const aodEvent );
63 
68  TClonesArray * fAODPWG4Photons;
69  TClonesArray * fAODPWG4Pi0;
70 
71 
73 
74 
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
TString fPionCutString
The cut string of the conversion analysis used to produce input AOD.
TString fGammaCutString
File where Gamma Conv AOD is located, if not in default AOD.
AliAnalysisTaskGCPartToPWG4Part & operator=(const AliAnalysisTaskGCPartToPWG4Part &)
AliAODPWG4ParticleCorrelation * AddToAOD(AliAODConversionPhoton *aodO, TClonesArray *branch, Int_t detector)
TClonesArray * GetConversionGammas(const AliAODEvent *aodEvent) const
int Int_t
Definition: External.C:63
Bool_t BothGammaPresent(const AliAODConversionPhoton *const pion, const TClonesArray *const photons, const TClonesArray *const tracks) const
AliAODPWG4ParticleCorrelation * AddPionToAOD(AliAODConversionPhoton *pion, TClonesArray *branch, Int_t detector)
TClonesArray * GetAODBranch(const AliAODEvent *aodEvent, TString branchName) const
void ProcessConvGamma(const AliAODEvent *const aodEvent)
Bool_t BothTracksPresent(const AliAODConversionPhoton *const photon, const TClonesArray *const tracks) const
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
TClonesArray * GetPions(const AliAODEvent *aodEvent) const
Class with analysis utils for simulations.
TString fAODBranchName
The cut string of the conversion analysis used to produce input AOD.