ROOT logo
#ifndef ALICALOPHOTON_H
#define ALICALOPHOTON_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice     */
/* $Id$ */
 
//_________________________________________________________________________
// Class to fill two-photon invariant mass hisograms
// to be used to extract pi0 raw yield.
//
//-- Author: Dmitri Peressounko (RRC "KI")
// This class contains all (minimal) necessary information about photon to 
// calculate invarint mass distr for pi0
// and for tagging and isolation analysis

class AliVCluster;

#include "TLorentzVector.h"

class AliCaloPhoton :public TLorentzVector{
  
 public:
  
  AliCaloPhoton() ;
  AliCaloPhoton(Double_t px,Double_t py,Double_t pz,Double_t E) ; 
  ~AliCaloPhoton(){} 

   const TLorentzVector * GetMomV2()const{return &fMomV2;}
   Int_t    DistToBad() const {return fBadDist ;}
   Double_t EMCx(void)  const {return fX;}
   Double_t EMCy(void)  const {return fY;}
   Double_t EMCz(void)  const {return fZ;}
   Int_t    Module(void)const {return fModule;}
   Int_t    GetBC(void) const {return fBC;}
   Int_t    GetFiducialArea(void) const {return fFiducialArea ;}
   Int_t    GetIsolationTag(void) const {return fIsolationTag ;}
   Double_t GetLambda1(void) const {return fLambda0;}
   Double_t GetLambda2(void) const {return fLambda1;}
   Int_t    GetNCells() const { return fNCells ;} 
   Int_t    GetPrimary()const {return fPrimary;}
   Int_t    GetPrimaryAtVertex()  const {return fPrimaryAtVertex;}
   Double_t GetPartnerPt(void)    const {return fPartnerPt;}  
   Int_t    GetTagInfo(void) const {return fTagInfo;}
   Double_t GetTime(void)    const {return fTime ;}
   Double_t GetWeight(void)  const {return fWeight;}

   Int_t    IsConvertedPartner() const { if(fConvertedPartner == 1) return 1; else return 0; }
   Bool_t   IsCPVOK(void)   const {return fCpv;}
   Bool_t   IsCPV2OK(void)  const {return fCpv2;}
   Bool_t   IsDispOK(void)  const {return fDisp;}
   Bool_t   IsDisp2OK(void) const {return fDisp2;} //stricter cut
   Bool_t   IsIsolated(void)const {return fIsIsolated ;}
   Bool_t   IsPhoton() const {return fIsPhoton ;} //check if this particle is indeed photon (this bit is set with MC stack info
   Bool_t   IsPIDOK(const Int_t ipid) const ;
   Bool_t   IsTagged(void)  const {return fIsTagged ;} //check if this photon is tagged
   Bool_t   IsTagged(Int_t i,Int_t k) const {return fIsTagged_reg[i][k] ;} //check if this photon is tagged
   Bool_t   IsTOFOK(void)   const {return fTof;}
   Bool_t   IsTrig(void)    const{ return fTrig ; }
   Bool_t   IsntUnfolded(void)const{return fUnfolded;}

   //ConvertedPair bit is set for events when photon's FirstMother is not e+/e- but pi0, but after pi0 decayed
//there is conversion of one or both of the photons and results of their conversion are registered by PHOS.
//This process is marked as tagged photons but actually the energy of photons is changed and pi0 can't be
//correctly found.
   Int_t IsConverted(void) const { if(fConverted == 1) return 1; else return 0; }
//Converted bit is set if this photon originate from e+/e- conversion on medium
   Int_t IsPi0Decay(void) const { if(fPi0Decayflag == 1) return 1; else return 0; }
//Pi0Decayflag is set if this photon originate from pi0 decay
   void Pi0Decay(Int_t flag){ fPi0Decayflag=flag; }
   void Pi0Id(Int_t id){ fPi0Id=id; }
//Id of pi0 from which this photon is decayed (to check if 2 photons originate from the same pi0 or not)

   Int_t ComparePi0Ids( AliCaloPhoton *phot) { if(AliCaloPhoton::fPi0Id!=0 && (*phot).fPi0Id !=0 && AliCaloPhoton::fPi0Id == (*phot).fPi0Id) return 1; else return 0; }

