CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

HcalTimingMonitorModule Class Reference

#include <DQM/HcalMonitorModule/src/HcalTimingMonitorModule.cc>

Inheritance diagram for HcalTimingMonitorModule:
edm::EDAnalyzer

List of all members.

Public Member Functions

 HcalTimingMonitorModule (const edm::ParameterSet &)
void initialize ()
 ~HcalTimingMonitorModule ()

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob ()
virtual void endJob ()
double get_ped_hbhe (int eta, int phi, int depth, int cup)
double get_ped_hf (int eta, int phi, int depth, int cup)
double get_ped_ho (int eta, int phi, int depth, int cup)
double GetTime (double *data, int n)
bool isSignal (double *data, int n)
void set_hbhe (int eta, int phi, int depth, int cap, float val)
void set_hf (int eta, int phi, int depth, int cap, float val)
void set_ho (int eta, int phi, int depth, int cap, float val)

Private Attributes

bool CosmicsCorr_
int counterEvt_
MonitorElementCSCcand
DQMStoredbe_
bool Debug_
MonitorElementDTcand
int GCTTriggerBit1_
int GCTTriggerBit2_
int GCTTriggerBit3_
int GCTTriggerBit4_
int GCTTriggerBit5_
MonitorElementHBEnergy
double HBHE [100][73][5][4]
MonitorElementHBShapeDT
MonitorElementHBShapeGCT
MonitorElementHBShapeRPC
MonitorElementHBTimeDT
MonitorElementHBTimeGCT
MonitorElementHBTimeRPC
MonitorElementHEEnergy
MonitorElementHEShapeCSCm
MonitorElementHEShapeCSCp
MonitorElementHETimeCSCm
MonitorElementHETimeCSCp
double HF [100][73][5][4]
MonitorElementHFEnergy
MonitorElementHFShapeCSCm
MonitorElementHFShapeCSCp
MonitorElementHFTimeCSCm
MonitorElementHFTimeCSCp
double HO [100][73][5][4]
MonitorElementHOEnergy
MonitorElementHOShapeDT
MonitorElementHOShapeGCT
MonitorElementHOShapeRPC
MonitorElementHOTimeDT
MonitorElementHOTimeGCT
MonitorElementHOTimeRPC
std::string L1ADataLabel
std::string monitorName_
double nHBHE [100][73][5][4]
double nHF [100][73][5][4]
double nHO [100][73][5][4]
MonitorElementOR
edm::ParameterSet parameters_
int prescaleEvt_
int prescaleLS_
MonitorElementRPCbcand
MonitorElementRPCfcand
int run_number
int TrigCSC
int TrigDT
int TrigGCT
int TrigRPC

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 77 of file HcalTimingMonitorModule.cc.


Constructor & Destructor Documentation

HcalTimingMonitorModule::HcalTimingMonitorModule ( const edm::ParameterSet iConfig) [explicit]

Definition at line 201 of file HcalTimingMonitorModule.cc.

