BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Pi0RecAlg Class Reference

#include <Pi0RecAlg.h>

Inheritance diagram for Pi0RecAlg:

Public Member Functions

 Pi0RecAlg (const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize ()
StatusCode execute ()
StatusCode finalize ()

Detailed Description

Definition at line 10 of file Pi0RecAlg.h.

Constructor & Destructor Documentation

◆ Pi0RecAlg()

Pi0RecAlg::Pi0RecAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 15 of file Pi0RecAlg.cxx.

16 : Algorithm( name, pSvcLocator ) {
17 // Declare the properties
18 declareProperty( "EMinOfBarrel", _pi0_cut.MinEnergyOfBarrelPhoton = 0.025 );
19 declareProperty( "EMinOfEndcap", _pi0_cut.MinEnergyOfEndcapPhoton = 0.045 );
20 declareProperty( "Angle", _pi0_cut.MinAngle = 20 );
21 declareProperty( "TimeLimit", _pi0_cut.TimeLimit = 20 );
22
23 declareProperty( "Pi0MinMass", _pi0_cut.MinMass = 0.10 );
24 declareProperty( "Pi0MaxMass", _pi0_cut.MaxMass = 0.18 );
25 declareProperty( "ChisqCut", _pi0_cut.Chisq = 50.0 );
26}

Referenced by Pi0RecAlg().

Member Function Documentation

◆ execute()

StatusCode Pi0RecAlg::execute ( )

Definition at line 38 of file Pi0RecAlg.cxx.

38 {
39
40 MsgStream log( msgSvc(), name() );
41 log << MSG::INFO << "in execute()" << endmsg;
42
43 // get event header, eventlist and tracklist from TDS
44 SmartDataPtr<Event::EventHeader> eventHeader( eventSvc(), "/Event/EventHeader" );
45 SmartDataPtr<EvtRecEvent> recEvt( eventSvc(), EventModel::EvtRec::EvtRecEvent );
46 SmartDataPtr<EvtRecTrackCol> recTrkCol( eventSvc(), EventModel::EvtRec::EvtRecTrackCol );
47
48 bool save2TDS = false;
49 SmartDataPtr<EvtRecPi0Col> recPi0Col( eventSvc(), EventModel::EvtRec::EvtRecPi0Col );
50 if ( !recPi0Col )
51 {
52 recPi0Col = new EvtRecPi0Col;
53 save2TDS = true;
54 }
55 using namespace Pi0;
56 // std::cout<<"**********************************************"<<std::endl;
57 static Criteria cri_inv( _pi0_cut.MinMass, _pi0_cut.MaxMass );
58
59 // static KFitCriteria cri_kfit;
60
61 UserPi0Cut::SetForTrack( recEvt, recTrkCol );
62
63 // Pi0::make_gamma_list(recEvt, recTrkCol);
64 Pi0::make_gamma_list( _pi0_cut );
66 // Pi0::print_gamma_list(Pi0::GetDefaultGammaList());
67 Pi0::apply_criteria( cri_inv );
68 Pi0::GetCandidatePi0List().sort( high_momentum() );
69 // Pi0::print_pi0_list(Pi0::GetCandidatePi0List());
71 // std::cout<<"**********************************************"<<std::endl;
72 if ( save2TDS )
73 {
74 StatusCode sc = eventSvc()->registerObject( EventModel::EvtRec::EvtRecPi0Col, recPi0Col );
75 if ( sc.isFailure() )
76 {
77 log << MSG::ERROR << "could not register EvtRecPi0Col in TDS" << endmsg;
78 return StatusCode::FAILURE;
79 }
80 }
81 return StatusCode::SUCCESS;
82}
ObjectVector< EvtRecPi0 > EvtRecPi0Col
IMessageSvc * msgSvc()
Pi0List & make_pi0_list(const GammaList &gamma_list)
GammaList & make_gamma_list(UserPi0Cut &cut)
void Pi0ListToTDS(const Pi0List &pi0list, EvtRecPi0Col *recPi0Col)
GammaList & GetDefaultGammaList()
Pi0List & GetCandidatePi0List()
Pi0List & apply_criteria(const Criteria &cri)
static void SetForTrack(EvtRecEvent *_recEvt, EvtRecTrackCol *_recTrkCol)
Definition Pi0Cut.h:91

◆ finalize()

StatusCode Pi0RecAlg::finalize ( )

Definition at line 85 of file Pi0RecAlg.cxx.

85 {
86
87 MsgStream log( msgSvc(), name() );
88 log << MSG::INFO << "in finalize()" << endmsg;
89
90 return StatusCode::SUCCESS;
91}

◆ initialize()

StatusCode Pi0RecAlg::initialize ( )

Definition at line 29 of file Pi0RecAlg.cxx.

29 {
30
31 MsgStream log( msgSvc(), name() );
32 log << MSG::INFO << "in initialize()" << endmsg;
33
34 return StatusCode::SUCCESS;
35}

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