59 myInfo() { theMB0 = theMB1 = theMB2 = theMB3 = theMB4 = 0; }
108 for (std::map<HcalDetId, myInfo>::const_iterator itr =
myMap_.begin(); itr !=
myMap_.end(); ++itr) {
109 mysubd = itr->first.subdet();
110 depth = itr->first.depth();
111 iphi = itr->first.iphi();
112 ieta = itr->first.ieta();
138 edm::LogInfo(
"AnalyzerMB") <<
" Start SimAnalyzerMinbias::analyze " << iEvent.
id().
run() <<
":" 147 edm::LogInfo(
"AnalyzerMB") <<
"Event with " << myGenEvent->particles_size() <<
" particles + " 148 << myGenEvent->vertices_size() <<
" vertices";
159 std::map<HcalDetId, double> hitMap;
160 for (std::vector<PCaloHit>::const_iterator hcalItr = HitHcal->begin(); hcalItr != HitHcal->end(); ++hcalItr) {
161 double time = hcalItr->time();
163 double energyhit = hcalItr->energy();
165 std::map<HcalDetId, double>::iterator itr1 = hitMap.find(hid);
166 if (itr1 == hitMap.end()) {
168 itr1 = hitMap.find(hid);
170 itr1->second += energyhit;
173 edm::LogInfo(
"AnalyzerMB") <<
"extract information of " << hitMap.size() <<
" towers from " << HitHcal->size()
176 for (std::map<HcalDetId, double>::const_iterator hcalItr = hitMap.begin(); hcalItr != hitMap.end(); ++hcalItr) {
178 double energyhit = hcalItr->second;
179 std::map<HcalDetId, myInfo>::iterator itr1 =
myMap_.find(hid);
180 if (itr1 ==
myMap_.end()) {
185 itr1->second.theMB0++;
186 itr1->second.theMB1 += energyhit;
187 itr1->second.theMB2 += (energyhit * energyhit);
188 itr1->second.theMB3 += (energyhit * energyhit * energyhit);
189 itr1->second.theMB4 += (energyhit * energyhit * energyhit * energyhit);
190 edm::LogInfo(
"AnalyzerMB") <<
"ID " << hid <<
" with energy " << energyhit;
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< PCaloHit > PCaloHitContainer
bool getByToken(EDGetToken token, Handle< PROD > &result) const
T * make(const Args &...args) const
make new ROOT object
~SimAnalyzerMinbias() override
void endRun(const edm::Run &r, const edm::EventSetup &iSetup) override
void beginRun(const edm::Run &r, const edm::EventSetup &iSetup) override
edm::EDGetTokenT< edm::HepMCProduct > tok_evt_
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hcal_
const HepMC::GenEvent * GetEvent() const
T const * product() const
edm::Service< TFileService > fs_
void analyze(const edm::Event &, const edm::EventSetup &) override
std::map< HcalDetId, myInfo > myMap_
SimAnalyzerMinbias(const edm::ParameterSet &)