103 MsgStream log(
msgSvc(), name());
106 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),
"/Event/EventHeader");
108 log << MSG::FATAL <<
"Could not find Event Header" << endreq;
109 return( StatusCode::FAILURE);
111 log << MSG::INFO <<
"eventNo-->" << eventHeader->eventNumber()<<endreq;
114 SmartDataPtr<MdcDigiCol> mdcDigiCol(eventSvc(),
"/Event/Digi/MdcDigiCol");
116 log << MSG::FATAL <<
"Could not find Mdc digi!!" << endreq;
117 return( StatusCode::FAILURE);
120 SmartDataPtr<TofDigiCol> tofDigiCol(eventSvc(),
"/Event/Digi/TofDigiCol");
122 log << MSG::FATAL <<
"Could not find Tof digi!!" << endreq;
123 return( StatusCode::FAILURE);
125 SmartDataPtr<EmcDigiCol> emcDigiCol(eventSvc(),
"/Event/Digi/EmcDigiCol");
127 log << MSG::FATAL <<
"Could not find Emc digi!!" << endreq;
128 return( StatusCode::FAILURE);
136 SmartDataPtr<MucDigiCol> mucDigiCol(eventSvc(),
"/Event/Digi/MucDigiCol");
138 log << MSG::FATAL <<
"Could not find Muc digi!!" << endreq;
139 return( StatusCode::FAILURE);
143 unsigned int nhitsMdc=mdcDigiCol->size();
149 unsigned int nhitsEmc=emcDigiCol->size();
150 unsigned int nhitsMuc=mucDigiCol->size();
151 unsigned int nhitsTof=tofDigiCol->size();
153 double rndm=CLHEP::RandFlat::shoot();
155 log << MSG::INFO <<
" Number of hits in MDC:EMC:MUC:TOF is " << nhitsMdc
156 <<
":" << nhitsEmc <<
":" << nhitsMuc <<
":" <<nhitsTof <<
"; "
157 <<
"random number:" << rndm <<endreq;
160 m_nmdc->setValue(nhitsMdc);
161 m_nmuc->setValue(nhitsMuc);
162 m_ntof->setValue(nhitsTof);
163 m_nemc->setValue(nhitsEmc);
165 m_rndm->setValue(rndm);
167 m_ef->addToEFVec(nhitsMdc, 5);
168 m_ef->addToEFVec(nhitsTof, 25);
169 m_ef->addToEFVec(nhitsEmc, 30);
170 m_ef->addToEFVec(nhitsMuc, 52);
172 m_ef->addToEFVec(0xFFFFFFF7,37);
174 m_ef->setVecBit(
true, 0, 0);
175 m_ef->addToEFVec(1, 1);
176 m_ef->addToEFVec(1<<8, 1);
177 m_ef->addToEFVec(1<<16, 1);
178 m_ef->addToEFVec(1<<24, 1);
182 return StatusCode::SUCCESS;