BOSS 7.1.1
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.

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

Member Function Documentation

◆ execute()

StatusCode Pi0RecAlg::execute ( )

Definition at line 40 of file Pi0RecAlg.cxx.

40 {
41
42 MsgStream log(msgSvc(), name());
43 log << MSG::INFO << "in execute()" <<endreq;
44
45 // get event header, eventlist and tracklist from TDS
46 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
47 SmartDataPtr<EvtRecEvent> recEvt(eventSvc(), EventModel::EvtRec::EvtRecEvent);
48 SmartDataPtr<EvtRecTrackCol> recTrkCol(eventSvc(), EventModel::EvtRec::EvtRecTrackCol);
49
50 bool save2TDS = false;
51 SmartDataPtr<EvtRecPi0Col> recPi0Col(eventSvc(), EventModel::EvtRec::EvtRecPi0Col);
52 if ( !recPi0Col ) {
53 recPi0Col = new EvtRecPi0Col;
54 save2TDS = true;
55 }
56 using namespace Pi0;
57 // std::cout<<"**********************************************"<<std::endl;
58 static Criteria cri_inv(_pi0_cut.MinMass, _pi0_cut.MaxMass);
59
60 //static KFitCriteria cri_kfit;
61
62 UserPi0Cut::SetForTrack(recEvt, recTrkCol);
63
64// Pi0::make_gamma_list(recEvt, recTrkCol);
65 Pi0::make_gamma_list(_pi0_cut);
67 // Pi0::print_gamma_list(Pi0::GetDefaultGammaList());
68 Pi0::apply_criteria(cri_inv);
70 // Pi0::print_pi0_list(Pi0::GetCandidatePi0List());
72 // std::cout<<"**********************************************"<<std::endl;
73 if ( save2TDS ) {
74 StatusCode sc = eventSvc()->registerObject(EventModel::EvtRec::EvtRecPi0Col, recPi0Col);
75 if ( sc.isFailure() ) {
76 log << MSG::ERROR << "could not register EvtRecPi0Col in TDS" <<endreq;
77 return StatusCode::FAILURE;
78 }
79 }
80 return StatusCode::SUCCESS;
81}
ObjectVector< EvtRecPi0 > EvtRecPi0Col
Definition EvtRecPi0.h:58
IMessageSvc * msgSvc()
_EXTERN_ std::string EvtRecPi0Col
Definition EventModel.h:123
_EXTERN_ std::string EvtRecEvent
Definition EventModel.h:116
_EXTERN_ std::string EvtRecTrackCol
Definition EventModel.h:117
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:90

◆ 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()" << endreq;
89
90 return StatusCode::SUCCESS;
91}

◆ initialize()

StatusCode Pi0RecAlg::initialize ( )

Definition at line 30 of file Pi0RecAlg.cxx.

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

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