References DQMStore::book2D(), DQMStore::bookFloat(), CosmicsCorr_, counterEvt_, dbe_, Debug_, MonitorElement::Fill(), GCTTriggerBit1_, GCTTriggerBit2_, GCTTriggerBit3_, GCTTriggerBit4_, GCTTriggerBit5_, MonitorElement::getTH2F(), edm::ParameterSet::getUntrackedParameter(), initialize(), L1ADataLabel, monitorName_, cppFunctionSkipper::operator, parameters_, prescaleEvt_, prescaleLS_, run_number, DQMStore::setCurrentFolder(), TrigCSC, TrigDT, TrigGCT, and TrigRPC.

                                                                              {
  std::string str;   
   parameters_ = iConfig;
   dbe_ = edm::Service<DQMStore>().operator->();
   // Base folder for the contents of this job
   std::string subsystemname = parameters_.getUntrackedParameter<std::string>("subSystemFolder", "HcalTiming") ;
   
   monitorName_ = parameters_.getUntrackedParameter<std::string>("monitorName","HcalTiming");
   if (monitorName_ != "" ) monitorName_ =subsystemname+"/"+monitorName_+"/" ;
   counterEvt_=0;
   
   // some currently dummy things for compartability with GUI
   dbe_->setCurrentFolder(subsystemname+"/EventInfo/");
   str="reportSummary";
   dbe_->bookFloat(str)->Fill(1);     // Unknown status by default
   str="reportSummaryMap";
   MonitorElement* me=dbe_->book2D(str,str,5,0,5,1,0,1); // Unknown status by default
   TH2F* myhist=me->getTH2F();
   myhist->GetXaxis()->SetBinLabel(1,"HB");
   myhist->GetXaxis()->SetBinLabel(2,"HE");
   myhist->GetXaxis()->SetBinLabel(3,"HO");
   myhist->GetXaxis()->SetBinLabel(4,"HF");
   myhist->GetYaxis()->SetBinLabel(1,"Status");
   // Unknown status by default
   myhist->SetBinContent(1,1,-1);
   myhist->SetBinContent(2,1,-1);
   myhist->SetBinContent(3,1,-1);
   myhist->SetBinContent(4,1,-1);
   // Add ZDC at some point
   myhist->GetXaxis()->SetBinLabel(5,"ZDC");
   myhist->SetBinContent(5,1,-1); // no ZDC info known
   myhist->SetOption("textcolz");
     
   run_number=0;
   TrigCSC=TrigDT=TrigRPC=TrigGCT=0;
   L1ADataLabel   = iConfig.getUntrackedParameter<std::string>("L1ADataLabel" , "l1GtUnpack");
   prescaleLS_    = parameters_.getUntrackedParameter<int>("prescaleLS",  1);
   prescaleEvt_   = parameters_.getUntrackedParameter<int>("prescaleEvt", 1);
   GCTTriggerBit1_= parameters_.getUntrackedParameter<int>("GCTTriggerBit1", -1);         
   GCTTriggerBit2_= parameters_.getUntrackedParameter<int>("GCTTriggerBit2", -1);         
   GCTTriggerBit3_= parameters_.getUntrackedParameter<int>("GCTTriggerBit3", -1);         
   GCTTriggerBit4_= parameters_.getUntrackedParameter<int>("GCTTriggerBit4", -1);         
   GCTTriggerBit5_= parameters_.getUntrackedParameter<int>("GCTTriggerBit5", -1);         
   CosmicsCorr_   = parameters_.getUntrackedParameter<bool>("CosmicsCorr", true); 
   Debug_         = parameters_.getUntrackedParameter<bool>("Debug", true);    
   initialize();
}
HcalTimingMonitorModule::~HcalTimingMonitorModule ( )

Definition at line 249 of file HcalTimingMonitorModule.cc.

{}

Member Function Documentation

void HcalTimingMonitorModule::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 295 of file HcalTimingMonitorModule.cc.

