BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
UserPi0Cut Struct Reference

#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)
 
 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)
 
- Public Member Functions inherited from DCSelectionFunction< CDPi0 >
 DCSelectionFunction ()
 
 DCSelectionFunction ()
 
virtual ~DCSelectionFunction ()
 
virtual ~DCSelectionFunction ()
 
virtual bool operator() (CDPi0 &)=0
 
bool operator() (CDPi0 &iArg) const
 
virtual bool operator() (CDPi0 &)=0
 
bool operator() (CDPi0 &iArg) const
 

Static Public Member Functions

static void SetForTrack (EvtRecEvent *_recEvt, EvtRecTrackCol *_recTrkCol)
 
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

Constructor & Destructor Documentation

◆ UserPi0Cut() [1/2]

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

◆ UserPi0Cut() [2/2]

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 Reconstruction/Pi0RecAlg/Pi0RecAlg-00-00-06/Pi0RecAlg/Pi0Cut.h.

18 MinAngle(MA),
19 TimeLimit(TL),
20 Chisq(c),
21 MinMass(MinM), MaxMass(MaxM)
22 {}

Member Function Documentation

◆ isGoodPhoton() [1/2]

bool UserPi0Cut::isGoodPhoton ( EvtRecTrack gTrk)
inline

Definition at line 43 of file InstallArea/include/Pi0RecAlg/Pi0RecAlg/Pi0Cut.h.

44 {
45 if ( !gTrk->isEmcShowerValid() ) return false;
46
47 RecEmcShower *emcTrk = gTrk->emcShower();
48 //check time
49 if(emcTrk->time() > TimeLimit) return false;
50 //check energy
51 int flag =(emcTrk->cellId() & 0x000F0000) >> 16;
52 if ((flag == 1) && emcTrk->energy() < MinEnergyOfBarrelPhoton) return false;
53 if ((flag == 0 || flag == 2) && emcTrk->energy() < MinEnergyOfEndcapPhoton) return false;
54 //check angle
55 Hep3Vector emcpos(emcTrk->x(), emcTrk->y(), emcTrk->z());
56 if (recEvt->totalCharged() > 0)
57 {
58 double dthe = 200.;
59 double dphi = 200.;
60 double dang1 = 200.;
61 for (int j = 0; j < recEvt->totalCharged(); j++) {
62 EvtRecTrackIterator jtTrk = recTrkCol->begin() + j;
63 if ( !(*jtTrk)->isExtTrackValid() ) continue;
64 RecExtTrack* extTrk = (*jtTrk)->extTrack();
65 if ( extTrk->emcVolumeNumber() == -1 ) continue;
66 Hep3Vector extpos = extTrk->emcPosition();
67 double angd1 = extpos.angle(emcpos);
68 double thed = extpos.theta() - emcpos.theta();
69 double phid = extpos.deltaPhi(emcpos);
70 thed = fmod(thed+CLHEP::twopi+CLHEP::twopi+CLHEP::pi, CLHEP::twopi) - CLHEP::pi;
71 phid = fmod(phid+CLHEP::twopi+CLHEP::twopi+CLHEP::pi, CLHEP::twopi) - CLHEP::pi;
72
73 if ( fabs(thed) < fabs(dthe) ) dthe = thed;
74 if ( fabs(phid) < fabs(dphi) ) dphi = phid;
75 if ( angd1 < dang1 ) dang1 = angd1;
76 }
77 if ( dang1 < 200 ) {
78 dthe = dthe * 180 / (CLHEP::pi);
79 dphi = dphi * 180 / (CLHEP::pi);
80 dang1 = dang1 * 180 / (CLHEP::pi);
81 if ( dang1 < MinAngle) return false;
82
83
84 } // End of "dang1 < 200" IF
85
86 } // End of "recEv
87 return true;
88 }

Referenced by operator()().

◆ isGoodPhoton() [2/2]

bool UserPi0Cut::isGoodPhoton ( EvtRecTrack gTrk)
inline

Definition at line 43 of file Reconstruction/Pi0RecAlg/Pi0RecAlg-00-00-06/Pi0RecAlg/Pi0Cut.h.

