36 trigGeomUtils(nullptr) {
37 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerLutTask") <<
"[DTLocalTriggerLutTask]: Constructor" << endl;
66 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerLutTask")
67 <<
"[DTLocalTriggerLutTask]: analyzed " <<
nEvents <<
" events" << endl;
90 string chTag =
"_W" +
wheel.str() +
"_Sec" + sector.str() +
"_St" +
station.str();
91 std::map<std::string, MonitorElement*>& chambMap =
chHistos[chId.
rawId()];
93 string hName =
"TM_PhiResidualIn";
95 chambMap[hName] = ibooker.
book1D(hName + chTag,
96 "Trigger local position In - Segment local position (correlated triggers)",
101 hName =
"TM_PhiResidualOut";
103 chambMap[hName] = ibooker.
book1D(hName + chTag,
104 "Trigger local position Out - Segment local position (correlated triggers)",
109 hName =
"TM_PhibResidualIn";
111 chambMap[hName] = ibooker.
book1D(hName + chTag,
112 "Trigger local direction In - Segment local direction (correlated triggers)",
117 hName =
"TM_PhibResidualOut";
119 chambMap[hName] = ibooker.
book1D(hName + chTag,
120 "Trigger local direction Out - Segment local direction (correlated triggers)",
126 hName =
"TM_PhitkvsPhitrig";
129 ibooker.
book2D(hName + chTag,
"Local position: segment vs trigger", 100, -500., 500., 100, -500., 500.);
130 hName =
"TM_PhibtkvsPhibtrig";
133 ibooker.
book2D(hName + chTag,
"Local direction : segment vs trigger", 200, -40., 40., 200, -40., 40.);
134 hName =
"TM_PhibResidualvsTkPos";
137 ibooker.
book2D(hName + chTag,
"Local direction residual vs Segment Position", 100, -500., 500., 200, -10., 10.);
138 hName =
"TM_PhiResidualvsTkPos";
141 ibooker.
book2D(hName + chTag,
"Local Position residual vs Segment Position", 100, -500., 500., 200, -10., 10.);
148 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerLutTask") <<
"[DTLocalTriggerLutTask]: bookHistograms" << endl;
150 std::vector<const DTChamber*>::const_iterator chambIt =
muonGeom->
chambers().begin();
151 std::vector<const DTChamber*>::const_iterator chambEnd =
muonGeom->
chambers().end();
153 for (; chambIt != chambEnd; ++chambIt)
159 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerLutTask") <<
"[DTLocalTriggerLutTask]: Begin of LS transition" << endl;
162 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerLutTask") <<
"[DTLocalTriggerLutTask]: Cleaning histos" << endl;
163 map<uint32_t, map<string, MonitorElement*> >::const_iterator chambIt =
chHistos.begin();
164 map<uint32_t, map<string, MonitorElement*> >::const_iterator chambEnd =
chHistos.end();
166 for (; chambIt != chambEnd; ++chambIt) {
167 map<string, MonitorElement*>::const_iterator histoIt = chambIt->second.begin();
168 map<string, MonitorElement*>::const_iterator histoEnd = chambIt->second.end();
169 for (; histoIt != histoEnd; ++histoIt) {
170 histoIt->second->Reset();
184 vector<L1MuDTChambPhDigi>
const* trigsIn = trigHandleIn->
getContainer();
186 vector<L1MuDTChambPhDigi>
const* trigsOut = trigHandleOut->
getContainer();
194 vector<const DTRecSegment4D*> best4DSegments;
196 for (chamberId = segments4D->id_begin(); chamberId != segments4D->id_end(); ++chamberId) {
205 for (; trackIt != trackEnd; ++trackIt) {
206 if (trackIt->hasPhi()) {
207 dof = trackIt->phiSegment()->degreesOfFreedom();
209 tmpBest = &(*trackIt);
216 best4DSegments.push_back(tmpBest);
219 vector<const DTRecSegment4D*>::const_iterator bestTrackIt = best4DSegments.begin();
220 vector<const DTRecSegment4D*>::const_iterator bestTrackEnd = best4DSegments.end();
222 for (; bestTrackIt != bestTrackEnd; ++bestTrackIt) {
223 if ((*bestTrackIt)->hasPhi()) {
225 int nHitsPhi = (*bestTrackIt)->phiSegment()->degreesOfFreedom() + 2;
230 float trackPosPhi, trackPosEta, trackDirPhi, trackDirEta;
233 map<string, MonitorElement*>& chMap =
chHistos[chId.
rawId()];
241 double deltaPos = trigPos - trackPosPhi;
243 double deltaDir = trigDir - trackDirPhi;
245 chMap.find(
"TM_PhiResidualIn")->second->Fill(deltaPos);
246 chMap.find(
"TM_PhibResidualIn")->second->Fill(deltaDir);
249 chMap.find(
"TM_PhitkvsPhitrig")->second->Fill(trigPos, trackPosPhi);
250 chMap.find(
"TM_PhibtkvsPhibtrig")->second->Fill(trigDir, trackDirPhi);
251 chMap.find(
"TM_PhibResidualvsTkPos")->second->Fill(trackPosPhi, trigDir - trackDirPhi);
252 chMap.find(
"TM_PhiResidualvsTkPos")->second->Fill(trackPosPhi, trigPos - trackPosPhi);
263 double deltaPos = trigPos - trackPosPhi;
265 double deltaDir = trigDir - trackDirPhi;
267 chMap.find(
"TM_PhiResidualOut")->second->Fill(deltaPos);
268 chMap.find(
"TM_PhibResidualOut")->second->Fill(deltaDir);
280 for (
int st = 0; st <= 4; ++st)
281 for (
int wh = 0; wh <= 5; ++wh)
285 vector<L1MuDTChambPhDigi>::const_iterator trigIt = trigs->begin();
286 vector<L1MuDTChambPhDigi>::const_iterator trigEnd = trigs->end();
287 for (; trigIt != trigEnd; ++trigIt) {
288 int wh = trigIt->whNum();
289 int sec = trigIt->scNum() + 1;
290 int st = trigIt->stNum();
291 int qual = trigIt->code();
306 for (
int st = 0; st <= 4; ++st)
307 for (
int wh = 0; wh <= 5; ++wh)
311 vector<L1MuDTChambPhDigi>::const_iterator trigIt = trigs->begin();
312 vector<L1MuDTChambPhDigi>::const_iterator trigEnd = trigs->end();
313 for (; trigIt != trigEnd; ++trigIt) {
314 int wh = trigIt->whNum();
315 int sec = trigIt->scNum() + 1;
316 int st = trigIt->stNum();
317 int qual = trigIt->code();