References adc2fC, CosmicsCorr_, counterEvt_, CSCcand, data, Debug_, DTcand, relval_parameters_module::energy, eta(), MonitorElement::Fill(), HcalObjRepresent::Fill(), GCTTriggerBit1_, GCTTriggerBit2_, GCTTriggerBit3_, GCTTriggerBit4_, GCTTriggerBit5_, get_ped_hbhe(), get_ped_hf(), get_ped_ho(), edm::Event::getByLabel(), edm::Event::getByType(), L1MuGMTReadoutCollection::getRecords(), GetTime(), HBEnergy, HBShapeDT, HBShapeGCT, HBShapeRPC, HBTimeDT, HBTimeGCT, HBTimeRPC, HcalBarrel, HcalEndcap, HEEnergy, HEShapeCSCm, HEShapeCSCp, HETimeCSCm, HETimeCSCp, HFEnergy, HFShapeCSCm, HFShapeCSCp, HFTimeCSCm, HFTimeCSCp, HOEnergy, HOShapeDT, HOShapeGCT, HOShapeRPC, HOTimeDT, HOTimeGCT, HOTimeRPC, i, edm::EventBase::id(), isSignal(), edm::HandleBase::isValid(), L1ADataLabel, MAXCSC, MAXDTBX, MAXRPC, N, OR, phi, prescaleEvt_, edm::Handle< T >::product(), RPCbcand, RPCfcand, edm::EventID::run(), run_number, set_hbhe(), set_hf(), set_ho(), funct::sin(), TRIG_CSC, TRIG_DT, TRIG_GCT, TRIG_RPC, TrigCSC, TrigDT, TrigGCT, and TrigRPC.

                                                                                        {
int HBcnt=0,HEcnt=0,HOcnt=0,HFcnt=0,eta,phi,depth,nTS;
int TRIGGER=0;
   counterEvt_++;
   if (prescaleEvt_<1)  return;
   if (counterEvt_%prescaleEvt_!=0)  return;

   run_number=iEvent.id().run();
   // Check GCT trigger bits
   edm::Handle< L1GlobalTriggerReadoutRecord > gtRecord;
   
   if (!iEvent.getByLabel( L1ADataLabel, gtRecord))
     return;
   const TechnicalTriggerWord tWord = gtRecord->technicalTriggerWord();
   const DecisionWord         dWord = gtRecord->decisionWord();
   //bool HFselfTrigger   = tWord.at(9);
   //bool HOselfTrigger   = tWord.at(11);
   bool GCTTrigger1      = dWord.at(GCTTriggerBit1_);     
   bool GCTTrigger2      = dWord.at(GCTTriggerBit2_);     
   bool GCTTrigger3      = dWord.at(GCTTriggerBit3_);     
   bool GCTTrigger4      = dWord.at(GCTTriggerBit4_);     
   bool GCTTrigger5      = dWord.at(GCTTriggerBit5_);     
   if(GCTTrigger1 || GCTTrigger2 || GCTTrigger3 || GCTTrigger4 || GCTTrigger5){ TrigGCT++; TRIGGER=+TRIG_GCT; }
   
   // define trigger trigger source (example from GMT group)
   edm::Handle<L1MuGMTReadoutCollection> gmtrc_handle; 
   if (!iEvent.getByLabel(L1ADataLabel,gmtrc_handle)) return;
   L1MuGMTReadoutCollection const* gmtrc = gmtrc_handle.product();
   
        int idt   =0;
        int icsc  =0;
        int irpcb =0;
        int irpcf =0;
        int ndt[5]   = {0,0,0,0,0};
        int ncsc[5]  = {0,0,0,0,0};
        int nrpcb[5] = {0,0,0,0,0};
        int nrpcf[5] = {0,0,0,0,0};
        int N;
                
        std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
        std::vector<L1MuGMTReadoutRecord>::const_iterator igmtrr;
        N=0;
        for(igmtrr=gmt_records.begin(); igmtrr!=gmt_records.end(); igmtrr++) {
                std::vector<L1MuRegionalCand>::const_iterator iter1;
                std::vector<L1MuRegionalCand> rmc;
                // DTBX Trigger
                rmc = igmtrr->getDTBXCands(); 
                for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
                        if ( idt < MAXDTBX && !(*iter1).empty() ) {
                                idt++; 
                                if(N<5) ndt[N]++; 
                                 
                        }        
                }
                // CSC Trigger
                rmc = igmtrr->getCSCCands(); 
                for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
                        if ( icsc < MAXCSC && !(*iter1).empty() ) {
                                icsc++; 
                                if(N<5) ncsc[N]++; 
                        } 
                }
                // RPCb Trigger
                rmc = igmtrr->getBrlRPCCands();
                for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
                        if ( irpcb < MAXRPC && !(*iter1).empty() ) {
                                irpcb++;
                                if(N<5) nrpcb[N]++;
                                
                        }  
                }
                // RPCfwd Trigger
                rmc = igmtrr->getFwdRPCCands();
                for(iter1=rmc.begin(); iter1!=rmc.end(); iter1++) {
                        if ( irpcf < MAXRPC && !(*iter1).empty() ) {
                                irpcf++;
                                if(N<5) nrpcf[N]++;
                                
                        }  
                }
                
                N++;
        }
        if(ndt[0]) DTcand->Fill(0);
        if(ndt[1]) DTcand->Fill(1);
        if(ndt[2]) DTcand->Fill(2);
        if(ndt[3]) DTcand->Fill(3);
        if(ndt[4]) DTcand->Fill(4);
        if(ncsc[0]) CSCcand->Fill(0);
        if(ncsc[1]) CSCcand->Fill(1);
        if(ncsc[2]) CSCcand->Fill(2);
        if(ncsc[3]) CSCcand->Fill(3);
        if(ncsc[4]) CSCcand->Fill(4);
        if(nrpcb[0]) RPCbcand->Fill(0);
        if(nrpcb[1]) RPCbcand->Fill(1);
        if(nrpcb[2]) RPCbcand->Fill(2);
        if(nrpcb[3]) RPCbcand->Fill(3);
        if(nrpcb[4]) RPCbcand->Fill(4);
        if(nrpcf[0]) RPCfcand->Fill(0);
        if(nrpcf[1]) RPCfcand->Fill(1);
        if(nrpcf[2]) RPCfcand->Fill(2);
        if(nrpcf[3]) RPCfcand->Fill(3);
        if(nrpcf[4]) RPCfcand->Fill(4);
        if(ndt[0]||nrpcb[0]||nrpcf[0]||ncsc[0]) OR->Fill(0);
        if(ndt[1]||nrpcb[1]||nrpcf[1]||ncsc[1]) OR->Fill(1);
        if(ndt[2]||nrpcb[2]||nrpcf[2]||ncsc[2]) OR->Fill(2);
        if(ndt[3]||nrpcb[3]||nrpcf[3]||ncsc[3]) OR->Fill(3);
        if(ndt[4]||nrpcb[4]||nrpcf[4]||ncsc[4]) OR->Fill(4);
        
        if(ncsc[1]>0 ) { TrigCSC++;   TRIGGER=+TRIG_CSC;  }
        if(ndt[1]>0  ) { TrigDT++;    TRIGGER=+TRIG_DT;   }
        if(nrpcb[1]>0) { TrigRPC++;   TRIGGER=+TRIG_RPC;  }

   if(counterEvt_<100){
     edm::Handle<HBHEDigiCollection> hbhe; 
     iEvent.getByType(hbhe);
     if (hbhe.isValid())
       {
         for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
           eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
           if(digi->id().subdet()==HcalBarrel) HBcnt++;
           if(digi->id().subdet()==HcalEndcap) HEcnt++;
           for(int i=0;i<nTS;i++)
             if(digi->sample(i).adc()<20) set_hbhe(eta,phi,depth,digi->sample(i).capid(),adc2fC[digi->sample(i).adc()]);
         } 
       }  
     edm::Handle<HODigiCollection> ho; 
     iEvent.getByType(ho);
     if (ho.isValid())
     {
       for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
         eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
         HOcnt++;
         for(int i=0;i<nTS;i++)
                if(digi->sample(i).adc()<20) set_ho(eta,phi,depth,digi->sample(i).capid(),adc2fC[digi->sample(i).adc()]);
       }   
     } // if

     edm::Handle<HFDigiCollection> hf;
     iEvent.getByType(hf);
     if (hf.isValid())
       {
         for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
           eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
           HFcnt++;
           for(int i=0;i<nTS;i++) 
             if(digi->sample(i).adc()<20) set_hf(eta,phi,depth,digi->sample(i).capid(),adc2fC[digi->sample(i).adc()]);
         }   
       }
   } // if (counterEvt<100)
   else{
      double data[10];
      
      edm::Handle<HBHEDigiCollection> hbhe; 
      iEvent.getByType(hbhe);
      if (hbhe.isValid())
        {
          for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
            eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
            if(nTS>10) nTS=10;
            if(digi->id().subdet()==HcalBarrel) HBcnt++;
            if(digi->id().subdet()==HcalEndcap) HEcnt++;
            double energy=0;
            for(int i=0;i<nTS;i++){
              data[i]=adc2fC[digi->sample(i).adc()]-get_ped_hbhe(eta,phi,depth,digi->sample(i).capid());
              energy+=data[i];
            }
            if(digi->id().subdet()==HcalBarrel) HBEnergy->Fill(energy); 
            if(digi->id().subdet()==HcalEndcap) HEEnergy->Fill(energy); 
            if(!isSignal(data,nTS)) continue;
            for(int i=0;i<nTS;i++){
              if(data[i]>-1.0){
                if(digi->id().subdet()==HcalBarrel && (TRIGGER|TRIG_DT)==TRIG_DT)             HBShapeDT->Fill(i,data[i]);
                if(digi->id().subdet()==HcalBarrel && (TRIGGER|TRIG_RPC)==TRIG_RPC)           HBShapeRPC->Fill(i,data[i]);
                if(digi->id().subdet()==HcalBarrel && (TRIGGER|TRIG_GCT)==TRIG_GCT)           HBShapeGCT->Fill(i,data[i]); 
                if(digi->id().subdet()==HcalEndcap && (TRIGGER|TRIG_CSC)==TRIG_CSC && eta>0)  HEShapeCSCp->Fill(i,data[i]);
                if(digi->id().subdet()==HcalEndcap && (TRIGGER|TRIG_CSC)==TRIG_CSC && eta<0)  HEShapeCSCm->Fill(i,data[i]);   
              }  
            }
            double Time=GetTime(data,nTS);
            if(digi->id().subdet()==HcalBarrel){
              if(CosmicsCorr_) Time+=(7.5*sin((phi*5.0)/180.0*3.14159))/25.0;
              if((TRIGGER&TRIG_DT)==TRIG_DT)  HBTimeDT ->Fill(GetTime(data,nTS));
              if((TRIGGER&TRIG_RPC)==TRIG_RPC) HBTimeRPC->Fill(GetTime(data,nTS));
              if((TRIGGER&TRIG_GCT)==TRIG_GCT) HBTimeGCT->Fill(GetTime(data,nTS));
            }else{
              if(CosmicsCorr_) Time+=(3.5*sin((phi*5.0)/180.0*3.14159))/25.0; 
              if(digi->id().subdet()==HcalEndcap && (TRIGGER&TRIG_CSC)==TRIG_CSC && eta>0) HETimeCSCp->Fill(Time);
              if(digi->id().subdet()==HcalEndcap && (TRIGGER&TRIG_CSC)==TRIG_CSC && eta<0) HETimeCSCm->Fill(Time);  
            }
          }    
        } // if (...)

      edm::Handle<HODigiCollection> ho; 
      iEvent.getByType(ho);
      if (ho.isValid())
        {
          for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
            eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
            if(nTS>10) nTS=10;
            HOcnt++; 
            double energy=0;
            for(int i=0;i<nTS;i++){
              data[i]=adc2fC[digi->sample(i).adc()]-get_ped_ho(eta,phi,depth,digi->sample(i).capid());
              energy+=data[i];
            }     
            HOEnergy->Fill(energy); 
            if(!isSignal(data,nTS)) continue;
            for(int i=0;i<nTS;i++){
              if(data[i]>-1.0){
                if((TRIGGER&TRIG_DT)==TRIG_DT)    HOShapeDT->Fill(i,data[i]);
                if((TRIGGER&TRIG_RPC)==TRIG_RPC)  HOShapeRPC->Fill(i,data[i]);
                if((TRIGGER&TRIG_GCT)==TRIG_GCT)  HOShapeGCT->Fill(i,data[i]);       
              }
            }  
            double Time=GetTime(data,nTS);
            if(CosmicsCorr_) Time+=(12.0*sin((phi*5.0)/180.0*3.14159))/25.0;    
            if((TRIGGER&TRIG_DT)==TRIG_DT)   HOTimeDT->Fill(Time);
            if((TRIGGER&TRIG_RPC)==TRIG_RPC) HOTimeRPC->Fill(Time);
            if((TRIGGER&TRIG_GCT)==TRIG_GCT) HOTimeGCT->Fill(Time);
          }   
        }// if (ho)

      edm::Handle<HFDigiCollection> hf; 
      iEvent.getByType(hf);
      if (hf.isValid())
        {
          for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
            eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
            if(nTS>10) nTS=10;
            HFcnt++; 
            double energy=0;
            for(int i=0;i<nTS;i++){
               data[i]=adc2fC[digi->sample(i).adc()]-get_ped_hf(eta,phi,depth,digi->sample(i).capid());
               energy+=data[i]; 
            }
            HFEnergy->Fill(energy); 
            if(energy<15.0) continue;
            for(int i=0;i<nTS;i++){
              if(data[i]>-1.0){
                if((TRIGGER&TRIG_CSC)==TRIG_CSC && eta>0)  HFShapeCSCp->Fill(i,data[i]); 
                if((TRIGGER&TRIG_CSC)==TRIG_CSC && eta<0)  HFShapeCSCm->Fill(i,data[i]);    
              } 
            }
            if((TRIGGER&TRIG_CSC)==TRIG_CSC && eta>0) HFTimeCSCp->Fill(GetTime(data,nTS)); 
            if((TRIGGER&TRIG_CSC)==TRIG_CSC && eta<0) HFTimeCSCm->Fill(GetTime(data,nTS)); 
        }   
        } // if (hf)
   }
   if(Debug_) if((counterEvt_%100)==0) printf("Run: %i,Events processed: %i (HB: %i towers,HE: %i towers,HO: %i towers,HF: %i towers)"
                                        " CSC: %i DT: %i RPC: %i GCT: %i\n",
                                        run_number,counterEvt_,HBcnt,HEcnt,HOcnt,HFcnt,TrigCSC,TrigDT,TrigRPC,TrigGCT);
}
void HcalTimingMonitorModule::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 252 of file HcalTimingMonitorModule.cc.

