CMS 3D CMS Logo

L1TDTTF Class Reference

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

Inheritance diagram for L1TDTTF:

edm::EDAnalyzer

List of all members.

Public Member Functions

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

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

MonitorElementbxnumber [5][12][5]
DQMStoredbe
MonitorElementdttf_2ndTrack_Summary
MonitorElementdttf_bx [6][12]
MonitorElementdttf_bx_2ndTrack [6][12]
MonitorElementdttf_bx_integ
MonitorElementdttf_bx_integ_2ndTrack
MonitorElementdttf_bx_Summary
MonitorElementdttf_bx_Summary_2ndTrack
MonitorElementdttf_bx_wheel [6]
MonitorElementdttf_highQual_Summary
MonitorElementdttf_highQual_Summary_2ndTrack
MonitorElementdttf_n2ndTracks_wheel [6]
MonitorElementdttf_nTracks_integ_2ndTrack
MonitorElementdttf_nTracks_wheel [6]
MonitorElementdttf_nTracksPerEvent_integ
MonitorElementdttf_nTracksPerEvent_wheel [6]
MonitorElementdttf_nTrksPerEv [3][6][12]
MonitorElementdttf_occupancySummary
MonitorElementdttf_occupancySummary_2ndTrack
MonitorElementdttf_occupancySummary_r
MonitorElementdttf_p_eta [3][6][12]
MonitorElementdttf_p_eta_integ
MonitorElementdttf_p_eta_integ_2ndTrack
MonitorElementdttf_p_phi [3][6][12]
MonitorElementdttf_p_phi_eta_integ
MonitorElementdttf_p_phi_eta_integ_2ndTrack
MonitorElementdttf_p_phi_eta_wheel [6]
MonitorElementdttf_p_phi_integ
MonitorElementdttf_p_phi_integ_2ndTrack
MonitorElementdttf_p_pt [3][6][12]
MonitorElementdttf_p_pt_integ
MonitorElementdttf_p_pt_integ_2ndTrack
MonitorElementdttf_p_q [3][6][12]
MonitorElementdttf_p_q_integ
MonitorElementdttf_p_q_integ_2ndTrack
MonitorElementdttf_p_qual [3][6][12]
MonitorElementdttf_p_qual_integ
MonitorElementdttf_p_qual_integ_2ndTrack
bool dttf_track
bool dttf_track_2
MonitorElementdttpgphbestmap
MonitorElementdttpgphbestmapcorr
MonitorElementdttpgphbx [8]
MonitorElementdttpgphbxcomp
MonitorElementdttpgphmap
MonitorElementdttpgphmap2nd
MonitorElementdttpgphmapbx [3]
MonitorElementdttpgphmapcorr
MonitorElementdttpgphntrack
MonitorElementdttpgphsector [3][5]
MonitorElementdttpgphsg1phiAngle [3][5][12][5]
MonitorElementdttpgphsg1phiBandingAngle [3][5][12][5]
MonitorElementdttpgphsg1quality [3][5][12][5]
MonitorElementdttpgphsg2phiAngle [3][5][12][5]
MonitorElementdttpgphsg2phiBandingAngle [3][5][12][5]
MonitorElementdttpgphsg2quality [3][5][12][5]
MonitorElementdttpgphstation [3][5][12]
MonitorElementdttpgphts2tag [3][5][12][5]
MonitorElementdttpgphwheel [3]
edm::InputTag dttpgSource_
MonitorElementdttpgthbestmap
MonitorElementdttpgthbestmaph
MonitorElementdttpgthbx [3]
MonitorElementdttpgthmap
MonitorElementdttpgthmapbx [3]
MonitorElementdttpgthmaph
MonitorElementdttpgthntrack
MonitorElementdttpgthquality [3][6][12][4]
MonitorElementdttpgthsector [3][6]
MonitorElementdttpgthstation [3][6][12]
MonitorElementdttpgththeta [3][6][12][4]
MonitorElementdttpgthwheel [3]
std::string l1tinfofolder
std::string l1tsubsystemfolder
ofstream logFile_
bool monitorDaemon_
int n2ndTrack [6][12]
int nBx [6][3]
int nBx_2ndTrack [6][3]
int nev_
int nev_dttf
int nev_dttf_track2
int nHighQual [6][12]
int nHighQual_2ndTrack [6][12]
int nOccupancy_integ [6][12]
int nOccupancy_integ_2ndTrack [6][12]
int nOccupancy_integ_phi_eta [64][144]
int nOccupancy_integ_phi_eta_2ndTrack [64][144]
int nOccupancy_wheel_phi_eta [64][144][6]
std::string outputFile_
bool verbose_


Detailed Description

Definition at line 32 of file L1TDTTF.h.


Constructor & Destructor Documentation

L1TDTTF::L1TDTTF ( const edm::ParameterSet ps  ) 

Definition at line 130 of file L1TDTTF.cc.

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

00131   : dttpgSource_( ps.getParameter< InputTag >("dttpgSource") )
00132 {
00133 
00134   l1tinfofolder = ps.getUntrackedParameter<string>("l1tInfoFolder", "L1T/EventInfo") ;
00135   l1tsubsystemfolder = ps.getUntrackedParameter<string>("l1tSystemFolder", "L1T/L1TDTTF") ;
00136   
00137   // verbosity switch
00138   verbose_ = ps.getUntrackedParameter<bool>("verbose", false);
00139 
00140   if(verbose_) cout << "L1TDTTF: constructor...." << endl;
00141 
00142 
00143   dbe = NULL;
00144   if ( ps.getUntrackedParameter<bool>("DQMStore", false) ) 
00145     {
00146       dbe = Service<DQMStore>().operator->();
00147       dbe->setVerbose(0);
00148     }
00149   
00150   outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
00151   if ( outputFile_.size() != 0 ) {
00152     cout << "L1T Monitoring histograms will be saved to " << outputFile_.c_str() << endl;
00153   }
00154 
00155   bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
00156   if(disable){
00157     outputFile_="";
00158   }
00159 
00160 
00161   if ( dbe !=NULL ) {
00162 //    dbe->setCurrentFolder("L1T/L1TDTTF");
00163     dbe->setCurrentFolder(l1tsubsystemfolder);
00164   }
00165 
00166 
00167 }

L1TDTTF::~L1TDTTF (  )  [virtual]

Definition at line 169 of file L1TDTTF.cc.

00170 {
00171 }


Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 870 of file L1TDTTF.cc.

References GenMuonPlsPt100GeV_cfg::cout, dttf_2ndTrack_Summary, dttf_bx, dttf_bx_2ndTrack, dttf_bx_integ, dttf_bx_integ_2ndTrack, dttf_bx_Summary, dttf_bx_Summary_2ndTrack, dttf_bx_wheel, dttf_highQual_Summary, dttf_highQual_Summary_2ndTrack, dttf_n2ndTracks_wheel, dttf_nTracks_integ_2ndTrack, dttf_nTracks_wheel, dttf_nTracksPerEvent_integ, dttf_nTracksPerEvent_wheel, dttf_nTrksPerEv, dttf_occupancySummary, dttf_occupancySummary_2ndTrack, dttf_occupancySummary_r, dttf_p_eta, dttf_p_eta_integ, dttf_p_eta_integ_2ndTrack, dttf_p_phi, dttf_p_phi_eta_integ, dttf_p_phi_eta_integ_2ndTrack, dttf_p_phi_eta_wheel, dttf_p_phi_integ, dttf_p_phi_integ_2ndTrack, dttf_p_pt, dttf_p_pt_integ, dttf_p_pt_integ_2ndTrack, dttf_p_q, dttf_p_q_integ, dttf_p_q_integ_2ndTrack, dttf_p_qual, dttf_p_qual_integ, dttf_p_qual_integ_2ndTrack, dttf_track, dttf_track_2, dttpgSource_, lat::endl(), MonitorElement::Fill(), edm::Event::getByLabel(), i, edm::Handle< T >::isValid(), k, edm::es::l(), edm::InputTag::label(), m, n2ndTrack, nBx, nBx_2ndTrack, nev_, nev_dttf, nev_dttf_track2, nHighQual, nHighQual_2ndTrack, nOccupancy_integ, nOccupancy_integ_2ndTrack, nOccupancy_integ_phi_eta, nOccupancy_integ_phi_eta_2ndTrack, nOccupancy_wheel_phi_eta, edm::InputTag::process(), MonitorElement::setBinContent(), t, and verbose_.

