CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Private Attributes

L1TCSCTF Class Reference

#include <L1TCSCTF.h>

Inheritance diagram for L1TCSCTF:
edm::EDAnalyzer

List of all members.

Public Member Functions

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

Protected Member Functions

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

Private Attributes

int BxInEvent_
MonitorElementcsctfAFerror
MonitorElementcsctfbx
MonitorElementcsctfbx_H
MonitorElementcsctfChamberOccupancies
MonitorElementcsctferrors
MonitorElementcsctfntrack
MonitorElementcsctfoccupancies
MonitorElementcsctfoccupancies_H
MonitorElementcsctfTrackEta
MonitorElementcsctfTrackEta_H
MonitorElementcsctfTrackEtaHighQ
MonitorElementcsctfTrackEtaLowQ
MonitorElementcsctfTrackM
MonitorElementcsctfTrackPhi
MonitorElementcsctfTrackPhi_H
MonitorElementcscTrackStubNumbers
DQMStoredbe
MonitorElementDTstubsTimeTrackMenTimeArrival [12]
edm::InputTag gmtProducer
bool isCSCcand_
int L1ABXN
edm::InputTag lctProducer
ofstream logFile_
unsigned long long m_ptScaleCacheID
unsigned long long m_scalesCacheID
edm::InputTag mbProducer
bool monitorDaemon_
int nev_
std::string outputFile_
CSCSectorReceiverLUTsrLUTs_ [5]
edm::InputTag statusProducer
const L1MuTriggerPtScaletpts
MonitorElementtrackModeVsQ
edm::InputTag trackProducer
const L1MuTriggerScalests
bool verbose_

Detailed Description

Definition at line 52 of file L1TCSCTF.h.


Constructor & Destructor Documentation

L1TCSCTF::L1TCSCTF ( const edm::ParameterSet ps)

Definition at line 27 of file L1TCSCTF.cc.

References edm::ParameterSet::addUntrackedParameter(), dbe, Reference_intrackfit_cff::endcap, edm::ParameterSet::getUntrackedParameter(), NULL, cppFunctionSkipper::operator, outputFile_, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), srLUTs_, relativeConstraints::station, and verbose_.

  : gmtProducer( ps.getParameter< InputTag >("gmtProducer") ),
    lctProducer( ps.getParameter< InputTag >("lctProducer") ),
    trackProducer( ps.getParameter< InputTag >("trackProducer") ),
    statusProducer( ps.getParameter< InputTag >("statusProducer") ),
    mbProducer( ps.getParameter< InputTag >("mbProducer") )
{

  // verbosity switch
  verbose_ = ps.getUntrackedParameter<bool>("verbose", false);

  if(verbose_) edm::LogInfo("DataNotFound") << "L1TCSCTF: constructor...." << endl;


  dbe = NULL;
  if ( ps.getUntrackedParameter<bool>("DQMStore", false) )
    {
      dbe = Service<DQMStore>().operator->();
      dbe->setVerbose(0);
    }

  outputFile_ = ps.getUntrackedParameter<string>("outputFile", "");
  if ( outputFile_.size() != 0 ) 
    {
      edm::LogInfo("DataNotFound") << "L1T Monitoring histograms will be saved to " << outputFile_.c_str() << endl;
    }

  bool disable = ps.getUntrackedParameter<bool>("disableROOToutput", false);
  if(disable){
    outputFile_="";
  }


  if ( dbe !=NULL ) 
    {
      dbe->setCurrentFolder("L1T/L1TCSCTF");
    }

  // instantiate standard on-fly SR LUTs from CSC TF emulator package
  bzero(srLUTs_,sizeof(srLUTs_));
  int endcap=1, sector=1; // assume SR LUTs are all same for every sector in either of endcaps
  bool TMB07=true; // specific TMB firmware
  // Create a dummy pset for SR LUTs
  edm::ParameterSet srLUTset;
  srLUTset.addUntrackedParameter<bool>("ReadLUTs", false);
  srLUTset.addUntrackedParameter<bool>("Binary",   false);
  srLUTset.addUntrackedParameter<std::string>("LUTPath", "./");
  for(int station=1,fpga=0; station<=4 && fpga<5; station++)
    {
      if(station==1)
        for(int subSector=0; subSector<2 && fpga<5; subSector++)
          srLUTs_[fpga++] = new CSCSectorReceiverLUT(endcap, sector, subSector+1, station, srLUTset, TMB07);
      else
        srLUTs_[fpga++] = new CSCSectorReceiverLUT(endcap, sector, 0, station, srLUTset, TMB07);
    }

}
L1TCSCTF::~L1TCSCTF ( ) [virtual]

Definition at line 87 of file L1TCSCTF.cc.

References i, and srLUTs_.

{

  for(int i=0; i<5; i++) 
    delete srLUTs_[i]; //free the array of pointers
}

Member Function Documentation

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

CAL as Janos adviced

Implements edm::EDAnalyzer.

Definition at line 415 of file L1TCSCTF.cc.

References abs, BxInEvent_, edm::eventsetup::EventSetupRecord::cacheIdentifier(), csctfbx, csctfbx_H, csctfChamberOccupancies, csctferrors, csctfntrack, csctfoccupancies, csctfoccupancies_H, csctfTrackEta, csctfTrackEta_H, csctfTrackEtaHighQ, csctfTrackEtaLowQ, csctfTrackM, csctfTrackPhi, csctfTrackPhi_H, cscTrackStubNumbers, DTstubsTimeTrackMenTimeArrival, Reference_intrackfit_cff::endcap, MonitorElement::Fill(), HcalObjRepresent::Fill(), edm::EventSetup::get(), edm::Event::getByLabel(), L1MuScale::getLowEdge(), L1MuTriggerScales::getPhiScale(), L1MuGMTReadoutCollection::getRecords(), CSCSectorReceiverLUT::globalEtaME(), CSCSectorReceiverLUT::globalPhiME(), gmtProducer, edm::InputTag::instance(), isCSCcand_, edm::HandleBase::isValid(), L1ABXN, edm::InputTag::label(), lctProducer, CSCSectorReceiverLUT::localPhi(), M_PI, m_ptScaleCacheID, m_scalesCacheID, mbProducer, nev_, edm::ESHandle< T >::product(), edm::Handle< T >::product(), CSCTriggerGeometry::setGeometry(), edm::shift, srLUTs_, relativeConstraints::station, ntuplemaker::status, statusProducer, tpts, trackModeVsQ, trackProducer, testEve_cfg::tracks, CSCTriggerNumbering::triggerSubSectorFromLabels(), ts, and verbose_.

