37 isLocalRun(ps.getUntrackedParameter<
bool>(
"localrun",
true))
44 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: Constructor"<<endl;
49 tm_Token_ = consumes<L1MuDTChambPhContainer>(
54 ros_Token_ = consumes<DTLocalTriggerCollection>(
56 seg_Token_ = consumes<DTRecSegment4DCollection>(
75 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: analyzed " <<
nevents <<
" events" << endl;
90 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: bookHistograms" << endl;
92 if(
parameters.getUntrackedParameter<
bool>(
"staticBooking",
true)) {
94 vector<string> trigSources;
95 if(
parameters.getUntrackedParameter<
bool>(
"localrun",
true)) {
96 trigSources.push_back(
"");
99 trigSources.push_back(
"_DTonly");
100 trigSources.push_back(
"_NoDT");
101 trigSources.push_back(
"_DTalso");
103 vector<string>::const_iterator trigSrcIt = trigSources.begin();
104 vector<string>::const_iterator trigSrcEnd = trigSources.end();
106 if(
parameters.getUntrackedParameter<
bool>(
"process_tm",
true)) {
112 for (
int wh=-2;wh<3;++wh){
113 for (
int sect=1;sect<13;++sect){
116 if (
parameters.getUntrackedParameter<
bool>(
"process_tm",
true)){
117 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"TM_BXvsQual"+(*trigSrcIt));
118 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"TM_QualvsPhirad"+(*trigSrcIt));
121 if (
parameters.getUntrackedParameter<
bool>(
"process_ddu",
true)){
122 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"DDU_BXvsQual"+(*trigSrcIt));
130 for (;trigSrcIt!=trigSrcEnd;++trigSrcIt){
131 for (
int wh=-2;wh<3;++wh){
132 if (
parameters.getUntrackedParameter<
bool>(
"process_tm",
true) &&
133 parameters.getUntrackedParameter<
bool>(
"process_ddu",
true)){
136 for (
int sect=1;sect<13;++sect){
139 if (
parameters.getUntrackedParameter<
bool>(
"process_tm",
true)){
141 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"TM_BXvsQual_In"+(*trigSrcIt));
143 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"TM_QualvsPhirad_In"+(*trigSrcIt));
144 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"TM_QualvsPhibend_In"+(*trigSrcIt));
146 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"TM_Flag1stvsQual_In"+(*trigSrcIt));
147 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"TM_FlagUpDownvsQual_In"+(*trigSrcIt));
149 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"TM_BestQual_In"+(*trigSrcIt));
151 bookHistos(ibooker, dtChId,
"LocalTriggerTheta",
"TM_PositionvsBX"+(*trigSrcIt));
152 bookHistos(ibooker, dtChId,
"LocalTriggerTheta",
"TM_QualityvsBX"+(*trigSrcIt));
154 bookHistos(ibooker, dtChId,
"LocalTriggerTheta",
"TM_PositionvsQual"+(*trigSrcIt));
156 bookHistos(ibooker, dtChId,
"LocalTriggerTheta",
"TM_ThetaBXvsQual"+(*trigSrcIt));
157 bookHistos(ibooker, dtChId,
"LocalTriggerTheta",
"TM_ThetaBestQual"+(*trigSrcIt));
160 if (
parameters.getUntrackedParameter<
bool>(
"process_seg",
true)){
161 bookHistos(ibooker, dtChId,
"Segment",
"TM_PhitkvsPhitrig"+(*trigSrcIt));
162 bookHistos(ibooker, dtChId,
"Segment",
"TM_PhibtkvsPhibtrig"+(*trigSrcIt));
163 bookHistos(ibooker, dtChId,
"Segment",
"TM_PhiResidual"+(*trigSrcIt));
164 bookHistos(ibooker, dtChId,
"Segment",
"TM_PhiResidualvsLUTPhi"+(*trigSrcIt));
165 bookHistos(ibooker, dtChId,
"Segment",
"TM_PhibResidual"+(*trigSrcIt));
166 bookHistos(ibooker, dtChId,
"Segment",
"TM_HitstkvsQualtrig"+(*trigSrcIt));
167 bookHistos(ibooker, dtChId,
"Segment",
"TM_TrackPosvsAngle"+(*trigSrcIt));
168 bookHistos(ibooker, dtChId,
"Segment",
"TM_TrackPosvsAngleandTrig"+(*trigSrcIt));
169 bookHistos(ibooker, dtChId,
"Segment",
"TM_TrackPosvsAngleandTrigHHHL"+(*trigSrcIt));
171 bookHistos(ibooker, dtChId,
"Segment",
"TM_TrackThetaPosvsAngle"+(*trigSrcIt));
172 bookHistos(ibooker, dtChId,
"Segment",
"TM_TrackThetaPosvsAngleandTrig"+(*trigSrcIt));
173 bookHistos(ibooker, dtChId,
"Segment",
"TM_TrackThetaPosvsAngleandTrigH"+(*trigSrcIt));
179 if (
parameters.getUntrackedParameter<
bool>(
"process_ddu",
true)){
181 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"DDU_BXvsQual"+(*trigSrcIt));
182 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"DDU_Flag1stvsQual"+(*trigSrcIt));
183 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"DDU_BestQual"+(*trigSrcIt));
185 bookHistos(ibooker, dtChId,
"LocalTriggerTheta",
"DDU_ThetaBXvsQual"+(*trigSrcIt));
186 bookHistos(ibooker, dtChId,
"LocalTriggerTheta",
"DDU_ThetaBestQual"+(*trigSrcIt));
189 if (
parameters.getUntrackedParameter<
bool>(
"process_seg",
true)){
190 bookHistos(ibooker, dtChId,
"Segment",
"DDU_HitstkvsQualtrig"+(*trigSrcIt));
191 bookHistos(ibooker, dtChId,
"Segment",
"DDU_TrackPosvsAngle"+(*trigSrcIt));
192 bookHistos(ibooker, dtChId,
"Segment",
"DDU_TrackPosvsAngleandTrig"+(*trigSrcIt));
193 bookHistos(ibooker, dtChId,
"Segment",
"DDU_TrackPosvsAngleandTrigHHHL"+(*trigSrcIt));
195 bookHistos(ibooker, dtChId,
"Segment",
"DDU_TrackThetaPosvsAngle"+(*trigSrcIt));
196 bookHistos(ibooker, dtChId,
"Segment",
"DDU_TrackThetaPosvsAngleandTrig"+(*trigSrcIt));
197 bookHistos(ibooker, dtChId,
"Segment",
"DDU_TrackThetaPosvsAngleandTrigH"+(*trigSrcIt));
203 if (
parameters.getUntrackedParameter<
bool>(
"process_tm",
true) &&
204 parameters.getUntrackedParameter<
bool>(
"process_ddu",
true)){
205 bookHistos(ibooker, dtChId,
"LocalTriggerPhiIn",
"COM_QualDDUvsQualTM"+(*trigSrcIt));
210 for (
int sect=13;sect<15;++sect){
212 if (
parameters.getUntrackedParameter<
bool>(
"process_tm",
true) &&
213 parameters.getUntrackedParameter<
bool>(
"process_seg",
true)){
214 bookHistos(ibooker, dtChId,
"Segment",
"TM_PhitkvsPhitrig"+(*trigSrcIt));
215 bookHistos(ibooker, dtChId,
"Segment",
"TM_PhibtkvsPhibtrig"+(*trigSrcIt));
216 bookHistos(ibooker, dtChId,
"Segment",
"TM_PhiResidual"+(*trigSrcIt));
217 bookHistos(ibooker, dtChId,
"Segment",
"TM_PhiResidualvsLUTPhi"+(*trigSrcIt));
218 bookHistos(ibooker, dtChId,
"Segment",
"TM_PhibResidual"+(*trigSrcIt));
233 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: Begin of LS transition" << endl;
236 for(
map<uint32_t, map<string, MonitorElement*> > ::const_iterator
histo =
digiHistos.begin();
239 for(map<string, MonitorElement*> ::const_iterator ht = (*histo).second.begin();
240 ht != (*histo).second.end();
242 (*ht).second->Reset();
265 useSEG = all4DSegments.isValid() &&
parameters.getUntrackedParameter<
bool>(
"process_seg",
true) ;
277 vector<L1MuDTChambPhDigi>
const* l1PhTrig = l1DTTPGPh->
getContainer();
282 vector<L1MuDTChambThDigi>
const* l1ThTrig = l1DTTPGTh->
getContainer();
308 bool isTM = histoTag.substr(0,2) ==
"TM";
310 if (histoTag ==
"TM_ErrorsChamberID") {
323 stringstream
wheel; wheel << wh;
325 stringstream sector; sector <<
sc;
331 string histoType = histoTag.substr(3,histoTag.find(
"_",3)-3);
332 bool isTM = histoTag.substr(0,2) ==
"TM";
335 "/Sector" + sector.str() +
336 "/Station" + station.str() +
"/" +
folder);
338 string histoName = histoTag +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_St" + station.str();
340 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: booking " <<
topFolder(isTM) <<
"Wheel" << wheel.str()
341 <<
"/Sector" << sector.str()
342 <<
"/Station"<< station.str() <<
"/" << folder <<
"/" << histoName << endl;
344 if (histoType.find(
"BX") != string::npos){
345 if (histoTag.substr(0,2) ==
"TM"){
346 minBX=
parameters.getUntrackedParameter<
int>(
"minBXTM",-2) - 0.5;
347 maxBX=
parameters.getUntrackedParameter<
int>(
"maxBXTM",2) + 0.5;
350 minBX=
parameters.getUntrackedParameter<
int>(
"minBXDDU",0) - 0.5;
351 maxBX=
parameters.getUntrackedParameter<
int>(
"maxBXDDU",20) + 0.5;
353 rangeBX = (
int)(maxBX-minBX);
356 if ( folder ==
"LocalTriggerPhiIn") {
358 if( histoType ==
"BXvsQual" ){
360 ibooker.
book2D(histoName,
"BX vs trigger quality",7,-0.5,6.5,rangeBX,minBX,maxBX);
364 if( histoType ==
"BestQual" ){
366 ibooker.
book1D(histoName,
"Trigger quality of best primitives",7,-0.5,6.5);
370 if( histoType ==
"QualvsPhirad" ){
372 ibooker.
book2D(histoName,
"Trigger quality vs local position",100,-500.,500.,7,-0.5,6.5);
376 if( histoType ==
"QualvsPhibend" ) {
378 ibooker.
book2D(histoName,
"Trigger quality vs local direction",200,-40.,40.,7,-0.5,6.5);
382 if( histoType ==
"Flag1stvsQual" ) {
384 ibooker.
book2D(histoName,
"1st/2nd trig flag vs quality",7,-0.5,6.5,2,-0.5,1.5);
388 if( histoType ==
"FlagUpDownvsQual" ) {
390 ibooker.
book2D(histoName,
"Up/Down trig flag vs quality",7,-0.5,6.5,2,-0.5,1.5);
395 if( histoType ==
"QualDDUvsQualTM" ){
397 ibooker.
book2D(histoName,
"DDU quality vs TM quality",8,-1.5,6.5,8,-1.5,6.5);
404 else if ( folder ==
"LocalTriggerTheta") {
406 if( histoType ==
"PositionvsBX" ) {
408 ibooker.
book2D(histoName,
"Theta trigger position vs BX",rangeBX,minBX,maxBX,7,-0.5,6.5);
411 if( histoType ==
"PositionvsQual" ) {
413 ibooker.
book2D(histoName,
"Theta trigger position vs quality",2,0.5,2.5,7,-0.5,6.5);
417 if( histoType ==
"ThetaBXvsQual" ) {
419 ibooker.
book2D(histoName,
"BX vs trigger quality",2,0.5,2.5,rangeBX,minBX,maxBX);
422 if( histoType ==
"ThetaBestQual" ){
424 ibooker.
book1D(histoName,
"Trigger quality of best primitives (theta)",2,0.5,2.5);
430 else if ( folder ==
"Segment") {
432 if( histoType.find(
"TrackThetaPosvsAngle" ) == 0 ) {
434 string histoLabel =
"Position vs Angle (theta)";
435 if (histoType.find(
"andTrigH") != string::npos) histoLabel +=
" for H triggers";
436 else if (histoType.find(
"andTrig") != string::npos) histoLabel +=
" for triggers";
442 ibooker.
book2D(histoName,histoLabel,16,-40.,40.,nbins,min,max);
445 if( histoType.find(
"TrackPosvsAngle") == 0 ){
451 string histoLabel =
"Position vs Angle (phi)";
452 if (histoType.find(
"andTrigHHHL") != string::npos) histoLabel +=
" for HH/HL triggers";
453 else if (histoType.find(
"andTrig") != string::npos) histoLabel +=
" for triggers";
456 ibooker.
book2D(histoName,histoLabel,16,-40.,40.,nbins,min,max);
459 if( histoType ==
"PhitkvsPhitrig" ){
461 ibooker.
book2D(histoName,
"Local position: segment vs trigger",100,-500.,500.,100,-500.,500.);
464 if( histoType ==
"PhibtkvsPhibtrig" ){
466 ibooker.
book2D(histoName,
"Local direction : segment vs trigger",200,-40.,40.,200,-40.,40.);
469 if( histoType ==
"PhiResidual" ){
471 ibooker.
book1D(histoName,
"Trigger local position - Segment local position (correlated triggers)",400,-10.,10.);
474 if( histoType ==
"PhibResidual" ){
476 ibooker.
book1D(histoName,
"Trigger local direction - Segment local direction (correlated triggers)",500,-10.,10.);
479 if( histoType ==
"HitstkvsQualtrig" ){
481 ibooker.
book2D(histoName,
"Segment hits (phi) vs trigger quality",7,-0.5,6.5,10,0.5,10.5);
492 stringstream
wheel; wheel << wh;
494 string histoType = histoTag.substr(3,histoTag.find(
"_",3)-3);
495 bool isTM = histoTag.substr(0,2) ==
"TM";
499 string histoName = histoTag +
"_W" + wheel.str();
501 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: booking " <<
topFolder(isTM)
502 <<
"Wheel" << wheel.str() <<
"/" << histoName << endl;
504 if( histoType.find(
"BXDiff") != string::npos ){
515 std::vector<L1MuDTChambThDigi>
const* thTrigs ) {
525 for (
int i=0;
i<5;++
i){
526 for (
int j=0;j<6;++j){
527 for (
int k=0;
k<13;++
k){
534 vector<L1MuDTChambPhDigi>::const_iterator iph = phTrigs->begin();
535 vector<L1MuDTChambPhDigi>::const_iterator iphe = phTrigs->end();
536 for(; iph !=iphe ; ++iph) {
538 int phwheel = iph->whNum();
539 int phsec = iph->scNum() + 1;
540 int phst = iph->stNum();
541 int phbx = iph->bxNum();
542 int phcode = iph->code();
543 int phi1st = iph->Ts2Tag();
544 int updown = iph->UpDownTag();
552 if(phcode>
phcode_best[phwheel+3][phst][phsec] && phcode<7) {
554 iphbest[phwheel+3][phst][phsec] = &(*iph);
561 uint32_t indexCh = dtChId.
rawId();
563 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
566 innerME.find(
"TM_BXvsQual"+
trigsrc)->second->Fill(phcode,phbx-phi1st);
567 innerME.find(
"TM_QualvsPhirad"+
trigsrc)->second->Fill(x,phcode);
570 innerME.find(
"TM_BXvsQual_In"+
trigsrc)->second->Fill(phcode,phbx-phi1st);
571 innerME.find(
"TM_Flag1stvsQual_In"+
trigsrc)->second->Fill(phcode,phi1st);
572 innerME.find(
"TM_FlagUpDownvsQual_In"+
trigsrc)->second->Fill(phcode,updown);
574 innerME.find(
"TM_QualvsPhirad_In"+
trigsrc)->second->Fill(x,phcode);
575 innerME.find(
"TM_QualvsPhibend_In"+
trigsrc)->second->Fill(angle,phcode);
583 vector<L1MuDTChambThDigi>::const_iterator ith = thTrigs->begin();
584 vector<L1MuDTChambThDigi>::const_iterator ithe = thTrigs->end();
585 for(; ith != ithe; ++ith) {
586 int thwheel = ith->whNum();
587 int thsec = ith->scNum() + 1;
588 int thst = ith->stNum();
589 int thbx = ith->bxNum();
592 thcode[
pos] = ith->code(
pos);
596 ithbest[thwheel+3][thst][thsec] = &(*ith);
601 uint32_t indexCh = dtChId.
rawId();
603 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
607 innerME.find(
"TM_PositionvsBX"+
trigsrc)->second->Fill(thbx,
pos);
608 innerME.find(
"TM_PositionvsQual"+
trigsrc)->second->Fill(thcode[
pos],pos);
609 innerME.find(
"TM_ThetaBXvsQual"+
trigsrc)->second->Fill(thcode[pos],thbx);
618 for (
int st=1;st<5;++st){
619 for (
int wh=-2;wh<3;++wh){
620 for (
int sc=1;
sc<13;++
sc){
623 uint32_t indexCh =
id.rawId();
624 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
630 uint32_t indexCh =
id.rawId();
631 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
645 for (
int i=0;
i<5;++
i){
646 for (
int j=0;j<6;++j){
647 for (
int k=0;
k<13;++
k){
654 for (detUnitIt=trigsDDU->begin();
655 detUnitIt!=trigsDDU->end();
660 uint32_t indexCh =
id.
rawId();
661 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
664 int sec =
id.sector();
665 int st =
id.station();
668 trigIt!=range.second;
671 int bx = trigIt->bx();
672 int quality = trigIt->quality();
673 int thqual = trigIt->trTheta();
674 int flag1st = trigIt->secondTrack() ? 1 : 0;
677 if( quality>-1 && quality<7 ) {
685 innerME.find(
"DDU_BXvsQual"+
trigsrc)->second->Fill(quality,bx-flag1st);
688 innerME.find(
"DDU_BXvsQual"+
trigsrc)->second->Fill(quality,bx-flag1st);
689 innerME.find(
"DDU_Flag1stvsQual"+
trigsrc)->second->Fill(quality,flag1st);
692 if( thqual>0 && !
tpMode ) {
698 innerME.find(
"DDU_ThetaBXvsQual"+
trigsrc)->second->Fill(thqual,bx);
722 memset(
track_ok,
false,450*
sizeof(
bool));
724 DTRecSegment4DCollection::id_iterator chamberId;
725 vector<const DTRecSegment4D*> best4DSegments;
728 for (chamberId = segments4D->id_begin(); chamberId != segments4D->id_end(); ++chamberId){
735 for ( track = range.first; track != range.second; ++track){
737 if( (*track).hasPhi() ) {
739 dof = (*track).phiSegment()->degreesOfFreedom();
744 int wheel = (*track).chamberId().wheel();
745 int sector = (*track).chamberId().sector();
746 int station = (*track).chamberId().station();
750 else if (sector==14){
758 if (tmpBest) best4DSegments.push_back(tmpBest);
761 vector<const DTRecSegment4D*>::const_iterator btrack;
763 for ( btrack = best4DSegments.begin(); btrack != best4DSegments.end(); ++btrack ){
765 if( (*btrack)->hasPhi() ) {
767 int wheel = (*btrack)->chamberId().wheel();
768 int station = (*btrack)->chamberId().station();
769 int sector = (*btrack)->chamberId().sector();
771 float x_track, y_track, x_angle, y_angle;
773 int nHitsPhi = (*btrack)->phiSegment()->degreesOfFreedom()+2;
776 uint32_t indexCh = dtChId.
rawId();
777 map<string, MonitorElement*> &innerMECh =
digiHistos[indexCh];
780 indexCh = dtChIdSC.
rawId();
781 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
788 innerME.find(
"DDU_HitstkvsQualtrig"+
trigsrc)->second->Fill(
dduphcode_best[wheel+3][station][scsector],nHitsPhi);
796 innerME.find(
"TM_HitstkvsQualtrig"+
trigsrc)->second->Fill(
phcode_best[wheel+3][station][scsector],nHitsPhi);
798 if (
phcode_best[wheel+3][station][scsector]>3 && nHitsPhi>=7){
804 innerMECh.find(
"TM_PhitkvsPhitrig"+
trigsrc)->second->Fill(x_trigger,x_track);
805 innerMECh.find(
"TM_PhibtkvsPhibtrig"+
trigsrc)->second->Fill(angle_trigger,x_angle);
806 innerMECh.find(
"TM_PhiResidual"+
trigsrc)->second->Fill(x_trigger-x_track);
807 innerMECh.find(
"TM_PhibResidual"+
trigsrc)->second->Fill(angle_trigger-x_angle);
815 bool trigFlagTM =
false;
816 for (
int ist=1; ist<5; ist++){
820 track_ok[wheel+3][ist][scsector]==
true){
826 if (trigFlagTM && fabs(x_angle)<40. && nHitsPhi>=7){
829 innerME.find(
"TM_TrackPosvsAngle"+
trigsrc)->second->Fill(x_angle,x_track);
831 innerME.find(
"TM_TrackPosvsAngleandTrig"+
trigsrc)->second->Fill(x_angle,x_track);
833 innerME.find(
"TM_TrackPosvsAngleandTrigHHHL"+
trigsrc)->second->Fill(x_angle,x_track);
839 if ((*btrack)->hasZed() && trigFlagTM && fabs(y_angle)<40. && (*btrack)->zSegment()->degreesOfFreedom()>=1){
842 innerME.find(
"TM_TrackThetaPosvsAngle"+
trigsrc)->second->Fill(y_angle,y_track);
844 innerME.find(
"TM_TrackThetaPosvsAngleandTrig"+
trigsrc)->second->Fill(y_angle,y_track);
845 if (
thcode_best[wheel+3][station][scsector] == 2) {
846 innerME.find(
"TM_TrackThetaPosvsAngleandTrigH"+
trigsrc)->second->Fill(y_angle,y_track);
856 bool trigFlagDDU =
false;
857 for (
int ist=1; ist<5; ist++){
861 track_ok[wheel+3][ist][scsector]==
true){
867 if (trigFlagDDU && fabs(x_angle)<40. && nHitsPhi>=7){
870 innerME.find(
"DDU_TrackPosvsAngle"+
trigsrc)->second->Fill(x_angle,x_track);
872 innerME.find(
"DDU_TrackPosvsAngleandTrig"+
trigsrc)->second->Fill(x_angle,x_track);
874 innerME.find(
"DDU_TrackPosvsAngleandTrigHHHL"+
trigsrc)->second->Fill(x_angle,x_track);
880 if ((*btrack)->hasZed() && trigFlagDDU && fabs(y_angle)<40. && (*btrack)->zSegment()->degreesOfFreedom()>=1){
883 innerME.find(
"DDU_TrackThetaPosvsAngle"+
trigsrc)->second->Fill(y_angle,y_track);
885 innerME.find(
"DDU_TrackThetaPosvsAngleandTrig"+
trigsrc)->second->Fill(y_angle,y_track);
887 innerME.find(
"DDU_TrackThetaPosvsAngleandTrigH"+
trigsrc)->second->Fill(y_angle,y_track);
904 for (
int st=1;st<5;++st){
905 for (
int wh=-2;wh<3;++wh){
906 for (
int sc=1;
sc<13;++
sc){
910 uint32_t indexCh =
id.rawId();
911 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
918 (
wheelHistos[wh]).
find(
"COM_BXDiff"+trigsrc)->second->Fill(sc,st,bxDDU-bxTM);
934 axis=histo->GetXaxis();
937 axis=histo->GetYaxis();
941 string labels[7] = {
"LI",
"LO",
"HI",
"HO",
"LL",
"HL",
"HH"};
942 int istart = axis->GetXmin()<-1 ? 2 : 1;
943 for (
int i=0;
i<7;
i++) {
944 axis->SetBinLabel(
i+istart,labels[
i].c_str());
956 axis=histo->GetXaxis();
959 axis=histo->GetYaxis();
963 string labels[2] = {
"L",
"H"};
964 int istart = axis->GetXmin()<-1 ? 2 : 1;
965 for (
int i=0;
i<2;
i++) {
966 axis->SetBinLabel(
i+istart,labels[
i].c_str());
981 for (std::vector<LTCDigi>::const_iterator ltc_it = ltcdigis->begin(); ltc_it != ltcdigis->end(); ltc_it++){
983 size_t otherTriggerSum=0;
984 for (
size_t i = 1;
i < 6;
i++) {
985 otherTriggerSum += size_t((*ltc_it).HasTriggered(
i));
987 if ((*ltc_it).HasTriggered(0) && otherTriggerSum == 0)
989 else if (!(*ltc_it).HasTriggered(0))
991 else if ((*ltc_it).HasTriggered(0) && otherTriggerSum > 0)
LuminosityBlockID id() const
T getParameter(std::string const &) const
The_Container const * getContainer() const
T getUntrackedParameter(std::string const &, T const &) const
const int wheelArrayShift
std::pair< const_iterator, const_iterator > range
iterator range
void thetaRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute theta range in local chamber coordinates.
std::string baseFolderDDU
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
void runTMAnalysis(std::vector< L1MuDTChambPhDigi > const *phTrigs, std::vector< L1MuDTChambThDigi > const *thTrigs)
Run analysis on TM data.
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Beginrun.
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Book the histograms.
float trigDir(const L1MuDTChambPhDigi *trig)
Return local direction (trigger RF) for a given trigger primitive.
void setQLabelsTheta(MonitorElement *me, short int iaxis)
MonitorElement * tm_IDDataErrorPlot
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::string & topFolder(bool isTM)
Get the Top folder (different between Physics and TP and TM/DDU)
void runSegmentAnalysis(edm::Handle< DTRecSegment4DCollection > &segments4D)
Run analysis using DT 4D segments.
uint32_t rawId() const
get the raw id
edm::EDGetTokenT< DTRecSegment4DCollection > seg_Token_
edm::EDGetTokenT< L1MuDTChambPhContainer > tm_Token_
MonitorElement * bookProfile2D(Args &&...args)
void trigToSeg(int st, float &x, float dir)
Compute Trigger x coordinate in chamber RF.
MonitorElement * book1D(Args &&...args)
DTArr3LocalTrigger iphbestddu
edm::EDGetTokenT< L1MuDTChambThContainer > tmTh_Token_
DTLocalTriggerTask(const edm::ParameterSet &ps)
Constructor.
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Analyze.
edm::EDGetTokenT< DTLocalTriggerCollection > ros_Token_
edm::ESHandle< DTGeometry > muonGeom
void phiRange(const DTChamberId &id, float &min, float &max, int &nbins, float step=15)
Compute phi range in local chamber coordinates.
void bookHistos(DQMStore::IBooker &, const DTChamberId &dtCh, std::string folder, std::string histoTag)
void setCurrentFolder(const std::string &fullpath)
void runDDUvsTMAnalysis(std::string &trigsrc)
Run analysis on ROS data.
MonitorElement * book2D(Args &&...args)
LuminosityBlockNumber_t luminosityBlock() const
void setQLabels(MonitorElement *me, short int iaxis)
Set Quality labels.
std::vector< DTLocalTrigger >::const_iterator const_iterator
Phi_Container const * getContainer() const
return(e1-e2)*(e1-e2)+dp *dp
DTTrigGeomUtils * trigGeomUtils
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) override
To reset the MEs.
void bookWheelHistos(DQMStore::IBooker &, int wh, std::string histoTag)
Book the histograms.
void triggerSource(const edm::Event &e)
Get the L1A source.
std::pair< const_iterator, const_iterator > Range
float trigPos(const L1MuDTChambPhDigi *trig)
Return local position (trigger RF) for a given trigger primitive.
int station() const
Return the station number.
int wheel() const
Return the wheel number.
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void bookBarrelHistos(DQMStore::IBooker &, std::string histoTag)
Book the histograms.
std::map< uint32_t, std::map< std::string, MonitorElement * > > digiHistos
~DTLocalTriggerTask() override
Destructor.
void computeSCCoordinates(const DTRecSegment4D *track, int &scsec, float &x, float &xdir, float &y, float &ydir)
Compute track coordinates with SC sector numbering.
void runDDUAnalysis(edm::Handle< DTLocalTriggerCollection > &trigsDDU)
Run analysis on ROS data.
T angle(T x1, T y1, T z1, T x2, T y2, T z2)