00871 {
00872   nev_++; 
00873   dttf_track = false;
00874   dttf_track_2 = false;
00875   if(verbose_) cout << "L1TDTTF: analyze...." << endl;
00876 
00877 
00878 
00879 
00880   /*
00882   edm::Handle<L1MuDTChambPhContainer > myL1MuDTChambPhContainer;  
00883   e.getByLabel(dttpgSource_,myL1MuDTChambPhContainer);
00884   
00885   if (!myL1MuDTChambPhContainer.isValid()) {
00886     edm::LogInfo("DataNotFound") << "can't find L1MuDTChambPhContainer with label "
00887                              << dttpgSource_.label() ;
00888     return;
00889   }
00890   
00891   L1MuDTChambPhContainer::Phi_Container *myPhContainer =  
00892     myL1MuDTChambPhContainer->getContainer();
00893 
00894   edm::Handle<L1MuDTChambThContainer > myL1MuDTChambThContainer;  
00895   e.getByLabel(dttpgSource_,myL1MuDTChambThContainer);
00896   
00897   if (!myL1MuDTChambThContainer.isValid()) {
00898     edm::LogInfo("DataNotFound") << "can't find L1MuDTChambThContainer with label "
00899                              << dttpgSource_.label() ;
00900     edm::LogInfo("DataNotFound") << "if this fails try to add DATA to the process name." ;
00901 
00902     return;
00903   }
00904 
00905   L1MuDTChambThContainer::The_Container* myThContainer =  
00906     myL1MuDTChambThContainer->getContainer();
00907 
00908   int ndttpgphtrack = 0;
00909   int ndttpgthtrack = 0; 
00910   int NumberOfSegmentsPhi[3]={0,0,0};
00911   
00912   for( L1MuDTChambPhContainer::Phi_Container::const_iterator 
00913          DTPhDigiItr =  myPhContainer->begin() ;
00914        DTPhDigiItr != myPhContainer->end() ;
00915        ++DTPhDigiItr ) 
00916     {        
00917       int bx = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag();
00918       int wh = DTPhDigiItr->whNum();
00919       int se = DTPhDigiItr->scNum();
00920       int st = DTPhDigiItr->stNum();
00921 
00922       bxnumber[wh+2][se][st] -> Fill(bx);
00923       
00924       if(bx == -1)
00925        NumberOfSegmentsPhi[0]++;
00926       if(bx == 0)
00927        NumberOfSegmentsPhi[1]++;
00928       if(bx == 1)
00929        NumberOfSegmentsPhi[2]++;   
00930     }
00931    
00932   //Fill Histos for Segment counter for each bx separately 
00933   
00934   for(int k=0;k<3;k++){
00935     dttpgphbx[k+2]->Fill(NumberOfSegmentsPhi[k]);
00936   }
00937 
00938   int bxCounterDttfPhi=0; // = no. of BX's with non-zero data
00939   for (int k=0;k<3;k++){
00940     if (NumberOfSegmentsPhi[k]>0)
00941       bxCounterDttfPhi++;
00942   }
00943 
00944   // the BX "code" 
00945   
00946   int bxCodePhi=0;
00947   if(bxCounterDttfPhi==0){
00948     bxCodePhi=0;
00949   }else if(bxCounterDttfPhi==1){
00950     for(int k=0;k<3;k++){
00951       if(NumberOfSegmentsPhi[k]>0)
00952         bxCodePhi=k+2;
00953     }
00954   }else if(bxCounterDttfPhi==2){
00955     for(int k=0;k<3;k++){
00956       if(NumberOfSegmentsPhi[k]==0)
00957         bxCodePhi=8-k;
00958     }
00959   }else if(bxCounterDttfPhi==3){
00960     bxCodePhi=10;
00961   }
00962 
00963   //The bx analyzer histo
00964   dttpgphbx[0]->Fill(bxCodePhi);
00965 
00966 
00967   const L1MuDTChambPhDigi* bestPhQualMap[5][12][4];
00968   memset(bestPhQualMap,0,240*sizeof(L1MuDTChambPhDigi*));
00969 
00970 
00971   for( L1MuDTChambPhContainer::Phi_Container::const_iterator 
00972          DTPhDigiItr =  myPhContainer->begin() ;
00973        DTPhDigiItr != myPhContainer->end() ;
00974        ++DTPhDigiItr ) 
00975     {           
00976 
00977       ndttpgphtrack++;
00978       
00979       int bxindex = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag() + 1;
00980       int wh = DTPhDigiItr->whNum();
00981       int se = DTPhDigiItr->scNum();
00982       int st = DTPhDigiItr->stNum();
00983 
00984       dttpgphwheel[bxindex]->Fill(wh);
00985       if (verbose_)
00986         {
00987           cout << "DTTPG phi wheel number " << DTPhDigiItr->whNum() << endl;
00988         }
00989       dttpgphsector[bxindex][wh+2]->Fill(se);
00990       if (verbose_)
00991         {   
00992           cout << "DTTPG phi sector number " << DTPhDigiItr->scNum() << endl;
00993         }
00994       dttpgphstation[bxindex][wh+2][se]->Fill(st);
00995       if (verbose_)
00996         {
00997           cout << "DTTPG phi sstation number " << DTPhDigiItr->stNum() << endl;
00998         }
00999         
01000       if(DTPhDigiItr->Ts2Tag()==0) {    
01001        dttpgphsg1phiAngle[bxindex][wh+2][se][st] -> Fill(DTPhDigiItr->phi());
01002        if (verbose_)
01003         {
01004           cout << "DTTPG phi phi " << DTPhDigiItr->phi() << endl;
01005         }
01006       dttpgphsg1phiBandingAngle[bxindex][wh+2][se][st] -> Fill(DTPhDigiItr->phiB());
01007        if (verbose_)
01008         {
01009           cout << "DTTPG phi phiB " << DTPhDigiItr->phiB() << endl;
01010         }
01011       dttpgphsg1quality[bxindex][wh+2][se][st] -> Fill(DTPhDigiItr->code());
01012        if (verbose_)
01013         {
01014           cout << "DTTPG phi quality " << DTPhDigiItr->code() << endl;
01015         }
01016       } else if(DTPhDigiItr->Ts2Tag()==1) {
01017       dttpgphsg2phiAngle[bxindex][wh+2][se][st] -> Fill(DTPhDigiItr->phi());
01018        if (verbose_)
01019         {
01020           cout << "DTTPG phi phi " << DTPhDigiItr->phi() << endl;
01021         }
01022       dttpgphsg2phiBandingAngle[bxindex][wh+2][se][st] -> Fill(DTPhDigiItr->phiB());
01023        if (verbose_)
01024         {
01025           cout << "DTTPG phi phiB " << DTPhDigiItr->phiB() << endl;
01026         }
01027       dttpgphsg2quality[bxindex][wh+2][se][st] -> Fill(DTPhDigiItr->code());
01028        if (verbose_)
01029         {
01030           cout << "DTTPG phi quality " << DTPhDigiItr->code() << endl;
01031         }
01032 
01033       dttpgphts2tag[bxindex][wh+2][se][st] -> Fill(DTPhDigiItr->Ts2Tag());
01034        if (verbose_)
01035         {
01036           cout << "DTTPG phi ts2tag " << DTPhDigiItr->Ts2Tag() << endl;
01037         }
01038      }
01039       
01040       int ypos = DTPhDigiItr->scNum();
01041       int xpos = DTPhDigiItr->stNum()+4*(DTPhDigiItr->whNum()+2);
01042       dttpgphmap->Fill(xpos,ypos);
01043       if (DTPhDigiItr->Ts2Tag())
01044         dttpgphmap2nd->Fill(xpos,ypos);
01045       dttpgphmapbx[bxindex]->Fill(xpos,ypos);
01046       if (DTPhDigiItr->code()>3)
01047         dttpgphmapcorr->Fill(xpos,ypos);
01048       
01049       if (bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]==0 ||
01050           bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]->code()<DTPhDigiItr->code())
01051         {
01052           bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]=&(*DTPhDigiItr);
01053         }
01054       
01055     }
01056 
01057   for (int iwh=0; iwh<5; iwh++){
01058     for (int isec=0; isec<12; isec++){
01059       for (int ist=0; ist<4; ist++){
01060         if (bestPhQualMap[iwh][isec][ist]){
01061           int xpos = iwh*4+ist+1;
01062           dttpgphbestmap->Fill(xpos,isec);
01063           if(bestPhQualMap[iwh][isec][ist]->code()>3)
01064             dttpgphbestmapcorr->Fill(xpos,isec);
01065         }
01066       }
01067     }
01068   }
01069   
01070 
01071   int bestThQualMap[5][12][3];
01072   memset(bestThQualMap,0,180*sizeof(int));
01073   //for( vector<L1MuDTChambThDigi>::const_iterator 
01074   for( L1MuDTChambThContainer::The_Container::const_iterator 
01075          DTThDigiItr =  myThContainer->begin() ;
01076        DTThDigiItr != myThContainer->end() ;
01077        ++DTThDigiItr ) 
01078     {                           
01079       ndttpgthtrack++;
01080       
01081       int bxindex = DTThDigiItr->bxNum() + 1;
01082       int wh = DTThDigiItr->whNum();
01083       int se = DTThDigiItr->scNum();
01084       int st = DTThDigiItr->stNum();
01085 
01086       dttpgthwheel[bxindex]->Fill(wh);
01087       if (verbose_)
01088         {
01089           cout << "DTTPG theta wheel number " << DTThDigiItr->whNum() << endl;
01090         }
01091       dttpgthsector[bxindex][wh+2]->Fill(se);
01092       if (verbose_)
01093         {
01094           cout << "DTTPG theta sector number " << DTThDigiItr->scNum() << endl;
01095         }
01096       dttpgthstation[bxindex][wh+2][se]->Fill(st);
01097       if (verbose_)
01098         {   
01099           cout << "DTTPG theta station number " << DTThDigiItr->stNum() << endl;
01100         }
01101       dttpgthbx[bxindex]->Fill(DTThDigiItr->bxNum());
01102       if (verbose_)
01103         {
01104           cout << "DTTPG theta bx number " << DTThDigiItr->bxNum() << endl;
01105         }
01106       int thcode[7]= {0,0,0,0,0,0,0};
01107       for (int j = 0; j < 7; j++)
01108         {
01109           dttpgththeta[bxindex][wh+2][se][st]->Fill(DTThDigiItr->position(j));
01110           if (verbose_)
01111             {
01112               cout << "DTTPG theta position " << DTThDigiItr->position(j) << endl;
01113             }
01114           thcode[j]=DTThDigiItr->code(j);
01115           dttpgthquality[bxindex][wh+2][se][st]->Fill(thcode[j]);
01116           if (verbose_)
01117             {
01118               cout << "DTTPG theta quality " << DTThDigiItr->code(j) << endl;
01119             }
01120         }
01121       
01122       int ypos = DTThDigiItr->scNum();
01123       int xpos = DTThDigiItr->stNum()+4*(DTThDigiItr->whNum()+2);
01124       int bestqual=0;
01125       dttpgthmap->Fill(xpos,ypos);
01126       dttpgthmapbx[bxindex]->Fill(xpos,ypos);
01127       for (int pos = 0; pos < 7; pos++){
01128         if (thcode[pos]>bestqual)
01129           bestqual=thcode[pos];
01130         if(thcode[pos]==2)
01131           dttpgthmaph->Fill(xpos,ypos);
01132       }
01133 
01134       if (bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1] < bestqual)
01135         {
01136           bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1]=bestqual;
01137         }
01138     }
01139   
01140   for (int iwh=0; iwh<5; iwh++){
01141     for (int isec=0; isec<12; isec++){
01142       for (int ist=0; ist<3; ist++){
01143         if (bestThQualMap[iwh][isec][ist]){
01144           int xpos = iwh*4+ist+1;
01145           dttpgthbestmap->Fill(xpos,isec);
01146           if(bestThQualMap[iwh][isec][ist]==2)
01147             dttpgthbestmaph->Fill(xpos,isec);
01148         }
01149       }
01150     }
01151   }
01152 
01153 
01154   dttpgphntrack->Fill(ndttpgphtrack);
01155   if (verbose_)
01156     {
01157       cout << "DTTPG phi ntrack " << ndttpgphtrack << endl;
01158     }
01159   dttpgthntrack->Fill(ndttpgthtrack);
01160   if (verbose_) {
01161     cout << "DTTPG theta ntrack " << ndttpgthtrack << endl;
01162   }
01164 */
01165 
01166 
01167   
01168   edm::Handle<L1MuDTTrackContainer > myL1MuDTTrackContainer;
01169 
01170   std::string trstring;
01171   trstring = dttpgSource_.label()+":"+"DATA"+":"+dttpgSource_.process();
01172   edm::InputTag trInputTag(trstring);
01173   e.getByLabel(trInputTag,myL1MuDTTrackContainer);
01174   
01175   if (!myL1MuDTTrackContainer.isValid()) {
01176     edm::LogInfo("DataNotFound") << "can't find L1MuDTTrackContainer with label "
01177                                << dttpgSource_.label() ;
01178     return;
01179   }
01180 
01181   L1MuDTTrackContainer::TrackContainer *t =  myL1MuDTTrackContainer->getContainer();
01182 
01183   int numTracks[3][6][12];
01184   for(int k=0; k<3; k++)
01185     for(int l=0; l<6; l++)
01186       for(int m=0; m<12; m++)
01187         numTracks[k][l][m] = 0;
01188 
01189   int numTracks_wh[6];
01190   //int numTracks_wh_2ndTrack[6];
01191   for(int k=0; k<6; k++) {
01192     numTracks_wh[k]=0; 
01193     //numTracks_wh_2ndTrack[k]=0;
01194   }
01195 
01196 
01197 
01198   int numTracks_integ = 0;
01199   int numTracks_integ_2ndTrack = 0;
01200 
01201   /*
01203   int NumberOfSegmentsOut[3]={0,0,0};
01204   for ( L1MuDTTrackContainer::TrackContainer::const_iterator i 
01205           = t->begin(); i != t->end(); ++i ) {
01206     if(i->bx() ==-1)
01207       NumberOfSegmentsOut[0]++;
01208     if(i->bx() ==0)
01209       NumberOfSegmentsOut[1]++;
01210     if(i->bx() ==1)
01211       NumberOfSegmentsOut[2]++;
01212   }
01213   
01214 
01215 // Fill Histos for Segment counter
01216   for(int k=0;k<3;k++){
01217     dttpgphbx[k+5]->Fill(NumberOfSegmentsOut[k]);
01218   }
01219 
01220 // Bunch assigments
01221 
01222   int bxCounterDttfOut=0;
01223   for (int k=0;k<3;k++){
01224     if (NumberOfSegmentsOut[k]>0)
01225       bxCounterDttfOut++;
01226   }
01227 
01228   int bxCodeOut=0;
01229   if(bxCounterDttfOut==0){
01230     bxCodeOut=0;
01231   }else if(bxCounterDttfOut==1){
01232     for(int k=0;k<3;k++){
01233       if(NumberOfSegmentsOut[k]>0)
01234         bxCodeOut=k+2;
01235     }
01236   }else if(bxCounterDttfOut==2){
01237     for(int k=0;k<3;k++){
01238       if(NumberOfSegmentsOut[k]==0)
01239         bxCodeOut=8-k;
01240     }
01241   }else if(bxCounterDttfOut==3){
01242     bxCodeOut=10;
01243   }
01244   
01245   //The bx analyzer histo
01246   dttpgphbx[1]->Fill(bxCodeOut);
01247 
01248 //   End Dttf Output Bunch analysis
01249 
01250    // the 2-DIM histo with phi.input vs. output
01251 //   dttpgphbxcomp->Fill(bxCodePhi,bxCodeOut);
01253 */
01254 
01255 
01256   //check if DTTF track exists for this event
01257   for ( L1MuDTTrackContainer::TrackContainer::const_iterator i 
01258           = t->begin(); i != t->end(); ++i ) {
01259     dttf_track = true;
01260     if(i->TrkTag() == 1)
01261       dttf_track_2 = true;
01262   }
01263   if(dttf_track == true) nev_dttf++;
01264   if(dttf_track_2 == true) nev_dttf_track2++;
01265 
01266   for ( L1MuDTTrackContainer::TrackContainer::const_iterator i 
01267           = t->begin(); i != t->end(); ++i ) {
01268     if ( verbose_ ) {
01269       std::cout << "bx = " << i->bx()
01270                 << std::endl;
01271       std::cout << "quality (packed) = " << i->quality_packed() 
01272                 << std::endl;
01273       std::cout << "pt      (packed) = " << i->pt_packed() << "  , pt  (GeV) = " << i->ptValue()
01274                 << std::endl;
01275       std::cout << "phi     (packed) = " << i->phi_packed() << " , phi (rad) = " << i->phiValue()
01276                 << std::endl;
01277       std::cout << "charge  (packed) = " << i->charge_packed() 
01278                 << std::endl;
01279     }
01280 
01281     int bxindex = i->bx() + 1;
01282     int wh = i->whNum();//wh has possible values {-3,-2,-1,1,2,3}
01283     int se = i->scNum();
01284 
01285     //testing purposes
01286 //     switch(i->bx()){
01287 //     case 0 : bx0++;  break;
01288 //     case 1 : bxp1++; break;
01289 //     case -1: bxn1++; break;
01290 //     }
01291 
01292    
01293     int wh2;//make wh2 go from 0 to 5
01294     if(wh<0)wh2=wh+3;
01295     else wh2=wh+2;
01296    
01297     numTracks[bxindex][wh2][se]++; 
01298     nBx[wh2][bxindex]++;
01299 
01300 
01301     dttf_bx[wh2][se]->Fill(i->bx());
01302 
01303     if(i->TrkTag() == 1) {
01304       nBx_2ndTrack[wh2][bxindex]++;
01305       dttf_bx_2ndTrack[wh2][se]->Fill(i->bx());
01306     }
01307     int phi_local = i->phi_packed();//range: 0 < phi_local < 31 
01308     if(phi_local > 15) phi_local -= 32; //range: -16 < phi_local < 15
01309     
01310     int phi_global = phi_local + se*12; //range: -16 < phi_global < 147
01311     if(phi_global < 0) phi_global = 144; //range: 0 < phi_global < 147
01312     if(phi_global > 143) phi_global -= 144; //range: 0 < phi_global < 143
01313 
01314     //float phi_phys = phi_global * 2.5;  
01315 
01316     dttf_p_phi[bxindex][wh2][se]->Fill(phi_global);
01317 
01318     dttf_p_qual[bxindex][wh2][se]->Fill(i->quality_packed());
01319     dttf_p_pt[bxindex][wh2][se]->Fill(i->pt_packed());
01320     dttf_p_q[bxindex][wh2][se]->Fill(i->charge_packed());
01321 
01322     int eta_global = i->eta_packed();
01323     //int eta_global = i->eta_packed() - 32;
01324     dttf_p_eta[bxindex][wh2][se]->Fill(eta_global);
01325     //float eta_phys = eta_global / 2.4 ;
01326 
01327     if(bxindex==1){
01328      
01329       nOccupancy_integ[wh2][se]++;
01330       nOccupancy_integ_phi_eta[eta_global][phi_global]++;
01331       nOccupancy_wheel_phi_eta[eta_global][phi_global][wh2]++;
01332 
01333       numTracks_integ++;
01334       numTracks_wh[wh2]++;
01335 
01336       //dttf_p_phi_integ->Fill(i->phi_packed());
01337       dttf_p_phi_integ->Fill(phi_global);
01338       dttf_p_pt_integ->Fill(i->pt_packed());
01339       dttf_p_eta_integ->Fill(i->eta_packed());
01340       //dttf_p_eta_integ->Fill(eta_global);
01341       dttf_p_qual_integ->Fill(i->quality_packed());
01342       dttf_p_q_integ->Fill(i->charge_packed());
01343       
01344 //       //dttf_phys_phi_integ->Fill(i->phiValue());
01345 //       dttf_phys_phi_integ->Fill(phi_phys);
01346 //       dttf_phys_pt_integ->Fill(i->ptValue());
01347 //       //dttf_phys_eta_integ->Fill(i->etaValue());
01348 //       dttf_phys_eta_integ->Fill(eta_phys);
01349       
01350       //dttf_p_phi_eta_wheel[wh2]->Fill(i->eta_packed(),phi_global);
01351       if(nev_dttf) dttf_p_phi_eta_wheel[wh2]->setBinContent(eta_global+1,phi_global+1,nOccupancy_wheel_phi_eta[eta_global][phi_global][wh2]/(float)nev_dttf);
01352       
01353       //dttf_p_phi_eta_integ->Fill(i->eta_packed(),phi_global);
01354       if(nev_dttf) dttf_p_phi_eta_integ->setBinContent(eta_global+1,phi_global+1,nOccupancy_integ_phi_eta[eta_global][phi_global]/(float)nev_dttf);
01355       
01356       
01357       //proportionate to number of events with at least one DTTF track
01358       if(nev_dttf){
01359         dttf_occupancySummary->setBinContent(wh2+1,se+1, nOccupancy_integ[wh2][se]/(float)nev_dttf);
01360         dttf_occupancySummary_r->setBinContent(wh2+1,se+1, nOccupancy_integ[wh2][se]/(float)nev_dttf);
01361         //      dttf_occupancySummary_r->Fill(wh2,se+1);
01362       }
01363 
01364       dttf_nTracks_wheel[wh2]->Fill(se+1);
01365       //dttf_nTracks_integ->Fill(wh2);
01366 
01367       if(i->quality_packed()>3)
01368         nHighQual[wh2][se]++;
01369       
01370       if(i->TrkTag()== 1){
01371         nOccupancy_integ_2ndTrack[wh2][se]++;
01372         nOccupancy_integ_phi_eta_2ndTrack[eta_global][phi_global]++;
01373         //numTracks_wh_2ndTrack[wh2]++;
01374         //dttf_nTracks_wheel_2ndTrack[wh2]->Fill(se+1);
01375         numTracks_integ_2ndTrack++;
01376         dttf_p_phi_integ_2ndTrack->Fill(phi_global);
01377         dttf_p_eta_integ_2ndTrack->Fill(i->eta_packed());
01378         dttf_p_pt_integ_2ndTrack->Fill(i->pt_packed());
01379         dttf_p_qual_integ_2ndTrack->Fill(i->quality_packed());
01380         dttf_p_q_integ_2ndTrack->Fill(i->charge_packed());
01381 
01382         //dttf_p_phi_eta_integ_2ndTrack->Fill(i->eta_packed(),phi_global);
01383         if(nev_dttf_track2) dttf_p_phi_eta_integ_2ndTrack->setBinContent(eta_global+1,phi_global+1,nOccupancy_integ_phi_eta_2ndTrack[eta_global][phi_global]/(float)nev_dttf_track2);   
01384 
01385 
01386         if(nev_dttf_track2){
01387           //dttf_occupancySummary_2ndTrack->Fill(wh2,se+1);
01388           dttf_occupancySummary_2ndTrack->setBinContent(wh2+1,se+1, nOccupancy_integ_2ndTrack[wh2][se]/(float)nev_dttf_track2);
01389         }
01390 
01391         n2ndTrack[wh2][se]++;
01392         dttf_n2ndTracks_wheel[wh2]->Fill(se+1);
01393         dttf_nTracks_integ_2ndTrack->Fill(wh2);
01394         if(i->quality_packed()>3)
01395           nHighQual_2ndTrack[wh2][se]++;
01396       }   
01397         
01398 
01399     }
01400 
01401     dttf_bx_wheel[wh2]->Fill(i->bx());
01402     dttf_bx_integ->Fill(i->bx());
01403     //dttf_bx_Summary->Fill(wh2,i->bx());   
01404     if(nev_dttf) dttf_bx_Summary->setBinContent(wh2+1,bxindex+1,nBx[wh2][bxindex]/(float)nev_dttf);
01405 
01406 
01407     if(i->TrkTag() == 1){
01408       //dttf_bx_wheel_2ndTrack[wh2]->Fill(i->bx());
01409       dttf_bx_integ_2ndTrack->Fill(i->bx());
01410       if(nev_dttf_track2)
01411         //dttf_bx_Summary_2ndTrack->Fill(wh2,i->bx());
01412         dttf_bx_Summary_2ndTrack->setBinContent(wh2+1,bxindex+1,nBx_2ndTrack[wh2][bxindex]/(float)nev_dttf_track2);
01413         
01414     }
01415     
01416     if(nOccupancy_integ[wh2][se]){
01417       double highQualFraction = (double)nHighQual[wh2][se] / (double)nOccupancy_integ[wh2][se];
01418       if(highQualFraction == 0)
01419         dttf_highQual_Summary->setBinContent(wh2+1, se+1, 0.01);
01420       else dttf_highQual_Summary->setBinContent(wh2+1,se+1,highQualFraction);
01421     }
01422 
01423     if(nOccupancy_integ_2ndTrack[wh2][se]){
01424       double highQualFraction2 = (double) nHighQual_2ndTrack[wh2][se] / (double)nOccupancy_integ_2ndTrack[wh2][se];
01425 
01426       //differentiate between empty bins and bins that have 0 high fractional quality
01427       if(highQualFraction2 == 0)
01428         dttf_highQual_Summary_2ndTrack->setBinContent(wh2+1,se+1, 0.01);
01429       else dttf_highQual_Summary_2ndTrack->setBinContent(wh2+1,se+1,highQualFraction2);
01430     }
01431 
01432       //dttf_2ndTrack_Summary->setBinContent(wh2+1,se+1,n2ndTrack[wh2][se] / dttf_occupancySummary->getBinContent(wh2+1,se+1));
01433     if(nev_dttf) dttf_2ndTrack_Summary->setBinContent(wh2+1, se+1, n2ndTrack[wh2][se]/(float)nev_dttf);
01434 
01435     
01436 
01437   }
01438 
01439   for(int l=0; l<6; l++){
01440     if(numTracks_wh[l])
01441       dttf_nTracksPerEvent_wheel[l]->Fill(numTracks_wh[l]);
01442     // if(numTracks_wh_2ndTrack[l])
01443     //  dttf_nTracksPerEvent_wheel_2ndTrack[l]->Fill(numTracks_wh_2ndTrack[l]);
01444     for(int k=0; k<3; k++){
01445       for(int m=0; m<12; m++){
01446         if(numTracks[k][l][m])
01447           dttf_nTrksPerEv[k][l][m]->Fill(numTracks[k][l][m]);
01448       }
01449     }
01450   }
01451 
01452   dttf_nTracksPerEvent_integ->Fill(numTracks_integ);
01453 
01454 //   //CHECK IF THIS IS WHAT WE WANT!!
01455 //   dttf_nTracksPerEvent_integ_2ndTrack->Fill(numTracks_integ_2ndTrack);
01456 }

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