{

  if( c.get< L1MuTriggerScalesRcd > ().cacheIdentifier() != m_scalesCacheID ||
      c.get< L1MuTriggerPtScaleRcd >().cacheIdentifier() != m_ptScaleCacheID ){
      
    ESHandle< L1MuTriggerScales > scales;
    c.get< L1MuTriggerScalesRcd >().get(scales);
    ts = scales.product();
    ESHandle< L1MuTriggerPtScale > ptscales;
    c.get< L1MuTriggerPtScaleRcd >().get(ptscales);
    tpts = ptscales.product();
    m_scalesCacheID  = c.get< L1MuTriggerScalesRcd  >().cacheIdentifier();
    m_ptScaleCacheID = c.get< L1MuTriggerPtScaleRcd >().cacheIdentifier();
    
    edm::LogInfo("L1TCSCTF")  << "Changing triggerscales and triggerptscales...";
  }    

  int NumCSCTfTracksRep = 0;
  nev_++;
  if(verbose_) edm::LogInfo("DataNotFound") << "L1TCSCTF: analyze...." << endl;

  edm::Handle<L1MuGMTReadoutCollection> pCollection;
  if( gmtProducer.label() != "null" )
    { // GMT block
      e.getByLabel(gmtProducer,pCollection);
      if (!pCollection.isValid()) 
        {
          edm::LogInfo("DataNotFound") << "can't find L1MuGMTReadoutCollection with label ";  // << csctfSource_.label() ;
          return;
        }

      L1MuGMTReadoutCollection const* gmtrc = pCollection.product();
      vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
      vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
      
      // Look if the readout window contains one (and only one CSC cands)
      // to make it simpler I reject events with more than a CSC cand in the
      // same readout window 

      // count non-empty candidates in this bx
      int bxWindow = 0;
      int nCands   = 0;
    
      for( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); RRItr++ ) {
        bxWindow++;

        // get the csc candidates
        vector<L1MuRegionalCand> INPCands = RRItr->getCSCCands();
        vector<L1MuRegionalCand>::const_iterator INPItr;

        BxInEvent_ = 0;
        isCSCcand_ = false;
        int  nCandsBx  = 0;
        
        for( INPItr = INPCands.begin(); INPItr != INPCands.end(); ++INPItr ) {
          if(!INPItr->empty()) 
            {
              nCandsBx++;
              nCands++;
              BxInEvent_ = RRItr->getBxInEvent();
              if (verbose_) edm::LogInfo("DataNotFound") << "cand " << nCandsBx << " -> assigned CSCTF bx: " << INPItr->bx() << endl;
            }
        }
        if (verbose_)
          if(nCandsBx) edm::LogInfo("DataNotFound") << nCandsBx << " cands in bx: " << BxInEvent_ << endl;
      }

      if (nCands != 1) return;
      else isCSCcand_ = true;
      if (verbose_) edm::LogInfo("DataNotFound") << "bxWindow: " << bxWindow << endl;
      
      int ncsctftrack = 0;
      if (verbose_)
        {
          edm::LogInfo("DataNotFound") << "\tCSCTFCand ntrack " << ncsctftrack << endl;
        }
    } // end of GMT block

  L1ABXN = -999;
  if( statusProducer.label() != "null" )
    {
      edm::Handle<L1CSCStatusDigiCollection> status;
      e.getByLabel(statusProducer.label(),statusProducer.instance(),status);
      bool integrity=status->first, se=false, sm=false, bx=false, af=false, fmm=false;
      int nStat = 0;
 
      for(std::vector<L1CSCSPStatusDigi>::const_iterator stat=status->second.begin(); stat!=status->second.end(); stat++)
        {
          se |= stat->SEs()&0xFFF;
          sm |= stat->SMs()&0xFFF;
          bx |= stat->BXs()&0xFFF;
          af |= stat->AFs()&0xFFF;
          fmm|= stat->FMM()!=8;

          if(stat->VPs() != 0) 
            {
              L1ABXN += stat->BXN();
              nStat++;
            }
        }
      // compute the average
      if(nStat!=0) L1ABXN /= nStat;
      if(integrity) csctferrors->Fill(0.5);
      if(se)        csctferrors->Fill(1.5);
      if(sm)        csctferrors->Fill(2.5);
      if(bx)        csctferrors->Fill(3.5);
      if(af)        csctferrors->Fill(4.5);
      if(fmm)       csctferrors->Fill(5.5);
    }

  if( lctProducer.label() != "null" )
    {
      edm::ESHandle<CSCGeometry> pDD;
      c.get<MuonGeometryRecord>().get( pDD );
      CSCTriggerGeometry::setGeometry(pDD);

      edm::Handle<CSCCorrelatedLCTDigiCollection> corrlcts;
      e.getByLabel(lctProducer.label(),lctProducer.instance(),corrlcts);

      for(CSCCorrelatedLCTDigiCollection::DigiRangeIterator csc=corrlcts.product()->begin(); csc!=corrlcts.product()->end(); csc++)
        {
          CSCCorrelatedLCTDigiCollection::Range range1 = corrlcts.product()->get((*csc).first);
          for(CSCCorrelatedLCTDigiCollection::const_iterator lct=range1.first; lct!=range1.second; lct++)
            {
              int endcap  = (*csc).first.endcap()-1;
              int station = (*csc).first.station()-1;
              int sector  = (*csc).first.triggerSector()-1;
              int subSector = CSCTriggerNumbering::triggerSubSectorFromLabels((*csc).first);
              int cscId   = (*csc).first.triggerCscId()-1;
              int fpga    = ( subSector ? subSector-1 : station+1 );

              int endcapAssignment = 1;
              int shift = 1;
              float sectorArg = sector;
              //float sectorArg = j;
                                
              if( endcap == 1 ){
                endcapAssignment = -1;
                shift = 2;
                //sectorArg = sector - 6;
              }
                                
              int signedStation = (station + shift)* endcapAssignment;
              if( (station == 0) && (endcap == 0)) signedStation = subSector - 1;
              if( (station == 0) && (endcap == 1)) signedStation = (-1)*subSector;
                                
              float chamberArg1 = cscId * 0.1 + sectorArg;
              //float chamberArg1 = i*0.1 + sectorArg;
              //std::cout << "First" << i << " " << sectorArg << " " << chamberArg1 << std::endl;
                                
              float chamberArg11 = chamberArg1;
              if(sectorArg == 1) chamberArg1 = chamberArg11 - 0.1;
              if(sectorArg == 2) chamberArg1 = chamberArg11 - 0.2;
              if(sectorArg == 3) chamberArg1 = chamberArg11 - 0.3;
              if(sectorArg == 4) chamberArg1 = chamberArg11 - 0.4;
              if(sectorArg == 5) chamberArg1 = chamberArg11 - 0.5;

              //std::cout << "cscId, station, sector, endcap, sectorArg, chamber Arg: " << cscId << ", " << station << ", " <<sector << ", " << endcap << ", " << chamberArg1 << ", " << signedStation << std::endl;                    

              csctfChamberOccupancies->Fill(chamberArg1, signedStation); 
              //int bunchX = ( (lct->getBX()) - 6 );
                                
              //int timingSectorArg = 3*(sector) + (lct->getMPCLink());
              //if( endcap == 1) timingSectorArg = 3*(sector + 6) + (lct->getMPCLink());
              //std::cout << "Sector, MPCLink, TSA, endcap: " << sector << ", " << lct->getMPCLink() << ", " << timingSectorArg << ", " << endcap << std::endl;
                                
              //csctfbx->Fill(timingSectorArg, bunchX );
              //std::cout << "LCT'S, encap: " << endcap << ", station: " << station << ", sector: " << sector << ", subSector: " << subSector << ", cscId: " << cscId << std:: endl;
              //End JAG
                                
              // Check if Det Id is within pysical range:
              if( endcap<0||endcap>1 || sector<0||sector>6 || station<0||station>3 || cscId<0||cscId>8 || fpga<0||fpga>4)
                {
                  edm::LogError("L1CSCTF: CSC TP are out of range: ")<<"  endcap: "<<(endcap+1)<<"  station: "<<(station+1) <<"  sector: "<<(sector+1)<<"  subSector: "<<subSector<<"  fpga: "<<fpga<<"  cscId: "<<(cscId+1);
                  continue;
                }
              lclphidat lclPhi;                 
              try {
                lclPhi = srLUTs_[fpga]->localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
              } catch(...) { 
                bzero(&lclPhi,sizeof(lclPhi)); 
              }
                                
              gblphidat gblPhi;
              try {
                gblPhi = srLUTs_[fpga]->globalPhiME(lclPhi.phi_local, lct->getKeyWG(), cscId+1);
              } catch(...) { 
                bzero(&gblPhi,sizeof(gblPhi)); 
              }
                                
              gbletadat gblEta;
              try {
                gblEta = srLUTs_[fpga]->globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), cscId+1);
              } catch(...) { 
                bzero(&gblEta,sizeof(gblEta)); 
              }
           
              // SR LUT gives packed eta and phi values -> normilize them to 1 by scale them to 'max' and shift by 'min'
              //float etaP = gblEta.global_eta/127*1.5 + 0.9;
              //float phiP =  (gblPhi.global_phi);// + ( sector )*4096 + station*4096*12) * 1./(4*4096*12);
              //std::cout << "LCT Eta & Phi Coordinates: " << etaP << ", " << phiP << "." << std::endl;
              //csctfoccupancies->Fill( gblEta.global_eta/127. * 1.5 + 0.9, (gblPhi.global_phi + ( sector + (endcap?0:6) )*4096 + station*4096*12) * 1./(4*4096*12) );
            }//lct != range1.scond
        }//csc!=corrlcts.product()->end()
    }// lctProducer.label() != "null"



  if( trackProducer.label() != "null" )
    {
      edm::Handle<L1CSCTrackCollection> tracks;
      e.getByLabel(trackProducer.label(),trackProducer.instance(),tracks);
      for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
        {

          NumCSCTfTracksRep++;
          long LUTAdd = trk->first.ptLUTAddress();
          int trigMode = ( (LUTAdd)&0xf0000 ) >> 16;
          int trEta = (trk->first.eta_packed() );

          
          // trk->first.endcap() = 2 for - endcap
          //                     = 1 for + endcap
          //int trEndcap = (trk->first.endcap()==2 ? trk->first.endcap()-3 : trk->first.endcap());
          if( trk->first.endcap() != 1) 
            {
              int holder = trEta;
              trEta = -1*holder;
              trEta -= 1;
            }
                                
          int trSector = 6*(trk->first.endcap()-1)+trk->first.sector();
          int trBX     = trk->first.BX();

          //Here is what is done with output phi value:
          //output_phi = (phi / 32) * 3 /16
          //where:
          //phi is 12-bit phi, 4096 bins covering 62 degrees
          //output_phi is 5-bit value

          //Easy to see that output_phi can have values from 0 to 23, or 24 total combinations.
          //This gives per-bin phi value of 62/24 = 2.583333 degrees.

          // Sector 1 nominally starts at 15 degrees but there 1 degree overlap between sectors so 14 degrees effectively 
          //double trPhi = trk->first.localPhi() * 62. / 24.;
          double trPhi     = ts->getPhiScale()->getLowEdge(trk->first.localPhi());
          double trPhi02PI = fmod(trPhi + 
                                  ((trSector-1)*M_PI/3) + 
                                  (M_PI*14/180.), 2*M_PI);
      
          if (trigMode == 15) {
            csctfTrackPhi_H    -> Fill( trPhi02PI );
            csctfTrackEta_H    -> Fill( trEta );
            csctfoccupancies_H -> Fill( trEta, trPhi02PI );
            csctfbx_H          -> Fill( trSector, trBX );
          }
          else{
            csctfTrackPhi    -> Fill( trPhi02PI );
            csctfTrackEta    -> Fill( trEta );
            csctfoccupancies -> Fill( trEta, trPhi02PI );
            csctfbx          -> Fill( trSector, trBX );

            // Low Quality / High Quality Eta Distributions
            //|eta| < 2.1
            if (abs(trEta) < 24) {
              if (trigMode ==  2 || 
                  trigMode ==  3 || 
                  trigMode ==  4 || 
                  trigMode ==  5 || 
                  trigMode ==  6 || 
                  trigMode ==  7 || 
                  trigMode == 11 || 
                  trigMode == 12 || 
                  trigMode == 13 || 
                  trigMode == 14  )  csctfTrackEtaHighQ -> Fill (trEta);
              
              if (trigMode ==  8 || 
                  trigMode ==  9 || 
                  trigMode == 10  )  csctfTrackEtaLowQ  -> Fill (trEta);
            }
            else {//|eta| > 2.1
              if (trigMode ==  2 || 
                  trigMode ==  3 || 
                  trigMode ==  4 || 
                  trigMode ==  5  )  csctfTrackEtaHighQ -> Fill (trEta);
              else
                                     csctfTrackEtaLowQ  -> Fill (trEta);
            }
          }
          
          csctfTrackM->Fill( trk->first.modeExtended() );
          
          // we monitor the track quality only on the first link
          // so let's make sure to fill the plot if there is something that 
          // is read from the hardware
          int trRank   = trk->first.rank();    
          if (trRank) {
            int trQuality = ((trRank>>5)&0x3);
            trackModeVsQ->Fill( trk->first.modeExtended(), trQuality );
          }

          /* 
             OLD METHOD FOR FILLING HALO PLOTS, IMPROVED METHOD USING ASSOCIATED TRACK STUBS
             BELOW ~LINE 605
             if( trigMode == 15 )
             {

             double haloVals[4][4];
             for( int i = 0; i < 4; i++)
             {
             haloVals[i][0] = 0;
             }
                                
             edm::Handle<CSCCorrelatedLCTDigiCollection> corrlcts;
             e.getByLabel(lctProducer.label(),lctProducer.instance(),corrlcts);
             for(CSCCorrelatedLCTDigiCollection::DigiRangeIterator csc=corrlcts.product()->begin(); csc!=corrlcts.product()->end(); csc++)
             {
             CSCCorrelatedLCTDigiCollection::Range range1 = corrlcts.product()->get((*csc).first);
             for(CSCCorrelatedLCTDigiCollection::const_iterator lct=range1.first; lct!=range1.second; lct++)
             {
             int endcap  = (*csc).first.endcap()-1;
             int station = (*csc).first.station()-1;
             int sector  = (*csc).first.triggerSector()-1;
             int cscId   = (*csc).first.triggerCscId()-1;
             int subSector = CSCTriggerNumbering::triggerSubSectorFromLabels((*csc).first);
             int fpga    = ( subSector ? subSector-1 : station+1 );
                                                
             if(station != 4)
             {
             int modEnd = 1;
             if( endcap == 0 ) modEnd = -1;
             int indexHalo = modEnd + station;
             if(haloVals[indexHalo][0] == 1.0) haloVals[indexHalo][3] = 1.0;
             if(haloVals[indexHalo][0] == 0) haloVals[indexHalo][0] = 1.0;
             haloVals[indexHalo][1] = sector*1.0;
                                                
             lclphidat lclPhi;
             lclPhi = srLUTs_[fpga]->localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
             gblphidat gblPhi;
             gblPhi = srLUTs_[fpga]->globalPhiME(lclPhi.phi_local, lct->getKeyWG(), cscId+1);
             gbletadat gblEta;
             gblEta = srLUTs_[fpga]->globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), cscId+1);
                                                        
             haloVals[indexHalo][2] = gblEta.global_eta/127. * 1.5 + 0.9;
             } //station1 or 2
             } //lct first to second
             } //corrlcts

             if( (haloVals[0][0] == 1.) && (haloVals[1][0] == 1.) && (haloVals[0][3] != 1.) && (haloVals[1][3] != 1.)  )
             {
             if( haloVals[0][1] == haloVals[1][1] ){
             double delEta23 = haloVals[1][2] - haloVals[0][2];
             haloDelEta23->Fill( delEta23 );
             }
             }
                                
             if( (haloVals[2][0] == 1.) && (haloVals[3][0] == 1.) && (haloVals[2][3] != 1.) && (haloVals[3][3] != 1.)  )
             {
             if( haloVals[2][1] == haloVals[3][1] ){
             double delEta23 = haloVals[3][2] - haloVals[2][2];
             haloDelEta23->Fill( delEta23 );
             }
             }  
             } //halo trigger
          */
                        
          int cscTrackStub = 0;
          //float haloEta[3];
          //for(int i=0; i<3; i++) haloEta[i]=-1.0;
          //bool haloME11 = false;
          CSCCorrelatedLCTDigiCollection lctsOfTracks=trk->second;
          for(CSCCorrelatedLCTDigiCollection::DigiRangeIterator trackStub=lctsOfTracks.begin(); trackStub!=lctsOfTracks.end(); trackStub++)
            {
              CSCCorrelatedLCTDigiCollection::Range range2 = lctsOfTracks.get((*trackStub).first);
              for(CSCCorrelatedLCTDigiCollection::const_iterator lct=range2.first; lct!=range2.second; lct++)
                {
//                   int station = (*trackStub).first.station()-1;
//                   if(station != 4)
//                     {
//                       // int endcap  = (*trackStub).first.endcap()-1;
//                       // int sector  = (*trackStub).first.triggerSector()-1;
//                       int cscId   = (*trackStub).first.triggerCscId()-1;
//                       int subSector = CSCTriggerNumbering::triggerSubSectorFromLabels((*trackStub).first);
//                       int fpga    = ( subSector ? subSector-1 : station+1 );
                                                
//                       lclphidat lclPhi;
//                       lclPhi = srLUTs_[fpga]->localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
//                       gblphidat gblPhi;
//                       gblPhi = srLUTs_[fpga]->globalPhiME(lclPhi.phi_local, lct->getKeyWG(), cscId+1);
//                       gbletadat gblEta;
//                       gblEta = srLUTs_[fpga]->globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), cscId+1);
//                       haloEta[station-1] = gblEta.global_eta/127. * 1.5 + 0.9;
//                       if(station==1 && cscId<2) haloME11 = true;
//                    }
                  cscTrackStub++;                       
                }
            }
          cscTrackStubNumbers->Fill(cscTrackStub);
          
//           if(trigMode == 15)
//             {
//               float dEta13 = haloEta[2]-haloEta[0];
//               float dEta12 = haloEta[1]-haloEta[0];
//               if(haloME11)
//                 {
//                   if(haloEta[1]!=-1.0) haloDelEta112->Fill(dEta12);
//                   if(haloEta[2]!=-1.0) haloDelEta113->Fill(dEta13);
//                 } else {
//                 if(haloEta[1]!=-1.0) haloDelEta12->Fill(dEta12);
//                 if(haloEta[2]!=-1.0) haloDelEta13->Fill(dEta13);
//               }
//             }
          //


                                
        }
    }
  csctfntrack->Fill(NumCSCTfTracksRep);


  if( mbProducer.label() != "null" ) 
    {
      // handle to needed collections
      edm::Handle<CSCTriggerContainer<csctf::TrackStub> > dtStubs;
      e.getByLabel(mbProducer.label(),  mbProducer.instance(),  dtStubs);
      edm::Handle<L1CSCTrackCollection> tracks;
      e.getByLabel(trackProducer.label(),trackProducer.instance(),tracks);
                  
      // loop on the DT stubs
      std::vector<csctf::TrackStub> vstubs = dtStubs->get();
      for(std::vector<csctf::TrackStub>::const_iterator stub=vstubs.begin(); 
          stub!=vstubs.end(); stub++)
        {
          if (verbose_) 
            {
              edm::LogInfo("DataNotFound") << "\n mbEndcap: "               << stub->endcap();
              edm::LogInfo("DataNotFound") << "\n stub->getStrip()[FLAG]: " << stub->getStrip(); 
              edm::LogInfo("DataNotFound") << "\n stub->getKeyWG()[CAL]: "  << stub->getKeyWG(); 
              edm::LogInfo("DataNotFound") << "\n stub->BX(): "             << stub->BX();
              edm::LogInfo("DataNotFound") << "\n stub->sector(): "         << stub->sector();
              edm::LogInfo("DataNotFound") << "\n stub->subsector(): "      << stub->subsector();
              edm::LogInfo("DataNotFound") << "\n stub->station(): "        << stub->station();
              edm::LogInfo("DataNotFound") << "\n stub->phiPacked(): "      << stub->phiPacked();
              edm::LogInfo("DataNotFound") << "\n stub->getBend(): "        << stub->getBend();
              edm::LogInfo("DataNotFound") << "\n stub->getQuality(): "     << stub->getQuality();
              edm::LogInfo("DataNotFound") << "\n stub->cscid(): "          << stub->cscid() << endl;      
            }       
          // define the sector ID
          int mbId = (stub->endcap()==2) ? 6 : 0;
          mbId += stub->sector();
          // *** do not fill if CalMB variable is set ***
          // horrible! They used the same class to write up the LCT and MB info,
          // but given the MB does not have strip and WG they replaced this two
          // with the flag and cal bits... :S
          if (stub->getKeyWG() == 0) 
            {
              // if FLAG =1, muon belong to previous BX
              int bxDT     = stub->BX()-stub->getStrip(); // correct by the FLAG
              int subDT    = stub->subsector();
          
              // Fill the event only if CSC had or would have triggered
              if (isCSCcand_)
                {
                  //look for tracks in the event and compare the matching DT stubs 
                  int trkBX = 0;
                  for(L1CSCTrackCollection::const_iterator trk=tracks->begin(); trk<tracks->end(); trk++)
                    {
                      trkBX = trk->first.BX();
                      int trkId = (trk->first.endcap()==2) ? 6 : 0;
                      trkId += trk->first.sector();
                      if (verbose_){ 
                        edm::LogInfo("DataNotFound") << "\n trk BX: "  << trkBX
                                                     << " Sector: "    << trkId
                                                     << " SubSector: " << trk->first.subsector()
                                                     << " Endcap: "    << trk->first.endcap();

                        edm::LogInfo("DataNotFound") << "\n DT  BX: "    << stub->BX()
                                                     << " Sector: "      << mbId
                                                     << " SubSector: "   << stub->subsector()
                                                     << " Endcap: "      << stub->endcap() << endl;
                      }

                      if (mbId == trkId) 
                        {
                          if (verbose_) {
                            edm::LogInfo("DataNotFound") << " --> MATCH" << endl;
                            edm::LogInfo("DataNotFound") << "Fill :" << trkBX+6-bxDT << " -- " << subDT << " -- cands" << endl;
                          }
                          // DT bx ranges from 3 to 9
                          // trk bx ranges from -3 to 3
                          DTstubsTimeTrackMenTimeArrival[mbId-1]->Fill(bxDT-trkBX-6,subDT);//subsec
                        }
                    }// loop on the tracks
                }//if (isCSCcand_){
            }//if (stub->getKeyWG() == 0) {
        }
    }
}
void L1TCSCTF::beginJob ( void  ) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 94 of file L1TCSCTF.cc.

