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";
117 sprintf(histo_n,
"Number_of_all_DT_hits");
118 sprintf(histo_t,
"Number_of_all_DT_hits");
121 sprintf(histo_n,
"Number_of_muon_DT_hits");
122 sprintf(histo_t,
"Number_of_muon_DT_hits");
125 sprintf(histo_n,
"Tof_of_hits ");
126 sprintf(histo_t,
"Tof_of_hits ");
127 meToF = iBooker.
book1D(histo_n, histo_t, 100, -0.5, 50.);
129 sprintf(histo_n,
"DT_energy_loss_keV");
130 sprintf(histo_t,
"DT_energy_loss_keV");
133 sprintf(histo_n,
"Momentum_at_MB1");
134 sprintf(histo_t,
"Momentum_at_MB1");
137 sprintf(histo_n,
"Momentum_at_MB4");
138 sprintf(histo_t,
"Momentum_at_MB4");
141 sprintf(histo_n,
"Loss_of_muon_Momentum_in_Iron");
142 sprintf(histo_t,
"Loss_of_muon_Momentum_in_Iron");
145 sprintf(histo_n,
"Local_x-coord_vs_local_z-coord_of_muon_hit");
146 sprintf(histo_t,
"Local_x-coord_vs_local_z-coord_of_muon_hit");
147 meLocalXvsZ = iBooker.
book2D(histo_n, histo_t, 100, -150., 150., 100, -0.8, 0.8);
149 sprintf(histo_n,
"local_x-coord_vs_local_y-coord_of_muon_hit");
150 sprintf(histo_t,
"local_x-coord_vs_local_y-coord_of_muon_hit");
151 meLocalXvsY = iBooker.
book2D(histo_n, histo_t, 100, -150., 150., 100, -150., 150.);
153 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit");
154 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit");
157 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit");
158 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit");
163 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-2");
164 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-2");
167 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-2");
168 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-2");
171 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-1");
172 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w-1");
175 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-1");
176 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w-1");
179 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w0");
180 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w0");
183 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w0");
184 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w0");
187 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w1");
188 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w1");
191 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w1");
192 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w1");
195 sprintf(histo_n,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w2");
196 sprintf(histo_t,
"Global_x-coord_vs_global_z-coord_of_muon_hit_w2");
199 sprintf(histo_n,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w2");
200 sprintf(histo_t,
"Global_x-coord_vs_global_y-coord_of_muon_hit_w2");
205 sprintf(histo_n,
"Wheel_occupancy");
206 sprintf(histo_t,
"Wheel_occupancy");
209 sprintf(histo_n,
"Station_occupancy");
210 sprintf(histo_t,
"Station_occupancy");
213 sprintf(histo_n,
"Sector_occupancy");
214 sprintf(histo_t,
"Sector_occupancy");
217 sprintf(histo_n,
"SuperLayer_occupancy");
218 sprintf(histo_t,
"SuperLayer_occupancy");
221 sprintf(histo_n,
"Layer_occupancy");
222 sprintf(histo_t,
"Layer_occupancy");
225 sprintf(histo_n,
"Wire_occupancy");
226 sprintf(histo_t,
"Wire_occupancy");
229 sprintf(histo_n,
"path_followed_by_muon");
230 sprintf(histo_t,
"path_followed_by_muon");
233 sprintf(histo_n,
"chamber_occupancy");
234 sprintf(histo_t,
"chamber_occupancy");
237 sprintf(histo_n,
"radius_of_hit");
238 sprintf(histo_t,
"radius_of_hit");
241 sprintf(histo_n,
"costheta_of_hit");
242 sprintf(histo_t,
"costheta_of_hit");
245 sprintf(histo_n,
"global_eta_of_hit");
246 sprintf(histo_t,
"global_eta_of_hit");
249 sprintf(histo_n,
"global_phi_of_hit");
250 sprintf(histo_t,
"global_phi_of_hit");
263 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") <<
"Processing run " << nrun <<
", event " <<
nevt;
268 std::vector<const edm::StableProvenance*> AllProv;
269 iEvent.getAllStableProvenance(AllProv);
272 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") <<
"Number of Provenances = " << AllProv.size();
275 TString eventout(
"\nProvenance info:\n");
277 for (
unsigned int i = 0;
i < AllProv.size(); ++
i) {
278 eventout +=
"\n ******************************";
279 eventout +=
"\n Module : ";
280 eventout += AllProv[
i]->moduleLabel();
281 eventout +=
"\n ProductID : ";
282 eventout += AllProv[
i]->productID().id();
283 eventout +=
"\n ClassName : ";
284 eventout += AllProv[
i]->className();
285 eventout +=
"\n InstanceName : ";
286 eventout += AllProv[
i]->productInstanceName();
287 eventout +=
"\n BranchName : ";
288 eventout += AllProv[
i]->branchName();
290 eventout +=
" ******************************\n";
291 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") << eventout <<
"\n";
298 edm::LogInfo(
"MuonSimHitsValidAnalyzer::analyze") <<
"Done gathering data from event.";
306 eventout =
"\nGathering DT info:";
309 edm::PSimHitContainer::const_iterator itHit;
315 if (!theDTGeometry.
isValid()) {
317 <<
"Unable to find MuonGeometryRecord for the DTGeometry in event!";
325 if (!MuonDTContainer.
isValid()) {
326 edm::LogWarning(
"MuonSimHitsValidAnalyzer::fillDT") <<
"Unable to find MuonDTHits in event!";
338 for (itHit = MuonDTContainer->begin(); itHit != MuonDTContainer->end(); ++itHit) {
342 DetId theDetUnitId(itHit->detUnitId());
352 edm::LogWarning(
"MuonSimHitsValidAnalyzer::fillDT") <<
"Unable to get GeomDetUnit from theDTMuon for hit " <<
i;
363 if (
abs(itHit->particleType()) == 13) {
368 iden = itHit->detUnitId();
395 mom1 = itHit->pabs();
404 mom4 = itHit->pabs();
414 meLocalXvsZ->
Fill(itHit->localPosition().x(), itHit->localPosition().z());
417 meLocalXvsY->
Fill(itHit->localPosition().x(), itHit->localPosition().y());
421 globposz = bsurf.toGlobal(itHit->localPosition()).
z();
467 <<
"MuonDT PSimHit " <<
i <<
" is expected to be (det,subdet) = (" <<
dMuon <<
"," <<
sdMuonDT
474 eventout +=
"\n Number of DT muon Hits collected:......... ";
480 edm::LogInfo(
"MuonSimHitsValidAnalyzer::fillDT") << eventout <<
"\n";