{}
void HcalTimingMonitorModule::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 254 of file HcalTimingMonitorModule.cc.

{}
double HcalTimingMonitorModule::get_ped_hbhe ( int  eta,
int  phi,
int  depth,
int  cup 
) [inline, private]

Definition at line 124 of file HcalTimingMonitorModule.cc.

References HBHE, nHBHE, and phi.

Referenced by analyze().

                                                           {
      if(nHBHE[eta+50][phi][depth][cup]<10) return 2.5; 
      if(nHBHE[eta+50][phi][depth][cup]!=0){
         double ped=HBHE[eta+50][phi][depth][cup]/nHBHE[eta+50][phi][depth][cup];
         if(ped>1.5 && ped<4.5) return ped;
      } 
      return 99999; 
     }   
double HcalTimingMonitorModule::get_ped_hf ( int  eta,
int  phi,
int  depth,
int  cup 
) [inline, private]

Definition at line 140 of file HcalTimingMonitorModule.cc.

References HF, nHF, and phi.

Referenced by analyze().

                                                         {
      if(nHF[eta+50][phi][depth][cup]<10) return 2.5; 
      if(nHF[eta+50][phi][depth][cup]!=0){
         double ped=HF[eta+50][phi][depth][cup]/nHF[eta+50][phi][depth][cup];
         if(ped>1.5 && ped<4.5) return ped;
      }
      return 99999; 
     }   
