70 usesResource(
"TFileService");
83 edm::LogInfo(
"ElectronStudy") <<
"Module Label: " << g4Label <<
" Hits: " << hitLabEB <<
", " << hitLabEE;
85 double tempP[
NPBins_ + 1] = {0.0, 10.0, 20.0, 40.0, 60.0, 100.0, 500.0, 1000.0, 10000.0};
86 double tempEta[
NEtaBins_ + 1] = {0.0, 1.2, 1.6, 3.0};
94 if (!
tfile.isAvailable()) {
95 edm::LogInfo(
"ElectronStudy") <<
"TFileService unavailable: no histograms";
98 char name[20],
title[200], cpbin[30], cebin[30];
100 for (
unsigned int i = 0;
i <
NPBins_ + 1; ++
i) {
102 sprintf(cpbin,
" All p");
107 sprintf(cebin,
" All #eta");
110 sprintf(
name,
"R1%d%d",
i,
j);
111 sprintf(
title,
"E1/E9 for %s%s", cpbin, cebin);
114 histoR1[
i][
j]->GetYaxis()->SetTitle(
"Tracks");
115 sprintf(
name,
"R2%d%d",
i,
j);
116 sprintf(
title,
"E1/E25 for %s%s", cpbin, cebin);
119 histoR2[
i][
j]->GetYaxis()->SetTitle(
"Tracks");
120 sprintf(
name,
"R3%d%d",
i,
j);
121 sprintf(
title,
"E9/E25 for %s%s", cpbin, cebin);
124 histoR3[
i][
j]->GetYaxis()->SetTitle(
"Tracks");
125 sprintf(
name,
"E1x1%d%d",
i,
j);
126 sprintf(
title,
"E1/P for %s%s", cpbin, cebin);
130 sprintf(
name,
"E3x3%d%d",
i,
j);
131 sprintf(
title,
"E9/P for %s%s", cpbin, cebin);
135 sprintf(
name,
"E5x5%d%d",
i,
j);
136 sprintf(
title,
"E25/P for %s%s", cpbin, cebin);
150 desc.addUntracked<
int>(
"Verbosity", 0);
151 descriptions.
add(
"electronStudy",
desc);
189 <<
" valid[EE]: " << caloHitEE.
isValid();
194 edm::PCaloHitContainer::const_iterator ihit;
195 for (ihit = caloHitEB->begin(), indx = 0; ihit != caloHitEB->end(); ihit++, indx++) {
197 edm::LogVerbatim(
"IsoTrack") <<
"Hit[" << indx <<
"] " <<
id <<
" E " << ihit->energy() <<
" T "
200 for (ihit = caloHitEE->begin(), indx = 0; ihit != caloHitEE->end(); ihit++, indx++) {
202 edm::LogVerbatim(
"IsoTrack") <<
"Hit[" << indx <<
"] " <<
id <<
" E " << ihit->energy() <<
" T "
206 edm::SimTrackContainer::const_iterator simTrkItr = SimTk->begin();
207 for (indx = 0; simTrkItr != SimTk->end(); simTrkItr++, indx++) {
209 edm::LogVerbatim(
"IsoTrack") <<
"ElectronStudy: Track[" << indx <<
"] ID " << simTrkItr->trackId() <<
" type "
210 << simTrkItr->type() <<
" charge " << simTrkItr->charge() <<
" p "
211 << simTrkItr->momentum() <<
" Generator Index " << simTrkItr->genpartIndex()
212 <<
" vertex " << simTrkItr->vertIndex();
213 if (
std::abs(simTrkItr->type()) == 11 && simTrkItr->vertIndex() != -1) {
214 int thisTrk = simTrkItr->trackId();
218 DetId hotCell = isoCell;
223 hotCell, caloHitEB, caloHitEE, geo, caloTopology, 0, 0, -100.0, -100.0, -500.0, 500.0, (
verbose_ > 2));
225 hotCell, caloHitEB, caloHitEE, geo, caloTopology, 1, 1, -100.0, -100.0, -500.0, 500.0, (
verbose_ > 2));
227 hotCell, caloHitEB, caloHitEE, geo, caloTopology, 2, 2, -100.0, -100.0, -500.0, 500.0, (
verbose_ > 2));
228 double p = simTrkItr->momentum().P();
229 double eta =
std::abs(simTrkItr->momentum().eta());
230 int etaBin = -1, momBin = -1;
235 for (
int ipt = 0; ipt <
NPBins_; ipt++) {
239 double r1 = -1,
r2 = -1, r3 = -1;
247 edm::LogVerbatim(
"IsoTrack") <<
"ElectronStudy: p " <<
p <<
" [" << momBin <<
"] eta " <<
eta <<
" ["
254 edm::LogVerbatim(
"IsoTrack") <<
" e1x1 " << e1x1 <<
"|" <<
r1 <<
"|" <<
r2 <<
" e3x3 " << e3x3 <<
"|" << r3