CMS 3D CMS Logo

L1TDTTPG Class Reference

#include <DQM/L1TMonitor/interface/L1TDTTPG.h>

Inheritance diagram for L1TDTTPG:

edm::EDAnalyzer

List of all members.

Public Member Functions

 L1TDTTPG (const edm::ParameterSet &ps)
virtual ~L1TDTTPG ()

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
void beginJob (const edm::EventSetup &c)
void endJob (void)

Private Member Functions

void setMapPhLabel (MonitorElement *me)
void setMapThLabel (MonitorElement *me)

Private Attributes

DQMStoredbe
MonitorElementdttf_p_phi [3]
MonitorElementdttf_p_pt [3]
MonitorElementdttf_p_q [3]
MonitorElementdttf_p_qual [3]
MonitorElementdttpgphbestmap
MonitorElementdttpgphbestmapcorr
MonitorElementdttpgphbx [8]
MonitorElementdttpgphbxcomp
MonitorElementdttpgphmap
MonitorElementdttpgphmap2nd
MonitorElementdttpgphmapbx [3]
MonitorElementdttpgphmapcorr
MonitorElementdttpgphntrack
MonitorElementdttpgphquality [3]
MonitorElementdttpgphsector [3]
MonitorElementdttpgphstation [3]
MonitorElementdttpgphts2tag [3]
MonitorElementdttpgphwheel [3]
edm::InputTag dttpgSource_
MonitorElementdttpgthbestmap
MonitorElementdttpgthbestmaph
MonitorElementdttpgthbx [3]
MonitorElementdttpgthmap
MonitorElementdttpgthmapbx [3]
MonitorElementdttpgthmaph
MonitorElementdttpgthntrack
MonitorElementdttpgthquality [3]
MonitorElementdttpgthsector [3]
MonitorElementdttpgthstation [3]
MonitorElementdttpgththeta [3]
MonitorElementdttpgthwheel [3]
ofstream logFile_
bool monitorDaemon_
int nev_
std::string outputFile_
bool verbose_


Detailed Description

Definition at line 32 of file L1TDTTPG.h.


Constructor & Destructor Documentation

L1TDTTPG::L1TDTTPG ( const edm::ParameterSet ps  ) 

Definition at line 105 of file L1TDTTPG.cc.

References GenMuonPlsPt100GeV_cfg::cout, dbe, lat::endl(), edm::ParameterSet::getUntrackedParameter(), NULL, outputFile_, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), and verbose_.

00106   : dttpgSource_( ps.getParameter< InputTag >("dttpgSource") )
00107 {
00108 
00109   // verbosity switch
00110   verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
00111 
00112   if(verbose_) cout << "L1TDTTPG: constructor...." << endl;
00113 
00114 
00115   dbe = NULL;
00116   if ( ps.getUntrackedParameter<bool>("DQMStore", false) ) 
00117     {
00118       dbe = Service<DQMStore>().operator->();
00119       dbe->setVerbose(0);
00120     }
00121   
00122   outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
00123   if ( outputFile_.size() != 0 ) {
00124     cout << "L1T Monitoring histograms will be saved to " << outputFile_.c_str() << endl;
00125   }
00126 
00127   bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
00128   if(disable){
00129     outputFile_="";
00130   }
00131 
00132 
00133   if ( dbe !=NULL ) {
00134     dbe->setCurrentFolder("L1T/L1TDTTPG");
00135   }
00136 
00137 
00138 }

L1TDTTPG::~L1TDTTPG (  )  [virtual]

Definition at line 140 of file L1TDTTPG.cc.

00141 {
00142 }


Member Function Documentation

void L1TDTTPG::analyze ( const edm::Event e,
const edm::EventSetup c 
) [protected, virtual]

Implements edm::EDAnalyzer.

Definition at line 331 of file L1TDTTPG.cc.

References L1MuDTChambPhDigi::code(), code, GenMuonPlsPt100GeV_cfg::cout, dttf_p_phi, dttf_p_pt, dttf_p_q, dttf_p_qual, dttpgphbestmap, dttpgphbestmapcorr, dttpgphbx, dttpgphbxcomp, dttpgphmap, dttpgphmap2nd, dttpgphmapbx, dttpgphmapcorr, dttpgphntrack, dttpgphquality, dttpgphsector, dttpgphstation, dttpgphts2tag, dttpgphwheel, dttpgSource_, dttpgthbestmap, dttpgthbestmaph, dttpgthbx, dttpgthmap, dttpgthmapbx, dttpgthmaph, dttpgthntrack, dttpgthquality, dttpgthsector, dttpgthstation, dttpgththeta, dttpgthwheel, lat::endl(), MonitorElement::Fill(), edm::Event::getByLabel(), i, edm::Handle< T >::isValid(), j, k, edm::InputTag::label(), nev_, edm::InputTag::process(), t, and verbose_.

