]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/PHOSTasks/PHOS_pp_pi0/AliCaloPhoton.cxx
Satoshi request: fTrig and fTime
[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   fBadDist(0),
47   fNCells(0),
48   fPi0Decayflag(0),
49   fPi0Id(0),
50   fConverted(0),
51   fConvertedPartner(0),
52   fPartnerPt(0),
53   fWeight(1.),
54   fPrimary(0),
55   fCluster(0x0)
56 {
57
58
59
60 //===============================================
61 AliCaloPhoton::AliCaloPhoton(Double_t px,Double_t py,Double_t pz,Double_t energy):
62   TLorentzVector(px,py,pz,energy),
63   fMomV2(),
64   fDisp(0),
65   fDisp2(0),
66   fTof(0),
67   fCpv(0),
68   fCpv2(0),
69   fPCA(0),
70   fTrig(0),
71   fIsTagged(0),
72   fIsIsolated(0),
73   fIsPhoton(0),
74   fUnfolded(0),
75   fX(0.),
76   fY(0.),
77   fZ(0.),
78   fLambda0(0.),
79   fLambda1(0.),
80   fTime(0.),
81   fModule(0),
82   fBadDist(0),
83   fNCells(0),
84   fPi0Decayflag(0),
85   fPi0Id(0),
86   fConverted(0),
87   fConvertedPartner(0),
88   fPartnerPt(0),
89   fWeight(1.),
90   fPrimary(0),
91   fCluster(0x0)
92 {
93   
94 }
95 //===============================================
96 Bool_t AliCaloPhoton::IsPIDOK(Int_t ipid)const{
97   // returns true if photon satisfies given PID criterium
98   switch(ipid){
99   case 0: return kTRUE ; //No PID at all
100   case 1: return fPCA; //Overall PID calculated in AliPHOSPIDv1
101   case 2: return fDisp ;   //only dispersion cut
102   case 3: return fTof ;    //Only TOF cut
103   case 4: return fCpv ;    //Only CPV cut
104   case 5: return fDisp&&fTof ;  //Dispersion and TOF
105   case 6: return fDisp&&fCpv ;  //Dispersion and CPV
106   case 7: return fTof && fCpv;  //TOF and CPV
107   case 8: return fDisp&&fTof&&fCpv ; // all 3 cuts
108   default: return kFALSE ; //Not known combination
109   }
110 }