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;