Reimplemented from edm::EDAnalyzer.

Definition at line 173 of file L1TDTTF.cc.

References DQMStore::book1D(), DQMStore::book2D(), dbe, dttf_2ndTrack_Summary, dttf_bx, dttf_bx_2ndTrack, dttf_bx_integ, dttf_bx_integ_2ndTrack, dttf_bx_Summary, dttf_bx_Summary_2ndTrack, dttf_bx_wheel, dttf_highQual_Summary, dttf_highQual_Summary_2ndTrack, dttf_n2ndTracks_wheel, dttf_nTracks_integ_2ndTrack, dttf_nTracks_wheel, dttf_nTracksPerEvent_integ, dttf_nTracksPerEvent_wheel, dttf_nTrksPerEv, dttf_occupancySummary, dttf_occupancySummary_2ndTrack, dttf_occupancySummary_r, dttf_p_eta, dttf_p_eta_integ, dttf_p_eta_integ_2ndTrack, dttf_p_phi, dttf_p_phi_eta_integ, dttf_p_phi_eta_integ_2ndTrack, dttf_p_phi_eta_wheel, dttf_p_phi_integ, dttf_p_phi_integ_2ndTrack, dttf_p_pt, dttf_p_pt_integ, dttf_p_pt_integ_2ndTrack, dttf_p_q, dttf_p_q_integ, dttf_p_q_integ_2ndTrack, dttf_p_qual, dttf_p_qual_integ, dttf_p_qual_integ_2ndTrack, k, l1tsubsystemfolder, m, n, n2ndTrack, nBx, nBx_2ndTrack, nev_, nev_dttf, nev_dttf_track2, nHighQual, nHighQual_2ndTrack, nOccupancy_integ, nOccupancy_integ_2ndTrack, nOccupancy_integ_phi_eta, nOccupancy_integ_phi_eta_2ndTrack, nOccupancy_wheel_phi_eta, MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), and MonitorElement::setResetMe().

