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;
143 "Bunch encoding DTTF Phi",11,0,11);
146 "Bunch encoding DTTF Output",11,0,11);
150 "Number of segments for bunch -1 Dttf Phi",
154 "Number of segments for bunch 0 Dttf Phi",
158 "Number of segments for bunch 1 Dttf Phi",
163 "Number of segments for bunch -1 Dttf Output",
167 "Number of segments for bunch 0 Dttf Output",
171 "Number of segments for bunch 1 Dttf Output",
174 for(
int i=0;
i<2;
i++){
186 "Bunch encoding: DTTF Phi vs. Output",
190 for(
int i=1;
i<=2;
i++){
202 "DT TPG phi ntrack", 20, -0.5, 19.5 ) ;
204 "DT TPG theta ntrack", 20, -0.5, 19.5 ) ;
206 for (
int ibx=0 ; ibx<=2; ibx++) {
214 bxn =
"+" + bxnum.str();
218 "DT TPG phi wheel number "+bxn, 5, -2.5, 2.5 ) ;
220 "DT TPG phi sector number "+bxn, 12, -0.5, 11.5 );
222 "DT TPG phi station number "+bxn, 5, 0.5, 4.5 ) ;
228 "DT TPG phi quality "+bxn, 8, -0.5, 7.5 ) ;
230 "DT TPG phi Ts2Tag "+bxn, 2, -0.5, 1.5 ) ;
234 "Map of triggers per station (BX="+bxn+
")",20,1,21,12,0,12);
239 "DT TPG theta bx "+bxn, 50, -24.5, 24.5 ) ;
241 "DT TPG theta wheel number "+bxn, 5, -2.5, 2.5 ) ;
243 "DT TPG theta sector number "+bxn, 12, -0.5, 11.5 ) ;
245 "DT TPG theta station number "+bxn, 5, -0.5, 4.5 ) ;
247 "DT TPG theta "+bxn, 20, -0.5, 19.5 ) ;
249 "DT TPG theta quality "+bxn, 8, -0.5, 7.5 ) ;
251 "Map of triggers per station (BX="+bxn+
")",15,1,16,12,0,12);
255 dttf_p_phi[ibx] = ibooker.
book1D(
"dttf_p_phi_"+bxn,
"dttf phi output #phi "+bxn, 256,
257 dttf_p_qual[ibx] = ibooker.
book1D(
"dttf_p_qual_"+bxn,
"dttf phi output qual "+bxn, 8, -0.5, 7.5);
258 dttf_p_q[ibx] = ibooker.
book1D(
"dttf_p_q_"+bxn,
"dttf phi output q "+bxn, 2, -0.5, 1.5);
259 dttf_p_pt[ibx] = ibooker.
book1D(
"dttf_p_pt_"+bxn,
"dttf phi output p_{t} "+bxn, 32, -0.5, 31.5);
264 "Map of triggers per station",20,1,21,12,0,12);
266 "Map of correlated triggers per station",20,1,21,12,0,12);
268 "Map of second tracks per station",20,1,21,12,0,12);
270 "Map of best triggers per station",20,1,21,12,0,12);
272 "Map of correlated best triggers per station",20,1,21,12,0,12);
282 "Map of triggers per station",15,1,16,12,0,12);
284 "Map of H quality triggers per station",15,1,16,12,0,12);
286 "Map of besttriggers per station",15,1,16,12,0,12);
288 "Map of H quality best triggers per station",15,1,16,12,0,12);
304 if (!myL1MuDTChambPhContainer.
isValid()) {
305 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuDTChambPhContainer with label "
310 myL1MuDTChambPhContainer->getContainer();
315 if (!myL1MuDTChambThContainer.
isValid()) {
316 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuDTChambThContainer with label "
318 edm::LogInfo(
"DataNotFound") <<
"if this fails try to add DATA to the process name." ;
323 myL1MuDTChambThContainer->getContainer();
325 int ndttpgphtrack = 0;
326 int ndttpgthtrack = 0;
327 int NumberOfSegmentsPhi[3]={0,0,0};
329 for( L1MuDTChambPhContainer::Phi_Container::const_iterator
330 DTPhDigiItr = myPhContainer->begin() ;
331 DTPhDigiItr != myPhContainer->end() ;
334 int bx = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag();
336 NumberOfSegmentsPhi[0]++;
338 NumberOfSegmentsPhi[1]++;
340 NumberOfSegmentsPhi[2]++;
344 for(
int k=0;
k<3;
k++){
347 int bxCounterDttfPhi=0;
348 for (
int k=0;
k<3;
k++){
349 if (NumberOfSegmentsPhi[
k]>0)
356 if(bxCounterDttfPhi==0){
358 }
else if(bxCounterDttfPhi==1){
359 for(
int k=0;
k<3;
k++){
360 if(NumberOfSegmentsPhi[
k]>0)
363 }
else if(bxCounterDttfPhi==2){
364 for(
int k=0;
k<3;
k++){
365 if(NumberOfSegmentsPhi[
k]==0)
368 }
else if(bxCounterDttfPhi==3){
379 for( L1MuDTChambPhContainer::Phi_Container::const_iterator
380 DTPhDigiItr = myPhContainer->begin() ;
381 DTPhDigiItr != myPhContainer->end() ;
387 int bxindex = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag() + 1;
392 cout <<
"DTTPG phi wheel number " << DTPhDigiItr->whNum() << endl;
397 cout <<
"DTTPG phi station number " << DTPhDigiItr->stNum() << endl;
402 cout <<
"DTTPG phi sector number " << DTPhDigiItr->scNum() << endl;
407 cout <<
"DTTPG phi quality " << DTPhDigiItr->code() << endl;
412 cout <<
"DTTPG phi ts2tag " << DTPhDigiItr->Ts2Tag() << endl;
414 int ypos = DTPhDigiItr->scNum();
415 int xpos = DTPhDigiItr->stNum()+4*(DTPhDigiItr->whNum()+2);
417 if (DTPhDigiItr->Ts2Tag())
420 if (DTPhDigiItr->code()>3)
423 if (bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]==0 ||
424 bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]->
code()<DTPhDigiItr->code())
426 bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]=&(*DTPhDigiItr);
431 for (
int iwh=0; iwh<5; iwh++){
432 for (
int isec=0; isec<12; isec++){
433 for (
int ist=0; ist<4; ist++){
434 if (bestPhQualMap[iwh][isec][ist]){
435 int xpos = iwh*4+ist+1;
437 if(bestPhQualMap[iwh][isec][ist]->code()>3)
445 int bestThQualMap[5][12][3];
446 memset(bestThQualMap,0,180*
sizeof(
int));
448 for( L1MuDTChambThContainer::The_Container::const_iterator
449 DTThDigiItr = myThContainer->begin() ;
450 DTThDigiItr != myThContainer->end() ;
455 int bxindex = DTThDigiItr->bxNum() + 1;
460 cout <<
"DTTPG theta wheel number " << DTThDigiItr->whNum() << endl;
465 cout <<
"DTTPG theta station number " << DTThDigiItr->stNum() << endl;
470 cout <<
"DTTPG theta sector number " << DTThDigiItr->scNum() << endl;
475 cout <<
"DTTPG theta bx number " << DTThDigiItr->bxNum() << endl;
477 int thcode[7]= {0,0,0,0,0,0,0};
478 for (
int j = 0;
j < 7;
j++)
483 cout <<
"DTTPG theta position " << DTThDigiItr->position(
j) << endl;
485 thcode[
j]=DTThDigiItr->code(
j);
489 cout <<
"DTTPG theta quality " << DTThDigiItr->code(j) << endl;
493 int ypos = DTThDigiItr->scNum();
494 int xpos = DTThDigiItr->stNum()+4*(DTThDigiItr->whNum()+2);
498 for (
int pos = 0; pos < 7; pos++){
499 if (thcode[pos]>bestqual)
500 bestqual=thcode[pos];
505 if (bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1] < bestqual)
507 bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1]=bestqual;
511 for (
int iwh=0; iwh<5; iwh++){
512 for (
int isec=0; isec<12; isec++){
513 for (
int ist=0; ist<3; ist++){
514 if (bestThQualMap[iwh][isec][ist]){
515 int xpos = iwh*4+ist+1;
517 if(bestThQualMap[iwh][isec][ist]==2)
528 cout <<
"DTTPG phi ntrack " << ndttpgphtrack << endl;
532 cout <<
"DTTPG theta ntrack " << ndttpgthtrack << endl;
538 if (!myL1MuDTTrackContainer.
isValid()) {
539 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuDTTrackContainer with label "
548 int NumberOfSegmentsOut[3]={0,0,0};
549 for ( L1MuDTTrackContainer::TrackContainer::const_iterator
i
550 = t->begin();
i != t->end(); ++
i ) {
552 NumberOfSegmentsOut[0]++;
554 NumberOfSegmentsOut[1]++;
556 NumberOfSegmentsOut[2]++;
561 for(
int k=0;
k<3;
k++){
567 int bxCounterDttfOut=0;
568 for (
int k=0;
k<3;
k++){
569 if (NumberOfSegmentsOut[
k]>0)
574 if(bxCounterDttfOut==0){
576 }
else if(bxCounterDttfOut==1){
577 for(
int k=0;
k<3;
k++){
578 if(NumberOfSegmentsOut[
k]>0)
581 }
else if(bxCounterDttfOut==2){
582 for(
int k=0;
k<3;
k++){
583 if(NumberOfSegmentsOut[
k]==0)
586 }
else if(bxCounterDttfOut==3){
599 for ( L1MuDTTrackContainer::TrackContainer::const_iterator
i
600 = t->begin();
i != t->end(); ++
i ) {
604 std::cout <<
"quality (packed) = " <<
i->quality_packed()
606 std::cout <<
"pt (packed) = " <<
i->pt_packed()
608 std::cout <<
"phi (packed) = " <<
i->phi_packed()
610 std::cout <<
"charge (packed) = " <<
i->charge_packed()
615 int bxindex =
i->bx() + 1;
628 for(
int i=0;
i<5;
i++){
640 for(
int i=0;
i<5;
i++){
void analyze(const edm::Event &e, const edm::EventSetup &c)
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]
MonitorElement * lumisecId_
MonitorElement * bookInt(Args &&...args)
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]
virtual void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
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_
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
MonitorElement * dttpgphts2tag[3]
MonitorElement * dttpgphntrack
edm::EDGetTokenT< L1MuDTChambPhContainer > dttpgSourcePhContainer_token_
MonitorElement * dttf_p_q[3]
void setMapThLabel(MonitorElement *me)
MonitorElement * dttpgphmapbx[3]
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)
virtual void dqmBeginRun(edm::Run const &, edm::EventSetup const &)
MonitorElement * dttpgphquality[3]
MonitorElement * dttpgphmap2nd
MonitorElement * dttpgphstation[3]