double HcalTimingMonitorModule::get_ped_ho ( int  eta,
int  phi,
int  depth,
int  cup 
) [inline, private]

Definition at line 132 of file HcalTimingMonitorModule.cc.

References HO, nHO, and phi.

Referenced by analyze().

                                                         {
      if(nHO[eta+50][phi][depth][cup]<10) return 2.5; 
      if(nHO[eta+50][phi][depth][cup]!=0){
         double ped=HO[eta+50][phi][depth][cup]/nHO[eta+50][phi][depth][cup];
         if(ped>1.5 && ped<4.5) return ped;
      }
      return 99999; 
     }   
double HcalTimingMonitorModule::GetTime ( double *  data,
int  n 
) [inline, private]

Definition at line 88 of file HcalTimingMonitorModule.cc.

References j, and n.

Referenced by analyze().

                                        {
             int MaxI=-100; double Time=0,SumT=0,MaxT=-10;
             for(int j=0;j<n;++j) if(MaxT<data[j]){ MaxT=data[j]; MaxI=j; }
             if (MaxI>=0)
               {
                 Time=MaxI*data[MaxI];
                 SumT=data[MaxI];
                 if(MaxI>0){ Time+=(MaxI-1)*data[MaxI-1]; SumT+=data[MaxI-1]; }
                 if(MaxI<(n-1)){ Time+=(MaxI+1)*data[MaxI+1]; SumT+=data[MaxI+1]; }
                 Time=Time/SumT;
               }
             return Time;
      }
