Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

UserPi0Cut Struct Reference

#include <Pi0Cut.h>

Inheritance diagram for UserPi0Cut:

DCSelectionFunction< CDPi0 > DCSelectionFunction< CDPi0 > unary_function unary_function unary_function unary_function List of all members.

Public Member Functions

bool isGoodPhoton (EvtRecTrack *gTrk)
bool isGoodPhoton (EvtRecTrack *gTrk)
bool operator() (CDPi0 &iArg) const
bool operator() (CDPi0 &_this)
bool operator() (CDPi0 &_this)
 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)
 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)

Static Public Member Functions

void SetForTrack (EvtRecEvent *_recEvt, EvtRecTrackCol *_recTrkCol)
void SetForTrack (EvtRecEvent *_recEvt, EvtRecTrackCol *_recTrkCol)

Public Attributes

double Chisq
double MaxMass
double MinAngle
double MinEnergyOfBarrelPhoton
double MinEnergyOfEndcapPhoton
double MinMass
double TimeLimit

Static Public Attributes

EvtRecEventrecEvt
EvtRecEventrecEvt = 0
EvtRecTrackColrecTrkCol
EvtRecTrackColrecTrkCol = 0

Constructor & Destructor Documentation

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]
 

00017                 : MinEnergyOfBarrelPhoton(MEBP), MinEnergyOfEndcapPhoton(MEEP),
00018                 MinAngle(MA), 
00019                 TimeLimit(TL),
00020                 Chisq(c),
00021                 MinMass(MinM), MaxMass(MaxM)
00022                 {}

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]
 

00017                 : MinEnergyOfBarrelPhoton(MEBP), MinEnergyOfEndcapPhoton(MEEP),
00018                 MinAngle(MA), 
00019                 TimeLimit(TL),
00020                 Chisq(c),
00021                 MinMass(MinM), MaxMass(MaxM)
00022                 {}


Member Function Documentation

bool UserPi0Cut::isGoodPhoton EvtRecTrack gTrk  )  [inline]
 

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 UserPi0Cut::isGoodPhoton EvtRecTrack gTrk  )  [inline]
 

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]
 

00078                                        {
00079          return const_cast<DCSelectionFunction<Arg> *>(this)->operator()(iArg);
00080       }

bool UserPi0Cut::operator() CDPi0 _this  )  [inline, virtual]
 

Implements DCSelectionFunction< CDPi0 >.

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         }

bool UserPi0Cut::operator() CDPi0 _this  )  [inline, virtual]
 

Implements DCSelectionFunction< CDPi0 >.

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         }

void UserPi0Cut::SetForTrack EvtRecEvent _recEvt,
EvtRecTrackCol _recTrkCol
[inline, static]
 

00090 { recEvt =_recEvt; recTrkCol=_recTrkCol;}

void UserPi0Cut::SetForTrack EvtRecEvent _recEvt,
EvtRecTrackCol _recTrkCol
[inline, static]
 

00090 { recEvt =_recEvt; recTrkCol=_recTrkCol;}


Member Data Documentation

double UserPi0Cut::Chisq
 

double UserPi0Cut::MaxMass
 

double UserPi0Cut::MinAngle
 

double UserPi0Cut::MinEnergyOfBarrelPhoton
 

double UserPi0Cut::MinEnergyOfEndcapPhoton
 

double UserPi0Cut::MinMass
 

EvtRecEvent* UserPi0Cut::recEvt [static]
 

EvtRecEvent * UserPi0Cut::recEvt = 0 [static]
 

EvtRecTrackCol* UserPi0Cut::recTrkCol [static]
 

EvtRecTrackCol * UserPi0Cut::recTrkCol = 0 [static]
 

double UserPi0Cut::TimeLimit
 


The documentation for this struct was generated from the following files:
Generated on Wed Feb 2 19:12:44 2011 for BOSS6.5.5 by  doxygen 1.3.9.1