53 LogVerbatim(
"DTDQM|DTMonitorModule|DTChamberEfficiency") <<
"DTChamberEfficiency: constructor called";
60 theTracksToken_ = consumes<reco::TrackCollection>(theTracksLabel_);
74 thedt4DSegments, thecscSegments, labelRPCRecHits,
InputTag(),
InputTag(), iC,
true,
false,
false,
false);
76 theNavigationType = pSet.
getParameter<
string>(
"NavigationType");
82 LogTrace(
"DTDQM|DTMonitorModule|DTChamberEfficiency") <<
"DTChamberEfficiency: destructor called";
86 delete theMeasurementExtractor;
93 LogTrace(
"DTDQM|DTMonitorModule|DTChamberEfficiency") <<
"DTChamberEfficiency: booking histos";
99 vector<MonitorElement*>
histos;
101 stringstream wheel_str;
105 "hCountSectVsChamb_All_W" + wheel_str.str(),
"Countings for wheel " + wheel_str.str(), 14, 1., 15., 4, 1., 5.));
108 "hCountSectVsChamb_Qual_W" + wheel_str.str(),
"Countings for wheel " + wheel_str.str(), 14, 1., 15., 4, 1., 5.));
111 "hExtrapSectVsChamb_W" + wheel_str.str(),
"Extrapolations for wheel " + wheel_str.str(), 14, 1., 15., 4, 1., 5.));
113 histosPerW.push_back(
histos);
120 LogTrace(
"DTDQM|DTMonitorModule|DTChamberEfficiency")
121 <<
"--- [DTChamberEfficiency] Event analysed #Run: " <<
event.id().run() <<
" #Event: " <<
event.id().event()
124 theService->update(eventSetup);
125 theMeasurementExtractor->setEvent(
event);
129 event.getByToken(theTracksToken_,
tracks);
145 LogTrace(
"DTDQM|DTMonitorModule|DTChamberEfficiency") <<
"--- New track" << endl;
146 set<DTChamberId> chAlrUsed;
148 DetId rHitid = (*rHit)->geographicalId();
152 if (chAlrUsed.find(wId) != chAlrUsed.end())
154 chAlrUsed.insert(wId);
155 LogTrace(
"DTDQM|DTMonitorModule|DTChamberEfficiency") <<
" " << wId << endl;
161 const DetLayer* initialLayer = theService->detLayerGeometry()->idToLayer(
id);
167 vector<const DetLayer*> layer_list =
168 compatibleLayers(*theService->muonNavigationSchool(), initialLayer, *init_fs_free,
alongMomentum);
169 vector<const DetLayer*> layer_list_2 =
170 compatibleLayers(*theService->muonNavigationSchool(), initialLayer, *init_fs_free,
oppositeToMomentum);
172 layer_list.insert(layer_list.end(), layer_list_2.begin(), layer_list_2.end());
174 set<DTChamberId> alreadyCheckedCh;
177 for (
int i = 0;
i < (
int)layer_list.size();
i++) {
184 vector<DetWithState> dss = layer_list.at(
i)->compatibleDets(tsos, *
propagator(), *theEstimator);
191 const DetId idDetLay = detWithState.first->geographicalId();
194 if (!chamberSelection(idDetLay, trans_track))
200 if (alreadyCheckedCh.find(DTid) != alreadyCheckedCh.end())
202 alreadyCheckedCh.insert(DTid);
206 layer_list.at(
i), detWithState.first, detWithState.second, *theEstimator,
event);
207 LogTrace(
"DTDQM|DTMonitorModule|DTChamberEfficiency")
208 <<
" chamber: " << DTid <<
" has: " << detMeasurements_initial.size() <<
" comp. meas." << endl;
215 vector<MonitorElement*>
histos = histosPerW[DTid.
wheel() + 2];
217 if (!detMeasurements_initial.empty())
219 if (!detMeasurements.empty())
225 LogInfo(
"DTDQM|DTMonitorModule|DTChamberEfficiency")
226 <<
"[DTChamberEfficiency] Collection: " << theTracksLabel_ <<
" is not valid!" << endl;
237 if (trans_track.
recHit(0)->geographicalId() == idDetLay || trans_track.
recHit(1)->geographicalId() == idDetLay)
246 for (MeasurementContainer::const_iterator mescont_Itr = seg_list.begin(); mescont_Itr != seg_list.end();
253 for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator recList_Itr = recHit_list.begin();
254 recList_Itr != recHit_list.end();
256 nhit_seg += (
int)(*recList_Itr)->transientHits().size();
261 if (tmpId.
station() < 4 && nhit_seg >= 12)
262 result.push_back(*mescont_Itr);
263 if (tmpId.
station() == 4 && nhit_seg >= 8)
264 result.push_back(*mescont_Itr);
274 vector<const DetLayer*> detLayers;
276 if (theNavigationType ==
"Standard") {
282 detLayers.insert(detLayers.begin(), initialLayer);
284 }
else if (theNavigationType ==
"Direct") {
288 LogError(
"DTDQM|DTMonitorModule|DTChamberEfficiency") <<
"No Properly Navigation Selected!!" << endl;
294 return theService->propagator(
"SteppingHelixPropagatorAny");