117 for (std::map<HcalDetId,myInfo>::const_iterator itr=
myMap_.begin();
118 itr !=
myMap_.end(); ++itr) {
119 mysubd = itr->first.subdet();
120 depth = itr->first.depth();
121 iphi = itr->first.iphi();
122 ieta = itr->first.ieta();
150 edm::LogInfo(
"AnalyzerMB") <<
" Start SimAnalyzerMinbias::analyze "
160 edm::LogInfo(
"AnalyzerMB") <<
"Event with " << myGenEvent->particles_size()
161 <<
" particles + " <<myGenEvent->vertices_size()
174 std::map<HcalDetId,double> hitMap;
175 for (std::vector<PCaloHit>::const_iterator hcalItr = HitHcal->begin();
176 hcalItr != HitHcal->end(); ++hcalItr) {
177 double time = hcalItr->time();
179 double energyhit = hcalItr->energy();
181 std::map<HcalDetId,double>::iterator itr1 = hitMap.find(hid);
182 if (itr1 == hitMap.end()) {
184 itr1 = hitMap.find(hid);
186 itr1->second += energyhit;
189 edm::LogInfo(
"AnalyzerMB") <<
"extract information of " << hitMap.size()
190 <<
" towers from " << HitHcal->size() <<
" hits";
192 for (std::map<HcalDetId,double>::const_iterator hcalItr=hitMap.begin();
193 hcalItr != hitMap.end(); ++hcalItr) {
195 double energyhit = hcalItr->second;
196 std::map<HcalDetId,myInfo>::iterator itr1 =
myMap_.find(hid);
197 if (itr1 ==
myMap_.end()) {
202 itr1->second.theMB0++;
203 itr1->second.theMB1 += energyhit;
204 itr1->second.theMB2 += (energyhit*energyhit);
205 itr1->second.theMB3 += (energyhit*energyhit*energyhit);
206 itr1->second.theMB4 += (energyhit*energyhit*energyhit*energyhit);
207 edm::LogInfo(
"AnalyzerMB") <<
"ID " << hid <<
" with energy " << energyhit;
std::map< HcalDetId, myInfo > myMap_
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< PCaloHit > PCaloHitContainer
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
T * make(const Args &...args) const
make new ROOT object
edm::EDGetTokenT< edm::HepMCProduct > tok_evt_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hcal_
T const * product() const
edm::Service< TFileService > fs_
virtual void beginRun(const edm::Run &r, const edm::EventSetup &iSetup)
return(e1-e2)*(e1-e2)+dp *dp
SimAnalyzerMinbias(const edm::ParameterSet &)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
virtual void endRun(const edm::Run &r, const edm::EventSetup &iSetup)