BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcBbEmcEff Class Reference

#include <MdcBbEmcEff.h>

+ Inheritance diagram for MdcBbEmcEff:

Public Member Functions

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

Detailed Description

Definition at line 7 of file MdcBbEmcEff.h.

Constructor & Destructor Documentation

◆ MdcBbEmcEff()

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

Definition at line 31 of file MdcBbEmcEff.cxx.

31 :
32 Algorithm(name, pSvcLocator) {
33 declareProperty("hist", m_hist = false);
34 declareProperty("debug", m_debug= 0);
35 //Good Emc shower selection cut
36 declareProperty("emcEneCutLow", m_emcEneCutLow=1.44);
37 declareProperty("emcEneCutHigh", m_emcEneCutHigh=1.88);
38 declareProperty("emcEneCutTot", m_emcEneCutTot=3.16);
39 declareProperty("emcDangCutLow", m_emcDangCutLow=2.94);
40 declareProperty("emcDangCutHigh",m_emcDangCutHigh=3.08);
41 //Mdc track cut
42 declareProperty("dPhi", m_dPhiCut= 0.2);
43 declareProperty("dCosTheta", m_dCosThetaCut= 0.2);
44 declareProperty("d0", m_d0Cut= 1.);
45 declareProperty("z0", m_z0Cut= 5.);
46 //Barrel and Endcap cut
47 declareProperty("barrelCut", m_barrelCut = 0.8);
48 declareProperty("endcapCut", m_endcapCutLow = 0.83);
49 declareProperty("endcapCutHigh", m_endcapCutHigh = 0.93);
50 }

Member Function Documentation

◆ execute()

StatusCode MdcBbEmcEff::execute ( )

Definition at line 75 of file MdcBbEmcEff.cxx.

75 {
76 MsgStream log(msgSvc(), name());
77 StatusCode sc = StatusCode::SUCCESS;
78
79 setFilterPassed(false);
80
81 // Get eventNo, t0
82 if(getEventInfo()<0) return StatusCode::FAILURE;
83
84 // Select Bhabha by Emc shower
85 if(selectBbByEmcShower()<0) return StatusCode::SUCCESS;
86
87 // Select Good track
88 if(bbEmcMdcTrackingEff()<0) return StatusCode::SUCCESS;
89
90 return StatusCode::SUCCESS;
91}
IMessageSvc * msgSvc()

◆ finalize()

StatusCode MdcBbEmcEff::finalize ( )

Definition at line 94 of file MdcBbEmcEff.cxx.

94 {
95 MsgStream log(msgSvc(), name());
96 log << MSG::INFO << "in finalize()" << endreq;
97 if((m_effAllN1+m_effAllN2)>0)std::cout<<" MdcBbEmcEff efficiency = N2/(N1+N2) = "
98 << m_effAllN2<<"/("<<m_effAllN1<<"+"<<m_effAllN2<<") = "
99 << (m_effAllN2)/((float)(m_effAllN1+m_effAllN2))<<std::endl;
100 for(int i=0;i<3;i++){
101 string pos;
102 if (0==i) pos="barrel";
103 if (1==i) pos="gap";
104 if (2==i) pos="endcap";
105 if((m_effN1[i]+m_effN2[i])>0){
106 std::cout<<" MdcBbEmcEff of "<<pos <<" N2/(N1+N2) = "
107 << m_effN2[i]<<"/("<<m_effN1[i]<<"+"<<m_effN2[i]<<") = "
108 << (m_effN2[i])/((float)(m_effN1[i]+m_effN2[i]))<<std::endl;
109 }
110 }
111 return StatusCode::SUCCESS;
112}

◆ initialize()

StatusCode MdcBbEmcEff::initialize ( )

Definition at line 54 of file MdcBbEmcEff.cxx.

54 {
55 MsgStream log(msgSvc(), name());
56 StatusCode sc;
57 m_evtIndex = 0;
58
59 m_effAllN1 = 0;
60 m_effAllN2 = 0;
61
62 for (int i=0;i<3;i++){
63 m_effN1[i] = 0;
64 m_effN2[i] = 0;
65 }
66
67 if(m_hist) {
68 if(bookNTuple()<0) sc = StatusCode::FAILURE;
69 }
70
71 return StatusCode::SUCCESS;
72}

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