void HcalTimingMonitorModule::initialize ( )

Definition at line 256 of file HcalTimingMonitorModule.cc.

References DQMStore::book1D(), CSCcand, dbe_, DTcand, HBEnergy, HBShapeDT, HBShapeGCT, HBShapeRPC, HBTimeDT, HBTimeGCT, HBTimeRPC, HEEnergy, HEShapeCSCm, HEShapeCSCp, HETimeCSCm, HETimeCSCp, HFEnergy, HFShapeCSCm, HFShapeCSCp, HFTimeCSCm, HFTimeCSCp, HOEnergy, HOShapeDT, HOShapeGCT, HOShapeRPC, HOTimeDT, HOTimeGCT, HOTimeRPC, monitorName_, OR, RPCbcand, RPCfcand, and DQMStore::setCurrentFolder().

Referenced by HcalTimingMonitorModule().

                                        {
  std::string str;
  dbe_->setCurrentFolder(monitorName_+"DebugPlots");
  str="L1MuGMTReadoutRecord_getDTBXCands";   DTcand  =dbe_->book1D(str,str,5,-0.5,4.5);
  str="L1MuGMTReadoutRecord_getBrlRPCCands"; RPCbcand=dbe_->book1D(str,str,5,-0.5,4.5);
  str="L1MuGMTReadoutRecord_getFwdRPCCands"; RPCfcand=dbe_->book1D(str,str,5,-0.5,4.5);
  str="L1MuGMTReadoutRecord_getCSCCands";    CSCcand =dbe_->book1D(str,str,5,-0.5,4.5);
  str="DT_OR_RPCb_OR_RPCf_OR_CSC";           OR      =dbe_->book1D(str,str,5,-0.5,4.5);
  
  str="HB Tower Energy (LinADC-PED)"; HBEnergy=dbe_->book1D(str,str,1000,-10,90);
  str="HE Tower Energy (LinADC-PED)"; HEEnergy=dbe_->book1D(str,str,1000,-10,90);
  str="HO Tower Energy (LinADC-PED)"; HOEnergy=dbe_->book1D(str,str,1000,-10,90);
  str="HF Tower Energy (LinADC-PED)"; HFEnergy=dbe_->book1D(str,str,1000,-10,90);
  
  dbe_->setCurrentFolder(monitorName_+"ShapePlots");
  str="HB Shape (DT Trigger)";        HBShapeDT  =dbe_->book1D(str,str,10,-0.5,9.5); 
  str="HB Shape (RPC Trigger)";       HBShapeRPC =dbe_->book1D(str,str,10,-0.5,9.5); 
  str="HB Shape (GCT Trigger)";       HBShapeGCT =dbe_->book1D(str,str,10,-0.5,9.5); 
  str="HO Shape (DT Trigger)";        HOShapeDT  =dbe_->book1D(str,str,10,-0.5,9.5); 
  str="HO Shape (RPC Trigger)";       HOShapeRPC =dbe_->book1D(str,str,10,-0.5,9.5); 
  str="HO Shape (GCT Trigger)";       HOShapeGCT =dbe_->book1D(str,str,10,-0.5,9.5); 
  str="HE+ Shape (CSC Trigger)";      HEShapeCSCp=dbe_->book1D(str,str,10,-0.5,9.5); 
  str="HE- Shape (CSC Trigger)";      HEShapeCSCm=dbe_->book1D(str,str,10,-0.5,9.5); 
  str="HF+ Shape (CSC Trigger)";      HFShapeCSCp=dbe_->book1D(str,str,10,-0.5,9.5); 
  str="HF- Shape (CSC Trigger)";      HFShapeCSCm=dbe_->book1D(str,str,10,-0.5,9.5); 
  
  dbe_->setCurrentFolder(monitorName_+"TimingPlots");
  str="HB Timing (DT Trigger)";       HBTimeDT   =dbe_->book1D(str,str,100,0,10);
  str="HB Timing (RPC Trigger)";      HBTimeRPC  =dbe_->book1D(str,str,100,0,10);
  str="HB Timing (GCT Trigger)";      HBTimeGCT  =dbe_->book1D(str,str,100,0,10);
  str="HO Timing (DT Trigger)";       HOTimeDT   =dbe_->book1D(str,str,100,0,10);
  str="HO Timing (RPC Trigger)";      HOTimeRPC  =dbe_->book1D(str,str,100,0,10);
  str="HO Timing (GCT Trigger)";      HOTimeGCT  =dbe_->book1D(str,str,100,0,10);
  str="HE+ Timing (CSC Trigger)";     HETimeCSCp =dbe_->book1D(str,str,100,0,10);
  str="HE- Timing (CSC Trigger)";     HETimeCSCm =dbe_->book1D(str,str,100,0,10);
  str="HF+ Timing (CSC Trigger)";     HFTimeCSCp =dbe_->book1D(str,str,100,0,10);
  str="HF- Timing (CSC Trigger)";     HFTimeCSCm =dbe_->book1D(str,str,100,0,10);
}
bool HcalTimingMonitorModule::isSignal ( double *  data,
int  n 
) [inline, private]