00174 {
00175 
00176   nev_ = 0;
00177   nev_dttf = 0;
00178   nev_dttf_track2 = 0;
00179 //   //testing purposes
00180 //   bx0=0; bxp1=0; bxn1=0;
00181  
00182   for(int m=0; m<6; m++)
00183     for(int n=0; n<12; n++)
00184       { nHighQual[m][n] = 0; nHighQual_2ndTrack[m][n] = 0;  n2ndTrack[m][n] = 0; 
00185       nOccupancy_integ[m][n]=0; nOccupancy_integ_2ndTrack[m][n]=0;}
00186   
00187   for(int m=0; m<6; m++)
00188     for(int n=0; n<3; n++)
00189       {nBx[m][n] = 0; nBx_2ndTrack[m][n] = 0;}
00190 
00191   for(int m=0; m<64; m++)
00192     for(int n=0; n<144; n++){
00193       nOccupancy_integ_phi_eta[m][n] = 0;
00194       nOccupancy_integ_phi_eta_2ndTrack[m][n] = 0;
00195       for(int k=0; k<6; k++)
00196         nOccupancy_wheel_phi_eta[m][n][k] = 0;
00197     }
00198 
00199   // get hold of back-end interface
00200   DQMStore* dbe = 0;
00201   dbe = Service<DQMStore>().operator->();
00202 /*  if ( dbe ) {
00203     dbe->setCurrentFolder("L1T/L1TDTTF");
00204     dbe->rmdir("L1T/L1TDTTF");
00205   }
00206 */
00207 
00208   if ( dbe ) 
00209     {
00210 
00211       // use this to read in reference histograms from file
00212       //dbe->readReferenceME("DQM_L1T_R000050658.root");
00213       //dbe->open("DQM_L1T_R000050658.root",false,"","prep");
00214       //dbe->showDirStructure();
00215       
00216       
00217       /*
00218       //  error summary histograms
00219       dbe->setCurrentFolder(l1tinfofolder);
00220       
00221       //  error summary segments
00222       string suberrfolder = l1tinfofolder + "/reportSummaryContents" ;
00223       dbe->setCurrentFolder(suberrfolder);
00224       dttpgphmap = dbe->book2D("DT_TPG_phi_map","Map of triggers per station",20,1,21,12,0,12);
00225       setMapPhLabel(dttpgphmap);
00226       
00227       string dttf_phi_folder = l1tsubsystemfolder+"/DTTF_PHI";
00228       string dttf_theta_folder = l1tsubsystemfolder+"/DTTF_THETA";
00229       */
00230 
00231       string dttf_trk_folder = l1tsubsystemfolder+"/DTTF_TRACKS";
00232 
00233       char hname[40];//histo name
00234       char mename[40];//ME name
00235 
00236       /*
00237 
00238       dbe->setCurrentFolder(dttf_phi_folder);
00239     
00240 
00241       //hist1[0]
00242       dttpgphbx[0] = dbe->book1D("BxEncoding_PHI",
00243                                  "Bunch encoding DTTF Phi",11,0,11);
00244       //hist1[1]
00245       dttpgphbx[1] = dbe->book1D("BxEncoding_OUT",
00246                                  "Bunch encoding DTTF Output",11,0,11);
00247 
00248       for(int i=0;i<2;i++){
00249         dttpgphbx[i]->setBinLabel(1,"None");
00250         dttpgphbx[i]->setBinLabel(3,"Only bx=-1");
00251         dttpgphbx[i]->setBinLabel(4,"Only bx= 0");
00252         dttpgphbx[i]->setBinLabel(5,"Only bx=+1");
00253         dttpgphbx[i]->setBinLabel(7,"Bx=-1,0");
00254         dttpgphbx[i]->setBinLabel(8,"Bx=-1,1");
00255         dttpgphbx[i]->setBinLabel(9,"Bx= 0,1");
00256         dttpgphbx[i]->setBinLabel(11,"All bx");
00257       }
00258    
00259 
00260       dttpgphbxcomp = dbe->book2D("BxEncoding_PHI_OUT",
00261                                   "Bunch encoding: DTTF Phi vs. Output",
00262                                   11,0,11,11,0,11);
00263       dttpgphbxcomp->setAxisTitle("DTTF (output)",1);
00264       dttpgphbxcomp->setAxisTitle("PHI-TF",2);
00265       for(int i=1;i<=2;i++){
00266         dttpgphbxcomp->setBinLabel(1,"None",i);
00267         dttpgphbxcomp->setBinLabel(3,"Only bx=-1",i);
00268         dttpgphbxcomp->setBinLabel(4,"Only bx= 0",i);
00269         dttpgphbxcomp->setBinLabel(5,"Only bx=+1",i);
00270         dttpgphbxcomp->setBinLabel(7,"Bx=-1,0",i);
00271         dttpgphbxcomp->setBinLabel(8,"Bx=-1,1",i);
00272         dttpgphbxcomp->setBinLabel(9,"Bx= 0,1",i);
00273         dttpgphbxcomp->setBinLabel(11,"All bx",i);
00274       }
00275 
00276       //hist1[2]
00277       dttpgphbx[2] = dbe->book1D("NumberOfSegmentsPHI_BunchNeg1",
00278                                  "Number of segments for bunch -1 Dttf Phi",
00279                                  20,0,20);
00280       //hist1[3]
00281       dttpgphbx[3] = dbe->book1D("NumberOfSegmentsPHI_Bunch0",
00282                                  "Number of segments for bunch 0 Dttf Phi",
00283                                  20,0,20);
00284       //hist1[4]
00285       dttpgphbx[4] = dbe->book1D("NumberOfSegmentsPHI_Bunch1",
00286                                  "Number of segments for bunch 1 Dttf Phi",
00287                                  20,0,20);
00288       //hist1[5]
00289       dttpgphbx[5] = dbe->book1D("NumberOfSegmentsOUT_BunchNeg1",
00290                                  "Number of segments for bunch -1 Dttf Output",
00291                                  20,0,20);
00292       //hist1[6] 
00293       dttpgphbx[6] = dbe->book1D("NumberOfSegmentsOUT_Bunch0",
00294                                  "Number of segments for bunch 0 Dttf Output",
00295                                  20,0,20);
00296       //hist1[7]
00297       dttpgphbx[7] = dbe->book1D("NumberOfSegmentsOUT_Bunch1",
00298                                  "Number of segments for bunch 1 Dttf Output",
00299                                  20,0,20);
00300 
00301       dttpgphntrack = dbe->book1D("DT_TPG_phi_ntrack", 
00302                                   "DT TPG phi ntrack", 20, -0.5, 19.5 ) ;  
00303 
00304       dttpgthntrack = dbe->book1D("DT_TPG_theta_ntrack", 
00305                                   "DT TPG theta ntrack", 20, -0.5, 19.5 ) ;  
00306 
00307 
00308       
00309 
00310 // DTTF INPUT Phi
00311       for(int ibx=0;ibx<3;ibx++){
00312          int tbx=ibx-1; 
00313          
00314          dbe->setCurrentFolder(dttf_phi_folder);
00315          
00316          sprintf(hname,"DT_TPG_phi_bx%d_wheel_number",tbx);
00317          dttpgphwheel[ibx] = dbe->book1D(hname,hname, 5, -2.5, 2.5 ) ;  
00318          
00319          for(int iwh=0;iwh<5;iwh++){
00320            int twh=iwh-2;
00321             
00322            ostringstream whnum;
00323            whnum << iwh;
00324            string whn;
00325            whn = whnum.str();
00326 
00327            string dttf_phi_folder_wheel = dttf_phi_folder + "/WHEEL_" + whn;
00328            dbe->setCurrentFolder(dttf_phi_folder_wheel);
00329  
00330            sprintf(hname,"DT_TPG_phi_bx%d_wh%d_sector_number",tbx,twh);
00331            dttpgphsector[ibx][iwh] = dbe->book1D(hname,hname, 12, -0.5, 11.5 ) ;  
00332             
00333            for(int ise=0;ise<12;ise++){
00334 
00335              ostringstream senum;
00336              senum << ise;
00337              string sen;
00338              sen = senum.str();
00339              string dttf_phi_folder_sector = dttf_phi_folder_wheel + "/SECTOR_" + sen;
00340              dbe->setCurrentFolder(dttf_phi_folder_sector);
00341              
00342              sprintf(hname,"DT_TPG_phi_bx%d_wh%d_se%d_station_number",tbx,twh,ise);
00343              dttpgphstation[ibx][iwh][ise] = dbe->book1D(hname,hname, 5, -0.5, 4.5 ) ;  
00344              
00345              for(int ist=0;ist<5;ist++){
00346                
00347                ostringstream stnum;
00348                stnum << ist;
00349                string stn;
00350                stn = stnum.str();
00351                
00352                string dttf_phi_folder_station = dttf_phi_folder_sector + "/STATION_" + stn;
00353                dbe->setCurrentFolder(dttf_phi_folder_station);
00354                
00355                sprintf(hname,"DT_TPG_phi_Seg1_phi_bx%d_wh%d_se%d_st%d",tbx,twh,ise,ist);
00356                dttpgphsg1phiAngle[ibx][iwh][ise][ist] = dbe->book1D(hname,hname,256,-0.5,255.5);
00357                     
00358                sprintf(hname,"DT_TPG_phi_Seg1_phiBanding_bx%d_wh%d_se%d_st%d",tbx,twh,ise,ist);
00359                dttpgphsg1phiBandingAngle[ibx][iwh][ise][ist] = dbe->book1D(hname,hname,256,-0.5,255.5);
00360                     
00361                sprintf(hname,"DT_TPG_phi_Seg1_quality_bx%d_wh%d_se%d_st%d",tbx,twh,ise,ist);
00362                dttpgphsg1quality[ibx][iwh][ise][ist] = dbe->book1D(hname,hname,8,-0.5,7.5);
00363                     
00364                sprintf(hname,"DT_TPG_phi_Seg2_phi_bx%d_wh%d_se%d_st%d",tbx,twh,ise,ist);
00365                dttpgphsg2phiAngle[ibx][iwh][ise][ist] = dbe->book1D(hname,hname,256,-0.5,255.5);
00366                     
00367                sprintf(hname,"DT_TPG_phi_Seg2_phiBanding_bx%d_wh%d_se%d_st%d",tbx,twh,ise,ist);
00368                dttpgphsg2phiBandingAngle[ibx][iwh][ise][ist] = dbe->book1D(hname,hname,256,-0.5,255.5);
00369                     
00370                sprintf(hname,"DT_TPG_phi_Seg2_quality_bx%d_wh%d_se%d_st%d",tbx,twh,ise,ist);
00371                dttpgphsg2quality[ibx][iwh][ise][ist] = dbe->book1D(hname,hname,8,-0.5,7.5);
00372                     
00373                sprintf(hname,"DT_TPG_phi_Ts2Tag_bx%d_wh%d_se%d_st%d",tbx,twh,ise,ist);
00374                dttpgphts2tag[ibx][iwh][ise][ist]= dbe->book1D(hname,hname,2,-0.5,1.5);
00375                     
00376                     
00377              }
00378            }
00379          }
00380       }  
00381 
00382       dbe->setCurrentFolder(dttf_theta_folder);
00383       
00384 // DTTF INPUT Theta
00385       for(int ibx=0;ibx<3;ibx++){
00386         int tbx=ibx-1; 
00387             
00388         dbe->setCurrentFolder(dttf_theta_folder);
00389 
00390         sprintf(hname,"DT_TPG_theta_bx%d_wheel_number",tbx);
00391         dttpgthwheel[ibx] = dbe->book1D(hname,hname, 5, -2.5, 2.5 ) ;  
00392         
00393         for(int iwh=0;iwh<5;iwh++){
00394           int twh=iwh-2;
00395             
00396           ostringstream whnum;
00397           whnum << iwh;
00398           string whn;
00399           whn = whnum.str();
00400 
00401           string dttf_theta_folder_wheel = dttf_theta_folder + "/WHEEL_" + whn;
00402           dbe->setCurrentFolder(dttf_theta_folder_wheel);
00403             
00404           sprintf(hname,"DT_TPG_theta_bx%d_wh%d_sector_number",tbx,twh);
00405           dttpgthsector[ibx][iwh] = dbe->book1D(hname,hname, 12, -0.5, 11.5 ) ;  
00406             
00407           for(int ise=0;ise<12;ise++){
00408 
00409             ostringstream senum;
00410             senum << ise;
00411             string sen;
00412             sen = senum.str();
00413             string dttf_theta_folder_sector = dttf_theta_folder_wheel + "/SECTOR_" + sen;
00414             dbe->setCurrentFolder(dttf_theta_folder_sector);
00415                
00416             sprintf(hname,"DT_TPG_theta_bx%d_wh%d_se%d_station_number",tbx,twh,ise);
00417             dttpgthstation[ibx][iwh][ise] = dbe->book1D(hname,hname, 5, -0.5, 4.5 ) ;  
00418                
00419             for(int ist=0;ist<4;ist++){
00420               
00421               ostringstream stnum;
00422               stnum << ist;
00423               string stn;
00424               stn = stnum.str();
00425               
00426               string dttf_theta_folder_station = dttf_theta_folder_sector + "/STATION_" + stn;
00427               dbe->setCurrentFolder(dttf_theta_folder_station);
00428               
00429               sprintf(hname,"DT_TPG_theta_quality_bx%d_wh%d_se%d_st%d",tbx,twh,ise,ist);
00430               dttpgthquality[ibx][iwh][ise][ist] = dbe->book1D(hname,hname,8,-0.5,7.5);
00431               
00432               sprintf(hname,"DT_TPG_theta_theta_bx%d_wh%d_se%d_st%d",tbx,twh,ise,ist);
00433               dttpgththeta[ibx][iwh][ise][ist]= dbe->book1D(hname,hname,2,-0.5,1.5);      
00434     
00435             }
00436           }
00437         }
00438       }  
00439       
00440          
00441       for(int iwh=0;iwh<5;iwh++){                                             
00442         int twh=iwh-2;
00443                                                                               
00444         for(int ise=0;ise<12;ise++){                                          
00445                                                                               
00446           for(int ist=0;ist<5;ist++){
00447             sprintf(hname,"bxNumber_wh%d_se%d_st%d",twh,ise,ist);             
00448             bxnumber[iwh][ise][ist]= dbe->book1D(hname,hname,3,-1.5,1.5);   
00449           }                                                                   
00450         }                                                                     
00451       }
00452 
00453       */
00454       
00455 //DTTF Output (6 wheels)     
00456       
00457       dbe->setCurrentFolder(dttf_trk_folder);
00458       
00459       for(int iwh=0;iwh<6;iwh++){
00460         int twh=iwh-3;
00461         if(iwh>=3) twh+=1;
00462         
00463         //ostringstream whnum;
00464         //whnum << iwh;
00465         string whn;
00466         //whn = whnum.str();
00467         
00468         switch(iwh){
00469         case 0:  whn = "N2";  break;
00470         case 1:  whn = "N1";  break;
00471         case 2:  whn = "N0";  break;
00472         case 3:  whn = "P0";  break;
00473         case 4:  whn = "P1";  break;
00474         case 5:  whn = "P2";  break;   
00475         }
00476         
00477         const char *c_whn = whn.c_str();
00478 
00479         string dttf_trk_folder_wheel = dttf_trk_folder + "/WHEEL_" + whn;
00480         dbe->setCurrentFolder(dttf_trk_folder_wheel);
00481         
00482         
00483         sprintf(hname,"dttf_nTracks_wh%s",c_whn);
00484         sprintf(mename,"Wheel %s - Number of Tracks",c_whn);
00485         dttf_nTracks_wheel[iwh] = dbe->book1D(mename,hname,12,0.5,12.5);
00486         dttf_nTracks_wheel[iwh]->setAxisTitle("sector",1);
00487 
00488         sprintf(hname,"dttf_nTracksPerEvent_wh%s",c_whn);
00489         sprintf(mename,"Wheel %s - Num Tracks Per Event",c_whn);
00490         dttf_nTracksPerEvent_wheel[iwh] = dbe->book1D(mename,hname,11,-0.5,10.5);
00491         dttf_nTracksPerEvent_wheel[iwh]->setAxisTitle("number of tracks",1);
00492 
00493         
00494         for(int ibx=0;ibx<3;ibx++){
00495           int tbx=ibx-1; 
00496           
00497           //ostringstream bxnum;
00498           //bxnum << tbx;
00499           //string bxn = bxnum.str();
00500 
00501           string bxn;
00502           //whn = whnum.str();
00503           
00504           switch(ibx){
00505           case 0:  bxn = "N1";  break;
00506           case 1:  bxn = "0";  break;
00507           case 2:  bxn = "P1";  break;   
00508           }
00509           
00510           string dttf_trk_folder_bx = dttf_trk_folder_wheel + "/BX_" + bxn;
00511           dbe->setCurrentFolder(dttf_trk_folder_bx);
00512           
00513           //QUALITY folder
00514           string dttf_trk_folder_quality = dttf_trk_folder_bx + "/Quality";
00515           dbe->setCurrentFolder(dttf_trk_folder_quality);
00516 
00517           for(int ise=0;ise<12;ise++){
00518             sprintf(hname,"dttf_p_qual_bx%d_wh%s_se%d",tbx,c_whn,ise+1);
00519             sprintf(mename,"Packed Quality bx%d wh%s se%d",tbx,c_whn,ise+1);
00520             dttf_p_qual[ibx][iwh][ise] = dbe->book1D(mename,hname,8,-0.5,7.5);    
00521           }
00522 
00523           //PHI folder
00524           string dttf_trk_folder_phi = dttf_trk_folder_bx + "/Phi";
00525           dbe->setCurrentFolder(dttf_trk_folder_phi);
00526 
00527           for(int ise=0;ise<12;ise++){
00528             sprintf(hname,"dttf_p_phi_bx%d_wh%s_se%d",tbx,c_whn,ise+1);
00529             sprintf(mename,"Packed Phi bx%d wh%s se%d",tbx,c_whn,ise+1);
00530             dttf_p_phi[ibx][iwh][ise] = dbe->book1D(mename,hname,144,-0.5,144.5);
00531             //dttf_p_phi[ibx][iwh][ise] = dbe->book1D(hname,hname, 32,-16.5, 15.5);
00532           }
00533 
00534           //ETA folder
00535           string dttf_trk_folder_eta = dttf_trk_folder_bx + "/Eta";
00536           dbe->setCurrentFolder(dttf_trk_folder_eta);
00537 
00538           for(int ise=0;ise<12;ise++){
00539             sprintf(hname,"dttf_p_eta_bx%d_wh%s_se%d",tbx,c_whn,ise+1);
00540             sprintf(mename,"Packed Eta bx%d wh%s se%d",tbx,c_whn,ise+1);
00541             dttf_p_eta[ibx][iwh][ise] = dbe->book1D(mename,hname,64,-32.5,32.5);//fix range and bin size!
00542           }
00543           
00544           //PT folder
00545           string dttf_trk_folder_pt = dttf_trk_folder_bx + "/PT";
00546           dbe->setCurrentFolder(dttf_trk_folder_pt);
00547 
00548           for(int ise=0;ise<12;ise++){
00549             sprintf(hname,"dttf_p_pt_bx%d_wh%s_se%d",tbx,c_whn,ise+1);
00550             sprintf(mename,"Packed PT bx%d wh%s se%d",tbx,c_whn,ise+1);
00551             dttf_p_pt[ibx][iwh][ise]= dbe->book1D(mename,hname,32,-0.5,31.5);
00552           }
00553 
00554           //CHARGE folder
00555           string dttf_trk_folder_charge = dttf_trk_folder_bx + "/Charge";
00556           dbe->setCurrentFolder(dttf_trk_folder_charge);
00557           
00558           for(int ise=0;ise<12;ise++){
00559             sprintf(hname,"dttf_p_q_bx%d_wh%s_se%d",tbx,c_whn,ise+1);
00560             sprintf(mename,"Packed Charge  bx%d wh%s se%d",tbx,c_whn,ise+1);
00561             dttf_p_q[ibx][iwh][ise] = dbe->book1D(mename,hname,2,-0.5,1.5);
00562           }
00563 
00564           //number of tracks per event folder
00565           string dttf_trk_folder_nTracksPerEvent = dttf_trk_folder_bx+"/TracksPerEvent";
00566           dbe->setCurrentFolder(dttf_trk_folder_nTracksPerEvent);
00567 
00568           for(int ise=0;ise<12;ise++){    
00569             sprintf(hname,"dttf_nTrksPerEv_bx%d_wh%s_se%d",tbx,c_whn,ise+1);
00570             sprintf(mename,"Num Tracks Per Event bx%d wh%s se%d",tbx,c_whn,ise+1);
00571             dttf_nTrksPerEv[ibx][iwh][ise] = dbe->book1D(mename,hname,2,0.5,2.5);
00572             dttf_nTrksPerEv[ibx][iwh][ise]->setAxisTitle("number of tracks",1);
00573           }
00574 
00575         }
00576         
00577         //track occupancy info - for each wheel
00578         dbe->setCurrentFolder(dttf_trk_folder_wheel);
00579         sprintf(hname,"dttf_p_phi_eta_wh%s",c_whn);
00580         sprintf(mename, "Wheel %s - Packed Phi vs Eta",c_whn);
00581         dttf_p_phi_eta_wheel[iwh] = dbe->book2D(mename,hname,64,-0.5,64.5,144,-0.5,143.5);
00582 
00583 
00584         sprintf(hname,"dttf_n2ndTracks_wh%s",c_whn);
00585         sprintf(mename, "Wheel %s - 2nd Tracks",c_whn);
00586         dttf_n2ndTracks_wheel[iwh] = dbe->book1D(mename,hname,12,0.5,12.5);
00587 
00588         sprintf(hname,"dttf_bx_wh%s",c_whn);
00589         sprintf(mename, "Wheel %s - BX",c_whn);
00590         dttf_bx_wheel[iwh] = dbe->book1D(mename,hname,3,-1.5,1.5);
00591         
00592  
00593         //BX_SECTORS for each wheel
00594         string dttf_trk_folder_wh_bxsec_all = dttf_trk_folder_wheel + "/BX_SECTORS/ALL";
00595         dbe->setCurrentFolder(dttf_trk_folder_wh_bxsec_all);
00596 
00597         for(int ise=0;ise<12;ise++){      
00598           sprintf(hname,"dttf_bx_wh%s_se%d",c_whn,ise+1);
00599           sprintf(mename, "BX - wh%s se%d",c_whn,ise+1);
00600           dttf_bx[iwh][ise] = dbe->book1D(mename,hname,3,-1.5,1.5);
00601         }
00602 
00603         string dttf_trk_folder_wh_bxsec_trk2 = dttf_trk_folder_wheel + "/BX_SECTORS/TRACK_2_ONLY";
00604         dbe->setCurrentFolder(dttf_trk_folder_wh_bxsec_trk2);
00605 
00606         for(int ise=0;ise<12;ise++){      
00607           sprintf(hname,"dttf_bx_2ndTrack_wh%s_se%d",c_whn,ise+1);
00608           sprintf(mename, "BX - 2nd Tracks only - wh%s se%d",c_whn,ise+1);
00609           dttf_bx_2ndTrack[iwh][ise] = dbe->book1D(mename,hname,3,-1.5,1.5);
00610         }
00611 
00612 //      sprintf(hname,"dttf_bx_wh%s_2ndTrack",c_whn);
00613 //      sprintf(mename, "Wheel %s - BX",c_whn);
00614 //      dttf_bx_wheel_2ndTrack[iwh] = dbe->book1D(mename,hname,3,-1.5,1.5);
00615 
00616 
00617 //      sprintf(hname,"dttf_nTracks_wh%s_2ndTracks",c_whn);
00618 //      sprintf(mename,"Wheel %s - Number of Tracks",c_whn);
00619 //      dttf_nTracks_wheel_2ndTrack[iwh] = dbe->book1D(mename,hname,12,0.5,12.5);
00620 //      dttf_nTracks_wheel_2ndTrack[iwh]->setAxisTitle("sector",1);
00621 
00622         //sprintf(hname,"dttf_nTracksPerEvent_wh%s_2ndTracks",c_whn);
00623         //sprintf(mename,"Wheel %s - Num Tracks Per Event",c_whn);
00624         //dttf_nTracksPerEvent_wheel_2ndTrack[iwh] = dbe->book1D(mename,hname,11,-0.5,10.5);
00625         //dttf_nTracksPerEvent_wheel_2ndTrack[iwh]->setAxisTitle("number of tracks",1);
00626           
00627         
00628       } 
00629       
00630 
00631       //integrated values
00632       string dttf_trk_folder_integrated = dttf_trk_folder + "/INTEG";
00633       dbe->setCurrentFolder(dttf_trk_folder_integrated);
00634 
00635       //packed values
00636       sprintf(hname,"dttf_p_phi_integ");
00637       sprintf(mename,"Integrated Packed Phi");
00638       dttf_p_phi_integ = dbe->book1D(mename,hname,144,-0.5,143.5);
00639             
00640 
00641       //MonitorElement* rh1 = dbe->getReferenceME(dttf_p_phi_integ);
00642       //if(rh1){
00643       //        cout << rh1->getPathname() << endl;
00644       //        //dbe->deleteME(rh1);
00645       //        cout << dttf_p_phi_integ->getPathname() << endl;
00646       //      }
00647 
00648       sprintf(hname,"dttf_p_eta_integ");
00649       sprintf(mename,"Integrated Packed Eta");
00650       dttf_p_eta_integ = dbe->book1D(mename,hname,64,-0.5,64.5);
00651             
00652       sprintf(hname,"dttf_p_pt_integ");
00653       sprintf(mename,"Integrated Packed Pt");
00654       dttf_p_pt_integ  = dbe->book1D(mename,hname,32,-0.5,31.5);
00655 
00656       sprintf(hname,"dttf_p_qual_integ");
00657       sprintf(mename,"Integrated Packed Quality");
00658       dttf_p_qual_integ  = dbe->book1D(mename,hname,8,-0.5,7.5);
00659 
00660       sprintf(hname,"dttf_p_q_integ");
00661       sprintf(mename,"Integrated Packed Charge");
00662       dttf_p_q_integ = dbe->book1D(mename,hname,2,-0.5,1.5);
00663 
00664       sprintf(hname,"dttf_bx_integ");
00665       sprintf(mename,"Integrated BX");
00666       dttf_bx_integ = dbe->book1D(mename,hname,3,-1.5,1.5);
00667 
00668       //sprintf(hname,"dttf_nTracks_integ");
00669       //sprintf(mename,"Integrated Num Tracks");
00670       //dttf_nTracks_integ = dbe->book1D(mename,hname,6,0,6);
00671 //       dttf_nTracks_integ->setAxisTitle("wheel",1);
00672 //       dttf_nTracks_integ->setBinLabel(1,"N2",1);
00673 //       dttf_nTracks_integ->setBinLabel(2,"N1",1);
00674 //       dttf_nTracks_integ->setBinLabel(3,"N0",1);
00675 //       dttf_nTracks_integ->setBinLabel(4,"P0",1);
00676 //       dttf_nTracks_integ->setBinLabel(5,"P1",1);
00677 //       dttf_nTracks_integ->setBinLabel(6,"P2",1);
00678 
00679       sprintf(hname,"dttf_nTracksPerEvent_integ");
00680       sprintf(mename,"Num Tracks Per Event");
00681       dttf_nTracksPerEvent_integ = dbe->book1D(mename,hname,21,-0.5,20.5);
00682       dttf_nTracksPerEvent_integ->setAxisTitle("number of tracks",1);
00683 
00684 //       //physical values
00685 //       sprintf(hname,"dttf_phys_phi_integ");
00686 //       dttf_phys_phi_integ = dbe->book1D(hname,hname,144,-0.5,360.5);
00687             
00688 //       sprintf(hname,"dttf_phys_eta_integ");
00689 //       dttf_phys_eta_integ = dbe->book1D(hname,hname,64,-1.2,1.2);//eta range (-1.2,1.2)
00690             
00691 //       sprintf(hname,"dttf_phys_pt_integ");
00692 //       dttf_phys_pt_integ  = dbe->book1D(hname,hname,100,-0.5,99.5);//what is max pt value?
00693 
00694       //track occupancy info - everything
00695       sprintf(hname,"dttf_p_phi_eta_integ");
00696       sprintf(mename,"Occupancy Phi vs Eta");
00697       dttf_p_phi_eta_integ = dbe->book2D(mename,hname,64,-0.5,64.5,144,-0.5,143.5);      
00698 
00699       //bunch crossing summary
00700       sprintf(hname,"bx_Summary");
00701       sprintf(mename,"BX Summary");
00702       dttf_bx_Summary = dbe->book2D(mename,hname,6,0,6,3,-1,2);
00703       
00704       //occupancy summary
00705       sprintf(hname,"Occupancy_Summary");
00706       sprintf(mename,"Occupancy Summary");
00707       dttf_occupancySummary = dbe->book2D(mename,hname,6,0,6,12,1,13);
00708 
00709       //occupancy summary - reset
00710       sprintf(hname,"Occupancy_Summary_r");
00711       sprintf(mename,"Occupancy Summary - Reset");
00712       dttf_occupancySummary_r = dbe->book2D(mename,hname,6,0,6,12,1,13);
00713       dttf_occupancySummary_r->setResetMe(true);
00714 
00715       //high quality fraction (q>3)
00716       sprintf(hname,"highQual_Summary");
00717       sprintf(mename,"Fractional High Quality Summary");
00718       dttf_highQual_Summary = dbe->book2D(mename,hname,6,0,6,12,1,13);
00719 
00720 
00721       //second track fraction
00722       sprintf(hname,"dttf_2ndTrack_Summary");
00723       sprintf(mename,"2nd Track Summary");
00724       dttf_2ndTrack_Summary = dbe->book2D(mename,hname,6,0,6,12,1,13);
00725 
00726 
00727       //integrated values - 2nd track only
00728       string dttf_trk_folder_integrated_2ndtrack = dttf_trk_folder_integrated + "/2ND_TRACK_ONLY";
00729       dbe->setCurrentFolder(dttf_trk_folder_integrated_2ndtrack);
00730 
00731       //packed values
00732       sprintf(hname,"dttf_p_phi_integ_2ndTrack");
00733       sprintf(mename,"Integrated Packed Phi");
00734       dttf_p_phi_integ_2ndTrack = dbe->book1D(mename,hname,144,-0.5,143.5);
00735             
00736       sprintf(hname,"dttf_p_eta_integ_2ndTrack");
00737       sprintf(mename,"Integrated Packed Eta");
00738       dttf_p_eta_integ_2ndTrack = dbe->book1D(mename,hname,64,-0.5,64.5);
00739             
00740       sprintf(hname,"dttf_p_pt_integ_2ndTrack");
00741       sprintf(mename,"Integrated Packed Pt");
00742       dttf_p_pt_integ_2ndTrack  = dbe->book1D(mename,hname,32,-0.5,31.5);
00743 
00744       sprintf(hname,"dttf_p_qual_integ_2ndTrack");
00745       sprintf(mename,"Integrated Packed Quality");
00746       dttf_p_qual_integ_2ndTrack  = dbe->book1D(mename,hname,8,-0.5,7.5);
00747 
00748       sprintf(hname,"dttf_p_q_integ_2ndTrack");
00749       sprintf(mename,"Integrated Packed Charge");
00750       dttf_p_q_integ_2ndTrack = dbe->book1D(mename,hname,2,-0.5,1.5);
00751 
00752       sprintf(hname,"dttf_bx_integ_2ndTrack");
00753       sprintf(mename,"Integrated BX");
00754       dttf_bx_integ_2ndTrack = dbe->book1D(mename,hname,3,-1.5,1.5);
00755       
00756       sprintf(hname,"dttf_nTracks_integ_2ndTrack");
00757       sprintf(mename,"Integrated Num Tracks");
00758       dttf_nTracks_integ_2ndTrack = dbe->book1D(mename,hname,6,0,6);
00759       
00760        //      sprintf(hname,"dttf_nTracksPerEvent_integ_2ndTrack");
00761 //       sprintf(mename,"Tracks Per Event");
00762 //       dttf_nTracksPerEvent_integ_2ndTrack = dbe->book1D(mename,hname,21,-0.5,20.5);
00763 //       dttf_nTracksPerEvent_integ_2ndTrack->setAxisTitle("number of tracks",1);
00764 
00765       //track occupancy info - everything
00766       sprintf(hname,"dttf_p_phi_eta_integ_2ndTrack");
00767       sprintf(mename,"Occupancy Phi vs Eta");
00768       dttf_p_phi_eta_integ_2ndTrack = dbe->book2D(mename,hname,64,-0.5,64.5,144,-0.5,143.5);      
00769 
00770       //bunch crossing summary
00771       sprintf(hname,"bx_Summary_2ndTrack");
00772       sprintf(mename,"BX Summary");
00773       dttf_bx_Summary_2ndTrack = dbe->book2D(mename,hname,6,0,6,3,-1,2);
00774       
00775       //occupancy summary
00776       sprintf(hname,"Occupancy_Summary_2ndTrack");
00777       sprintf(mename,"Occupancy Summary");
00778       dttf_occupancySummary_2ndTrack = dbe->book2D(mename,hname,6,0,6,12,1,13);
00779 
00780       //high quality fraction (q>4)
00781       sprintf(hname,"highQual_Summary_2ndTrack");
00782       sprintf(mename,"Fractional High Quality Summary");
00783       dttf_highQual_Summary_2ndTrack = dbe->book2D(mename,hname,6,0,6,12,1,13);
00784 
00785 
00786 
00787 
00788       /*
00789 
00790       dbe->setCurrentFolder(l1tsubsystemfolder);
00791 
00792       for (int ibx=0 ; ibx<=2; ibx++) {
00793         
00794         ostringstream bxnum;
00795         bxnum << ibx-1;
00796         string bxn;
00797         if (ibx<2)
00798           bxn = bxnum.str();
00799         else
00800           bxn = "+" + bxnum.str();
00801         
00802 
00803         //phi
00804         dttpgphmapbx[ibx] = dbe->book2D("DT_TPG_phi_map_bx"+bxn,
00805                                         "Map of triggers per station (BX="+bxn+")",20,1,21,12,0,12);
00806         setMapPhLabel(dttpgphmapbx[ibx]);
00807 
00808         //Theta
00809         dttpgthbx[ibx] = dbe->book1D("DT_TPG_theta_bx_"+bxn, 
00810                                      "DT TPG theta bx "+bxn, 50, -24.5, 24.5 ) ;  
00811         
00812         dttpgthmapbx[ibx] = dbe->book2D("DT_TPG_theta_map_bx_"+bxn,
00813                                         "Map of triggers per station (BX="+bxn+")",15,1,16,12,0,12);
00814         setMapThLabel(dttpgthmapbx[ibx]);
00815 
00816       }
00817       
00818 
00819 //      dttpgphmap = dbe->book2D("DT_TPG_phi_map","Map of triggers per station",20,1,21,12,0,12); // moved to errfolder
00820 
00821       dttpgphmapcorr = dbe->book2D("DT_TPG_phi_map_corr",
00822                                    "Map of correlated triggers per station",20,1,21,12,0,12);
00823       dttpgphmap2nd = dbe->book2D("DT_TPG_phi_map_2nd",
00824                                   "Map of second tracks per station",20,1,21,12,0,12);
00825       dttpgphbestmap = dbe->book2D("DT_TPG_phi_best_map",
00826                                    "Map of best triggers per station",20,1,21,12,0,12);
00827       dttpgphbestmapcorr = dbe->book2D("DT_TPG_phi_best_map_corr",
00828                                        "Map of correlated best triggers per station",20,1,21,12,0,12);
00829       setMapPhLabel(dttpgphmapcorr);
00830       setMapPhLabel(dttpgphmap2nd);
00831       setMapPhLabel(dttpgphbestmap);
00832       setMapPhLabel(dttpgphbestmapcorr);
00833 
00834       dttpgthmap = dbe->book2D("DT_TPG_theta_map",
00835                                "Map of triggers per station",15,1,16,12,0,12);
00836       dttpgthmaph = dbe->book2D("DT_TPG_theta_map_h",
00837                                 "Map of H quality triggers per station",15,1,16,12,0,12);
00838       dttpgthbestmap = dbe->book2D("DT_TPG_theta_best_map",
00839                                    "Map of besttriggers per station",15,1,16,12,0,12);
00840       dttpgthbestmaph = dbe->book2D("DT_TPG_theta_best_map_h",
00841                                     "Map of H quality best triggers per station",15,1,16,12,0,12);
00842       setMapThLabel(dttpgthmap);
00843       setMapThLabel(dttpgthmaph);
00844       setMapThLabel(dttpgthbestmap);
00845       setMapThLabel(dttpgthbestmaph);
00846 
00847 
00848 */
00849 
00850     } 
00851 }

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

