37 isLocalRun(ps.getUntrackedParameter<bool>(
"localrun",
true))
44 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: Constructor"<<endl;
51 ros_Token_ = consumes<DTLocalTriggerCollection>(
53 seg_Token_ = consumes<DTRecSegment4DCollection>(
74 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: analyzed " <<
nevents <<
" events" << endl;
82 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: BeginJob" << endl;
90 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: BeginRun" << endl;
97 vector<string> trigSources;
99 trigSources.push_back(
"");
102 trigSources.push_back(
"_DTonly");
103 trigSources.push_back(
"_NoDT");
104 trigSources.push_back(
"_DTalso");
106 vector<string>::const_iterator trigSrcIt = trigSources.begin();
107 vector<string>::const_iterator trigSrcEnd = trigSources.end();
114 for (
int stat=1;stat<5;++stat){
115 for (
int wh=-2;wh<3;++wh){
116 for (
int sect=1;sect<13;++sect){
120 bookHistos(dtChId,
"LocalTriggerPhi",
"DCC_BXvsQual"+(*trigSrcIt));
121 bookHistos(dtChId,
"LocalTriggerPhi",
"DCC_QualvsPhirad"+(*trigSrcIt));
125 bookHistos(dtChId,
"LocalTriggerPhi",
"DDU_BXvsQual"+(*trigSrcIt));
133 for (;trigSrcIt!=trigSrcEnd;++trigSrcIt){
134 for (
int wh=-2;wh<3;++wh){
139 for (
int sect=1;sect<13;++sect){
140 for (
int stat=1;stat<5;++stat){
144 bookHistos(dtChId,
"LocalTriggerPhi",
"DCC_BXvsQual"+(*trigSrcIt));
146 bookHistos(dtChId,
"LocalTriggerPhi",
"DCC_QualvsPhirad"+(*trigSrcIt));
147 bookHistos(dtChId,
"LocalTriggerPhi",
"DCC_QualvsPhibend"+(*trigSrcIt));
149 bookHistos(dtChId,
"LocalTriggerPhi",
"DCC_Flag1stvsQual"+(*trigSrcIt));
150 bookHistos(dtChId,
"LocalTriggerPhi",
"DCC_BestQual"+(*trigSrcIt));
152 bookHistos(dtChId,
"LocalTriggerTheta",
"DCC_PositionvsBX"+(*trigSrcIt));
159 bookHistos(dtChId,
"Segment",
"DCC_PhitkvsPhitrig"+(*trigSrcIt));
160 bookHistos(dtChId,
"Segment",
"DCC_PhibtkvsPhibtrig"+(*trigSrcIt));
161 bookHistos(dtChId,
"Segment",
"DCC_PhiResidual"+(*trigSrcIt));
162 bookHistos(dtChId,
"Segment",
"DCC_PhiResidualvsLUTPhi"+(*trigSrcIt));
163 bookHistos(dtChId,
"Segment",
"DCC_PhibResidual"+(*trigSrcIt));
164 bookHistos(dtChId,
"Segment",
"DCC_HitstkvsQualtrig"+(*trigSrcIt));
165 bookHistos(dtChId,
"Segment",
"DCC_TrackPosvsAngle"+(*trigSrcIt));
166 bookHistos(dtChId,
"Segment",
"DCC_TrackPosvsAngleandTrig"+(*trigSrcIt));
167 bookHistos(dtChId,
"Segment",
"DCC_TrackPosvsAngleandTrigHHHL"+(*trigSrcIt));
169 bookHistos(dtChId,
"Segment",
"DCC_TrackThetaPosvsAngle"+(*trigSrcIt));
170 bookHistos(dtChId,
"Segment",
"DCC_TrackThetaPosvsAngleandTrig"+(*trigSrcIt));
179 bookHistos(dtChId,
"LocalTriggerPhi",
"DDU_BXvsQual"+(*trigSrcIt));
180 bookHistos(dtChId,
"LocalTriggerPhi",
"DDU_Flag1stvsQual"+(*trigSrcIt));
181 bookHistos(dtChId,
"LocalTriggerPhi",
"DDU_BestQual"+(*trigSrcIt));
183 bookHistos(dtChId,
"LocalTriggerTheta",
"DDU_ThetaBXvsQual"+(*trigSrcIt));
184 bookHistos(dtChId,
"LocalTriggerTheta",
"DDU_ThetaBestQual"+(*trigSrcIt));
188 bookHistos(dtChId,
"Segment",
"DDU_HitstkvsQualtrig"+(*trigSrcIt));
189 bookHistos(dtChId,
"Segment",
"DDU_TrackPosvsAngle"+(*trigSrcIt));
190 bookHistos(dtChId,
"Segment",
"DDU_TrackPosvsAngleandTrig"+(*trigSrcIt));
191 bookHistos(dtChId,
"Segment",
"DDU_TrackPosvsAngleandTrigHHHL"+(*trigSrcIt));
193 bookHistos(dtChId,
"Segment",
"DDU_TrackThetaPosvsAngle"+(*trigSrcIt));
194 bookHistos(dtChId,
"Segment",
"DDU_TrackThetaPosvsAngleandTrig"+(*trigSrcIt));
195 bookHistos(dtChId,
"Segment",
"DDU_TrackThetaPosvsAngleandTrigH"+(*trigSrcIt));
203 bookHistos(dtChId,
"LocalTriggerPhi",
"COM_QualDDUvsQualDCC"+(*trigSrcIt));
208 for (
int sect=13;sect<15;++sect){
212 bookHistos(dtChId,
"Segment",
"DCC_PhitkvsPhitrig"+(*trigSrcIt));
213 bookHistos(dtChId,
"Segment",
"DCC_PhibtkvsPhibtrig"+(*trigSrcIt));
214 bookHistos(dtChId,
"Segment",
"DCC_PhiResidual"+(*trigSrcIt));
215 bookHistos(dtChId,
"Segment",
"DCC_PhiResidualvsLUTPhi"+(*trigSrcIt));
216 bookHistos(dtChId,
"Segment",
"DCC_PhibResidual"+(*trigSrcIt));
230 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: Begin of LS transition" << endl;
233 for(
map<uint32_t, map<string, MonitorElement*> > ::const_iterator
histo =
digiHistos.begin();
236 for(map<string, MonitorElement*> ::const_iterator ht = (*histo).second.begin();
237 ht != (*histo).second.end();
239 (*ht).second->Reset();
249 LogVerbatim(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: analyzed " <<
nevents <<
" events" << endl;
282 vector<L1MuDTChambPhDigi>
const* l1PhTrig = l1DTTPGPh->getContainer();
286 vector<L1MuDTChambThDigi>
const* l1ThTrig = l1DTTPGTh->getContainer();
311 bool isDCC = histoTag.substr(0,3) ==
"DCC";
313 if (histoTag ==
"DCC_ErrorsChamberID") {
326 stringstream wheel; wheel << wh;
328 stringstream sector; sector << sc;
334 string histoType = histoTag.substr(4,histoTag.find(
"_",4)-4);
335 bool isDCC = histoTag.substr(0,3) ==
"DCC";
338 "/Sector" + sector.str() +
339 "/Station" + station.str() +
"/" + folder);
341 string histoName = histoTag +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_St" + station.str();
343 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: booking " <<
topFolder(isDCC) <<
"Wheel" << wheel.str()
344 <<
"/Sector" << sector.str()
345 <<
"/Station"<< station.str() <<
"/" << folder <<
"/" << histoName << endl;
347 if (histoType.find(
"BX") != string::npos){
348 if (histoTag.substr(0,3) ==
"DCC"){
356 rangeBX = (int)(maxBX-minBX);
359 if ( folder ==
"LocalTriggerPhi") {
361 if( histoType ==
"BXvsQual" ){
363 dbe->
book2D(histoName,
"BX vs trigger quality",7,-0.5,6.5,rangeBX,minBX,maxBX);
367 if( histoType ==
"BestQual" ){
369 dbe->
book1D(histoName,
"Trigger quality of best primitives",7,-0.5,6.5);
373 if( histoType ==
"QualvsPhirad" ){
375 dbe->
book2D(histoName,
"Trigger quality vs local position",100,-500.,500.,7,-0.5,6.5);
379 if( histoType ==
"QualvsPhibend" ) {
381 dbe->
book2D(histoName,
"Trigger quality vs local direction",200,-40.,40.,7,-0.5,6.5);
385 if( histoType ==
"Flag1stvsQual" ) {
387 dbe->
book2D(histoName,
"1st/2nd trig flag vs quality",7,-0.5,6.5,2,-0.5,1.5);
391 if( histoType ==
"QualDDUvsQualDCC" ){
393 dbe->
book2D(histoName,
"DDU quality vs DCC quality",8,-1.5,6.5,8,-1.5,6.5);
400 else if ( folder ==
"LocalTriggerTheta") {
402 if( histoType ==
"PositionvsBX" ) {
404 dbe->
book2D(histoName,
"Theta trigger position vs BX",rangeBX,minBX,maxBX,7,-0.5,6.5);
407 if( histoType ==
"PositionvsQual" ) {
409 dbe->
book2D(histoName,
"Theta trigger position vs quality",7,-0.5,6.5,7,-0.5,6.5);
413 if( histoType ==
"ThetaBXvsQual" ) {
415 dbe->
book2D(histoName,
"BX vs trigger quality",7,-0.5,6.5,rangeBX,minBX,maxBX);
418 if( histoType ==
"ThetaBestQual" ){
420 dbe->
book1D(histoName,
"Trigger quality of best primitives (theta)",7,-0.5,6.5);
426 else if ( folder ==
"Segment") {
428 if( histoType.find(
"TrackThetaPosvsAngle" ) == 0 ) {
430 string histoLabel =
"Position vs Angle (theta)";
431 if (histoType.find(
"andTrigH") != string::npos) histoLabel +=
" for H triggers";
432 else if (histoType.find(
"andTrig") != string::npos) histoLabel +=
" for triggers";
438 dbe->
book2D(histoName,histoLabel,16,-40.,40.,nbins,min,max);
441 if( histoType.find(
"TrackPosvsAngle") == 0 ){
447 string histoLabel =
"Position vs Angle (phi)";
448 if (histoType.find(
"andTrigHHHL") != string::npos) histoLabel +=
" for HH/HL triggers";
449 else if (histoType.find(
"andTrig") != string::npos) histoLabel +=
" for triggers";
452 dbe->
book2D(histoName,histoLabel,16,-40.,40.,nbins,min,max);
455 if( histoType ==
"PhitkvsPhitrig" ){
457 dbe->
book2D(histoName,
"Local position: segment vs trigger",100,-500.,500.,100,-500.,500.);
460 if( histoType ==
"PhibtkvsPhibtrig" ){
462 dbe->
book2D(histoName,
"Local direction : segment vs trigger",200,-40.,40.,200,-40.,40.);
465 if( histoType ==
"PhiResidual" ){
467 dbe->
book1D(histoName,
"Trigger local position - Segment local position (correlated triggers)",400,-10.,10.);
470 if( histoType ==
"PhibResidual" ){
472 dbe->
book1D(histoName,
"Trigger local direction - Segment local direction (correlated triggers)",500,-10.,10.);
475 if( histoType ==
"HitstkvsQualtrig" ){
477 dbe->
book2D(histoName,
"Segment hits (phi) vs trigger quality",7,-0.5,6.5,10,0.5,10.5);
488 stringstream wheel; wheel << wh;
490 string histoType = histoTag.substr(4,histoTag.find(
"_",4)-4);
491 bool isDCC = histoTag.substr(0,3) ==
"DCC";
495 string histoName = histoTag +
"_W" + wheel.str();
497 LogTrace(
"DTDQM|DTMonitorModule|DTLocalTriggerTask") <<
"[DTLocalTriggerTask]: booking " <<
topFolder(isDCC)
498 <<
"Wheel" << wheel.str() <<
"/" << histoName << endl;
500 if( histoType.find(
"BXDiff") != string::npos ){
511 std::vector<L1MuDTChambThDigi>
const* thTrigs ) {
518 for (
int i=0;
i<5;++
i){
519 for (
int j=0;
j<6;++
j){
520 for (
int k=0;
k<13;++
k){
527 vector<L1MuDTChambPhDigi>::const_iterator iph = phTrigs->begin();
528 vector<L1MuDTChambPhDigi>::const_iterator iphe = phTrigs->end();
529 for(; iph !=iphe ; ++iph) {
531 int phwheel = iph->whNum();
532 int phsec = iph->scNum() + 1;
533 int phst = iph->stNum();
534 int phbx = iph->bxNum();
535 int phcode = iph->code();
536 int phi1st = iph->Ts2Tag();
544 if(phcode>
phcode_best[phwheel+3][phst][phsec] && phcode<7) {
546 iphbest[phwheel+3][phst][phsec] = &(*iph);
553 uint32_t indexCh = dtChId.
rawId();
555 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
556 if (innerME.find(
"DCC_BXvsQual"+
trigsrc) == innerME.end()){
572 innerME.find(
"DCC_BXvsQual"+
trigsrc)->second->Fill(phcode,phbx-phi1st);
573 innerME.find(
"DCC_QualvsPhirad"+
trigsrc)->second->Fill(x,phcode);
576 innerME.find(
"DCC_BXvsQual"+
trigsrc)->second->Fill(phcode,phbx-phi1st);
577 innerME.find(
"DCC_Flag1stvsQual"+
trigsrc)->second->Fill(phcode,phi1st);
579 innerME.find(
"DCC_QualvsPhirad"+
trigsrc)->second->Fill(x,phcode);
580 innerME.find(
"DCC_QualvsPhibend"+
trigsrc)->second->Fill(angle,phcode);
588 vector<L1MuDTChambThDigi>::const_iterator ith = thTrigs->begin();
589 vector<L1MuDTChambThDigi>::const_iterator ithe = thTrigs->end();
590 for(; ith != ithe; ++ith) {
591 int thwheel = ith->whNum();
592 int thsec = ith->scNum() + 1;
593 int thst = ith->stNum();
594 int thbx = ith->bxNum();
596 for (
int pos=0; pos<7; pos++) {
597 thcode[pos] = ith->code(pos);
599 if(thcode[pos]>
thcode_best[thwheel+3][thst][thsec] ) {
601 ithbest[thwheel+3][thst][thsec] = &(*ith);
606 uint32_t indexCh = dtChId.
rawId();
608 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
609 if (innerME.find(
"DCC_PositionvsBX"+
trigsrc) == innerME.end()){
617 for (
int pos=0; pos<7; pos++) {
619 innerME.find(
"DCC_PositionvsBX"+
trigsrc)->second->Fill(thbx,pos);
633 for (
int st=1;st<5;++st){
634 for (
int wh=-2;wh<3;++wh){
635 for (
int sc=1;sc<13;++sc){
638 uint32_t indexCh =
id.rawId();
639 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
640 if (innerME.find(
"DCC_BestQual"+
trigsrc) == innerME.end())
663 for (
int i=0;
i<5;++
i){
664 for (
int j=0;
j<6;++
j){
665 for (
int k=0;
k<13;++
k){
672 for (detUnitIt=trigsDDU->begin();
673 detUnitIt!=trigsDDU->end();
678 uint32_t indexCh =
id.
rawId();
679 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
682 int sec =
id.sector();
683 int st =
id.station();
686 trigIt!=range.second;
689 int bx = trigIt->bx();
690 int quality = trigIt->quality();
691 int thqual = trigIt->trTheta();
692 int flag1st = trigIt->secondTrack() ? 1 : 0;
695 if( quality>-1 && quality<7 ) {
702 if (innerME.find(
"DDU_BXvsQual"+
trigsrc) == innerME.end()){
708 innerME.find(
"DDU_BXvsQual"+
trigsrc)->second->Fill(quality,bx-flag1st);
711 innerME.find(
"DDU_BXvsQual"+
trigsrc)->second->Fill(quality,bx-flag1st);
712 innerME.find(
"DDU_Flag1stvsQual"+
trigsrc)->second->Fill(quality,flag1st);
715 if( thqual>0 && !
tpMode ) {
720 if (innerME.find(
"DDU_ThetaBXvsQual"+
trigsrc) == innerME.end())
722 innerME.find(
"DDU_ThetaBXvsQual"+
trigsrc)->second->Fill(thqual,bx);
731 if (innerME.find(
"DDU_BestQual"+
trigsrc) == innerME.end())
736 if (innerME.find(
"DDU_ThetaBestQual"+
trigsrc) == innerME.end())
751 memset(
track_ok,
false,450*
sizeof(
bool));
753 DTRecSegment4DCollection::id_iterator chamberId;
754 vector<const DTRecSegment4D*> best4DSegments;
757 for (chamberId = segments4D->id_begin(); chamberId != segments4D->id_end(); ++chamberId){
764 for ( track = range.first; track != range.second; ++track){
766 if( (*track).hasPhi() ) {
774 int sector = (*track).chamberId().sector();
775 int station = (*track).chamberId().station();
779 else if (sector==14){
787 if (tmpBest) best4DSegments.push_back(tmpBest);
790 vector<const DTRecSegment4D*>::const_iterator btrack;
792 for ( btrack = best4DSegments.begin(); btrack != best4DSegments.end(); ++btrack ){
794 if( (*btrack)->hasPhi() ) {
796 int wheel = (*btrack)->chamberId().wheel();
797 int station = (*btrack)->chamberId().station();
798 int sector = (*btrack)->chamberId().sector();
800 float x_track, y_track, x_angle, y_angle;
802 int nHitsPhi = (*btrack)->phiSegment()->degreesOfFreedom()+2;
805 uint32_t indexCh = dtChId.
rawId();
806 map<string, MonitorElement*> &innerMECh =
digiHistos[indexCh];
809 indexCh = dtChIdSC.
rawId();
810 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
817 if (innerME.find(
"DDU_HitstkvsQualtrig"+
trigsrc) == innerME.end())
819 innerME.find(
"DDU_HitstkvsQualtrig"+
trigsrc)->second->Fill(
dduphcode_best[wheel+3][station][scsector],nHitsPhi);
827 if (innerME.find(
"DCC_HitstkvsQualtrig"+
trigsrc) == innerME.end()){
830 innerME.find(
"DCC_HitstkvsQualtrig"+
trigsrc)->second->Fill(
phcode_best[wheel+3][station][scsector],nHitsPhi);
832 if (
phcode_best[wheel+3][station][scsector]>3 && nHitsPhi>=7){
838 if (innerMECh.find(
"DCC_PhibResidual"+
trigsrc) == innerMECh.end()){
846 innerMECh.find(
"DCC_PhitkvsPhitrig"+
trigsrc)->second->Fill(x_trigger,x_track);
847 innerMECh.find(
"DCC_PhibtkvsPhibtrig"+
trigsrc)->second->Fill(angle_trigger,x_angle);
848 innerMECh.find(
"DCC_PhiResidual"+
trigsrc)->second->Fill(x_trigger-x_track);
849 innerMECh.find(
"DCC_PhibResidual"+
trigsrc)->second->Fill(angle_trigger-x_angle);
860 bool trigFlagDCC =
false;
861 for (
int ist=1; ist<5; ist++){
865 track_ok[wheel+3][ist][scsector]==
true){
871 if (trigFlagDCC && fabs(x_angle)<40. && nHitsPhi>=7){
873 if (innerME.find(
"DCC_TrackPosvsAngle"+
trigsrc) == innerME.end()){
880 innerME.find(
"DCC_TrackPosvsAngle"+
trigsrc)->second->Fill(x_angle,x_track);
882 innerME.find(
"DCC_TrackPosvsAngleandTrig"+
trigsrc)->second->Fill(x_angle,x_track);
884 innerME.find(
"DCC_TrackPosvsAngleandTrigHHHL"+
trigsrc)->second->Fill(x_angle,x_track);
890 if ((*btrack)->hasZed() && trigFlagDCC && fabs(y_angle)<40. && (*btrack)->zSegment()->degreesOfFreedom()>=1){
892 if (innerME.find(
"DCC_TrackThetaPosvsAngle"+
trigsrc) == innerME.end()){
899 innerME.find(
"DCC_TrackThetaPosvsAngle"+
trigsrc)->second->Fill(y_angle,y_track);
901 innerME.find(
"DCC_TrackThetaPosvsAngleandTrig"+
trigsrc)->second->Fill(y_angle,y_track);
913 bool trigFlagDDU =
false;
914 for (
int ist=1; ist<5; ist++){
918 track_ok[wheel+3][ist][scsector]==
true){
924 if (trigFlagDDU && fabs(x_angle)<40. && nHitsPhi>=7){
926 if (innerME.find(
"DDU_TrackPosvsAngle"+
trigsrc) == innerME.end()){
933 innerME.find(
"DDU_TrackPosvsAngle"+
trigsrc)->second->Fill(x_angle,x_track);
935 innerME.find(
"DDU_TrackPosvsAngleandTrig"+
trigsrc)->second->Fill(x_angle,x_track);
937 innerME.find(
"DDU_TrackPosvsAngleandTrigHHHL"+
trigsrc)->second->Fill(x_angle,x_track);
943 if ((*btrack)->hasZed() && trigFlagDDU && fabs(y_angle)<40. && (*btrack)->zSegment()->degreesOfFreedom()>=1){
945 if (innerME.find(
"DDU_TrackThetaPosvsAngle"+
trigsrc) == innerME.end()){
952 innerME.find(
"DDU_TrackThetaPosvsAngle"+
trigsrc)->second->Fill(y_angle,y_track);
954 innerME.find(
"DDU_TrackThetaPosvsAngleandTrig"+
trigsrc)->second->Fill(y_angle,y_track);
956 innerME.find(
"DDU_TrackThetaPosvsAngleandTrigH"+
trigsrc)->second->Fill(y_angle,y_track);
973 for (
int st=1;st<5;++st){
974 for (
int wh=-2;wh<3;++wh){
975 for (
int sc=1;sc<13;++sc){
979 uint32_t indexCh =
id.rawId();
980 map<string, MonitorElement*> &innerME =
digiHistos[indexCh];
981 if (innerME.find(
"COM_QualDDUvsQualDCC"+trigsrc) == innerME.end())
982 bookHistos(
id,
"LocalTriggerPhi",
"COM_QualDDUvsQualDCC"+trigsrc);
988 (
wheelHistos[wh]).
find(
"COM_BXDiff"+trigsrc)->second->Fill(sc,st,bxDDU-bxDCC);
1004 axis=histo->GetXaxis();
1007 axis=histo->GetYaxis();
1011 string labels[7] = {
"LI",
"LO",
"HI",
"HO",
"LL",
"HL",
"HH"};
1012 int istart = axis->GetXmin()<-1 ? 2 : 1;
1013 for (
int i=0;
i<7;
i++) {
1014 axis->SetBinLabel(
i+istart,labels[
i].c_str());
1027 for (std::vector<LTCDigi>::const_iterator ltc_it = ltcdigis->begin(); ltc_it != ltcdigis->end(); ltc_it++){
1029 size_t otherTriggerSum=0;
1030 for (
size_t i = 1;
i < 6;
i++) {
1031 otherTriggerSum += size_t((*ltc_it).HasTriggered(
i));
1033 if ((*ltc_it).HasTriggered(0) && otherTriggerSum == 0)
1035 else if (!(*ltc_it).HasTriggered(0))
1037 else if ((*ltc_it).HasTriggered(0) && otherTriggerSum > 0)
LuminosityBlockID id() const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void bookWheelHistos(int wh, std::string histoTag)
Book the histograms.
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.
int phcode_best[6][5][13]
std::string baseFolderDDU
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
virtual int degreesOfFreedom() const
return the DOF of the segment
void rmdir(const std::string &fullpath)
std::map< int, std::map< std::string, MonitorElement * > > wheelHistos
edm::EDGetTokenT< LTCDigiCollection > ltcDigiCollectionToken_
int thcode_best[6][5][13]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void runDCCAnalysis(std::vector< L1MuDTChambPhDigi > const *phTrigs, std::vector< L1MuDTChambThDigi > const *thTrigs)
Run analysis on DCC data.
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
float trigDir(const L1MuDTChambPhDigi *trig)
Return local direction (trigger RF) for a given trigger primitive.
edm::EDGetTokenT< L1MuDTChambPhContainer > dcc_Token_
int dduphcode_best[6][5][13]
void bookBarrelHistos(std::string histoTag)
Book the histograms.
void runDDUvsDCCAnalysis(std::string &trigsrc)
Run analysis on ROS data.
virtual DTChamberId chamberId() const
The (specific) DetId of the chamber on which the segment resides.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
int dduthcode_best[6][5][13]
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_
const T & max(const T &a, const T &b)
std::string baseFolderDCC
void bookHistos(const DTChamberId &dtCh, std::string folder, std::string histoTag)
Book the histograms.
void trigToSeg(int st, float &x, float dir)
Compute Trigger x coordinate in chamber RF.
DTLocalTriggerTask(const edm::ParameterSet &ps)
Constructor.
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.
const DTLocalTrigger * iphbestddu[6][5][13]
const L1MuDTChambThDigi * ithbest[6][5][13]
LuminosityBlockNumber_t luminosityBlock() const
void setQLabels(MonitorElement *me, short int iaxis)
Set Quality labels.
std::vector< DTLocalTrigger >::const_iterator const_iterator
return(e1-e2)*(e1-e2)+dp *dp
edm::ParameterSet parameters
std::string & topFolder(bool isDCC)
Get the Top folder (different between Physics and TP and DCC/DDU)
DTTrigGeomUtils * trigGeomUtils
const L1MuDTChambPhDigi * iphbest[6][5][13]
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
To reset the MEs.
virtual ~DTLocalTriggerTask()
Destructor.
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.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
int wheel() const
Return the wheel number.
MonitorElement * dcc_IDDataErrorPlot
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::map< uint32_t, std::map< std::string, MonitorElement * > > digiHistos
void computeSCCoordinates(const DTRecSegment4D *track, int &scsec, float &x, float &xdir, float &y, float &ydir)
Compute track coordinates with SC sector numbering.
void beginRun(const edm::Run &, const edm::EventSetup &)
Beginrun.
void setCurrentFolder(const std::string &fullpath)
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)
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")