Definition at line 101 of file HcalTimingMonitorModule.cc.

References i, and max().

Referenced by analyze().

                                       {
        int Imax=-1; double max=-100;
        for(int i=0;i<n;i++) if(data[i]>max){max=data[i]; Imax=i;}
        if(Imax==0 && Imax==(n-1)) return false;
        float sum=data[Imax-1]+data[Imax+1];
        if(data[Imax]>5.5 && sum>(data[Imax]*0.20)) return true;
        return false;
     }
void HcalTimingMonitorModule::set_hbhe ( int  eta,
int  phi,
int  depth,
int  cap,
float  val 
) [inline, private]

Definition at line 112 of file HcalTimingMonitorModule.cc.

References HBHE, nHBHE, and phi.

Referenced by analyze().

                                                               {
       HBHE[eta+50][phi][depth][cap]+=val;
       nHBHE[eta+50][phi][depth][cap]+=1.0;
     }   
void HcalTimingMonitorModule::set_hf ( int  eta,
int  phi,
int  depth,
int  cap,
float  val 
) [inline, private]

Definition at line 120 of file HcalTimingMonitorModule.cc.

References HF, nHF, and phi.

Referenced by analyze().

                                                             {
       HF[eta+50][phi][depth][cap]+=val;
       nHF[eta+50][phi][depth][cap]+=1.0;
     }
