#include <Pi0Cut.h>
Inheritance diagram for UserPi0Cut:
Public Member Functions | |
UserPi0Cut (double MEBP=0.025, double MEEP=0.045, double MA=20., double TL=25., double MinM=0.12, double MaxM=0.15, double c=1e+10) | |
bool | operator() (CDPi0 &_this) |
bool | isGoodPhoton (EvtRecTrack *gTrk) |
bool | operator() (CDPi0 &iArg) const |
Static Public Member Functions | |
static void | SetForTrack (EvtRecEvent *_recEvt, EvtRecTrackCol *_recTrkCol) |
Public Attributes | |
double | MinEnergyOfBarrelPhoton |
double | MinEnergyOfEndcapPhoton |
double | MinAngle |
double | TimeLimit |
double | MinMass |
double | MaxMass |
double | Chisq |
Static Public Attributes | |
static EvtRecEvent * | recEvt = 0 |
static EvtRecTrackCol * | recTrkCol = 0 |
Definition at line 10 of file Pi0Cut.h.
UserPi0Cut::UserPi0Cut | ( | double | MEBP = 0.025 , |
|
double | MEEP = 0.045 , |
|||
double | MA = 20. , |
|||
double | TL = 25. , |
|||
double | MinM = 0.12 , |
|||
double | MaxM = 0.15 , |
|||
double | c = 1e+10 | |||
) | [inline] |
Definition at line 12 of file Pi0Cut.h.
00017 : MinEnergyOfBarrelPhoton(MEBP), MinEnergyOfEndcapPhoton(MEEP), 00018 MinAngle(MA), 00019 TimeLimit(TL), 00020 Chisq(c), 00021 MinMass(MinM), MaxMass(MaxM) 00022 {}
bool UserPi0Cut::isGoodPhoton | ( | EvtRecTrack * | gTrk | ) | [inline] |
Definition at line 43 of file Pi0Cut.h.
References DstEmcShower::cellId(), DstExtTrack::emcPosition(), EvtRecTrack::emcShower(), DstExtTrack::emcVolumeNumber(), DstEmcShower::energy(), EvtRecTrack::isEmcShowerValid(), ganga-rec::j, MinAngle, MinEnergyOfBarrelPhoton, MinEnergyOfEndcapPhoton, pi, recEvt, recTrkCol, DstEmcShower::time(), TimeLimit, EvtRecEvent::totalCharged(), DstEmcShower::x(), DstEmcShower::y(), and DstEmcShower::z().
Referenced by operator()().
00044 { 00045 if ( !gTrk->isEmcShowerValid() ) return false; 00046 00047 RecEmcShower *emcTrk = gTrk->emcShower(); 00048 //check time 00049 if(emcTrk->time() > TimeLimit) return false; 00050 //check energy 00051 int flag =(emcTrk->cellId() & 0x000F0000) >> 16; 00052 if ((flag == 1) && emcTrk->energy() < MinEnergyOfBarrelPhoton) return false; 00053 if ((flag == 0 || flag == 2) && emcTrk->energy() < MinEnergyOfEndcapPhoton) return false; 00054 //check angle 00055 Hep3Vector emcpos(emcTrk->x(), emcTrk->y(), emcTrk->z()); 00056 if (recEvt->totalCharged() > 0) 00057 { 00058 double dthe = 200.; 00059 double dphi = 200.; 00060 double dang1 = 200.; 00061 for (int j = 0; j < recEvt->totalCharged(); j++) { 00062 EvtRecTrackIterator jtTrk = recTrkCol->begin() + j; 00063 if ( !(*jtTrk)->isExtTrackValid() ) continue; 00064 RecExtTrack* extTrk = (*jtTrk)->extTrack(); 00065 if ( extTrk->emcVolumeNumber() == -1 ) continue; 00066 Hep3Vector extpos = extTrk->emcPosition(); 00067 double angd1 = extpos.angle(emcpos); 00068 double thed = extpos.theta() - emcpos.theta(); 00069 double phid = extpos.deltaPhi(emcpos); 00070 thed = fmod(thed+CLHEP::twopi+CLHEP::twopi+CLHEP::pi, CLHEP::twopi) - CLHEP::pi; 00071 phid = fmod(phid+CLHEP::twopi+CLHEP::twopi+CLHEP::pi, CLHEP::twopi) - CLHEP::pi; 00072 00073 if ( fabs(thed) < fabs(dthe) ) dthe = thed; 00074 if ( fabs(phid) < fabs(dphi) ) dphi = phid; 00075 if ( angd1 < dang1 ) dang1 = angd1; 00076 } 00077 if ( dang1 < 200 ) { 00078 dthe = dthe * 180 / (CLHEP::pi); 00079 dphi = dphi * 180 / (CLHEP::pi); 00080 dang1 = dang1 * 180 / (CLHEP::pi); 00081 if ( dang1 < MinAngle) return false; 00082 00083 00084 } // End of "dang1 < 200" IF 00085 00086 } // End of "recEv 00087 return true; 00088 }
bool DCSelectionFunction< CDPi0 >::operator() | ( | CDPi0 & | iArg | ) | const [inline, inherited] |
Implements DCSelectionFunction< CDPi0 >.
Definition at line 32 of file Pi0Cut.h.
References Chisq, EvtRecPi0::chisq(), EvtRecPi0::hiEnGamma(), isGoodPhoton(), EvtRecPi0::loEnGamma(), MaxMass, MinMass, CDPi0::navPi0(), and EvtRecPi0::unconMass().
00033 { 00034 EvtRecTrack* g1 = const_cast<EvtRecTrack*>(_this.navPi0()->hiEnGamma()); 00035 EvtRecTrack* g2 = const_cast<EvtRecTrack*>(_this.navPi0()->loEnGamma()); 00036 if(!isGoodPhoton(g1)) return false; 00037 if(!isGoodPhoton(g2)) return false; 00038 if(_this.navPi0()->chisq() > Chisq) return false; 00039 if(_this.navPi0()->unconMass() < MinMass || _this.navPi0()->unconMass() > MaxMass) return false; 00040 return true; 00041 }
static void UserPi0Cut::SetForTrack | ( | EvtRecEvent * | _recEvt, | |
EvtRecTrackCol * | _recTrkCol | |||
) | [inline, static] |
double UserPi0Cut::Chisq |
double UserPi0Cut::MaxMass |
Definition at line 29 of file Pi0Cut.h.
Referenced by Pi0RecAlg::execute(), operator()(), and Pi0RecAlg::Pi0RecAlg().
double UserPi0Cut::MinAngle |
double UserPi0Cut::MinMass |
Definition at line 28 of file Pi0Cut.h.
Referenced by Pi0RecAlg::execute(), operator()(), and Pi0RecAlg::Pi0RecAlg().
EvtRecEvent * UserPi0Cut::recEvt = 0 [static] |
Definition at line 91 of file Pi0Cut.h.
Referenced by isGoodPhoton(), Pi0::make_gamma_list(), and SetForTrack().
EvtRecTrackCol * UserPi0Cut::recTrkCol = 0 [static] |
Definition at line 92 of file Pi0Cut.h.
Referenced by isGoodPhoton(), Pi0::make_gamma_list(), and SetForTrack().
double UserPi0Cut::TimeLimit |