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;
140 "Bunch encoding DTTF Phi",11,0,11);
143 "Bunch encoding DTTF Output",11,0,11);
147 "Number of segments for bunch -1 Dttf Phi",
151 "Number of segments for bunch 0 Dttf Phi",
155 "Number of segments for bunch 1 Dttf Phi",
160 "Number of segments for bunch -1 Dttf Output",
164 "Number of segments for bunch 0 Dttf Output",
168 "Number of segments for bunch 1 Dttf Output",
171 for(
int i=0;
i<2;
i++){
183 "Bunch encoding: DTTF Phi vs. Output",
187 for(
int i=1;
i<=2;
i++){
199 "DT TPG phi ntrack", 20, -0.5, 19.5 ) ;
201 "DT TPG theta ntrack", 20, -0.5, 19.5 ) ;
203 for (
int ibx=0 ; ibx<=2; ibx++) {
211 bxn =
"+" + bxnum.str();
215 "DT TPG phi wheel number "+bxn, 5, -2.5, 2.5 ) ;
217 "DT TPG phi sector number "+bxn, 12, -0.5, 11.5 );
219 "DT TPG phi station number "+bxn, 5, 0.5, 4.5 ) ;
225 "DT TPG phi quality "+bxn, 8, -0.5, 7.5 ) ;
227 "DT TPG phi Ts2Tag "+bxn, 2, -0.5, 1.5 ) ;
231 "Map of triggers per station (BX="+bxn+
")",20,1,21,12,0,12);
236 "DT TPG theta bx "+bxn, 50, -24.5, 24.5 ) ;
238 "DT TPG theta wheel number "+bxn, 5, -2.5, 2.5 ) ;
240 "DT TPG theta sector number "+bxn, 12, -0.5, 11.5 ) ;
242 "DT TPG theta station number "+bxn, 5, -0.5, 4.5 ) ;
244 "DT TPG theta "+bxn, 20, -0.5, 19.5 ) ;
246 "DT TPG theta quality "+bxn, 8, -0.5, 7.5 ) ;
248 "Map of triggers per station (BX="+bxn+
")",15,1,16,12,0,12);
252 dttf_p_phi[ibx] = ibooker.
book1D(
"dttf_p_phi_"+bxn,
"dttf phi output #phi "+bxn, 256,
254 dttf_p_qual[ibx] = ibooker.
book1D(
"dttf_p_qual_"+bxn,
"dttf phi output qual "+bxn, 8, -0.5, 7.5);
255 dttf_p_q[ibx] = ibooker.
book1D(
"dttf_p_q_"+bxn,
"dttf phi output q "+bxn, 2, -0.5, 1.5);
256 dttf_p_pt[ibx] = ibooker.
book1D(
"dttf_p_pt_"+bxn,
"dttf phi output p_{t} "+bxn, 32, -0.5, 31.5);
261 "Map of triggers per station",20,1,21,12,0,12);
263 "Map of correlated triggers per station",20,1,21,12,0,12);
265 "Map of second tracks per station",20,1,21,12,0,12);
267 "Map of best triggers per station",20,1,21,12,0,12);
269 "Map of correlated best triggers per station",20,1,21,12,0,12);
279 "Map of triggers per station",15,1,16,12,0,12);
281 "Map of H quality triggers per station",15,1,16,12,0,12);
283 "Map of besttriggers per station",15,1,16,12,0,12);
285 "Map of H quality best triggers per station",15,1,16,12,0,12);
301 if (!myL1MuDTChambPhContainer.
isValid()) {
302 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuDTChambPhContainer with label " 312 if (!myL1MuDTChambThContainer.
isValid()) {
313 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuDTChambThContainer with label " 315 edm::LogInfo(
"DataNotFound") <<
"if this fails try to add DATA to the process name." ;
322 int ndttpgphtrack = 0;
323 int ndttpgthtrack = 0;
324 int NumberOfSegmentsPhi[3]={0,0,0};
326 for( L1MuDTChambPhContainer::Phi_Container::const_iterator
327 DTPhDigiItr = myPhContainer->begin() ;
328 DTPhDigiItr != myPhContainer->end() ;
331 int bx = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag();
333 NumberOfSegmentsPhi[0]++;
335 NumberOfSegmentsPhi[1]++;
337 NumberOfSegmentsPhi[2]++;
341 for(
int k=0;
k<3;
k++){
344 int bxCounterDttfPhi=0;
345 for (
int k=0;
k<3;
k++){
346 if (NumberOfSegmentsPhi[
k]>0)
353 if(bxCounterDttfPhi==0){
355 }
else if(bxCounterDttfPhi==1){
356 for(
int k=0;
k<3;
k++){
357 if(NumberOfSegmentsPhi[
k]>0)
360 }
else if(bxCounterDttfPhi==2){
361 for(
int k=0;
k<3;
k++){
362 if(NumberOfSegmentsPhi[
k]==0)
365 }
else if(bxCounterDttfPhi==3){
376 for( L1MuDTChambPhContainer::Phi_Container::const_iterator
377 DTPhDigiItr = myPhContainer->begin() ;
378 DTPhDigiItr != myPhContainer->end() ;
384 int bxindex = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag() + 1;
389 cout <<
"DTTPG phi wheel number " << DTPhDigiItr->whNum() << endl;
394 cout <<
"DTTPG phi station number " << DTPhDigiItr->stNum() << endl;
399 cout <<
"DTTPG phi sector number " << DTPhDigiItr->scNum() << endl;
404 cout <<
"DTTPG phi quality " << DTPhDigiItr->code() << endl;
409 cout <<
"DTTPG phi ts2tag " << DTPhDigiItr->Ts2Tag() << endl;
411 int ypos = DTPhDigiItr->scNum();
412 int xpos = DTPhDigiItr->stNum()+4*(DTPhDigiItr->whNum()+2);
414 if (DTPhDigiItr->Ts2Tag())
417 if (DTPhDigiItr->code()>3)
420 if (bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]==0 ||
421 bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]->
code()<DTPhDigiItr->code())
423 bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]=&(*DTPhDigiItr);
428 for (
int iwh=0; iwh<5; iwh++){
429 for (
int isec=0; isec<12; isec++){
430 for (
int ist=0; ist<4; ist++){
431 if (bestPhQualMap[iwh][isec][ist]){
432 int xpos = iwh*4+ist+1;
434 if(bestPhQualMap[iwh][isec][ist]->code()>3)
442 int bestThQualMap[5][12][3];
443 memset(bestThQualMap,0,180*
sizeof(
int));
445 for( L1MuDTChambThContainer::The_Container::const_iterator
446 DTThDigiItr = myThContainer->begin() ;
447 DTThDigiItr != myThContainer->end() ;
452 int bxindex = DTThDigiItr->bxNum() + 1;
457 cout <<
"DTTPG theta wheel number " << DTThDigiItr->whNum() << endl;
462 cout <<
"DTTPG theta station number " << DTThDigiItr->stNum() << endl;
467 cout <<
"DTTPG theta sector number " << DTThDigiItr->scNum() << endl;
472 cout <<
"DTTPG theta bx number " << DTThDigiItr->bxNum() << endl;
474 int thcode[7]= {0,0,0,0,0,0,0};
475 for (
int j = 0; j < 7; j++)
480 cout <<
"DTTPG theta position " << DTThDigiItr->position(j) << endl;
482 thcode[j]=DTThDigiItr->code(j);
486 cout <<
"DTTPG theta quality " << DTThDigiItr->code(j) << endl;
490 int ypos = DTThDigiItr->scNum();
491 int xpos = DTThDigiItr->stNum()+4*(DTThDigiItr->whNum()+2);
496 if (thcode[
pos]>bestqual)
497 bestqual=thcode[
pos];
502 if (bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1] < bestqual)
504 bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1]=bestqual;
508 for (
int iwh=0; iwh<5; iwh++){
509 for (
int isec=0; isec<12; isec++){
510 for (
int ist=0; ist<3; ist++){
511 if (bestThQualMap[iwh][isec][ist]){
512 int xpos = iwh*4+ist+1;
514 if(bestThQualMap[iwh][isec][ist]==2)
525 cout <<
"DTTPG phi ntrack " << ndttpgphtrack << endl;
529 cout <<
"DTTPG theta ntrack " << ndttpgthtrack << endl;
535 if (!myL1MuDTTrackContainer.
isValid()) {
536 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuDTTrackContainer with label " 545 int NumberOfSegmentsOut[3]={0,0,0};
546 for ( L1MuDTTrackContainer::TrackContainer::const_iterator
i 547 = t->begin();
i != t->end(); ++
i ) {
549 NumberOfSegmentsOut[0]++;
551 NumberOfSegmentsOut[1]++;
553 NumberOfSegmentsOut[2]++;
558 for(
int k=0;
k<3;
k++){
564 int bxCounterDttfOut=0;
565 for (
int k=0;
k<3;
k++){
566 if (NumberOfSegmentsOut[
k]>0)
571 if(bxCounterDttfOut==0){
573 }
else if(bxCounterDttfOut==1){
574 for(
int k=0;
k<3;
k++){
575 if(NumberOfSegmentsOut[
k]>0)
578 }
else if(bxCounterDttfOut==2){
579 for(
int k=0;
k<3;
k++){
580 if(NumberOfSegmentsOut[
k]==0)
583 }
else if(bxCounterDttfOut==3){
596 for ( L1MuDTTrackContainer::TrackContainer::const_iterator
i 597 = t->begin();
i != t->end(); ++
i ) {
601 std::cout <<
"quality (packed) = " <<
i->quality_packed()
603 std::cout <<
"pt (packed) = " <<
i->pt_packed()
605 std::cout <<
"phi (packed) = " <<
i->phi_packed()
607 std::cout <<
"charge (packed) = " <<
i->charge_packed()
612 int bxindex =
i->bx() + 1;
625 for(
int i=0;
i<5;
i++){
637 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]
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
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
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)
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]
virtual 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]