]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/GammaConv/AliAODConversionPhoton.h
modified trainconfig PbPb for phi cut check
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAODConversionPhoton.h
1 #ifndef ALIAODCONVERSIONPHOTON_H
2 #define ALIAODCONVERSIONPHOTON_H
3
4 #include "AliConversionPhotonBase.h"
5 #include "AliKFConversionPhoton.h"
6 #include "AliAODConversionParticle.h"
7
8 class AliAODConversionPhoton : public AliAODConversionParticle, public AliConversionPhotonBase {
9
10         public: 
11
12                 enum caloPhotonMCFlags_t {
13                         kIsPhoton                               = 0x001, kIsElectron            = 0x002, kIsConversion  = 0x004, kIsConversionFullyContained    = 0x008,
14                         kIsMerged                               = 0x010, kIsMergedPartConv      = 0x020, kIsDalitz              = 0x040, kIsDalitzMerged                                = 0x080,
15             kIsPhotonWithElecMother = 0x100, kIsShower                  = 0x200, kIsSubLeadingEM= 0x400
16                 };
17                 
18                 //Constructors
19                 AliAODConversionPhoton();    
20                 AliAODConversionPhoton(AliKFConversionPhoton *kfphoton);
21                 AliAODConversionPhoton(TLorentzVector *vec);
22
23                 //Copy Constructor
24                 AliAODConversionPhoton(const AliAODConversionPhoton & g);           
25                 //assignment operator
26                 AliAODConversionPhoton & operator = (const AliAODConversionPhoton & g);
27
28                 //Destructor
29                 virtual ~AliAODConversionPhoton();
30
31                 // Overwrite GetLabelFunctions to Make it accessible via AliAODConversionParticle
32         virtual Int_t GetLabel(Int_t i) const { return AliConversionPhotonBase::GetTrackLabel(i); }
33         virtual Int_t GetLabel1() const { return AliConversionPhotonBase::GetTrackLabelPositive(); }
34         virtual Int_t GetLabel2() const { return AliConversionPhotonBase::GetTrackLabelNegative(); }
35
36                 virtual Double_t GetPhotonMass() const {return AliAODConversionParticle::M();}
37                 virtual Double_t GetPhotonPt() const {return AliAODConversionParticle::Pt();}
38                 virtual Double_t GetPhotonP() const {return AliAODConversionParticle::P();}
39                 virtual Double_t GetPhotonEta() const {return AliAODConversionParticle::Eta();}
40                 virtual Double_t GetPhotonTheta() const {return AliAODConversionParticle::Theta();}
41                 virtual Double_t GetPhotonPhi() const {return AliAODConversionParticle::Phi();}
42                 virtual Double_t GetPx() const { return AliAODConversionParticle::Px();}
43                 virtual Double_t GetPy() const { return AliAODConversionParticle::Py();}
44                 virtual Double_t GetPz() const { return AliAODConversionParticle::Pz();}
45                 void CalculateDistanceOfClossetApproachToPrimVtx(const AliVVertex* primVertex);
46                 void SetMassToZero() { SetE(P()); }
47                 
48                 void SetIsTrueConvertedPhoton(){
49                         fCaloPhoton = 0;
50                         fCaloPhotonMCFlags = 1; 
51                 }       
52                 
53                 Float_t GetDCAzToPrimVtx()const {return fDCAzPrimVtx;}
54                 Float_t GetDCArToPrimVtx()const {return fDCArPrimVtx;}
55                 
56                 void SetIsCaloPhoton(){fCaloPhoton =1;}
57                 Bool_t GetIsCaloPhoton(){return fCaloPhoton;}
58                 void SetCaloPhotonMCLabel(Int_t i, Int_t labelCaloPhoton){fCaloPhotonMCLabels[i] = labelCaloPhoton;}
59                 Int_t GetCaloPhotonMCLabel(Int_t i){return fCaloPhotonMCLabels[i];}
60                 void SetNCaloPhotonMCLabels(Int_t nLabels){fNCaloPhotonMCLabels = nLabels;}
61                 Int_t GetNCaloPhotonMCLabels(){return fNCaloPhotonMCLabels;}
62         Int_t GetNCaloPhotonMotherMCLabels(){return fNCaloPhotonMotherMCLabels;}
63                 void SetCaloPhotonMCFlags(AliStack *MCStack);
64                 void SetCaloPhotonMCFlagsAOD(AliVEvent* event);
65                 void SetCaloClusterRef(Long_t ref){fCaloClusterRef = ref;}
66                 Long_t GetCaloClusterRef()const {return fCaloClusterRef;}
67                 
68                 //Calo cluster MC identifiers
69                 Bool_t IsLargestComponentPhoton(){return fCaloPhotonMCFlags&kIsPhoton;}                                         // largest contribution to cluster is photon
70                 Bool_t IsLargestComponentElectron(){return fCaloPhotonMCFlags&kIsElectron;}                                     // largest contribution to cluster is electron
71                 Bool_t IsConversion(){return fCaloPhotonMCFlags&kIsConversion;}                                                         // largest contribution to cluster is converted electron
72                 Bool_t IsConversionFullyContained(){return fCaloPhotonMCFlags&kIsConversionFullyContained;}     // largest contribution to cluster is converted electron & other electron has been found in cluster as well
73                 Bool_t IsMerged(){return fCaloPhotonMCFlags&kIsMerged;}                                                                         // largest contribution to cluster is photon, second photon or electron from dalitz decay is found in cluster as well
74                 Bool_t IsMergedPartConv(){return fCaloPhotonMCFlags&kIsMergedPartConv;}                                         // cluster contains more than 1 particle belonging to the same mother particle (i.e. pi0, eta ...) 
75                                                                                                                                                                                                         // & at least one of the decays was a conversion
76                 Bool_t IsDalitz(){return fCaloPhotonMCFlags&kIsDalitz;}                                                                         // cluster contains particle from Dalitz decay
77                 Bool_t IsDalitzMerged(){return fCaloPhotonMCFlags&kIsDalitzMerged;}                                                     // cluster contains particle from Dalitz decay & more than one particle of this decay is contained in cluster
78                 Bool_t IsPhotonWithElecMother(){return fCaloPhotonMCFlags&kIsPhotonWithElecMother;}                     // largest contribution to cluster is photon which stems from an electron (i.e. radiation)
79                 Bool_t IsShower(){return fCaloPhotonMCFlags&kIsShower;}                                                                         // largest contribution to cluster seems to stem from a shower
80                 Bool_t IsEMNonLeading(){return !(fCaloPhotonMCFlags&kIsPhoton) && !(fCaloPhotonMCFlags&kIsElectron);} // largest contribution is from hadron
81         Bool_t IsSubLeadingEM(){return fCaloPhotonMCFlags&kIsSubLeadingEM;}                         // cluster contains at least one electron or photon from a pi0 or eta in subleading contribution
82                 
83                 Bool_t IsTrueConvertedPhoton() {
84                         if (!fCaloPhoton && fCaloPhotonMCFlags == 1) return kTRUE;
85                                 else return kFALSE;
86                 }
87                 
88                 Float_t fDCArPrimVtx;
89                 Float_t fDCAzPrimVtx;
90                 Bool_t fCaloPhoton;
91                 Long_t fCaloClusterRef;
92                 Int_t fNCaloPhotonMCLabels;
93         Int_t fNCaloPhotonMotherMCLabels;
94         Int_t fCaloPhotonMCFlags;
95         Int_t fCaloPhotonMCLabels[20];
96         Int_t fCaloPhotonMotherMCLabels[20];
97                 
98         
99         ClassDef(AliAODConversionPhoton,4)
100 };
101
102
103 #endif
104
105
106