Reimplemented from edm::EDAnalyzer.

Definition at line 855 of file L1TDTTF.cc.

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

00856 {
00857   if(verbose_) cout << "L1TDTTF: end job...." << endl;
00858   LogInfo("EndJob") << "analyzed " << nev_ << " events"; 
00859 
00860   if ( outputFile_.size() != 0  && dbe ) dbe->save(outputFile_);
00861 
00862 
00863   //  std::cout << "nev_: " << nev_ << std::endl;
00864   //std::cout << "nev_dttf: " << nev_dttf << std::endl;
00865   //std::cout << "nev_dttf_track2: " << nev_dttf_track2 << std::endl;
00866 
00867   return;
00868 }

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

Definition at line 1458 of file L1TDTTF.cc.

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

01459 {
01460   me->setAxisTitle("DTTF Sector",2);
01461   for(int i=0;i<5;i++){
01462     ostringstream wheel;
01463     wheel << i-2;
01464     me->setBinLabel(1+i*4,"Wheel "+ wheel.str(),1);
01465   }
01466 }

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

Definition at line 1468 of file L1TDTTF.cc.

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

01469 {
01470   me->setAxisTitle("DTTF Sector",2);
01471   for(int i=0;i<5;i++){
01472     ostringstream wheel;
01473     wheel << i-2;
01474     me->setBinLabel(1+i*3,"Wheel "+ wheel.str(),1);
01475   } 
01476 }


