BOSS 8.0.0
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 30 of file MdcBbEmcEff.cxx.

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

Member Function Documentation

◆ execute()

StatusCode MdcBbEmcEff::execute ( )

Definition at line 76 of file MdcBbEmcEff.cxx.

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

◆ finalize()

StatusCode MdcBbEmcEff::finalize ( )

Definition at line 95 of file MdcBbEmcEff.cxx.

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

◆ initialize()

StatusCode MdcBbEmcEff::initialize ( )

Definition at line 53 of file MdcBbEmcEff.cxx.

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

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