00332 {
00333 
00334   nev_++; 
00335   if(verbose_) cout << "L1TDTTPG: analyze...." << endl;
00336 
00337   edm::Handle<L1MuDTChambPhContainer > myL1MuDTChambPhContainer;  
00338   e.getByLabel(dttpgSource_,myL1MuDTChambPhContainer);
00339   
00340   if (!myL1MuDTChambPhContainer.isValid()) {
00341     edm::LogInfo("DataNotFound") << "can't find L1MuDTChambPhContainer with label "
00342                              << dttpgSource_.label() ;
00343     return;
00344   }
00345   L1MuDTChambPhContainer::Phi_Container *myPhContainer =  
00346     myL1MuDTChambPhContainer->getContainer();
00347 
00348   edm::Handle<L1MuDTChambThContainer > myL1MuDTChambThContainer;  
00349   e.getByLabel(dttpgSource_,myL1MuDTChambThContainer);
00350   
00351   if (!myL1MuDTChambThContainer.isValid()) {
00352     edm::LogInfo("DataNotFound") << "can't find L1MuDTChambThContainer with label "
00353                              << dttpgSource_.label() ;
00354     edm::LogInfo("DataNotFound") << "if this fails try to add DATA to the process name." ;
00355 
00356     return;
00357   }
00358   L1MuDTChambThContainer::The_Container* myThContainer =  
00359     myL1MuDTChambThContainer->getContainer();
00360 
00361   int ndttpgphtrack = 0;
00362   int ndttpgthtrack = 0; 
00363   int NumberOfSegmentsPhi[3]={0,0,0};
00364   
00365   for( L1MuDTChambPhContainer::Phi_Container::const_iterator 
00366          DTPhDigiItr =  myPhContainer->begin() ;
00367        DTPhDigiItr != myPhContainer->end() ;
00368        ++DTPhDigiItr ) 
00369     {           
00370       int bx = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag();
00371       if(bx == -1)
00372        NumberOfSegmentsPhi[0]++;
00373       if(bx == 0)
00374        NumberOfSegmentsPhi[1]++;
00375       if(bx == 1)
00376        NumberOfSegmentsPhi[2]++;   
00377     }
00378    /*Fill Histos for Segment counter for each bx separately */
00379 
00380   for(int k=0;k<3;k++){
00381      dttpgphbx[k+2]->Fill(NumberOfSegmentsPhi[k]);
00382    }
00383    int bxCounterDttfPhi=0; // = no. of BX's with non-zero data
00384    for (int k=0;k<3;k++){
00385      if (NumberOfSegmentsPhi[k]>0)
00386        bxCounterDttfPhi++;
00387    }
00388 
00389    /* the BX "code" */
00390 
00391    int bxCodePhi=0;
00392    if(bxCounterDttfPhi==0){
00393      bxCodePhi=0;
00394    }else if(bxCounterDttfPhi==1){
00395      for(int k=0;k<3;k++){
00396        if(NumberOfSegmentsPhi[k]>0)
00397         bxCodePhi=k+2;
00398      }
00399    }else if(bxCounterDttfPhi==2){
00400      for(int k=0;k<3;k++){
00401        if(NumberOfSegmentsPhi[k]==0)
00402         bxCodePhi=8-k;
00403      }
00404    }else if(bxCounterDttfPhi==3){
00405      bxCodePhi=10;
00406    }
00407 
00408    //The bx analyzer histo
00409    dttpgphbx[0]->Fill(bxCodePhi);
00410 
00411 
00412    const L1MuDTChambPhDigi* bestPhQualMap[5][12][4];
00413    memset(bestPhQualMap,0,240*sizeof(L1MuDTChambPhDigi*));
00414 
00415    for( L1MuDTChambPhContainer::Phi_Container::const_iterator 
00416          DTPhDigiItr =  myPhContainer->begin() ;
00417        DTPhDigiItr != myPhContainer->end() ;
00418        ++DTPhDigiItr ) 
00419     {           
00420 
00421       ndttpgphtrack++;
00422 
00423       int bxindex = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag() + 1;
00424 
00425       dttpgphwheel[bxindex]->Fill(DTPhDigiItr->whNum());
00426       if (verbose_)
00427         {
00428           cout << "DTTPG phi wheel number " << DTPhDigiItr->whNum() << endl;
00429         }
00430       dttpgphstation[bxindex]->Fill(DTPhDigiItr->stNum());
00431       if (verbose_)
00432         {   
00433           cout << "DTTPG phi station number " << DTPhDigiItr->stNum() << endl;
00434         }
00435       dttpgphsector[bxindex]->Fill(DTPhDigiItr->scNum());
00436       if (verbose_)
00437         {
00438           cout << "DTTPG phi sector number " << DTPhDigiItr->scNum() << endl;
00439         }
00440 //       dttpgphphi[bxindex]->Fill(DTPhDigiItr->phi());
00441 //       if (verbose_)
00442 //      {
00443 //        cout << "DTTPG phi phi " << DTPhDigiItr->phi() << endl;
00444 //      }
00445 //       dttpgphphiB[bxindex]->Fill(DTPhDigiItr->phiB());
00446 //       if (verbose_)
00447 //      {
00448 //        cout << "DTTPG phi phiB " << DTPhDigiItr->phiB() << endl;
00449 //      }
00450       dttpgphquality[bxindex]->Fill(DTPhDigiItr->code());
00451       if (verbose_)
00452         {
00453           cout << "DTTPG phi quality " << DTPhDigiItr->code() << endl;
00454         }
00455       dttpgphts2tag[bxindex]->Fill(DTPhDigiItr->Ts2Tag());
00456       if (verbose_)
00457         {
00458           cout << "DTTPG phi ts2tag " << DTPhDigiItr->Ts2Tag() << endl;
00459         }
00460 //       dttpgphbxcnt[bxindex]->Fill(DTPhDigiItr->BxCnt());
00461 //       if (verbose_)
00462 //      {
00463 //        cout << "DTTPG phi bxcnt " << DTPhDigiItr->BxCnt() << endl;
00464 //      }
00465     
00466       int ypos = DTPhDigiItr->scNum();
00467       int xpos = DTPhDigiItr->stNum()+4*(DTPhDigiItr->whNum()+2);
00468       dttpgphmap->Fill(xpos,ypos);
00469       if (DTPhDigiItr->Ts2Tag())
00470         dttpgphmap2nd->Fill(xpos,ypos);
00471       dttpgphmapbx[bxindex]->Fill(xpos,ypos);
00472       if (DTPhDigiItr->code()>3)
00473         dttpgphmapcorr->Fill(xpos,ypos);
00474 
00475       if (bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]==0 ||
00476           bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]->code()<DTPhDigiItr->code())
00477         {
00478           bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]=&(*DTPhDigiItr);
00479         }
00480 
00481     }
00482 
00483    for (int iwh=0; iwh<5; iwh++){
00484      for (int isec=0; isec<12; isec++){
00485        for (int ist=0; ist<4; ist++){
00486          if (bestPhQualMap[iwh][isec][ist]){
00487            int xpos = iwh*4+ist+1;
00488            dttpgphbestmap->Fill(xpos,isec);
00489            if(bestPhQualMap[iwh][isec][ist]->code()>3)
00490              dttpgphbestmapcorr->Fill(xpos,isec);
00491          }
00492        }
00493      }
00494    }
00495 
00496 
00497    int bestThQualMap[5][12][3];
00498    memset(bestThQualMap,0,180*sizeof(int));
00499    //for( vector<L1MuDTChambThDigi>::const_iterator 
00500    for( L1MuDTChambThContainer::The_Container::const_iterator 
00501          DTThDigiItr =  myThContainer->begin() ;
00502        DTThDigiItr != myThContainer->end() ;
00503        ++DTThDigiItr ) 
00504     {                           
00505       ndttpgthtrack++;
00506 
00507       int bxindex = DTThDigiItr->bxNum() + 1;
00508 
00509       dttpgthwheel[bxindex]->Fill(DTThDigiItr->whNum());
00510       if (verbose_)
00511         {
00512           cout << "DTTPG theta wheel number " << DTThDigiItr->whNum() << endl;
00513         }
00514       dttpgthstation[bxindex]->Fill(DTThDigiItr->stNum());
00515       if (verbose_)
00516         {   
00517           cout << "DTTPG theta station number " << DTThDigiItr->stNum() << endl;
00518         }
00519       dttpgthsector[bxindex]->Fill(DTThDigiItr->scNum());
00520       if (verbose_)
00521         {
00522           cout << "DTTPG theta sector number " << DTThDigiItr->scNum() << endl;
00523         }
00524       dttpgthbx[bxindex]->Fill(DTThDigiItr->bxNum());
00525       if (verbose_)
00526         {
00527           cout << "DTTPG theta bx number " << DTThDigiItr->bxNum() << endl;
00528         }
00529       int thcode[7]= {0,0,0,0,0,0,0};
00530       for (int j = 0; j < 7; j++)
00531         {
00532           dttpgththeta[bxindex]->Fill(DTThDigiItr->position(j));
00533           if (verbose_)
00534             {
00535               cout << "DTTPG theta position " << DTThDigiItr->position(j) << endl;
00536             }
00537           thcode[j]=DTThDigiItr->code(j);
00538           dttpgthquality[bxindex]->Fill(thcode[j]);
00539           if (verbose_)
00540             {
00541               cout << "DTTPG theta quality " << DTThDigiItr->code(j) << endl;
00542             }
00543         }
00544       
00545       int ypos = DTThDigiItr->scNum();
00546       int xpos = DTThDigiItr->stNum()+4*(DTThDigiItr->whNum()+2);
00547       int bestqual=0;
00548       dttpgthmap->Fill(xpos,ypos);
00549       dttpgthmapbx[bxindex]->Fill(xpos,ypos);
00550       for (int pos = 0; pos < 7; pos++){
00551         if (thcode[pos]>bestqual)
00552           bestqual=thcode[pos];
00553         if(thcode[pos]==2)
00554           dttpgthmaph->Fill(xpos,ypos);
00555       }
00556 
00557       if (bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1] < bestqual)
00558         {
00559           bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1]=bestqual;
00560         }
00561     }
00562 
00563    for (int iwh=0; iwh<5; iwh++){
00564      for (int isec=0; isec<12; isec++){
00565        for (int ist=0; ist<3; ist++){
00566          if (bestThQualMap[iwh][isec][ist]){
00567            int xpos = iwh*4+ist+1;
00568            dttpgthbestmap->Fill(xpos,isec);
00569            if(bestThQualMap[iwh][isec][ist]==2)
00570              dttpgthbestmaph->Fill(xpos,isec);
00571          }
00572        }
00573      }
00574    }
00575 
00576 
00577   dttpgphntrack->Fill(ndttpgphtrack);
00578   if (verbose_)
00579     {
00580       cout << "DTTPG phi ntrack " << ndttpgphtrack << endl;
00581     }
00582   dttpgthntrack->Fill(ndttpgthtrack);
00583   if (verbose_) {
00584     cout << "DTTPG theta ntrack " << ndttpgthtrack << endl;
00585   }
00586 
00587   edm::Handle<L1MuDTTrackContainer > myL1MuDTTrackContainer;
00588 
00589   
00590     std::string trstring;
00591     trstring = dttpgSource_.label()+":"+"DATA"+":"+dttpgSource_.process();
00592     edm::InputTag trInputTag(trstring);
00593     e.getByLabel(trInputTag,myL1MuDTTrackContainer);
00594 
00595   if (!myL1MuDTTrackContainer.isValid()) {
00596     edm::LogInfo("DataNotFound") << "can't find L1MuDTTrackContainer with label "
00597                                << dttpgSource_.label() ;
00598     return;
00599   }
00600 
00601   L1MuDTTrackContainer::TrackContainer *t =  myL1MuDTTrackContainer->getContainer();
00602 
00603 
00604 
00605   int NumberOfSegmentsOut[3]={0,0,0};
00606   for ( L1MuDTTrackContainer::TrackContainer::const_iterator i 
00607           = t->begin(); i != t->end(); ++i ) {
00608     if(i->bx() ==-1)
00609        NumberOfSegmentsOut[0]++;
00610     if(i->bx() ==0)
00611        NumberOfSegmentsOut[1]++;
00612     if(i->bx() ==1)
00613        NumberOfSegmentsOut[2]++;
00614   }
00615 
00616 
00617    /*Fill Histos for Segment counter*/
00618    for(int k=0;k<3;k++){
00619      dttpgphbx[k+5]->Fill(NumberOfSegmentsOut[k]);
00620    }
00621 
00622    /*Bunch assigments*/
00623 
00624    int bxCounterDttfOut=0;
00625    for (int k=0;k<3;k++){
00626    if (NumberOfSegmentsOut[k]>0)
00627      bxCounterDttfOut++;
00628    }
00629 
00630    int bxCodeOut=0;
00631    if(bxCounterDttfOut==0){
00632      bxCodeOut=0;
00633    }else if(bxCounterDttfOut==1){
00634      for(int k=0;k<3;k++){
00635        if(NumberOfSegmentsOut[k]>0)
00636          bxCodeOut=k+2;
00637      }
00638    }else if(bxCounterDttfOut==2){
00639      for(int k=0;k<3;k++){
00640        if(NumberOfSegmentsOut[k]==0)
00641          bxCodeOut=8-k;
00642      }
00643    }else if(bxCounterDttfOut==3){
00644      bxCodeOut=10;
00645    }
00646 
00647    //The bx analyzer histo
00648    dttpgphbx[1]->Fill(bxCodeOut);
00649 
00650    /*End Dttf Output Bunch analysis*/
00651 
00652    // the 2-DIM histo with phi.input vs. output
00653    dttpgphbxcomp->Fill(bxCodePhi,bxCodeOut);
00654 
00655 
00656   for ( L1MuDTTrackContainer::TrackContainer::const_iterator i 
00657           = t->begin(); i != t->end(); ++i ) {
00658     if ( verbose_ ) {
00659       std::cout << "bx = " << i->bx() 
00660                 << std::endl;
00661       std::cout << "quality (packed) = " << i->quality_packed() 
00662                 << std::endl;
00663       std::cout << "pt      (packed) = " << i->pt_packed() 
00664                 << std::endl;
00665       std::cout << "phi     (packed) = " << i->phi_packed() 
00666                 << std::endl;
00667       std::cout << "charge  (packed) = " << i->charge_packed() 
00668                 << std::endl;
00669     }
00670 
00671 
00672     int bxindex = i->bx() + 1;
00673     dttf_p_phi[bxindex]->Fill(i->phi_packed());
00674     dttf_p_qual[bxindex]->Fill(i->quality_packed());
00675     dttf_p_pt[bxindex]->Fill(i->pt_packed());
00676     dttf_p_q[bxindex]->Fill(i->charge_packed());
00677   }
00678     
00679 }