Member Data Documentation

MonitorElement* L1TDTTF::bxnumber[5][12][5] [private]

Definition at line 78 of file L1TDTTF.h.

DQMStore* L1TDTTF::dbe [private]

Definition at line 58 of file L1TDTTF.h.

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

MonitorElement* L1TDTTF::dttf_2ndTrack_Summary [private]

Definition at line 124 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_bx[6][12] [private]

Definition at line 94 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_bx_2ndTrack[6][12] [private]

Definition at line 95 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_bx_integ [private]

Definition at line 112 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_bx_integ_2ndTrack [private]

Definition at line 131 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_bx_Summary [private]

Definition at line 120 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_bx_Summary_2ndTrack [private]

Definition at line 135 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_bx_wheel[6] [private]

Definition at line 96 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_highQual_Summary [private]

Definition at line 123 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_highQual_Summary_2ndTrack [private]

Definition at line 137 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_n2ndTracks_wheel[6] [private]

Definition at line 104 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_nTracks_integ_2ndTrack [private]

Definition at line 132 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_nTracks_wheel[6] [private]

Definition at line 98 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_nTracksPerEvent_integ [private]

Definition at line 106 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_nTracksPerEvent_wheel[6] [private]

Definition at line 101 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_nTrksPerEv[3][6][12] [private]

