1#include "GaudiKernel/MsgStream.h"
3#include "GaudiKernel/SmartDataPtr.h"
15int EFSectorHits::idmax[43]={40,44,48,56,64,72,80,80,76,76,
16 88,88,100,100,112,112,128,128,140,140,
17 160,160,160,160,176,176,176,176,208,208,
18 208,208,240,240,240,240,256,256,256,256,
25 MsgStream log(
msgSvc(), name);
36 MsgStream log(
msgSvc(), name());
37 log << MSG::INFO <<
"in initialize()" << endreq;
43 if ( sc.isFailure() ) {
44 log << MSG::ERROR <<
"m_HltStoreSvc->put(nsec) wrong" << endreq;
48 return StatusCode::SUCCESS;
54 MsgStream log(
msgSvc(), name());
56 if(nshower<2)
return StatusCode::SUCCESS;
61 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),
"/Event/EventHeader");
63 log << MSG::FATAL <<
"Could not find Event Header" << endreq;
64 return( StatusCode::FAILURE);
67 SmartDataPtr<MdcDigiCol> mdcDigiCol(eventSvc(),
"/Event/Digi/MdcDigiCol");
69 log << MSG::FATAL <<
"EmcRec could not find Mdc digi!!" << endreq;
70 return( StatusCode::FAILURE);
75 MdcDigiCol::iterator
iter=mdcDigiCol->begin();
83 if(phi1<0) phi1+=6.2831852;
84 if(phi2<0) phi2+=6.2831852;
86 float phi11=
min(phi1,phi2);
87 float phi22=
max(phi1,phi2);
88 float phi12=(phi11+phi22-3.1415926)*0.5;
89 float phi21=(phi11+phi22+3.1415926)*0.5;
90 if(phi12<0.) phi12 += 6.2831852;
91 if(phi21>6.2831852) phi21 -= 6.2831852;
92 for(;
iter!= mdcDigiCol->end();
iter++) {
93 id=(*iter)->identify();
97 log << MSG::ERROR <<
"MDC(" << ilayer <<
","<<iphi <<endreq;
98 float phi=6.2831853*iphi/idmax[ilayer];
99 if(WhetherSector(phi,phi11,phi12)||WhetherSector(phi,phi21,phi22)) nsec++;
101 log << MSG::INFO <<
" Number of hits in sector of MDC is " << nsec <<endreq;
107 if(
m_ef->
getEFVec(37)!=0) log << MSG::WARNING <<
"nsec(0) !=0"<< endreq;
112 return StatusCode::SUCCESS;
116 MsgStream log(
msgSvc(), name());
117 log << MSG::INFO <<
"in finalize()" << endmsg;
118 return StatusCode::SUCCESS;
130bool EFSectorHits::WhetherSector(
float ph,
float ph1,
float ph2){
131 float phi1=
min(ph1,ph2);
132 float phi2=
max(ph1,ph2);
133 float delta=0.0610865;
134 if((phi2-phi1)<3.1415926){
137 if(phi1<0.) phi1 += 6.2831852;
138 if(phi2>6.2831852) phi2 -= 6.2831852;
139 float tmp1=
min(phi1,phi2);
140 float tmp2=
max(phi1,phi2);
148 if((phi2-phi1)<3.1415926){
149 if(ph<=phi2&&ph>=phi1)
return true;
153 if(ph>=phi2||ph<=phi1)
return true;
*******INTEGER m_nBinMax INTEGER m_NdiMax !No of bins in histogram for cell exploration division $ !Last vertex $ !Last active cell $ !Last cell in buffer $ !No of sampling when dividing cell $ !No of function total $ !Flag for random ceel for $ !Flag for type of for WtMax $ !Flag which decides whether vertices are included in the sampling $ entire domain is hyp !Maximum effective eevents per saves r n generator level $ !Flag for chat level in output
void setValue(float value)
bool getValue(float &value) const
bool addToEFVec(uint32_t val, uint32_t pos)
bool setVecBit(uint32_t val, uint32_t vecpos, uint32_t bbegin, uint32_t bend)
const std::vector< uint32_t > getEFVec() const
EFSectorHits(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize()
bool put(const std::string &name, const T &value)
bool get(const std::string &name, T &value)
virtual StatusCode initialize()
HltStoreSvc * m_HltStoreSvc
static int layer(const Identifier &id)
Values of different levels (failure returns 0)
static int wire(const Identifier &id)