UserPi0Cut Struct Reference

#include <Pi0Cut.h>

Inheritance diagram for UserPi0Cut:

DCSelectionFunction< CDPi0 > unary_function List of all members.

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 EvtRecEventrecEvt = 0
static EvtRecTrackColrecTrkCol = 0

Detailed Description

Definition at line 10 of file Pi0Cut.h.


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]

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                 {}


Member Function Documentation

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]

Definition at line 78 of file DCSelectionFunction.h.

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

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

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]

Definition at line 90 of file Pi0Cut.h.

References recEvt, and recTrkCol.

Referenced by Pi0RecAlg::execute().

00090 { recEvt =_recEvt; recTrkCol=_recTrkCol;}


Member Data Documentation

double UserPi0Cut::Chisq

Definition at line 30 of file Pi0Cut.h.

Referenced by operator()(), and Pi0RecAlg::Pi0RecAlg().

double UserPi0Cut::MaxMass

Definition at line 29 of file Pi0Cut.h.

Referenced by Pi0RecAlg::execute(), operator()(), and Pi0RecAlg::Pi0RecAlg().

double UserPi0Cut::MinAngle

Definition at line 26 of file Pi0Cut.h.

Referenced by isGoodPhoton(), and Pi0RecAlg::Pi0RecAlg().

double UserPi0Cut::MinEnergyOfBarrelPhoton

Definition at line 24 of file Pi0Cut.h.

Referenced by isGoodPhoton(), and Pi0RecAlg::Pi0RecAlg().

double UserPi0Cut::MinEnergyOfEndcapPhoton

Definition at line 25 of file Pi0Cut.h.

Referenced by isGoodPhoton(), and Pi0RecAlg::Pi0RecAlg().

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

Definition at line 27 of file Pi0Cut.h.

Referenced by isGoodPhoton(), and Pi0RecAlg::Pi0RecAlg().


Generated on Tue Nov 29 23:36:20 2016 for BOSS_7.0.2 by  doxygen 1.4.7