   void SetBC(Int_t bc){fBC = bc;}
   void SetCluster(AliVCluster* cluster) { fCluster = cluster; }
   void SetConverted(Int_t flag){ fConverted=flag; }
   void SetConvertedPartner(Int_t flag){ fConvertedPartner=flag; }
   void SetCPVBit(Bool_t cpv){fCpv = cpv; }
   void SetCPV2Bit(Bool_t cpv){fCpv2 = cpv; }
   void SetDispBit(Bool_t chi2){fDisp = chi2 ;} 
   void SetDisp2Bit(Bool_t chi2){fDisp2 = chi2 ;} 
   void SetDistToBad(Int_t dist){fBadDist=dist;} 
   void SetEMCx(Double_t x){fX = x ;} 
   void SetEMCy(Double_t y){fY = y ;} 
   void SetEMCz(Double_t z){fZ = z ;} 
   void SetFiducialArea(Int_t a){fFiducialArea=a ;}
   void SetIsolationTag(Int_t tag){fIsolationTag=tag ;}
   void SetIsolated(Bool_t bit){fIsIsolated=bit;}
   void SetLambdas(Double_t l1,Double_t l2){fLambda0=l1; fLambda1=l2;}
   void SetModule(Int_t mod){fModule = mod ;} 
   void SetMomV2(TLorentzVector * p){fMomV2=(*p);}
   void SetNCells(Int_t n){fNCells=n;}
   void SetPartnerPt(Double_t pt){fPartnerPt=pt;}
   void SetPCAPID(Bool_t pca){fPCA = pca;}
   void SetPhoton(Int_t flag){ fIsPhoton=flag; }
   void SetPrimary(Int_t label){fPrimary=label;}
   void SetPrimaryAtVertex(Int_t label){fPrimaryAtVertex=label;}
   void SetTagged(Bool_t bit){fIsTagged=bit;}
   void SetTagged(Bool_t bit,Int_t i,Int_t k){fIsTagged_reg[i][k]=bit;}
   void SetTagInfo(Int_t bits){fTagInfo=bits;}
   void SetTime(Double_t t) {fTime=t ;}
   void SetTOFBit(Bool_t tof){fTof = tof ;} 
   void SetTrig(Bool_t trig){fTrig=trig;}
   void SetUnfolded(Bool_t wasNotUnfolded){fUnfolded=wasNotUnfolded;} 
   void SetWeight(Double_t w){fWeight=w;}

   AliVCluster* GetCluster() { return fCluster; }

private:
  AliCaloPhoton(const AliCaloPhoton&); // not implemented
  AliCaloPhoton& operator=(const AliCaloPhoton&);
  
  TLorentzVector fMomV2 ; //Alternative momentum
  Bool_t    fDisp ;   //Dispersion bit
  Bool_t    fDisp2 ;  //Strict Dispersion bit
  Bool_t    fTof ;    //TOF bit
  Bool_t    fCpv ;    //Charged bit
  Bool_t    fCpv2 ;   //Strict Charged bit
  Bool_t    fPCA ;    //Principal Component Analysis bit
  Bool_t    fTrig ;      //If this photon fired trigger
  Bool_t    fIsTagged;   //If it is tagged 
  Bool_t    fIsTagged_reg[10][20];   //If it is tagged 
  Bool_t    fIsIsolated ; //it is isolated
  Bool_t    fIsPhoton; //If it is really photon or not
  Bool_t    fUnfolded;  //True if was not unfolded
  Int_t     fModule ;   //Module number
  Int_t     fBC ;       //Bunch crossing number (BC=0 is main-main collision)
  Int_t     fBadDist ;  //Distance to bad module in module units
  Int_t     fNCells ;   //Number of cells in cluster
  Int_t     fFiducialArea ; //class of fiducial areas
  Int_t     fPi0Decayflag; //if this photon is from pi0 decay (from simulation)
  Int_t     fPi0Id;
  Int_t     fConverted; //If this photon originated from convertion on material (i.e. its primary is electron)
  Int_t	    fConvertedPartner;
  Int_t     fIsolationTag ;
  Int_t     fTagInfo ;
  Int_t     fPrimary;   //Primary entered PHOS
  Int_t     fPrimaryAtVertex;   //Primary at vertex
  Double_t  fX ;        //Cluster coordinates in ALICE ref system 
  Double_t  fY ;        //Cluster coordinates in ALICE ref system
  Double_t  fZ ;        //Cluster coordinates in ALICE ref system
  Double_t  fLambda0 ;  //Short and 
  Double_t  fLambda1 ;  //Long dispersion axis
  Double_t  fTime ;     //time of the cluster
  Double_t  fPartnerPt;
  Double_t  fWeight ;   //Weight of parent particle
  AliVCluster* fCluster; //! Originating Cluster the Photon Candidate is based on

  ClassDef(AliCaloPhoton,7);

};