44 {
45 if ( !gTrk->isEmcShowerValid() ) return false;
46
47 RecEmcShower *emcTrk = gTrk->emcShower();
48 //check time
49 if(emcTrk->time() > TimeLimit) return false;
50 //check energy
51 int flag =(emcTrk->cellId() & 0x000F0000) >> 16;
52 if ((flag == 1) && emcTrk->energy() < MinEnergyOfBarrelPhoton) return false;
53 if ((flag == 0 || flag == 2) && emcTrk->energy() < MinEnergyOfEndcapPhoton) return false;
54 //check angle
55 Hep3Vector emcpos(emcTrk->x(), emcTrk->y(), emcTrk->z());
56 if (recEvt->totalCharged() > 0)
57 {
58 double dthe = 200.;
59 double dphi = 200.;
60 double dang1 = 200.;
61 for (int j = 0; j < recEvt->totalCharged(); j++) {
62 EvtRecTrackIterator jtTrk = recTrkCol->begin() + j;
63 if ( !(*jtTrk)->isExtTrackValid() ) continue;
64 RecExtTrack* extTrk = (*jtTrk)->extTrack();
65 if ( extTrk->emcVolumeNumber() == -1 ) continue;
66 Hep3Vector extpos = extTrk->emcPosition();
67 double angd1 = extpos.angle(emcpos);
68 double thed = extpos.theta() - emcpos.theta();
69 double phid = extpos.deltaPhi(emcpos);
70 thed = fmod(thed+CLHEP::twopi+CLHEP::twopi+CLHEP::pi, CLHEP::twopi) - CLHEP::pi;
71 phid = fmod(phid+CLHEP::twopi+CLHEP::twopi+CLHEP::pi, CLHEP::twopi) - CLHEP::pi;
72
73 if ( fabs(thed) < fabs(dthe) ) dthe = thed;
74 if ( fabs(phid) < fabs(dphi) ) dphi = phid;
75 if ( angd1 < dang1 ) dang1 = angd1;
76 }
77 if ( dang1 < 200 ) {
78 dthe = dthe * 180 / (CLHEP::pi);
79 dphi = dphi * 180 / (CLHEP::pi);
80 dang1 = dang1 * 180 / (CLHEP::pi);
81 if ( dang1 < MinAngle) return false;
82
83
84 } // End of "dang1 < 200" IF
85
86 } // End of "recEv
87 return true;
88 }

◆ operator()() [1/2]

bool UserPi0Cut::operator() ( CDPi0 _this)
inlinevirtual

Implements DCSelectionFunction< CDPi0 >.

Definition at line 32 of file InstallArea/include/Pi0RecAlg/Pi0RecAlg/Pi0Cut.h.

33 {
34 EvtRecTrack* g1 = const_cast<EvtRecTrack*>(_this.navPi0()->hiEnGamma());
35 EvtRecTrack* g2 = const_cast<EvtRecTrack*>(_this.navPi0()->loEnGamma());
36 if(!isGoodPhoton(g1)) return false;
37 if(!isGoodPhoton(g2)) return false;
38 if(_this.navPi0()->chisq() > Chisq) return false;
39 if(_this.navPi0()->unconMass() < MinMass || _this.navPi0()->unconMass() > MaxMass) return false;
40 return true;
41 }
TF1 * g1
virtual const EvtRecPi0 * navPi0() const
Definition: CDPi0.cxx:103

◆ operator()() [2/2]

bool UserPi0Cut::operator() ( CDPi0 _this)
inlinevirtual

Implements DCSelectionFunction< CDPi0 >.

Definition at line 32 of file Reconstruction/Pi0RecAlg/Pi0RecAlg-00-00-06/Pi0RecAlg/Pi0Cut.h.

33 {
34 EvtRecTrack* g1 = const_cast<EvtRecTrack*>(_this.navPi0()->hiEnGamma());
35 EvtRecTrack* g2 = const_cast<EvtRecTrack*>(_this.navPi0()->loEnGamma());
36 if(!isGoodPhoton(g1)) return false;
37 if(!isGoodPhoton(g2)) return false;
38 if(_this.navPi0()->chisq() > Chisq) return false;
39 if(_this.navPi0()->unconMass() < MinMass || _this.navPi0()->unconMass() > MaxMass) return false;
40 return true;
41 }

◆ SetForTrack() [1/2]

static void UserPi0Cut::SetForTrack ( EvtRecEvent _recEvt,
EvtRecTrackCol _recTrkCol 
)
inlinestatic

Definition at line 90 of file InstallArea/include/Pi0RecAlg/Pi0RecAlg/Pi0Cut.h.

90{ recEvt =_recEvt; recTrkCol=_recTrkCol;}

Referenced by Pi0RecAlg::execute().

◆ SetForTrack() [2/2]

static void UserPi0Cut::SetForTrack ( EvtRecEvent _recEvt,
EvtRecTrackCol _recTrkCol 
)
inlinestatic

Definition at line 90 of file Reconstruction/Pi0RecAlg/Pi0RecAlg-00-00-06/Pi0RecAlg/Pi0Cut.h.

90{ recEvt =_recEvt; recTrkCol=_recTrkCol;}

Member Data Documentation

◆ Chisq

double UserPi0Cut::Chisq

◆ MaxMass

double UserPi0Cut::MaxMass

◆ MinAngle

double UserPi0Cut::MinAngle

◆ MinEnergyOfBarrelPhoton

double UserPi0Cut::MinEnergyOfBarrelPhoton

◆ MinEnergyOfEndcapPhoton

double UserPi0Cut::MinEnergyOfEndcapPhoton

◆ MinMass

double UserPi0Cut::MinMass

◆ recEvt

EvtRecEvent * UserPi0Cut::recEvt = 0
static

◆ recTrkCol

EvtRecTrackCol * UserPi0Cut::recTrkCol = 0
static

◆ TimeLimit

double UserPi0Cut::TimeLimit

The documentation for this struct was generated from the following files: