BOSS 8.0.0
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)
Public Member Functions inherited from DCSelectionFunction< CDPi0 >
 DCSelectionFunction ()
virtual ~DCSelectionFunction ()

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::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 11 of file Pi0Cut.h.

15 , MinAngle( MA )
16 , TimeLimit( TL )
17 , Chisq( c )
18 , MinMass( MinM )
19 , MaxMass( MaxM ) {}
double MinAngle
Definition Pi0Cut.h:23
double MinEnergyOfEndcapPhoton
Definition Pi0Cut.h:22
double MinMass
Definition Pi0Cut.h:25
double MaxMass
Definition Pi0Cut.h:26
double TimeLimit
Definition Pi0Cut.h:24
double MinEnergyOfBarrelPhoton
Definition Pi0Cut.h:21
double Chisq
Definition Pi0Cut.h:27

Member Function Documentation

◆ isGoodPhoton()

bool UserPi0Cut::isGoodPhoton ( EvtRecTrack * gTrk)
inline

Definition at line 40 of file Pi0Cut.h.

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

Referenced by operator()().

◆ operator()()

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

Implements DCSelectionFunction< CDPi0 >.

Definition at line 29 of file Pi0Cut.h.

29 {
30 EvtRecTrack* g1 = const_cast<EvtRecTrack*>( _this.navPi0()->hiEnGamma() );
31 EvtRecTrack* g2 = const_cast<EvtRecTrack*>( _this.navPi0()->loEnGamma() );
32 if ( !isGoodPhoton( g1 ) ) return false;
33 if ( !isGoodPhoton( g2 ) ) return false;
34 if ( _this.navPi0()->chisq() > Chisq ) return false;
35 if ( _this.navPi0()->unconMass() < MinMass || _this.navPi0()->unconMass() > MaxMass )
36 return false;
37 return true;
38 }
TF1 * g1
virtual const EvtRecPi0 * navPi0() const
Definition CDPi0.cxx:92
bool isGoodPhoton(EvtRecTrack *gTrk)
Definition Pi0Cut.h:40

◆ SetForTrack()

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

Definition at line 91 of file Pi0Cut.h.

91 {
92 recEvt = _recEvt;
93 recTrkCol = _recTrkCol;
94 }

Referenced by Pi0RecAlg::execute().

Member Data Documentation

◆ Chisq

double UserPi0Cut::Chisq

Definition at line 27 of file Pi0Cut.h.

Referenced by operator()(), and UserPi0Cut().

◆ MaxMass

double UserPi0Cut::MaxMass

Definition at line 26 of file Pi0Cut.h.

Referenced by operator()(), and UserPi0Cut().

◆ MinAngle

double UserPi0Cut::MinAngle

Definition at line 23 of file Pi0Cut.h.

Referenced by isGoodPhoton(), and UserPi0Cut().

◆ MinEnergyOfBarrelPhoton

double UserPi0Cut::MinEnergyOfBarrelPhoton

Definition at line 21 of file Pi0Cut.h.

Referenced by isGoodPhoton(), and UserPi0Cut().

◆ MinEnergyOfEndcapPhoton

double UserPi0Cut::MinEnergyOfEndcapPhoton

Definition at line 22 of file Pi0Cut.h.

Referenced by isGoodPhoton(), and UserPi0Cut().

◆ MinMass

double UserPi0Cut::MinMass

Definition at line 25 of file Pi0Cut.h.

Referenced by operator()(), and UserPi0Cut().

◆ recEvt

EvtRecEvent * UserPi0Cut::recEvt = 0
static

Definition at line 95 of file Pi0Cut.h.

Referenced by isGoodPhoton(), Pi0::make_gamma_list(), and SetForTrack().

◆ recTrkCol

EvtRecTrackCol * UserPi0Cut::recTrkCol = 0
static

Definition at line 96 of file Pi0Cut.h.

Referenced by isGoodPhoton(), Pi0::make_gamma_list(), and SetForTrack().

◆ TimeLimit

double UserPi0Cut::TimeLimit

Definition at line 24 of file Pi0Cut.h.

Referenced by isGoodPhoton(), and UserPi0Cut().


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