96 dttpgSource_( ps.getParameter<
InputTag >(
"dttpgSource") )
104 if(verbose_)
cout <<
"L1TDTTPG: constructor...." << endl;
108 cout <<
"L1T Monitoring histograms will be saved to " <<
outputFile_.c_str() << endl;
136 "Bunch encoding DTTF Phi",11,0,11);
139 "Bunch encoding DTTF Output",11,0,11);
143 "Number of segments for bunch -1 Dttf Phi",
147 "Number of segments for bunch 0 Dttf Phi",
151 "Number of segments for bunch 1 Dttf Phi",
156 "Number of segments for bunch -1 Dttf Output",
160 "Number of segments for bunch 0 Dttf Output",
164 "Number of segments for bunch 1 Dttf Output",
167 for(
int i=0;
i<2;
i++){
179 "Bunch encoding: DTTF Phi vs. Output",
183 for(
int i=1;
i<=2;
i++){
195 "DT TPG phi ntrack", 20, -0.5, 19.5 ) ;
197 "DT TPG theta ntrack", 20, -0.5, 19.5 ) ;
199 for (
int ibx=0 ; ibx<=2; ibx++) {
207 bxn =
"+" + bxnum.str();
211 "DT TPG phi wheel number "+bxn, 5, -2.5, 2.5 ) ;
213 "DT TPG phi sector number "+bxn, 12, -0.5, 11.5 );
215 "DT TPG phi station number "+bxn, 5, 0.5, 4.5 ) ;
221 "DT TPG phi quality "+bxn, 8, -0.5, 7.5 ) ;
223 "DT TPG phi Ts2Tag "+bxn, 2, -0.5, 1.5 ) ;
227 "Map of triggers per station (BX="+bxn+
")",20,1,21,12,0,12);
232 "DT TPG theta bx "+bxn, 50, -24.5, 24.5 ) ;
234 "DT TPG theta wheel number "+bxn, 5, -2.5, 2.5 ) ;
236 "DT TPG theta sector number "+bxn, 12, -0.5, 11.5 ) ;
238 "DT TPG theta station number "+bxn, 5, -0.5, 4.5 ) ;
240 "DT TPG theta "+bxn, 20, -0.5, 19.5 ) ;
242 "DT TPG theta quality "+bxn, 8, -0.5, 7.5 ) ;
244 "Map of triggers per station (BX="+bxn+
")",15,1,16,12,0,12);
248 dttf_p_phi[ibx] = ibooker.
book1D(
"dttf_p_phi_"+bxn,
"dttf phi output #phi "+bxn, 256,
250 dttf_p_qual[ibx] = ibooker.
book1D(
"dttf_p_qual_"+bxn,
"dttf phi output qual "+bxn, 8, -0.5, 7.5);
251 dttf_p_q[ibx] = ibooker.
book1D(
"dttf_p_q_"+bxn,
"dttf phi output q "+bxn, 2, -0.5, 1.5);
252 dttf_p_pt[ibx] = ibooker.
book1D(
"dttf_p_pt_"+bxn,
"dttf phi output p_{t} "+bxn, 32, -0.5, 31.5);
257 "Map of triggers per station",20,1,21,12,0,12);
259 "Map of correlated triggers per station",20,1,21,12,0,12);
261 "Map of second tracks per station",20,1,21,12,0,12);
263 "Map of best triggers per station",20,1,21,12,0,12);
265 "Map of correlated best triggers per station",20,1,21,12,0,12);
275 "Map of triggers per station",15,1,16,12,0,12);
277 "Map of H quality triggers per station",15,1,16,12,0,12);
279 "Map of besttriggers per station",15,1,16,12,0,12);
281 "Map of H quality best triggers per station",15,1,16,12,0,12);
297 if (!myL1MuDTChambPhContainer.
isValid()) {
298 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuDTChambPhContainer with label " 308 if (!myL1MuDTChambThContainer.
isValid()) {
309 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuDTChambThContainer with label " 311 edm::LogInfo(
"DataNotFound") <<
"if this fails try to add DATA to the process name." ;
318 int ndttpgphtrack = 0;
319 int ndttpgthtrack = 0;
320 int NumberOfSegmentsPhi[3]={0,0,0};
322 for( L1MuDTChambPhContainer::Phi_Container::const_iterator
323 DTPhDigiItr = myPhContainer->begin() ;
324 DTPhDigiItr != myPhContainer->end() ;
327 int bx = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag();
329 NumberOfSegmentsPhi[0]++;
331 NumberOfSegmentsPhi[1]++;
333 NumberOfSegmentsPhi[2]++;
337 for(
int k=0;
k<3;
k++){
340 int bxCounterDttfPhi=0;
341 for (
int k=0;
k<3;
k++){
342 if (NumberOfSegmentsPhi[
k]>0)
349 if(bxCounterDttfPhi==0){
351 }
else if(bxCounterDttfPhi==1){
352 for(
int k=0;
k<3;
k++){
353 if(NumberOfSegmentsPhi[
k]>0)
356 }
else if(bxCounterDttfPhi==2){
357 for(
int k=0;
k<3;
k++){
358 if(NumberOfSegmentsPhi[
k]==0)
361 }
else if(bxCounterDttfPhi==3){
372 for( L1MuDTChambPhContainer::Phi_Container::const_iterator
373 DTPhDigiItr = myPhContainer->begin() ;
374 DTPhDigiItr != myPhContainer->end() ;
380 int bxindex = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag() + 1;
385 cout <<
"DTTPG phi wheel number " << DTPhDigiItr->whNum() << endl;
390 cout <<
"DTTPG phi station number " << DTPhDigiItr->stNum() << endl;
395 cout <<
"DTTPG phi sector number " << DTPhDigiItr->scNum() << endl;
400 cout <<
"DTTPG phi quality " << DTPhDigiItr->code() << endl;
405 cout <<
"DTTPG phi ts2tag " << DTPhDigiItr->Ts2Tag() << endl;
407 int ypos = DTPhDigiItr->scNum();
408 int xpos = DTPhDigiItr->stNum()+4*(DTPhDigiItr->whNum()+2);
410 if (DTPhDigiItr->Ts2Tag())
413 if (DTPhDigiItr->code()>3)
416 if (bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]==
nullptr ||
417 bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]->
code()<DTPhDigiItr->code())
419 bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]=&(*DTPhDigiItr);
424 for (
int iwh=0; iwh<5; iwh++){
425 for (
int isec=0; isec<12; isec++){
426 for (
int ist=0; ist<4; ist++){
427 if (bestPhQualMap[iwh][isec][ist]){
428 int xpos = iwh*4+ist+1;
430 if(bestPhQualMap[iwh][isec][ist]->code()>3)
438 int bestThQualMap[5][12][3];
439 memset(bestThQualMap,0,180*
sizeof(
int));
441 for( L1MuDTChambThContainer::The_Container::const_iterator
442 DTThDigiItr = myThContainer->begin() ;
443 DTThDigiItr != myThContainer->end() ;
448 int bxindex = DTThDigiItr->bxNum() + 1;
453 cout <<
"DTTPG theta wheel number " << DTThDigiItr->whNum() << endl;
458 cout <<
"DTTPG theta station number " << DTThDigiItr->stNum() << endl;
463 cout <<
"DTTPG theta sector number " << DTThDigiItr->scNum() << endl;
468 cout <<
"DTTPG theta bx number " << DTThDigiItr->bxNum() << endl;
470 int thcode[7]= {0,0,0,0,0,0,0};
471 for (
int j = 0; j < 7; j++)
476 cout <<
"DTTPG theta position " << DTThDigiItr->position(j) << endl;
478 thcode[j]=DTThDigiItr->code(j);
482 cout <<
"DTTPG theta quality " << DTThDigiItr->code(j) << endl;
486 int ypos = DTThDigiItr->scNum();
487 int xpos = DTThDigiItr->stNum()+4*(DTThDigiItr->whNum()+2);
492 if (thcode[
pos]>bestqual)
493 bestqual=thcode[
pos];
498 if (bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1] < bestqual)
500 bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1]=bestqual;
504 for (
int iwh=0; iwh<5; iwh++){
505 for (
int isec=0; isec<12; isec++){
506 for (
int ist=0; ist<3; ist++){
507 if (bestThQualMap[iwh][isec][ist]){
508 int xpos = iwh*4+ist+1;
510 if(bestThQualMap[iwh][isec][ist]==2)
521 cout <<
"DTTPG phi ntrack " << ndttpgphtrack << endl;
525 cout <<
"DTTPG theta ntrack " << ndttpgthtrack << endl;
531 if (!myL1MuDTTrackContainer.
isValid()) {
532 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuDTTrackContainer with label " 541 int NumberOfSegmentsOut[3]={0,0,0};
542 for ( L1MuDTTrackContainer::TrackContainer::const_iterator
i 543 = t->begin();
i != t->end(); ++
i ) {
545 NumberOfSegmentsOut[0]++;
547 NumberOfSegmentsOut[1]++;
549 NumberOfSegmentsOut[2]++;
554 for(
int k=0;
k<3;
k++){
560 int bxCounterDttfOut=0;
561 for (
int k=0;
k<3;
k++){
562 if (NumberOfSegmentsOut[
k]>0)
567 if(bxCounterDttfOut==0){
569 }
else if(bxCounterDttfOut==1){
570 for(
int k=0;
k<3;
k++){
571 if(NumberOfSegmentsOut[
k]>0)
574 }
else if(bxCounterDttfOut==2){
575 for(
int k=0;
k<3;
k++){
576 if(NumberOfSegmentsOut[
k]==0)
579 }
else if(bxCounterDttfOut==3){
592 for ( L1MuDTTrackContainer::TrackContainer::const_iterator
i 593 = t->begin();
i != t->end(); ++
i ) {
597 std::cout <<
"quality (packed) = " <<
i->quality_packed()
599 std::cout <<
"pt (packed) = " <<
i->pt_packed()
601 std::cout <<
"phi (packed) = " <<
i->phi_packed()
603 std::cout <<
"charge (packed) = " <<
i->charge_packed()
608 int bxindex =
i->bx() + 1;
621 for(
int i=0;
i<5;
i++){
633 for(
int i=0;
i<5;
i++){
The_Container const * getContainer() const
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * dttpgthbestmaph
MonitorElement * dttf_p_phi[3]
L1TDTTPG(const edm::ParameterSet &ps)
MonitorElement * dttpgphmap
MonitorElement * dttpgphbestmapcorr
MonitorElement * dttpgphmapcorr
void setMapPhLabel(MonitorElement *me)
MonitorElement * dttpgphbx[8]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< L1MuDTChambThContainer > dttpgSourceThContainer_token_
MonitorElement * dttpgththeta[3]
void analyze(const edm::Event &e, const edm::EventSetup &c) override
MonitorElement * dttpgphwheel[3]
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * dttpgthbestmap
MonitorElement * dttpgphbxcomp
edm::EDGetTokenT< L1MuDTTrackContainer > trToken_
MonitorElement * dttpgthmaph
MonitorElement * dttpgthsector[3]
MonitorElement * dttpgthmapbx[3]
void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
void setCurrentFolder(std::string const &fullpath)
MonitorElement * dttpgthwheel[3]
MonitorElement * dttpgthmap
std::vector< L1MuDTTrackCand > TrackContainer
MonitorElement * book1D(Args &&...args)
MonitorElement * dttf_p_qual[3]
MonitorElement * dttpgthbx[3]
MonitorElement * dttpgthquality[3]
std::vector< L1MuDTChambPhDigi > Phi_Container
MonitorElement * dttf_p_pt[3]
std::vector< L1MuDTChambThDigi > The_Container
MonitorElement * dttpgphbestmap
MonitorElement * dttpgthntrack
edm::InputTag dttpgSource_
MonitorElement * book2D(Args &&...args)
MonitorElement * dttpgphts2tag[3]
MonitorElement * dttpgphntrack
Phi_Container const * getContainer() const
edm::EDGetTokenT< L1MuDTChambPhContainer > dttpgSourcePhContainer_token_
MonitorElement * dttf_p_q[3]
void setMapThLabel(MonitorElement *me)
MonitorElement * dttpgphmapbx[3]
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
MonitorElement * dttpgthstation[3]
MonitorElement * dttpgphsector[3]
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
TrackContainer const * getContainer() const
MonitorElement * dttpgphquality[3]
MonitorElement * dttpgphmap2nd
MonitorElement * dttpgphstation[3]