void HcalTimingMonitorModule::set_ho ( int  eta,
int  phi,
int  depth,
int  cap,
float  val 
) [inline, private]

Definition at line 116 of file HcalTimingMonitorModule.cc.

References HO, nHO, and phi.

Referenced by analyze().

                                                             {
       HO[eta+50][phi][depth][cap]+=val;
       nHO[eta+50][phi][depth][cap]+=1.0;
     }   

Member Data Documentation

Definition at line 170 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 156 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 174 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 162 of file HcalTimingMonitorModule.cc.

Referenced by HcalTimingMonitorModule(), and initialize().

Definition at line 171 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 174 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 165 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 166 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 167 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 168 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 169 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 173 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

double HcalTimingMonitorModule::HBHE[100][73][5][4] [private]

Definition at line 148 of file HcalTimingMonitorModule.cc.

Referenced by get_ped_hbhe(), and set_hbhe().

Definition at line 176 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 178 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 177 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 187 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 189 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 188 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 173 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 183 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 182 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 194 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 193 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

double HcalTimingMonitorModule::HF[100][73][5][4] [private]

Definition at line 152 of file HcalTimingMonitorModule.cc.

Referenced by get_ped_hf(), and set_hf().

Definition at line 173 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 185 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 184 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 196 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 195 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

double HcalTimingMonitorModule::HO[100][73][5][4] [private]

Definition at line 150 of file HcalTimingMonitorModule.cc.

Referenced by get_ped_ho(), and set_ho().

Definition at line 173 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 179 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 181 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 180 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 190 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 192 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 191 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 198 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 163 of file HcalTimingMonitorModule.cc.

Referenced by HcalTimingMonitorModule(), and initialize().

double HcalTimingMonitorModule::nHBHE[100][73][5][4] [private]

Definition at line 149 of file HcalTimingMonitorModule.cc.

Referenced by get_ped_hbhe(), and set_hbhe().

double HcalTimingMonitorModule::nHF[100][73][5][4] [private]

Definition at line 153 of file HcalTimingMonitorModule.cc.

Referenced by get_ped_hf(), and set_hf().

double HcalTimingMonitorModule::nHO[100][73][5][4] [private]

Definition at line 151 of file HcalTimingMonitorModule.cc.

Referenced by get_ped_ho(), and set_ho().

Definition at line 174 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 161 of file HcalTimingMonitorModule.cc.

Referenced by HcalTimingMonitorModule().

Definition at line 164 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 164 of file HcalTimingMonitorModule.cc.

Referenced by HcalTimingMonitorModule().

Definition at line 174 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 174 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and initialize().

Definition at line 157 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 159 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 159 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 159 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().

Definition at line 159 of file HcalTimingMonitorModule.cc.

Referenced by analyze(), and HcalTimingMonitorModule().