]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/PHOSTasks/PHOS_pp_pi0/AliCaloPhoton.h
Added to PHOS AliCaloPhoton.h, functionality for having it remember originating cluster.
[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
be9b0afa 16class AliVCluster;
dfff4b29 17
18#include "TLorentzVector.h"
19
20class AliCaloPhoton :public TLorentzVector{
21
22 public:
23
24 AliCaloPhoton() ;
25 AliCaloPhoton(Double_t px,Double_t py,Double_t pz,Double_t E) ;
26 ~AliCaloPhoton(){}
27
28 const TLorentzVector * GetMomV2()const{return &fMomV2;}
da60a9d4 29 Double_t EMCx(void)const {return fX;}
30 Double_t EMCy(void)const {return fY;}
dfff4b29 31 Double_t EMCz(void)const {return fZ;}
32 Int_t Module(void)const{return fModule;}
33 Int_t DistToBad()const {return fBadDist ;}
34 Int_t GetNCells()const { return fNCells ;}
35
36 Bool_t IsDispOK(void)const {return fDisp;}
da60a9d4 37 Bool_t IsDisp2OK(void)const {return fDisp2;} //stricter cut
dfff4b29 38 Bool_t IsTOFOK(void)const {return fTof;}
39 Bool_t IsCPVOK(void)const {return fCpv;}
2cde7444 40 Bool_t IsCPV2OK(void)const {return fCpv2;}
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
da60a9d4 46 Bool_t IsntUnfolded()const{return fUnfolded;}
dfff4b29 47 Int_t IsConvertedPartner(){ if(fConvertedPartner == 1) return 1; else return 0; }
7063ee4d 48 Double_t GetWeight(void){return fWeight;}
49
50 //ConvertedPair bit is set for events when photon's FirstMother is not e+/e- but pi0, but after pi0 decayed
dfff4b29 51//there is conversion of one or both of the photons and results of their conversion are registered by PHOS.
52//This process is marked as tagged photons but actually the energy of photons is changed and pi0 can't be
53//correctly found.
54 Int_t IsConverted(){ if(fConverted == 1) return 1; else return 0; }
55//Converted bit is set if this photon originate from e+/e- conversion on medium
56 Int_t IsPi0Decay(){ if(fPi0Decayflag == 1) return 1; else return 0; }
57//Pi0Decayflag is set if this photon originate from pi0 decay
58 void Pi0Decay(Int_t flag){ fPi0Decayflag=flag; }
59 void Pi0Id(Int_t id){ fPi0Id=id; }
60//Id of pi0 from which this photon is decayed (to check if 2 photons originate from the same pi0 or not)
61
62
63 void SetMomV2(TLorentzVector * p){fMomV2=(*p);}
64 void SetNCells(Int_t n){fNCells=n;}
65 void SetConverted(Int_t flag){ fConverted=flag; }
66 Int_t ComparePi0Ids( AliCaloPhoton *phot) { if(AliCaloPhoton::fPi0Id!=0 && (*phot).fPi0Id !=0 && AliCaloPhoton::fPi0Id == (*phot).fPi0Id) return 1; else return 0; }
67 void SetConvertedPartner(Int_t flag){ fConvertedPartner=flag; }
68 void SetPhoton(Int_t flag){ fIsPhoton=flag; }
da60a9d4 69 void SetDispBit(Bool_t chi2){fDisp = chi2 ;}
2cde7444 70 void SetDisp2Bit(Bool_t chi2){fDisp2 = chi2 ;}
dfff4b29 71 void SetTOFBit(Bool_t tof){fTof = tof ;}
72 void SetCPVBit(Bool_t cpv){fCpv = cpv; }
2cde7444 73 void SetCPV2Bit(Bool_t cpv){fCpv2 = cpv; }
dfff4b29 74 void SetPCAPID(Bool_t pca){fPCA = pca;}
75 void SetTrig(Bool_t trig){fTrig=trig;}
76 void SetEMCx(Double_t x){fX = x ;}
77 void SetEMCy(Double_t y){fY = y ;}
78 void SetEMCz(Double_t z){fZ = z ;}
79 void SetModule(Int_t mod){fModule = mod ;}
80 void SetDistToBad(Int_t dist){fBadDist=dist;}
81 void SetTagged(Bool_t bit){fIsTagged=bit;}
82 void SetTagged(Bool_t bit,Int_t i,Int_t k){fIsTagged_reg[i][k]=bit;}
83 void SetIsolated(Bool_t bit){fIsIsolated=bit;}
84 void SetPartnerPt(Double_t pt){fPartnerPt=pt;}
85 void SetPrimary(Int_t label){fPrimary=label;}
da60a9d4 86 void SetUnfolded(Bool_t wasNotUnfolded){fUnfolded=wasNotUnfolded;}
7063ee4d 87 void SetWeight(Double_t w){fWeight=w;}
da60a9d4 88
be9b0afa 89 void SetCluster(AliVCluster* cluster) { fCluster = cluster; }
90 AliVCluster* GetCluster() { return fCluster; }
91
da60a9d4 92 void SetLambdas(Double_t l1,Double_t l2){fLambda0=l1; fLambda1=l2;}
93 Double_t GetLambda1(void){return fLambda0;}
94 Double_t GetLambda2(void){return fLambda1;}
95
dfff4b29 96 Int_t GetPrimary(){return fPrimary;}
97 Double_t GetPartnerPt(){return fPartnerPt;}
98private:
99 TLorentzVector fMomV2 ; //Alternative momentum
100 Bool_t fDisp ; //Dispersion bit
2cde7444 101 Bool_t fDisp2 ; //Strict Dispersion bit
dfff4b29 102 Bool_t fTof ; //TOF bit
103 Bool_t fCpv ; //Charged bit
2cde7444 104 Bool_t fCpv2 ; //Strict Charged bit
dfff4b29 105 Bool_t fPCA ; //Principal Component Analysis bit
106 Bool_t fTrig ; //If this photon fired trigger
107 Bool_t fIsTagged; //If it is tagged
108 Bool_t fIsTagged_reg[10][20]; //If it is tagged
109 Bool_t fIsIsolated ; //it is isolated
110 Bool_t fIsPhoton; //If it is really photon or not
da60a9d4 111 Bool_t fUnfolded; //True if was not unfolded
dfff4b29 112 Double_t fX ; //Cluster coordinates in ALICE ref system
113 Double_t fY ; //Cluster coordinates in ALICE ref system
114 Double_t fZ ; //Cluster coordinates in ALICE ref system
da60a9d4 115 Double_t fLambda0 ; //Short and
116 Double_t fLambda1 ; //Long dispersion axis
dfff4b29 117 Int_t fModule ; //Module number
118 Int_t fBadDist ; //Distance to bad module in module units
119 Int_t fNCells ; //Number of cells in cluster
120 Int_t fPi0Decayflag; //if this photon is from pi0 decay (from simulation)
121 Int_t fPi0Id;
122 Int_t fConverted; //If this photon originated from convertion on material (i.e. its primary is electron)
123 Int_t fConvertedPartner;
124 Double_t fPartnerPt;
7063ee4d 125 Double_t fWeight ; //Weight of parent particle
dfff4b29 126 Int_t fPrimary; //Primary label
be9b0afa 127 AliVCluster* fCluster; //! Originating Cluster the Photon Candidate is based on
dfff4b29 128
be9b0afa 129 ClassDef(AliCaloPhoton,4);
dfff4b29 130
131};
132
133#endif // #ifdef ALICALOPHOTON_H
134
135