References DQMStore::book1D(), DQMStore::book2D(), csctfbx, csctfbx_H, csctfChamberOccupancies, csctferrors, csctfntrack, csctfoccupancies, csctfoccupancies_H, csctfTrackEta, csctfTrackEta_H, csctfTrackEtaHighQ, csctfTrackEtaLowQ, csctfTrackM, csctfTrackPhi, csctfTrackPhi_H, cscTrackStubNumbers, dbe, DTstubsTimeTrackMenTimeArrival, MonitorElement::getTH2F(), i, M_PI, m_ptScaleCacheID, m_scalesCacheID, nev_, cppFunctionSkipper::operator, DQMStore::rmdir(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), and trackModeVsQ.

{
  m_scalesCacheID  = -999;
  m_ptScaleCacheID = -999;

  nev_ = 0;

  // get hold of back-end interface
  DQMStore* dbe = 0;
  dbe = Service<DQMStore>().operator->();

  if( dbe )
    {
      dbe->setCurrentFolder("L1T/L1TCSCTF");
      dbe->rmdir("L1T/L1TCSCTF");
    }


  if( dbe )
    {
      dbe->setCurrentFolder("L1T/L1TCSCTF");
                
      //  Error counting histogram:
      //  1) checks TF data integrity (error rate - first bin),
      //  2) monitors sychronization on input links (4 errors types: SE/SM/BX/AF; ORed for all time bins, links, and SPs),
      //  3) reports FMM status (if in any SP FMM status != "Ready" - fill the last bin)
      csctferrors = dbe->book1D("CSCTF_errors","CSCTF Errors",6,0,6);   
      csctferrors->setAxisTitle("Error type",1);
      csctferrors->setAxisTitle("Number of Errors",2);
      csctferrors->setBinLabel(1,"Corruptions",1);
      csctferrors->setBinLabel(2,"Synch. Err.",1);
      csctferrors->setBinLabel(3,"Synch. Mod.",1);
      csctferrors->setBinLabel(4,"BX mismatch",1);
      csctferrors->setBinLabel(5,"Time misalign.",1);
      csctferrors->setBinLabel(6,"FMM != Ready",1);
        
      //  Occupancy histogram Eta x Y, where Y:
      //  1) Phi_packed of input LCTs from 1st, 2nd, 3rd, and 4th stations
      //  2) Phi_packed of output tracks
      //  (all 12 SPs - 360 degree coveradge)
      csctfoccupancies = dbe->book2D("CSCTF_occupancies", "CSCTF Occupancies", 64,-32,31,32,0,6.2);
      csctfoccupancies->setAxisTitle("#eta",1);
      csctfoccupancies->setAxisTitle("#phi",2);
      csctfoccupancies->setBinLabel( 1,"-2.5", 1);
      csctfoccupancies->setBinLabel( 8,"-2.1", 1);
      csctfoccupancies->setBinLabel(18,"-1.6", 1);
      csctfoccupancies->setBinLabel(26,"-1.2", 1);
      csctfoccupancies->setBinLabel(32,"-0.9", 1);
      csctfoccupancies->setBinLabel(33, "0.9", 1);
      csctfoccupancies->setBinLabel(39, "1.2", 1);
      csctfoccupancies->setBinLabel(47, "1.6", 1);
      csctfoccupancies->setBinLabel(57, "2.1", 1);
      csctfoccupancies->setBinLabel(64, "2.5", 1);

      // ... and for halo muons only
      csctfoccupancies_H = dbe->book2D("CSCTF_occupancies_H", "CSCTF Halo Occupancies", 64,-32,31,32,0,6.2);
      csctfoccupancies_H->setAxisTitle("#eta",1);
      csctfoccupancies_H->setAxisTitle("#phi",2);
      csctfoccupancies_H->setBinLabel( 1,"-2.5", 1);
      csctfoccupancies_H->setBinLabel( 8,"-2.1", 1);
      csctfoccupancies_H->setBinLabel(18,"-1.6", 1);
      csctfoccupancies_H->setBinLabel(26,"-1.2", 1);
      csctfoccupancies_H->setBinLabel(32,"-0.9", 1);
      csctfoccupancies_H->setBinLabel(33, "0.9", 1);
      csctfoccupancies_H->setBinLabel(39, "1.2", 1);
      csctfoccupancies_H->setBinLabel(47, "1.6", 1);
      csctfoccupancies_H->setBinLabel(57, "2.1", 1);
      csctfoccupancies_H->setBinLabel(64, "2.5", 1);

      //haloDelEta12  = dbe->book1D("CSCTF_Halo_Eta12", "#Delta #eta_{12} for Halo Muons", 40, -0.20,0.30);
      //haloDelEta112 = dbe->book1D("CSCTF_Halo_Eta112","#Delta #eta_{112} for Halo Muons", 40, -0.20,0.30);
      //haloDelEta13  = dbe->book1D("CSCTF_Halo_Eta13", "#Delta #eta_{13} for Halo Muons", 40, -0.20,0.30);
      //haloDelEta113 = dbe->book1D("CSCTF_Halo_Eta113","#Delta #eta_{113} for Halo Muons", 40, -0.20,0.30);
        
      // Quality VS Mode
      trackModeVsQ = dbe->book2D("CSCTF_Track_ModeVsQual","CSC Track Mode Vs Quality", 19, -0.5, 18.5, 4, 0, 4);
      trackModeVsQ->setAxisTitle("Track Type", 1);
      trackModeVsQ->setBinLabel(1,"No Track",1);
      trackModeVsQ->setBinLabel(2,"Bad Phi/Single",1);
      trackModeVsQ->setBinLabel(3,"ME1-2-3",1);
      trackModeVsQ->setBinLabel(4,"ME1-2-4",1);
      trackModeVsQ->setBinLabel(5,"ME1-3-4",1);
      trackModeVsQ->setBinLabel(6,"ME2-3-4",1);
      trackModeVsQ->setBinLabel(7,"ME1-2",1);
      trackModeVsQ->setBinLabel(8,"ME1-3",1);
      trackModeVsQ->setBinLabel(9,"ME2-3",1);
      trackModeVsQ->setBinLabel(10,"ME2-4",1);
      trackModeVsQ->setBinLabel(11,"ME3-4",1);
      trackModeVsQ->setBinLabel(12,"MB1-ME3",1);
      trackModeVsQ->setBinLabel(13,"MB1-ME2",1);
      trackModeVsQ->setBinLabel(14,"ME1-4",1);
      trackModeVsQ->setBinLabel(15,"MB1-ME1",1);
      trackModeVsQ->setBinLabel(16,"Halo Trigger",1);
      trackModeVsQ->setBinLabel(17,"MB1-ME1-2",1);
      trackModeVsQ->setBinLabel(18,"MB1-ME1-3",1);
      trackModeVsQ->setBinLabel(19,"MB1-ME2-3",1);

      trackModeVsQ->setAxisTitle("Quality",2);
      trackModeVsQ->setBinLabel(1,"0",2);
      trackModeVsQ->setBinLabel(2,"1",2);
      trackModeVsQ->setBinLabel(3,"2",2);
      trackModeVsQ->setBinLabel(4,"3",2);

      // Mode
      csctfTrackM = dbe->book1D("CSCTF_Track_Mode","CSC Track Mode", 19, -0.5, 18.5);
      csctfTrackM->setAxisTitle("Track Type", 1);
      csctfTrackM->setBinLabel(1,"No Track",1);
      csctfTrackM->setBinLabel(2,"Bad Phi/Single",1);
      csctfTrackM->setBinLabel(3,"ME1-2-3",1);
      csctfTrackM->setBinLabel(4,"ME1-2-4",1);
      csctfTrackM->setBinLabel(5,"ME1-3-4",1);
      csctfTrackM->setBinLabel(6,"ME2-3-4",1);
      csctfTrackM->setBinLabel(7,"ME1-2",1);
      csctfTrackM->setBinLabel(8,"ME1-3",1);
      csctfTrackM->setBinLabel(9,"ME2-3",1);
      csctfTrackM->setBinLabel(10,"ME2-4",1);
      csctfTrackM->setBinLabel(11,"ME3-4",1);
      csctfTrackM->setBinLabel(12,"MB1-ME3",1);
      csctfTrackM->setBinLabel(13,"MB1-ME2",1);
      csctfTrackM->setBinLabel(14,"ME1-4",1);
      csctfTrackM->setBinLabel(15,"MB1-ME1",1);
      csctfTrackM->setBinLabel(16,"Halo Trigger",1);
      csctfTrackM->setBinLabel(17,"MB1-ME1-2",1);
      csctfTrackM->setBinLabel(18,"MB1-ME1-3",1);
      csctfTrackM->setBinLabel(19,"MB1-ME2-3",1);
                
      // Chamber Occupancy
      csctfChamberOccupancies = dbe->book2D("CSCTF_Chamber_Occupancies","CSCTF Chamber Occupancies", 54, -0.05, 5.35, 10, -5.5, 4.5);
      csctfChamberOccupancies->setAxisTitle("Sector, (chambers 1-9 not labeled)",1);
      csctfChamberOccupancies->setBinLabel(1,"ME-4",2);
      csctfChamberOccupancies->setBinLabel(2,"ME-3",2);
      csctfChamberOccupancies->setBinLabel(3,"ME-2",2);
      csctfChamberOccupancies->setBinLabel(4,"ME-1b",2);
      csctfChamberOccupancies->setBinLabel(5,"ME-1a",2);
      csctfChamberOccupancies->setBinLabel(6,"ME+1a",2);
      csctfChamberOccupancies->setBinLabel(7,"ME+1b",2);
      csctfChamberOccupancies->setBinLabel(8,"ME+2",2);
      csctfChamberOccupancies->setBinLabel(9,"ME+3",2);
      csctfChamberOccupancies->setBinLabel(10,"ME+4",2);
      csctfChamberOccupancies->setBinLabel(1, "1",1);
      csctfChamberOccupancies->setBinLabel(10,"2",1);
      csctfChamberOccupancies->setBinLabel(19,"3",1);
      csctfChamberOccupancies->setBinLabel(28,"4",1);
      csctfChamberOccupancies->setBinLabel(37,"5",1);
      csctfChamberOccupancies->setBinLabel(46,"6",1);
                
      // Track Phi
      csctfTrackPhi = dbe->book1D("CSCTF_Track_Phi", "CSCTF Track #phi",144,0,2*M_PI);
      csctfTrackPhi->setAxisTitle("Track #phi", 1);

      // Track Eta
      csctfTrackEta = dbe->book1D("CSCTF_Track_Eta", "CSCTF Track #eta",64,-32,32);
      csctfTrackEta->setAxisTitle("Track #eta", 1);
      csctfTrackEta->setBinLabel( 1,"-2.5", 1);
      csctfTrackEta->setBinLabel( 8,"-2.1", 1);
      csctfTrackEta->setBinLabel(18,"-1.6", 1);
      csctfTrackEta->setBinLabel(26,"-1.2", 1);
      csctfTrackEta->setBinLabel(32,"-0.9", 1);
      csctfTrackEta->setBinLabel(33, "0.9", 1);
      csctfTrackEta->setBinLabel(39, "1.2", 1);
      csctfTrackEta->setBinLabel(47, "1.6", 1);
      csctfTrackEta->setBinLabel(57, "2.1", 1);
      csctfTrackEta->setBinLabel(64, "2.5", 1);

      // Track Eta Low Quality
      csctfTrackEtaLowQ = dbe->book1D("CSCTF_Track_Eta_LowQ", "CSCTF Track #eta LQ",64,-32,32);
      csctfTrackEtaLowQ->setAxisTitle("Track #eta", 1);
      csctfTrackEtaLowQ->setBinLabel( 1,"-2.5", 1);
      csctfTrackEtaLowQ->setBinLabel( 8,"-2.1", 1);
      csctfTrackEtaLowQ->setBinLabel(18,"-1.6", 1);
      csctfTrackEtaLowQ->setBinLabel(26,"-1.2", 1);
      csctfTrackEtaLowQ->setBinLabel(32,"-0.9", 1);
      csctfTrackEtaLowQ->setBinLabel(33, "0.9", 1);
      csctfTrackEtaLowQ->setBinLabel(39, "1.2", 1);
      csctfTrackEtaLowQ->setBinLabel(47, "1.6", 1);
      csctfTrackEtaLowQ->setBinLabel(57, "2.1", 1);
      csctfTrackEtaLowQ->setBinLabel(64, "2.5", 1);


      // Track Eta High Quality
      csctfTrackEtaHighQ = dbe->book1D("CSCTF_Track_Eta_HighQ", "CSCTF Track #eta HQ",64,-32,32);
      csctfTrackEtaHighQ->setAxisTitle("Track #eta", 1);
      csctfTrackEtaHighQ->setBinLabel( 1,"-2.5", 1);
      csctfTrackEtaHighQ->setBinLabel( 8,"-2.1", 1);
      csctfTrackEtaHighQ->setBinLabel(18,"-1.6", 1);
      csctfTrackEtaHighQ->setBinLabel(26,"-1.2", 1);
      csctfTrackEtaHighQ->setBinLabel(32,"-0.9", 1);
      csctfTrackEtaHighQ->setBinLabel(33, "0.9", 1);
      csctfTrackEtaHighQ->setBinLabel(39, "1.2", 1);
      csctfTrackEtaHighQ->setBinLabel(47, "1.6", 1);
      csctfTrackEtaHighQ->setBinLabel(57, "2.1", 1);
      csctfTrackEtaHighQ->setBinLabel(64, "2.5", 1);


      // Halo Phi 
      csctfTrackPhi_H = dbe->book1D("CSCTF_Track_Phi_H", "CSCTF Halo #phi",144,0,2*M_PI);
      csctfTrackPhi_H->setAxisTitle("Track #phi", 1);

      // Halo Eta 
      csctfTrackEta_H = dbe->book1D("CSCTF_Track_Eta_H", "CSCTF Halo #eta",64,-32,32);
      csctfTrackEta_H->setAxisTitle("Track #eta", 1);
      csctfTrackEta_H->setBinLabel( 1,"-2.5", 1);
      csctfTrackEta_H->setBinLabel( 8,"-2.1", 1);
      csctfTrackEta_H->setBinLabel(18,"-1.6", 1);
      csctfTrackEta_H->setBinLabel(26,"-1.2", 1);
      csctfTrackEta_H->setBinLabel(32,"-0.9", 1);
      csctfTrackEta_H->setBinLabel(33, "0.9", 1);
      csctfTrackEta_H->setBinLabel(39, "1.2", 1);
      csctfTrackEta_H->setBinLabel(47, "1.6", 1);
      csctfTrackEta_H->setBinLabel(57, "2.1", 1);
      csctfTrackEta_H->setBinLabel(64, "2.5", 1);
                
      // Track Timing
      csctfbx = dbe->book2D("CSCTF_bx","CSCTF BX", 12,1,13, 7,-3,3) ;
      csctfbx->setAxisTitle("Sector (Endcap)", 1);
      csctfbx->setBinLabel( 1," 1 (+)",1);
      csctfbx->setBinLabel( 2," 2 (+)",1);
      csctfbx->setBinLabel( 3," 3 (+)",1);
      csctfbx->setBinLabel( 4," 4 (+)",1);
      csctfbx->setBinLabel( 5," 5 (+)",1);
      csctfbx->setBinLabel( 6," 6 (+)",1);
      csctfbx->setBinLabel( 7," 7 (-)",1);
      csctfbx->setBinLabel( 8," 8 (-)",1);
      csctfbx->setBinLabel( 9," 9 (-)",1);
      csctfbx->setBinLabel(10,"10 (-)",1);
      csctfbx->setBinLabel(11,"11 (-)",1);
      csctfbx->setBinLabel(12,"12 (-)",1);
                
      csctfbx->setAxisTitle("CSCTF BX", 2);
      csctfbx->setBinLabel( 1, "-3", 2);
      csctfbx->setBinLabel( 2, "-2", 2);
      csctfbx->setBinLabel( 3, "-1", 2);
      csctfbx->setBinLabel( 4, "-0", 2);
      csctfbx->setBinLabel( 5, " 1", 2);
      csctfbx->setBinLabel( 6, " 2", 2);
      csctfbx->setBinLabel( 7, " 3", 2);

      // Halo Timing
      csctfbx_H = dbe->book2D("CSCTF_bx_H","CSCTF HALO BX", 12,1,13, 7,-3,3) ;
      csctfbx_H->setAxisTitle("Sector (Endcap)", 1);
      csctfbx_H->setBinLabel( 1," 1 (+)",1);
      csctfbx_H->setBinLabel( 2," 2 (+)",1);
      csctfbx_H->setBinLabel( 3," 3 (+)",1);
      csctfbx_H->setBinLabel( 4," 4 (+)",1);
      csctfbx_H->setBinLabel( 5," 5 (+)",1);
      csctfbx_H->setBinLabel( 6," 6 (+)",1);
      csctfbx_H->setBinLabel( 7," 7 (-)",1);
      csctfbx_H->setBinLabel( 8," 8 (-)",1);
      csctfbx_H->setBinLabel( 9," 9 (-)",1);
      csctfbx_H->setBinLabel(10,"10 (-)",1);
      csctfbx_H->setBinLabel(11,"11 (-)",1);
      csctfbx_H->setBinLabel(12,"12 (-)",1);
                
      csctfbx_H->setAxisTitle("CSCTF BX", 2);
      csctfbx_H->setBinLabel( 1, "-3", 2);
      csctfbx_H->setBinLabel( 2, "-2", 2);
      csctfbx_H->setBinLabel( 3, "-1", 2);
      csctfbx_H->setBinLabel( 4, "-0", 2);
      csctfbx_H->setBinLabel( 5, " 1", 2);
      csctfbx_H->setBinLabel( 6, " 2", 2);
      csctfbx_H->setBinLabel( 7, " 3", 2);

      // Number of Tracks Stubs
      cscTrackStubNumbers = dbe->book1D("CSCTF_TrackStubs", "Number of Stubs in CSCTF Tracks", 5, 0, 5);
      cscTrackStubNumbers->setBinLabel( 1, "0", 1);
      cscTrackStubNumbers->setBinLabel( 2, "1", 1);
      cscTrackStubNumbers->setBinLabel( 3, "2", 1);
      cscTrackStubNumbers->setBinLabel( 4, "3", 1);
      cscTrackStubNumbers->setBinLabel( 5, "4", 1);

      // Number of Tracks       
      csctfntrack = dbe->book1D("CSCTF_ntrack","Number of CSCTracks found per event", 5, 0, 5 ) ;
      csctfntrack->setBinLabel( 1, "0", 1);
      csctfntrack->setBinLabel( 2, "1", 1);
      csctfntrack->setBinLabel( 3, "2", 1);
      csctfntrack->setBinLabel( 4, "3", 1);
      csctfntrack->setBinLabel( 5, "4", 1);
    }
 
  char hname [200];
  char htitle[200];

  for(int i=0; i<12; i++) {
    
    sprintf(hname ,"DTstubsTimeTrackMenTimeArrival_%d",i+1);
    sprintf(htitle,"T_{track} - T_{DT stub} sector %d",i+1);
 
    DTstubsTimeTrackMenTimeArrival[i] = dbe->book2D(hname,htitle, 7,-3,3, 2,1,3);
    DTstubsTimeTrackMenTimeArrival[i]->getTH2F()->SetMinimum(0);
    
    // axis makeup
    DTstubsTimeTrackMenTimeArrival[i]->setAxisTitle("bx_{CSC track} - bx_{DT stub}",1);
    DTstubsTimeTrackMenTimeArrival[i]->setAxisTitle("subsector",2);

    DTstubsTimeTrackMenTimeArrival[i]->setBinLabel(1,"-3",1);
    DTstubsTimeTrackMenTimeArrival[i]->setBinLabel(2,"-2",1);
    DTstubsTimeTrackMenTimeArrival[i]->setBinLabel(3,"-1",1);
    DTstubsTimeTrackMenTimeArrival[i]->setBinLabel(4, "0",1);
    DTstubsTimeTrackMenTimeArrival[i]->setBinLabel(5,"+1",1);
    DTstubsTimeTrackMenTimeArrival[i]->setBinLabel(6,"+2",1);
    DTstubsTimeTrackMenTimeArrival[i]->setBinLabel(7,"+3",1);

    DTstubsTimeTrackMenTimeArrival[i]->setBinLabel(1,"sub1",2);
    DTstubsTimeTrackMenTimeArrival[i]->setBinLabel(2,"sub2",2);

  } 

}
void L1TCSCTF::endJob ( void  ) [protected, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 404 of file L1TCSCTF.cc.

References dbe, nev_, outputFile_, DQMStore::save(), and verbose_.

{

  if(verbose_) edm::LogInfo("DataNotFound") << "L1TCSCTF: end job...." << endl;
  LogInfo("EndJob") << "analyzed " << nev_ << " events";

  if ( outputFile_.size() != 0  && dbe ) dbe->save(outputFile_);

  return;
}

Member Data Documentation

int L1TCSCTF::BxInEvent_ [private]

Definition at line 104 of file L1TCSCTF.h.

Referenced by analyze().

Definition at line 99 of file L1TCSCTF.h.

Definition at line 77 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 78 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 89 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 80 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 76 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 81 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 82 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 91 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 95 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 93 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 92 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 97 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 90 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 94 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 96 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

DQMStore* L1TCSCTF::dbe [private]

Definition at line 74 of file L1TCSCTF.h.

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

Definition at line 103 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 114 of file L1TCSCTF.h.

Referenced by analyze().

bool L1TCSCTF::isCSCcand_ [private]

Definition at line 105 of file L1TCSCTF.h.

Referenced by analyze().

int L1TCSCTF::L1ABXN [private]

Definition at line 107 of file L1TCSCTF.h.

Referenced by analyze().

Definition at line 114 of file L1TCSCTF.h.

Referenced by analyze().

ofstream L1TCSCTF::logFile_ [private]

Definition at line 113 of file L1TCSCTF.h.

unsigned long long L1TCSCTF::m_ptScaleCacheID [private]

Definition at line 121 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

unsigned long long L1TCSCTF::m_scalesCacheID [private]

Definition at line 120 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 114 of file L1TCSCTF.h.

Referenced by analyze().

bool L1TCSCTF::monitorDaemon_ [private]

Definition at line 112 of file L1TCSCTF.h.

int L1TCSCTF::nev_ [private]

Definition at line 109 of file L1TCSCTF.h.

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

std::string L1TCSCTF::outputFile_ [private]

Definition at line 110 of file L1TCSCTF.h.

Referenced by endJob(), and L1TCSCTF().

Definition at line 116 of file L1TCSCTF.h.

Referenced by analyze(), L1TCSCTF(), and ~L1TCSCTF().

Definition at line 114 of file L1TCSCTF.h.

Referenced by analyze().

Definition at line 119 of file L1TCSCTF.h.

Referenced by analyze().

Definition at line 98 of file L1TCSCTF.h.

Referenced by analyze(), and beginJob().

Definition at line 114 of file L1TCSCTF.h.

Referenced by analyze().

const L1MuTriggerScales* L1TCSCTF::ts [private]

Definition at line 118 of file L1TCSCTF.h.

Referenced by analyze().

bool L1TCSCTF::verbose_ [private]

Definition at line 111 of file L1TCSCTF.h.

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