void L1TDTTPG::beginJob ( const edm::EventSetup c  )  [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 144 of file L1TDTTPG.cc.

References DQMStore::book1D(), DQMStore::book2D(), dbe, dttf_p_phi, dttf_p_pt, dttf_p_q, dttf_p_qual, dttpgphbestmap, dttpgphbestmapcorr, dttpgphbx, dttpgphbxcomp, dttpgphmap, dttpgphmap2nd, dttpgphmapbx, dttpgphmapcorr, dttpgphntrack, dttpgphquality, dttpgphsector, dttpgphstation, dttpgphts2tag, dttpgphwheel, dttpgthbestmap, dttpgthbestmaph, dttpgthbx, dttpgthmap, dttpgthmapbx, dttpgthmaph, dttpgthntrack, dttpgthquality, dttpgthsector, dttpgthstation, dttpgththeta, dttpgthwheel, i, nev_, DQMStore::rmdir(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), setMapPhLabel(), and setMapThLabel().

00145 {
00146 
00147   nev_ = 0;
00148 
00149   // get hold of back-end interface
00150   DQMStore* dbe = 0;
00151   dbe = Service<DQMStore>().operator->();
00152   if ( dbe ) {
00153     dbe->setCurrentFolder("L1T/L1TDTTPG");
00154     dbe->rmdir("L1T/L1TDTTPG");
00155   }
00156 
00157 
00158   if ( dbe ) 
00159     {
00160       dbe->setCurrentFolder("L1T/L1TDTTPG");
00161 
00162 
00163       //hist1[0]
00164       dttpgphbx[0] = dbe->book1D("BxEncoding_PHI",
00165                                  "Bunch encoding DTTF Phi",11,0,11);
00166       //hist1[1]
00167       dttpgphbx[1] = dbe->book1D("BxEncoding_OUT",
00168                                  "Bunch encoding DTTF Output",11,0,11);
00169 
00170       //hist1[2]
00171       dttpgphbx[2] = dbe->book1D("NumberOfSegmentsPHI_BunchNeg1",
00172                                  "Number of segments for bunch -1 Dttf Phi",
00173                                  20,0,20);
00174       //hist1[3]
00175       dttpgphbx[3] = dbe->book1D("NumberOfSegmentsPHI_Bunch0",
00176                                  "Number of segments for bunch 0 Dttf Phi",
00177                                  20,0,20);
00178       //hist1[4]
00179       dttpgphbx[4] = dbe->book1D("NumberOfSegmentsPHI_Bunch1",
00180                                  "Number of segments for bunch 1 Dttf Phi",
00181                                  20,0,20);
00182 
00183       //hist1[5]
00184       dttpgphbx[5] = dbe->book1D("NumberOfSegmentsOUT_BunchNeg1",
00185                                  "Number of segments for bunch -1 Dttf Output",
00186                                  20,0,20);
00187       //hist1[6] 
00188       dttpgphbx[6] = dbe->book1D("NumberOfSegmentsOUT_Bunch0",
00189                                  "Number of segments for bunch 0 Dttf Output",
00190                                  20,0,20);
00191       //hist1[7]
00192       dttpgphbx[7] = dbe->book1D("NumberOfSegmentsOUT_Bunch1",
00193                                  "Number of segments for bunch 1 Dttf Output",
00194                                  20,0,20);
00195 
00196       for(int i=0;i<2;i++){
00197         dttpgphbx[i]->setBinLabel(1,"None");
00198         dttpgphbx[i]->setBinLabel(3,"Only bx=-1");
00199         dttpgphbx[i]->setBinLabel(4,"Only bx= 0");
00200         dttpgphbx[i]->setBinLabel(5,"Only bx=+1");
00201         dttpgphbx[i]->setBinLabel(7,"Bx=-1,0");
00202         dttpgphbx[i]->setBinLabel(8,"Bx=-1,1");
00203         dttpgphbx[i]->setBinLabel(9,"Bx= 0,1");
00204         dttpgphbx[i]->setBinLabel(11,"All bx");
00205       }
00206    
00207       dttpgphbxcomp = dbe->book2D("BxEncoding_PHI_OUT",
00208                                   "Bunch encoding: DTTF Phi vs. Output",
00209                                   11,0,11,11,0,11);
00210       dttpgphbxcomp->setAxisTitle("DTTF (output)",1);
00211       dttpgphbxcomp->setAxisTitle("PHI-TF",2);
00212       for(int i=1;i<=2;i++){
00213         dttpgphbxcomp->setBinLabel(1,"None",i);
00214         dttpgphbxcomp->setBinLabel(3,"Only bx=-1",i);
00215         dttpgphbxcomp->setBinLabel(4,"Only bx= 0",i);
00216         dttpgphbxcomp->setBinLabel(5,"Only bx=+1",i);
00217         dttpgphbxcomp->setBinLabel(7,"Bx=-1,0",i);
00218         dttpgphbxcomp->setBinLabel(8,"Bx=-1,1",i);
00219         dttpgphbxcomp->setBinLabel(9,"Bx= 0,1",i);
00220         dttpgphbxcomp->setBinLabel(11,"All bx",i);
00221       }
00222 
00223       dttpgphntrack = dbe->book1D("DT_TPG_phi_ntrack", 
00224                                   "DT TPG phi ntrack", 20, -0.5, 19.5 ) ;  
00225       dttpgthntrack = dbe->book1D("DT_TPG_theta_ntrack", 
00226                                   "DT TPG theta ntrack", 20, -0.5, 19.5 ) ;  
00227 
00228       for (int ibx=0 ; ibx<=2; ibx++) {
00229         
00230         ostringstream bxnum;
00231         bxnum << ibx-1;
00232         string bxn;
00233         if (ibx<2)
00234           bxn = bxnum.str();
00235         else
00236           bxn = "+" + bxnum.str();
00237         
00238         // Phi
00239         dttpgphwheel[ibx] = dbe->book1D("DT_TPG_phi_wheel_number_"+bxn, 
00240                                             "DT TPG phi wheel number "+bxn, 5, -2.5, 2.5 ) ;  
00241         dttpgphsector[ibx] = dbe->book1D("DT_TPG_phi_sector_number_"+bxn, 
00242                                          "DT TPG phi sector number "+bxn, 12, -0.5, 11.5 );  
00243         dttpgphstation[ibx] = dbe->book1D("DT_TPG_phi_station_number_"+bxn, 
00244                                           "DT TPG phi station number "+bxn, 5, 0.5, 4.5 ) ;
00245 //      dttpgphphi[ibx] = dbe->book1D("DT_TPG_phi_"+bxn, 
00246 //                                    "DT TPG phi "+bxn, 100, -2100., 2100. ) ;  
00247 //      dttpgphphiB[ibx] = dbe->book1D("DT_TPG_phiB_"+bxn, 
00248 //                                     "DT TPG phiB "+bxn, 100, -550., 550. ) ;  
00249         dttpgphquality[ibx] = dbe->book1D("DT_TPG_phi_quality_"+bxn, 
00250                                           "DT TPG phi quality "+bxn, 8, -0.5, 7.5 ) ;  
00251         dttpgphts2tag[ibx] = dbe->book1D("DT_TPG_phi_Ts2Tag_"+bxn, 
00252                                          "DT TPG phi Ts2Tag "+bxn, 2, -0.5, 1.5 ) ;  
00253 //      dttpgphbxcnt[ibx] = dbe->book1D("DT_TPG_phi_BxCnt_"+bxn, 
00254 //                                      "DT TPG phi BxCnt "+bxn, 10, -0.5, 9.5 ) ;  
00255         dttpgphmapbx[ibx] = dbe->book2D("DT_TPG_phi_map_bx"+bxn,
00256                                       "Map of triggers per station (BX="+bxn+")",20,1,21,12,0,12);
00257         setMapPhLabel(dttpgphmapbx[ibx]);
00258 
00259         //Theta
00260         dttpgthbx[ibx] = dbe->book1D("DT_TPG_theta_bx_"+bxn, 
00261                                      "DT TPG theta bx "+bxn, 50, -24.5, 24.5 ) ;  
00262         dttpgthwheel[ibx] = dbe->book1D("DT_TPG_theta_wheel_number_"+bxn, 
00263                                         "DT TPG theta wheel number "+bxn, 5, -2.5, 2.5 ) ;  
00264         dttpgthsector[ibx] = dbe->book1D("DT_TPG_theta_sector_number_"+bxn, 
00265                                          "DT TPG theta sector number "+bxn, 12, -0.5, 11.5 ) ;  
00266         dttpgthstation[ibx] = dbe->book1D("DT_TPG_theta_station_number_"+bxn, 
00267                                           "DT TPG theta station number "+bxn, 5, -0.5, 4.5 ) ;  
00268         dttpgththeta[ibx] = dbe->book1D("DT_TPG_theta_"+bxn, 
00269                                         "DT TPG theta "+bxn, 20, -0.5, 19.5 ) ;  
00270         dttpgthquality[ibx] = dbe->book1D("DT_TPG_theta_quality_"+bxn, 
00271                                           "DT TPG theta quality "+bxn, 8, -0.5, 7.5 ) ;  
00272         dttpgthmapbx[ibx] = dbe->book2D("DT_TPG_theta_map_bx_"+bxn,
00273                                         "Map of triggers per station (BX="+bxn+")",15,1,16,12,0,12);
00274         setMapThLabel(dttpgthmapbx[ibx]);
00275 
00276         // Phi output
00277         dttf_p_phi[ibx] = dbe->book1D("dttf_p_phi_"+bxn, "dttf phi output #phi "+bxn, 256, 
00278                                       -0.5, 255.5);
00279         dttf_p_qual[ibx] = dbe->book1D("dttf_p_qual_"+bxn, "dttf phi output qual "+bxn, 8, -0.5, 7.5);
00280         dttf_p_q[ibx] = dbe->book1D("dttf_p_q_"+bxn, "dttf phi output q "+bxn, 2, -0.5, 1.5);
00281         dttf_p_pt[ibx] = dbe->book1D("dttf_p_pt_"+bxn, "dttf phi output p_{t} "+bxn, 32, -0.5, 31.5);
00282       
00283       }
00284 
00285       dttpgphmap = dbe->book2D("DT_TPG_phi_map",
00286                                "Map of triggers per station",20,1,21,12,0,12);
00287       dttpgphmapcorr = dbe->book2D("DT_TPG_phi_map_corr",
00288                                    "Map of correlated triggers per station",20,1,21,12,0,12);
00289       dttpgphmap2nd = dbe->book2D("DT_TPG_phi_map_2nd",
00290                                   "Map of second tracks per station",20,1,21,12,0,12);
00291       dttpgphbestmap = dbe->book2D("DT_TPG_phi_best_map",
00292                                    "Map of best triggers per station",20,1,21,12,0,12);
00293       dttpgphbestmapcorr = dbe->book2D("DT_TPG_phi_best_map_corr",
00294                                        "Map of correlated best triggers per station",20,1,21,12,0,12);
00295       setMapPhLabel(dttpgphmap);
00296       setMapPhLabel(dttpgphmapcorr);
00297       setMapPhLabel(dttpgphmap2nd);
00298       setMapPhLabel(dttpgphbestmap);
00299       setMapPhLabel(dttpgphbestmapcorr);
00300       
00301 
00302 
00303       dttpgthmap = dbe->book2D("DT_TPG_theta_map",
00304                                "Map of triggers per station",15,1,16,12,0,12);
00305       dttpgthmaph = dbe->book2D("DT_TPG_theta_map_h",
00306                                 "Map of H quality triggers per station",15,1,16,12,0,12);
00307       dttpgthbestmap = dbe->book2D("DT_TPG_theta_best_map",
00308                                    "Map of besttriggers per station",15,1,16,12,0,12);
00309       dttpgthbestmaph = dbe->book2D("DT_TPG_theta_best_map_h",
00310                                     "Map of H quality best triggers per station",15,1,16,12,0,12);
00311       setMapThLabel(dttpgthmap);
00312       setMapThLabel(dttpgthmaph);
00313       setMapThLabel(dttpgthbestmap);
00314       setMapThLabel(dttpgthbestmaph);
00315 
00316 
00317     }  
00318 }

void L1TDTTPG::endJob ( void   )  [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 321 of file L1TDTTPG.cc.

References GenMuonPlsPt100GeV_cfg::cout, dbe, lat::endl(), nev_, outputFile_, DQMStore::save(), and verbose_.

00322 {
00323   if(verbose_) cout << "L1TDTTPG: end job...." << endl;
00324   LogInfo("EndJob") << "analyzed " << nev_ << " events"; 
00325 
00326   if ( outputFile_.size() != 0  && dbe ) dbe->save(outputFile_);
00327 
00328   return;
00329 }

void L1TDTTPG::setMapPhLabel ( MonitorElement me  )  [private]

Definition at line 681 of file L1TDTTPG.cc.

References i, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), and muonGeometry::wheel.

Referenced by beginJob().

00682 {
00683 
00684   me->setAxisTitle("DTTF Sector",2);
00685       for(int i=0;i<5;i++){
00686         ostringstream wheel;
00687         wheel << i-2;
00688         me->setBinLabel(1+i*4,"Wheel "+ wheel.str(),1);
00689       }
00690   
00691 }

void L1TDTTPG::setMapThLabel ( MonitorElement me  )  [private]

Definition at line 693 of file L1TDTTPG.cc.

References i, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), and muonGeometry::wheel.

