18 getAllProvenances(
false),
19 printProvenanceInfo(
false),
42 edm::LogInfo(
"MuonSimHitsValidAnalyzer::MuonSimHitsValidAnalyzer")
43 <<
"\n===============================\n"
44 <<
"Initialized as EDAnalyzer with parameter values:\n"
45 <<
" Name = " <<
fName <<
"\n"
47 <<
" Label = " <<
label <<
"\n"
53 <<
" DTHitsSrc = " <<
l.module <<
":" <<
l.productInstance
57 <<
"===============================\n";
71 geomToken_ = esConsumes<DTGeometry, MuonGeometryRecord>();
118 sprintf(histo_n,
"Number_of_all_DT_hits");
119 sprintf(histo_t,
"Number_of_all_DT_hits");
122 sprintf(histo_n,
"Number_of_muon_DT_hits");
123 sprintf(histo_t,
"Number_of_muon_DT_hits");
126 sprintf(histo_n,
"Tof_of_hits ");
127 sprintf(histo_t,
"Tof_of_hits ");
128 meToF = iBooker.
book1D(histo_n, histo_t, 100, -0.5, 50.);
130 sprintf(histo_n,
"DT_energy_loss_keV");
131 sprintf(histo_t,
"DT_energy_loss_keV");
134 sprintf(histo_n,
"Momentum_at_MB1");
135 sprintf(histo_t,
"Momentum_at_MB1");
138 sprintf(histo_n,
"Momentum_at_MB4");
139 sprintf(histo_t,
"Momentum_at_MB4");
142 sprintf(histo_n,
"Loss_of_muon_Momentum_in_Iron");
143 sprintf(histo_t,
"Loss_of_muon_Momentum_in_Iron");
146 sprintf(histo_n,
"Local_x-coord_vs_local_z-coord_of_muon_hit");
147 sprintf(histo_t,
"Local_x-coord_vs_local_z-coord_of_muon_hit");
148 meLocalXvsZ = iBooker.
book2D(histo_n, histo_t, 100, -150., 150., 100, -0.8, 0.8);
150 sprintf(histo_n,
"local_x-coord_vs_local_y-coord_of_muon_hit");
151 sprintf(histo_t,
"local_x-coord_vs_local_y-coord_of_muon_hit");
152 meLocalXvsY = iBooker.
book2D(histo_n, histo_t, 100, -150., 150., 100, -150., 150.);
154 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit");
155 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit");
158 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit");
159 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit");
164 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-2");
165 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-2");
168 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-2");
169 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-2");
172 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-1");
173 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-1");
176 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-1");
177 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-1");
180 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w0");
181 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w0");
184 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w0");
185 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w0");
188 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w1");
189 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w1");
192 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w1");
193 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w1");
196 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w2");
197 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w2");
200 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w2");
201 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w2");
206 sprintf(histo_n,
"Wheel_occupancy");
207 sprintf(histo_t,
"Wheel_occupancy");
210 sprintf(histo_n,
"Station_occupancy");
211 sprintf(histo_t,
"Station_occupancy");
214 sprintf(histo_n,
"Sector_occupancy");
215 sprintf(histo_t,
"Sector_occupancy");
218 sprintf(histo_n,
"SuperLayer_occupancy");
219 sprintf(histo_t,
"SuperLayer_occupancy");
222 sprintf(histo_n,
"Layer_occupancy");
223 sprintf(histo_t,
"Layer_occupancy");
226 sprintf(histo_n,
"Wire_occupancy");
227 sprintf(histo_t,
"Wire_occupancy");
230 sprintf(histo_n,
"path_followed_by_muon");
231 sprintf(histo_t,
"path_followed_by_muon");
234 sprintf(histo_n,
"chamber_occupancy");
235 sprintf(histo_t,
"chamber_occupancy");
238 sprintf(histo_n,
"radius_of_hit");
239 sprintf(histo_t,
"radius_of_hit");
242 sprintf(histo_n,
"costheta_of_hit");
243 sprintf(histo_t,
"costheta_of_hit");
246 sprintf(histo_n,
"global_eta_of_hit");
247 sprintf(histo_t,
"global_eta_of_hit");
250 sprintf(histo_n,
"global_phi_of_hit");
251 sprintf(histo_t,
"global_phi_of_hit");
264 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") <<
"Processing run " << nrun <<
", event " <<
nevt;
269 std::vector<const edm::StableProvenance*> AllProv;
270 iEvent.getAllStableProvenance(AllProv);
273 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") <<
"Number of Provenances = " << AllProv.size();
276 TString eventout(
"\nProvenance info:\n");
278 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
279 eventout +=
"\n ******************************";
280 eventout +=
"\n Module : ";
281 eventout += AllProv[
i]->moduleLabel();
282 eventout +=
"\n ProductID : ";
283 eventout += AllProv[
i]->productID().id();
284 eventout +=
"\n ClassName : ";
285 eventout += AllProv[
i]->className();
286 eventout +=
"\n InstanceName : ";
287 eventout += AllProv[
i]->productInstanceName();
288 eventout +=
"\n BranchName : ";
289 eventout += AllProv[
i]->branchName();
291 eventout +=
" ******************************\n";
292 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") << eventout <<
"\n";
299 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") <<
"Done gathering data from event.";
307 eventout =
"\nGathering DT info:";
310 edm::PSimHitContainer::const_iterator itHit;
316 <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
324 if (!MuonDTContainer.
isValid()) {
325 edm::LogWarning(
"MuonSimHitsValidAnalyzer::fillDT") <<
"Unable to find MuonDTHits in event!";
337 for (itHit = MuonDTContainer->begin(); itHit != MuonDTContainer->end(); ++itHit) {
341 DetId theDetUnitId(itHit->detUnitId());
351 edm::LogWarning(
"MuonSimHitsValidAnalyzer::fillDT") <<
"Unable to get GeomDetUnit from theDTMuon for hit " <<
i;
362 if (
abs(itHit->particleType()) == 13) {
367 iden = itHit->detUnitId();
394 mom1 = itHit->pabs();
403 mom4 = itHit->pabs();
413 meLocalXvsZ->
Fill(itHit->localPosition().x(), itHit->localPosition().z());
416 meLocalXvsY->
Fill(itHit->localPosition().x(), itHit->localPosition().y());
420 globposz = bsurf.toGlobal(itHit->localPosition()).
z();
466 <<
"MuonDT PSimHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dMuon <<
"," <<
sdMuonDT
473 eventout +=
"\n Number of DT muon Hits collected:......... ";
479 edm::LogInfo(
"MuonSimHitsValidAnalyzer::fillDT") << eventout <<
"\n";