Definition at line 100 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_occupancySummary [private]

Definition at line 121 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_occupancySummary_2ndTrack [private]

Definition at line 136 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_occupancySummary_r [private]

Definition at line 122 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_eta[3][6][12] [private]

Definition at line 90 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_eta_integ [private]

Definition at line 108 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_eta_integ_2ndTrack [private]

Definition at line 127 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_phi[3][6][12] [private]

Definition at line 89 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_phi_eta_integ [private]

Definition at line 117 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_phi_eta_integ_2ndTrack [private]

Definition at line 134 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_phi_eta_wheel[6] [private]

Definition at line 119 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_phi_integ [private]

Definition at line 107 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_phi_integ_2ndTrack [private]

Definition at line 126 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_pt[3][6][12] [private]

Definition at line 93 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_pt_integ [private]

Definition at line 109 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_pt_integ_2ndTrack [private]

Definition at line 128 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_q[3][6][12] [private]

Definition at line 92 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_q_integ [private]

Definition at line 111 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_q_integ_2ndTrack [private]

Definition at line 130 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_qual[3][6][12] [private]

Definition at line 91 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_qual_integ [private]

Definition at line 110 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

MonitorElement* L1TDTTF::dttf_p_qual_integ_2ndTrack [private]

Definition at line 129 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

