]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/GammaConv/AliAODConversionPhoton.h
- fixed MC routines in CaloConv task, added corresponding addtasks
[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,
15 kIsPhotonWithElecMother = 0x100, kIsShower = 0x200
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 Float_t GetDCAzToPrimVtx()const {return fDCAzPrimVtx;}
49 Float_t GetDCArToPrimVtx()const {return fDCArPrimVtx;}
50
51 void SetIsCaloPhoton(){fCaloPhoton =1;}
52 Bool_t GetIsCaloPhoton(){return fCaloPhoton;}
53 void SetCaloPhotonMCLabel(Int_t i, Int_t labelCaloPhoton){fCaloPhotonMCLabels[i] = labelCaloPhoton;}
54 Int_t GetCaloPhotonMCLabel(Int_t i){return fCaloPhotonMCLabels[i];}
55 void SetNCaloPhotonMCLabels(Int_t nLabels){fNCaloPhotonMCLabels = nLabels;}
56 Int_t GetNCaloPhotonMCLabels(){return fNCaloPhotonMCLabels;}
57 void SetCaloPhotonMCFlags(AliStack *MCStack);
58 void SetCaloPhotonMCFlagsAOD(AliVEvent* event);
59
60 //Calo cluster MC identifiers
61 Bool_t IsLargestComponentPhoton(){return fCaloPhotonMCFlags&kIsPhoton;} // largest contribution to cluster is photon
62 Bool_t IsLargestComponentElectron(){return fCaloPhotonMCFlags&kIsElectron;} // largest contribution to cluster is electron
63 Bool_t IsConversion(){return fCaloPhotonMCFlags&kIsConversion;} // largest contribution to cluster is converted electron
64 Bool_t IsConversionFullyContained(){return fCaloPhotonMCFlags&kIsConversionFullyContained;} // largest contribution to cluster is converted electron & other electron has been found in cluster as well
65 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
66 Bool_t IsMergedPartConv(){return fCaloPhotonMCFlags&kIsMergedPartConv;} // cluster contains more than 1 particle belonging to the same mother particle (i.e. pi0, eta ...)
67 // & at least one of the decays was a conversion
68 Bool_t IsDalitz(){return fCaloPhotonMCFlags&kIsDalitz;} // cluster contains particle from Dalitz decay
69 Bool_t IsDalitzMerged(){return fCaloPhotonMCFlags&kIsDalitzMerged;} // cluster contains particle from Dalitz decay & more than one particle of this decay is contained in cluster
70 Bool_t IsPhotonWithElecMother(){return fCaloPhotonMCFlags&kIsPhotonWithElecMother;} // largest contribution to cluster is photon which stems from an electron (i.e. radiation)
71 Bool_t IsShower(){return fCaloPhotonMCFlags&kIsShower;} // largest contribution to cluster seems to stem from a shower
72 Bool_t IsEMNonLeading(){return !(fCaloPhotonMCFlags&kIsPhoton) && !(fCaloPhotonMCFlags&kIsElectron);} // largest contribution is from hadron
73
74
75 Float_t fDCArPrimVtx;
76 Float_t fDCAzPrimVtx;
77 Bool_t fCaloPhoton;
78 Int_t fNCaloPhotonMCLabels;
79 Int_t fCaloPhotonMCFlags;
80 Int_t fCaloPhotonMCLabels[50];
81
82
83 ClassDef(AliAODConversionPhoton,3)
2eedd4ed 84};
85
86
87#endif
88
89
90