Code used for pi0 Raa and v2 analysis in LHC10h
[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;}
28 Double_t EMCx(void)const {return fZ;}
29 Double_t EMCy(void)const {return fZ;}
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;}
2cde7444 36 Bool_t IsDisp2OK(void)const {return fDisp2;}
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;}
40 Bool_t IsntUnfolded(void){return fUnfolded;}
dfff4b29 41 Bool_t IsIsolated(void)const{return fIsIsolated ;}
42 Bool_t IsTagged(void) const{return fIsTagged ;} //check if this photon is tagged
43 Bool_t IsTagged(Int_t i,Int_t k) const{return fIsTagged_reg[i][k] ;} //check if this photon is tagged
44 Bool_t IsPIDOK(const Int_t ipid) const ;
45 Bool_t IsPhoton()const {return fIsPhoton ;} //check if this particle is indeed photon (this bit is set with MC stack info
46 Int_t IsConvertedPartner(){ if(fConvertedPartner == 1) return 1; else return 0; }
47//ConvertedPair bit is set for events when photon's FirstMother is not e+/e- but pi0, but after pi0 decayed
48//there is conversion of one or both of the photons and results of their conversion are registered by PHOS.
49//This process is marked as tagged photons but actually the energy of photons is changed and pi0 can't be
50//correctly found.
51 Int_t IsConverted(){ if(fConverted == 1) return 1; else return 0; }
52//Converted bit is set if this photon originate from e+/e- conversion on medium
53 Int_t IsPi0Decay(){ if(fPi0Decayflag == 1) return 1; else return 0; }
54//Pi0Decayflag is set if this photon originate from pi0 decay
55 void Pi0Decay(Int_t flag){ fPi0Decayflag=flag; }
56 void Pi0Id(Int_t id){ fPi0Id=id; }
57//Id of pi0 from which this photon is decayed (to check if 2 photons originate from the same pi0 or not)
58
59
60 void SetMomV2(TLorentzVector * p){fMomV2=(*p);}
61 void SetNCells(Int_t n){fNCells=n;}
62 void SetConverted(Int_t flag){ fConverted=flag; }
63 Int_t ComparePi0Ids( AliCaloPhoton *phot) { if(AliCaloPhoton::fPi0Id!=0 && (*phot).fPi0Id !=0 && AliCaloPhoton::fPi0Id == (*phot).fPi0Id) return 1; else return 0; }
64 void SetConvertedPartner(Int_t flag){ fConvertedPartner=flag; }
65 void SetPhoton(Int_t flag){ fIsPhoton=flag; }
2cde7444 66 void SetDispBit(Bool_t chi2){fDisp = chi2 ;}
67 void SetDisp2Bit(Bool_t chi2){fDisp2 = chi2 ;}
dfff4b29 68 void SetTOFBit(Bool_t tof){fTof = tof ;}
69 void SetCPVBit(Bool_t cpv){fCpv = cpv; }
2cde7444 70 void SetCPV2Bit(Bool_t cpv){fCpv2 = cpv; }
dfff4b29 71 void SetPCAPID(Bool_t pca){fPCA = pca;}
72 void SetTrig(Bool_t trig){fTrig=trig;}
73 void SetEMCx(Double_t x){fX = x ;}
74 void SetEMCy(Double_t y){fY = y ;}
75 void SetEMCz(Double_t z){fZ = z ;}
76 void SetModule(Int_t mod){fModule = mod ;}
77 void SetDistToBad(Int_t dist){fBadDist=dist;}
78 void SetTagged(Bool_t bit){fIsTagged=bit;}
79 void SetTagged(Bool_t bit,Int_t i,Int_t k){fIsTagged_reg[i][k]=bit;}
80 void SetIsolated(Bool_t bit){fIsIsolated=bit;}
81 void SetPartnerPt(Double_t pt){fPartnerPt=pt;}
82 void SetPrimary(Int_t label){fPrimary=label;}
2cde7444 83 void SetUnfolded(Bool_t unf){fUnfolded=unf ;}
84
dfff4b29 85 Int_t GetPrimary(){return fPrimary;}
86 Double_t GetPartnerPt(){return fPartnerPt;}
87private:
88 TLorentzVector fMomV2 ; //Alternative momentum
89 Bool_t fDisp ; //Dispersion bit
2cde7444 90 Bool_t fDisp2 ; //Strict Dispersion bit
dfff4b29 91 Bool_t fTof ; //TOF bit
92 Bool_t fCpv ; //Charged bit
2cde7444 93 Bool_t fCpv2 ; //Strict Charged bit
dfff4b29 94 Bool_t fPCA ; //Principal Component Analysis bit
95 Bool_t fTrig ; //If this photon fired trigger
96 Bool_t fIsTagged; //If it is tagged
97 Bool_t fIsTagged_reg[10][20]; //If it is tagged
98 Bool_t fIsIsolated ; //it is isolated
99 Bool_t fIsPhoton; //If it is really photon or not
2cde7444 100 Bool_t fUnfolded; //Wheter cluster was unfolded
dfff4b29 101 Double_t fX ; //Cluster coordinates in ALICE ref system
102 Double_t fY ; //Cluster coordinates in ALICE ref system
103 Double_t fZ ; //Cluster coordinates in ALICE ref system
104 Int_t fModule ; //Module number
105 Int_t fBadDist ; //Distance to bad module in module units
106 Int_t fNCells ; //Number of cells in cluster
107 Int_t fPi0Decayflag; //if this photon is from pi0 decay (from simulation)
108 Int_t fPi0Id;
109 Int_t fConverted; //If this photon originated from convertion on material (i.e. its primary is electron)
110 Int_t fConvertedPartner;
111 Double_t fPartnerPt;
112 Int_t fPrimary; //Primary label
113
114 ClassDef(AliCaloPhoton,1)
115
116};
117
118#endif // #ifdef ALICALOPHOTON_H
119
120