]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/PHOSTasks/PHOS_pp_pi0/AliCaloPhoton.cxx
Updates for bunch crossing pileup, event selection, histogramming.
[u/mrichter/AliRoot.git] / PWGGA / PHOSTasks / PHOS_pp_pi0 / AliCaloPhoton.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15 /* $Id$ */
16  
17 //_________________________________________________________________________
18 // Minimal class to store photon infomation for pi0, tagged and isolated photon analysis
19 //
20 //-- Author: Dmitri Peressounko (RRC "KI")
21
22 #include "AliCaloPhoton.h"
23 ClassImp(AliCaloPhoton) 
24 //===============================================
25 AliCaloPhoton::AliCaloPhoton() :
26   TLorentzVector(),
27   fMomV2(),
28   fDisp(0),
29   fDisp2(0),
30   fTof(0),
31   fCpv(0),
32   fCpv2(0),
33   fPCA(0),
34   fTrig(0),
35   fIsTagged(0),
36   fIsIsolated(0),
37   fIsPhoton(0),
38   fUnfolded(0),
39   fX(0.),
40   fY(0.),
41   fZ(0.),
42   fLambda0(0.),
43   fLambda1(0.),
44   fTime(0.),
45   fModule(0),
46   fBC(0),
47   fBadDist(0),
48   fNCells(0),
49   fPi0Decayflag(0),
50   fPi0Id(0),
51   fConverted(0),
52   fConvertedPartner(0),
53   fPartnerPt(0),
54   fWeight(1.),
55   fPrimary(0),
56   fCluster(0x0)
57 {
58
59
60
61 //===============================================
62 AliCaloPhoton::AliCaloPhoton(Double_t px,Double_t py,Double_t pz,Double_t energy):
63   TLorentzVector(px,py,pz,energy),
64   fMomV2(),
65   fDisp(0),
66   fDisp2(0),
67   fTof(0),
68   fCpv(0),
69   fCpv2(0),
70   fPCA(0),
71   fTrig(0),
72   fIsTagged(0),
73   fIsIsolated(0),
74   fIsPhoton(0),
75   fUnfolded(0),
76   fX(0.),
77   fY(0.),
78   fZ(0.),
79   fLambda0(0.),
80   fLambda1(0.),
81   fTime(0.),
82   fModule(0),
83   fBadDist(0),
84   fNCells(0),
85   fPi0Decayflag(0),
86   fPi0Id(0),
87   fConverted(0),
88   fConvertedPartner(0),
89   fPartnerPt(0),
90   fWeight(1.),
91   fPrimary(0),
92   fCluster(0x0)
93 {
94   
95 }
96 //===============================================
97 Bool_t AliCaloPhoton::IsPIDOK(Int_t ipid)const{
98   // returns true if photon satisfies given PID criterium
99   switch(ipid){
100   case 0: return kTRUE ; //No PID at all
101   case 1: return fPCA; //Overall PID calculated in AliPHOSPIDv1
102   case 2: return fDisp ;   //only dispersion cut
103   case 3: return fTof ;    //Only TOF cut
104   case 4: return fCpv ;    //Only CPV cut
105   case 5: return fDisp&&fTof ;  //Dispersion and TOF
106   case 6: return fDisp&&fCpv ;  //Dispersion and CPV
107   case 7: return fTof && fCpv;  //TOF and CPV
108   case 8: return fDisp&&fTof&&fCpv ; // all 3 cuts
109   default: return kFALSE ; //Not known combination
110   }
111 }