#endif // #ifdef ALICALOPHOTON_H

  
 AliCaloPhoton.h:1
 AliCaloPhoton.h:2
 AliCaloPhoton.h:3
 AliCaloPhoton.h:4
 AliCaloPhoton.h:5
 AliCaloPhoton.h:6
 AliCaloPhoton.h:7
 AliCaloPhoton.h:8
 AliCaloPhoton.h:9
 AliCaloPhoton.h:10
 AliCaloPhoton.h:11
 AliCaloPhoton.h:12
 AliCaloPhoton.h:13
 AliCaloPhoton.h:14
 AliCaloPhoton.h:15
 AliCaloPhoton.h:16
 AliCaloPhoton.h:17
 AliCaloPhoton.h:18
 AliCaloPhoton.h:19
 AliCaloPhoton.h:20
 AliCaloPhoton.h:21
 AliCaloPhoton.h:22
 AliCaloPhoton.h:23
 AliCaloPhoton.h:24
 AliCaloPhoton.h:25
 AliCaloPhoton.h:26
 AliCaloPhoton.h:27
 AliCaloPhoton.h:28
 AliCaloPhoton.h:29
 AliCaloPhoton.h:30
 AliCaloPhoton.h:31
 AliCaloPhoton.h:32
 AliCaloPhoton.h:33
 AliCaloPhoton.h:34
 AliCaloPhoton.h:35
 AliCaloPhoton.h:36
 AliCaloPhoton.h:37
 AliCaloPhoton.h:38
 AliCaloPhoton.h:39
 AliCaloPhoton.h:40
 AliCaloPhoton.h:41
 AliCaloPhoton.h:42
 AliCaloPhoton.h:43
 AliCaloPhoton.h:44
 AliCaloPhoton.h:45
 AliCaloPhoton.h:46
 AliCaloPhoton.h:47
 AliCaloPhoton.h:48
 AliCaloPhoton.h:49
 AliCaloPhoton.h:50
 AliCaloPhoton.h:51
 AliCaloPhoton.h:52
 AliCaloPhoton.h:53
 AliCaloPhoton.h:54
 AliCaloPhoton.h:55
 AliCaloPhoton.h:56
 AliCaloPhoton.h:57
 AliCaloPhoton.h:58
 AliCaloPhoton.h:59
 AliCaloPhoton.h:60
 AliCaloPhoton.h:61
 AliCaloPhoton.h:62
 AliCaloPhoton.h:63
 AliCaloPhoton.h:64
 AliCaloPhoton.h:65
 AliCaloPhoton.h:66
 AliCaloPhoton.h:67
 AliCaloPhoton.h:68
 AliCaloPhoton.h:69
 AliCaloPhoton.h:70
 AliCaloPhoton.h:71
 AliCaloPhoton.h:72
 AliCaloPhoton.h:73
 AliCaloPhoton.h:74
 AliCaloPhoton.h:75
 AliCaloPhoton.h:76
 AliCaloPhoton.h:77
 AliCaloPhoton.h:78
 AliCaloPhoton.h:79
 AliCaloPhoton.h:80
 AliCaloPhoton.h:81
 AliCaloPhoton.h:82
 AliCaloPhoton.h:83
 AliCaloPhoton.h:84
 AliCaloPhoton.h:85
 AliCaloPhoton.h:86
 AliCaloPhoton.h:87
 AliCaloPhoton.h:88
 AliCaloPhoton.h:89
 AliCaloPhoton.h:90
 AliCaloPhoton.h:91
 AliCaloPhoton.h:92
 AliCaloPhoton.h:93
 AliCaloPhoton.h:94
 AliCaloPhoton.h:95
 AliCaloPhoton.h:96
 AliCaloPhoton.h:97
 AliCaloPhoton.h:98
 AliCaloPhoton.h:99
 AliCaloPhoton.h:100
 AliCaloPhoton.h:101
 AliCaloPhoton.h:102
 AliCaloPhoton.h:103
 AliCaloPhoton.h:104
 AliCaloPhoton.h:105
 AliCaloPhoton.h:106
 AliCaloPhoton.h:107
 AliCaloPhoton.h:108
 AliCaloPhoton.h:109
 AliCaloPhoton.h:110
 AliCaloPhoton.h:111
 AliCaloPhoton.h:112
 AliCaloPhoton.h:113
 AliCaloPhoton.h:114
 AliCaloPhoton.h:115
 AliCaloPhoton.h:116
 AliCaloPhoton.h:117
 AliCaloPhoton.h:118
 AliCaloPhoton.h:119
 AliCaloPhoton.h:120
 AliCaloPhoton.h:121
 AliCaloPhoton.h:122
 AliCaloPhoton.h:123
 AliCaloPhoton.h:124
 AliCaloPhoton.h:125
 AliCaloPhoton.h:126
 AliCaloPhoton.h:127
 AliCaloPhoton.h:128
 AliCaloPhoton.h:129
 AliCaloPhoton.h:130
 AliCaloPhoton.h:131
 AliCaloPhoton.h:132
 AliCaloPhoton.h:133
 AliCaloPhoton.h:134
 AliCaloPhoton.h:135
 AliCaloPhoton.h:136
 AliCaloPhoton.h:137
 AliCaloPhoton.h:138
 AliCaloPhoton.h:139
 AliCaloPhoton.h:140
 AliCaloPhoton.h:141
 AliCaloPhoton.h:142
 AliCaloPhoton.h:143
 AliCaloPhoton.h:144
 AliCaloPhoton.h:145
 AliCaloPhoton.h:146
 AliCaloPhoton.h:147
 AliCaloPhoton.h:148
 AliCaloPhoton.h:149
 AliCaloPhoton.h:150
 AliCaloPhoton.h:151
 AliCaloPhoton.h:152
 AliCaloPhoton.h:153
 AliCaloPhoton.h:154
 AliCaloPhoton.h:155
 AliCaloPhoton.h:156