bool L1TDTTF::dttf_track [private]

Definition at line 153 of file L1TDTTF.h.

Referenced by analyze().

bool L1TDTTF::dttf_track_2 [private]

Definition at line 154 of file L1TDTTF.h.

Referenced by analyze().

MonitorElement* L1TDTTF::dttpgphbestmap [private]

Definition at line 142 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphbestmapcorr [private]

Definition at line 143 of file L1TDTTF.h.

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

Definition at line 62 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphbxcomp [private]

Definition at line 63 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphmap [private]

Definition at line 139 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphmap2nd [private]

Definition at line 140 of file L1TDTTF.h.

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

Definition at line 77 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphmapcorr [private]

Definition at line 141 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphntrack [private]

Definition at line 64 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphsector[3][5] [private]

Definition at line 68 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphsg1phiAngle[3][5][12][5] [private]

Definition at line 70 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphsg1phiBandingAngle[3][5][12][5] [private]

Definition at line 71 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphsg1quality[3][5][12][5] [private]

Definition at line 72 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphsg2phiAngle[3][5][12][5] [private]

Definition at line 73 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphsg2phiBandingAngle[3][5][12][5] [private]

Definition at line 74 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphsg2quality[3][5][12][5] [private]

Definition at line 75 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphstation[3][5][12] [private]

Definition at line 69 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgphts2tag[3][5][12][5] [private]

Definition at line 76 of file L1TDTTF.h.

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

Definition at line 67 of file L1TDTTF.h.

edm::InputTag L1TDTTF::dttpgSource_ [private]

Definition at line 171 of file L1TDTTF.h.

Referenced by analyze().

MonitorElement* L1TDTTF::dttpgthbestmap [private]

Definition at line 147 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgthbestmaph [private]

Definition at line 148 of file L1TDTTF.h.

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

Definition at line 80 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgthmap [private]

Definition at line 86 of file L1TDTTF.h.

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

Definition at line 87 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgthmaph [private]

Definition at line 146 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgthntrack [private]

Definition at line 65 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgthquality[3][6][12][4] [private]

Definition at line 85 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgthsector[3][6] [private]

Definition at line 82 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgthstation[3][6][12] [private]

Definition at line 83 of file L1TDTTF.h.

MonitorElement* L1TDTTF::dttpgththeta[3][6][12][4] [private]

Definition at line 84 of file L1TDTTF.h.

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

Definition at line 81 of file L1TDTTF.h.

std::string L1TDTTF::l1tinfofolder [private]

Definition at line 59 of file L1TDTTF.h.

Referenced by L1TDTTF().

std::string L1TDTTF::l1tsubsystemfolder [private]

Definition at line 60 of file L1TDTTF.h.

Referenced by beginJob(), and L1TDTTF().

ofstream L1TDTTF::logFile_ [private]

Definition at line 170 of file L1TDTTF.h.

bool L1TDTTF::monitorDaemon_ [private]

Definition at line 169 of file L1TDTTF.h.

int L1TDTTF::n2ndTrack[6][12] [private]

Definition at line 166 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

int L1TDTTF::nBx[6][3] [private]

Definition at line 157 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

int L1TDTTF::nBx_2ndTrack[6][3] [private]

Definition at line 158 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

int L1TDTTF::nev_ [private]

Definition at line 152 of file L1TDTTF.h.

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

int L1TDTTF::nev_dttf [private]

Definition at line 155 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

int L1TDTTF::nev_dttf_track2 [private]

Definition at line 156 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

int L1TDTTF::nHighQual[6][12] [private]

Definition at line 164 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

int L1TDTTF::nHighQual_2ndTrack[6][12] [private]

Definition at line 165 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

int L1TDTTF::nOccupancy_integ[6][12] [private]

Definition at line 159 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

int L1TDTTF::nOccupancy_integ_2ndTrack[6][12] [private]

Definition at line 160 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

int L1TDTTF::nOccupancy_integ_phi_eta[64][144] [private]

Definition at line 161 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

int L1TDTTF::nOccupancy_integ_phi_eta_2ndTrack[64][144] [private]

Definition at line 162 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

int L1TDTTF::nOccupancy_wheel_phi_eta[64][144][6] [private]

Definition at line 163 of file L1TDTTF.h.

Referenced by analyze(), and beginJob().

std::string L1TDTTF::outputFile_ [private]

Definition at line 167 of file L1TDTTF.h.

Referenced by endJob(), and L1TDTTF().

bool L1TDTTF::verbose_ [private]

Definition at line 168 of file L1TDTTF.h.

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


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