1#include "GaudiKernel/MsgStream.h"
3#include "GaudiKernel/SmartDataPtr.h"
16 MsgStream log(
msgSvc(), name);
51 MsgStream log(
msgSvc(), name());
52 log << MSG::INFO <<
"in initialize()" << endreq;
58 if ( sc.isFailure() ) {
59 log << MSG::ERROR <<
"m_HltStoreSvc->put(nshw) wrong" << endreq;
63 if ( sc.isFailure() ) {
64 log << MSG::ERROR <<
"m_HltStoreSvc->put(acop) wrong" << endreq;
68 if ( sc.isFailure() ) {
69 log << MSG::ERROR <<
"m_HltStoreSvc->put(acole) wrong" << endreq;
73 if ( sc.isFailure() ) {
74 log << MSG::ERROR <<
"m_HltStoreSvc->put(emax1) wrong" << endreq;
78 if ( sc.isFailure() ) {
79 log << MSG::ERROR <<
"m_HltStoreSvc->put(emax2) wrong" << endreq;
83 if ( sc.isFailure() ) {
84 log << MSG::ERROR <<
"m_HltStoreSvc->put(emax3) wrong" << endreq;
88 if ( sc.isFailure() ) {
89 log << MSG::ERROR <<
"m_HltStoreSvc->put(emax12) wrong" << endreq;
93 if ( sc.isFailure() ) {
94 log << MSG::ERROR <<
"m_HltStoreSvc->put(cos1) wrong" << endreq;
98 if ( sc.isFailure() ) {
99 log << MSG::ERROR <<
"m_HltStoreSvc->put(cos2) wrong" << endreq;
103 if ( sc.isFailure() ) {
104 log << MSG::ERROR <<
"m_HltStoreSvc->put(cos3) wrong" << endreq;
108 if ( sc.isFailure() ) {
109 log << MSG::ERROR <<
"m_HltStoreSvc->put(phi1) wrong" << endreq;
113 if ( sc.isFailure() ) {
114 log << MSG::ERROR <<
"m_HltStoreSvc->put(phi2) wrong" << endreq;
118 if ( sc.isFailure() ) {
119 log << MSG::ERROR <<
"m_HltStoreSvc->put(phi3) wrong" << endreq;
123 return StatusCode::SUCCESS;
130 MsgStream log(
msgSvc(), name());
133 char*
electron=getenv(
"BEPCII_INFO.BER_PRB");
138 log << MSG::ERROR <<
"Cannot get beam energy (e-)! Please call online people" << endreq;
140 char* positron=getenv(
"BEPCII_INFO.BPR_PRB");
145 log << MSG::ERROR <<
"Cannot get beam energy (e+)! Please call online people" << endreq;
152 log << MSG::INFO <<
"beam energy = " <<
m_beam << endreq;
155 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),
"/Event/EventHeader");
157 log << MSG::FATAL <<
"Could not find Event Header" << endreq;
158 return( StatusCode::FAILURE);
161 SmartDataPtr<RecEmcShowerCol> emcShowerCol(eventSvc(),
"/Event/Recon/RecEmcShowerCol");
163 log << MSG::FATAL <<
"Could not find Emc rec!!" << endreq;
164 return( StatusCode::FAILURE);
167 RecEmcShowerCol::iterator iterShower=emcShowerCol->begin();
168 double max1=-999,max2=-999,max3=-999;
169 double cost1=-999,cost2=-999,cost3=-999,
phi1=-999,
phi2=-999,phi3=-999;
171 unsigned int nshower=emcShowerCol->size();
172 for(;iterShower!= emcShowerCol->end();iterShower++){
173 if((*iterShower)->energy()>=max1){
180 max1=(*iterShower)->energy();
181 cost1=
cos((*iterShower)->position().theta());
182 phi1=(*iterShower)->position().phi();
184 else if((*iterShower)->energy()>max2){
188 max2=(*iterShower)->energy();
189 cost2=
cos((*iterShower)->position().theta());
190 phi2=(*iterShower)->position().phi();
192 else if((*iterShower)->energy()>max3){
193 max3=(*iterShower)->energy();
194 cost3=(*iterShower)->position().theta();
195 phi3=(*iterShower)->position().phi();
198 double acop=180,acol=180.;
206 log << MSG::INFO <<
"nshower=" << nshower <<
"; acop=" << acop
207 <<
"; emax1="<< max1 <<
"; emax2="<< max2 <<endreq;
247 return StatusCode::SUCCESS;
251 MsgStream log(
msgSvc(), name());
252 log << MSG::INFO <<
"in finalize()" << endmsg;
253 return StatusCode::SUCCESS;
double sin(const BesAngle a)
double cos(const BesAngle a)
double abs(const EvtComplex &c)
*******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)
virtual ~EFProcessCluster()
EFProcessCluster(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize()
bool addToEFVec(uint32_t val, uint32_t pos)
bool appToEFVec(double val, uint32_t pos)
bool setVecBit(uint32_t val, uint32_t vecpos, uint32_t bbegin, uint32_t bend)
bool put(const std::string &name, const T &value)
virtual StatusCode initialize()
HltStoreSvc * m_HltStoreSvc