Referenced by beginJob().

00694 {
00695 
00696   me->setAxisTitle("DTTF Sector",2);
00697       for(int i=0;i<5;i++){
00698         ostringstream wheel;
00699         wheel << i-2;
00700         me->setBinLabel(1+i*3,"Wheel "+ wheel.str(),1);
00701       }
00702   
00703 }


Member Data Documentation

DQMStore* L1TDTTPG::dbe [private]

Definition at line 58 of file L1TDTTPG.h.

Referenced by beginJob(), endJob(), and L1TDTTPG().

MonitorElement* L1TDTTPG::dttf_p_phi[3] [private]

Definition at line 92 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttf_p_pt[3] [private]

Definition at line 93 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttf_p_q[3] [private]

Definition at line 94 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttf_p_qual[3] [private]

Definition at line 95 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphbestmap [private]

Definition at line 75 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphbestmapcorr [private]

Definition at line 76 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphbx[8] [private]

Definition at line 60 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphbxcomp [private]

Definition at line 61 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphmap [private]

Definition at line 71 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphmap2nd [private]

Definition at line 73 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphmapbx[3] [private]

Definition at line 72 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphmapcorr [private]

Definition at line 74 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphntrack [private]

Definition at line 70 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphquality[3] [private]

Definition at line 67 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphsector[3] [private]

