TENDER becomes Tender, removing .so
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAODConversionPhoton.h
CommitLineData
2eedd4ed 1#ifndef ALIAODCONVERSIONPHOTON_H
2#define ALIAODCONVERSIONPHOTON_H
3
4#include "AliConversionPhotonBase.h"
5#include "AliKFConversionPhoton.h"
6#include "AliAODConversionParticle.h"
7
8class AliAODConversionPhoton : public AliAODConversionParticle, public AliConversionPhotonBase {
9
fd94f234 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,
cc579963 15 kIsPhotonWithElecMother = 0x100, kIsShower = 0x200, kIsSubLeadingEM= 0x400
fd94f234 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
cc579963 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(); }
fd94f234 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
e764f3ba 48 void SetIsTrueConvertedPhoton(){
49 fCaloPhoton = 0;
50 fCaloPhotonMCFlags = 1;
51 }
52
fd94f234 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;}
cc579963 62 Int_t GetNCaloPhotonMotherMCLabels(){return fNCaloPhotonMotherMCLabels;}
fd94f234 63 void SetCaloPhotonMCFlags(AliStack *MCStack);
64 void SetCaloPhotonMCFlagsAOD(AliVEvent* event);
d53bf4ac 65 void SetCaloClusterRef(Long_t ref){fCaloClusterRef = ref;}
66 Long_t GetCaloClusterRef()const {return fCaloClusterRef;}
fd94f234 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
cc579963 81 Bool_t IsSubLeadingEM(){return fCaloPhotonMCFlags&kIsSubLeadingEM;} // cluster contains at least one electron or photon from a pi0 or eta in subleading contribution
fd94f234 82
e764f3ba 83 Bool_t IsTrueConvertedPhoton() {
84 if (!fCaloPhoton && fCaloPhotonMCFlags == 1) return kTRUE;
85 else return kFALSE;
86 }
87
fd94f234 88 Float_t fDCArPrimVtx;
89 Float_t fDCAzPrimVtx;
90 Bool_t fCaloPhoton;
d53bf4ac 91 Long_t fCaloClusterRef;
fd94f234 92 Int_t fNCaloPhotonMCLabels;
cc579963 93 Int_t fNCaloPhotonMotherMCLabels;
94 Int_t fCaloPhotonMCFlags;
95 Int_t fCaloPhotonMCLabels[20];
96 Int_t fCaloPhotonMotherMCLabels[20];
fd94f234 97
98
e764f3ba 99 ClassDef(AliAODConversionPhoton,4)
2eedd4ed 100};
101
102
103#endif
104
105
106