]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/PHOSTasks/PHOS_pp_pi0/AliCaloPhoton.h
Added support for MC extension of Pi0Flow Task.
[u/mrichter/AliRoot.git] / PWGGA / PHOSTasks / PHOS_pp_pi0 / AliCaloPhoton.h
CommitLineData
dfff4b29 1#ifndef ALICALOPHOTON_H
2#define ALICALOPHOTON_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
898da7b3 5/* $Id$ */
dfff4b29 6
7//_________________________________________________________________________
8// Class to fill two-photon invariant mass hisograms
9// to be used to extract pi0 raw yield.
10//
11//-- Author: Dmitri Peressounko (RRC "KI")
12// This class contains all (minimal) necessary information about photon to
13// calculate invarint mass distr for pi0
14// and for tagging and isolation analysis
15
16
17#include "TLorentzVector.h"
18
19class AliCaloPhoton :public TLorentzVector{
20
21 public:
22
23 AliCaloPhoton() ;
24 AliCaloPhoton(Double_t px,Double_t py,Double_t pz,Double_t E) ;
25 ~AliCaloPhoton(){}
26
27 const TLorentzVector * GetMomV2()const{return &fMomV2;}
da60a9d4 28 Double_t EMCx(void)const {return fX;}
29 Double_t EMCy(void)const {return fY;}
dfff4b29 30 Double_t EMCz(void)const {return fZ;}
31 Int_t Module(void)const{return fModule;}
32 Int_t DistToBad()const {return fBadDist ;}
33 Int_t GetNCells()const { return fNCells ;}
34
35 Bool_t IsDispOK(void)const {return fDisp;}
da60a9d4 36 Bool_t IsDisp2OK(void)const {return fDisp2;} //stricter cut
dfff4b29 37 Bool_t IsTOFOK(void)const {return fTof;}
38 Bool_t IsCPVOK(void)const {return fCpv;}
2cde7444 39 Bool_t IsCPV2OK(void)const {return fCpv2;}
dfff4b29 40 Bool_t IsIsolated(void)const{return fIsIsolated ;}
41 Bool_t IsTagged(void) const{return fIsTagged ;} //check if this photon is tagged
42 Bool_t IsTagged(Int_t i,Int_t k) const{return fIsTagged_reg[i][k] ;} //check if this photon is tagged
43 Bool_t IsPIDOK(const Int_t ipid) const ;
44 Bool_t IsPhoton()const {return fIsPhoton ;} //check if this particle is indeed photon (this bit is set with MC stack info
da60a9d4 45 Bool_t IsntUnfolded()const{return fUnfolded;}
dfff4b29 46 Int_t IsConvertedPartner(){ if(fConvertedPartner == 1) return 1; else return 0; }
7063ee4d 47 Double_t GetWeight(void){return fWeight;}
48
49 //ConvertedPair bit is set for events when photon's FirstMother is not e+/e- but pi0, but after pi0 decayed
dfff4b29 50//there is conversion of one or both of the photons and results of their conversion are registered by PHOS.
51//This process is marked as tagged photons but actually the energy of photons is changed and pi0 can't be
52//correctly found.
53 Int_t IsConverted(){ if(fConverted == 1) return 1; else return 0; }
54//Converted bit is set if this photon originate from e+/e- conversion on medium
55 Int_t IsPi0Decay(){ if(fPi0Decayflag == 1) return 1; else return 0; }
56//Pi0Decayflag is set if this photon originate from pi0 decay
57 void Pi0Decay(Int_t flag){ fPi0Decayflag=flag; }
58 void Pi0Id(Int_t id){ fPi0Id=id; }
59//Id of pi0 from which this photon is decayed (to check if 2 photons originate from the same pi0 or not)
60
61
62 void SetMomV2(TLorentzVector * p){fMomV2=(*p);}
63 void SetNCells(Int_t n){fNCells=n;}
64 void SetConverted(Int_t flag){ fConverted=flag; }
65 Int_t ComparePi0Ids( AliCaloPhoton *phot) { if(AliCaloPhoton::fPi0Id!=0 && (*phot).fPi0Id !=0 && AliCaloPhoton::fPi0Id == (*phot).fPi0Id) return 1; else return 0; }
66 void SetConvertedPartner(Int_t flag){ fConvertedPartner=flag; }
67 void SetPhoton(Int_t flag){ fIsPhoton=flag; }
da60a9d4 68 void SetDispBit(Bool_t chi2){fDisp = chi2 ;}
2cde7444 69 void SetDisp2Bit(Bool_t chi2){fDisp2 = chi2 ;}
dfff4b29 70 void SetTOFBit(Bool_t tof){fTof = tof ;}
71 void SetCPVBit(Bool_t cpv){fCpv = cpv; }
2cde7444 72 void SetCPV2Bit(Bool_t cpv){fCpv2 = cpv; }
dfff4b29 73 void SetPCAPID(Bool_t pca){fPCA = pca;}
74 void SetTrig(Bool_t trig){fTrig=trig;}
75 void SetEMCx(Double_t x){fX = x ;}
76 void SetEMCy(Double_t y){fY = y ;}
77 void SetEMCz(Double_t z){fZ = z ;}
78 void SetModule(Int_t mod){fModule = mod ;}
79 void SetDistToBad(Int_t dist){fBadDist=dist;}
80 void SetTagged(Bool_t bit){fIsTagged=bit;}
81 void SetTagged(Bool_t bit,Int_t i,Int_t k){fIsTagged_reg[i][k]=bit;}
82 void SetIsolated(Bool_t bit){fIsIsolated=bit;}
83 void SetPartnerPt(Double_t pt){fPartnerPt=pt;}
84 void SetPrimary(Int_t label){fPrimary=label;}
da60a9d4 85 void SetUnfolded(Bool_t wasNotUnfolded){fUnfolded=wasNotUnfolded;}
7063ee4d 86 void SetWeight(Double_t w){fWeight=w;}
da60a9d4 87
88 void SetLambdas(Double_t l1,Double_t l2){fLambda0=l1; fLambda1=l2;}
89 Double_t GetLambda1(void){return fLambda0;}
90 Double_t GetLambda2(void){return fLambda1;}
91
dfff4b29 92 Int_t GetPrimary(){return fPrimary;}
93 Double_t GetPartnerPt(){return fPartnerPt;}
94private:
95 TLorentzVector fMomV2 ; //Alternative momentum
96 Bool_t fDisp ; //Dispersion bit
2cde7444 97 Bool_t fDisp2 ; //Strict Dispersion bit
dfff4b29 98 Bool_t fTof ; //TOF bit
99 Bool_t fCpv ; //Charged bit
2cde7444 100 Bool_t fCpv2 ; //Strict Charged bit
dfff4b29 101 Bool_t fPCA ; //Principal Component Analysis bit
102 Bool_t fTrig ; //If this photon fired trigger
103 Bool_t fIsTagged; //If it is tagged
104 Bool_t fIsTagged_reg[10][20]; //If it is tagged
105 Bool_t fIsIsolated ; //it is isolated
106 Bool_t fIsPhoton; //If it is really photon or not
da60a9d4 107 Bool_t fUnfolded; //True if was not unfolded
dfff4b29 108 Double_t fX ; //Cluster coordinates in ALICE ref system
109 Double_t fY ; //Cluster coordinates in ALICE ref system
110 Double_t fZ ; //Cluster coordinates in ALICE ref system
da60a9d4 111 Double_t fLambda0 ; //Short and
112 Double_t fLambda1 ; //Long dispersion axis
dfff4b29 113 Int_t fModule ; //Module number
114 Int_t fBadDist ; //Distance to bad module in module units
115 Int_t fNCells ; //Number of cells in cluster
116 Int_t fPi0Decayflag; //if this photon is from pi0 decay (from simulation)
117 Int_t fPi0Id;
118 Int_t fConverted; //If this photon originated from convertion on material (i.e. its primary is electron)
119 Int_t fConvertedPartner;
120 Double_t fPartnerPt;
7063ee4d 121 Double_t fWeight ; //Weight of parent particle
dfff4b29 122 Int_t fPrimary; //Primary label
123
7063ee4d 124 ClassDef(AliCaloPhoton,3)
dfff4b29 125
126};
127
128#endif // #ifdef ALICALOPHOTON_H
129
130