Definition at line 63 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphstation[3] [private]

Definition at line 64 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphts2tag[3] [private]

Definition at line 68 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgphwheel[3] [private]

Definition at line 62 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

edm::InputTag L1TDTTPG::dttpgSource_ [private]

Definition at line 102 of file L1TDTTPG.h.

Referenced by analyze().

MonitorElement* L1TDTTPG::dttpgthbestmap [private]

Definition at line 89 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthbestmaph [private]

Definition at line 90 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthbx[3] [private]

Definition at line 79 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthmap [private]

Definition at line 86 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthmapbx[3] [private]

Definition at line 87 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthmaph [private]

Definition at line 88 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthntrack [private]

Definition at line 85 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthquality[3] [private]

Definition at line 84 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthsector[3] [private]

Definition at line 81 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthstation[3] [private]

Definition at line 82 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgththeta[3] [private]

Definition at line 83 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTPG::dttpgthwheel[3] [private]

Definition at line 80 of file L1TDTTPG.h.

Referenced by analyze(), and beginJob().

ofstream L1TDTTPG::logFile_ [private]

Definition at line 101 of file L1TDTTPG.h.

bool L1TDTTPG::monitorDaemon_ [private]

Definition at line 100 of file L1TDTTPG.h.

int L1TDTTPG::nev_ [private]

Definition at line 97 of file L1TDTTPG.h.

Referenced by analyze(), beginJob(), and endJob().

std::string L1TDTTPG::outputFile_ [private]

Definition at line 98 of file L1TDTTPG.h.

Referenced by endJob(), and L1TDTTPG().

bool L1TDTTPG::verbose_ [private]

Definition at line 99 of file L1TDTTPG.h.

Referenced by analyze(), endJob(), and L1TDTTPG().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:27:02 2009 for CMSSW by  doxygen 1.5.4