84 descriptions.
add(
"simAnalyzerMinbias", desc);
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();
147 edm::LogVerbatim(
"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::LogVerbatim(
"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::LogVerbatim(
"AnalyzerMB") <<
"ID " << hid <<
" with energy " << energyhit;
static const std::string kSharedResource
Log< level::Info, true > LogVerbatim
EventNumber_t event() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T getUntrackedParameter(std::string const &, T const &) const
std::vector< PCaloHit > PCaloHitContainer
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
T * make(const Args &...args) const
make new ROOT object
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_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hcal_
T const * product() const
edm::Service< TFileService > fs_
void analyze(const edm::Event &, const edm::EventSetup &) override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::map< HcalDetId, myInfo > myMap_
SimAnalyzerMinbias(const edm::ParameterSet &)
Log< level::Warning, false > LogWarning