CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

HcalDetDiagLaserMonitor Class Reference

#include <DQM/HcalDetDiagLaserMonitor/src/HcalDetDiagLaserMonitor.cc>

Inheritance diagram for HcalDetDiagLaserMonitor:
HcalBaseDQMonitor edm::EDAnalyzer

List of all members.

Public Member Functions

 HcalDetDiagLaserMonitor (const edm::ParameterSet &)
 ~HcalDetDiagLaserMonitor ()

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
void beginRun (const edm::Run &run, const edm::EventSetup &c)
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
void endRun (const edm::Run &run, const edm::EventSetup &c)
void fillHistos (int sd)
void fillProblems (int sd)
bool get_ave_rbx (int sd, int side, int rbx, float *ave, float *rms)
bool get_ave_subdet (int sd, float *ave_t, float *ave_e, float *ave_t_r, float *ave_e_r)
HcalDetDiagLaserDataGetCalib (std::string sd, int eta, int phi)
void LoadDataset ()
void LoadReference ()
void SaveRaddamData ()
void SaveReference ()

Private Attributes

std::string baseFolder_
HcalDetDiagLaserData calib_data [5][5][72]
edm::InputTag calibDigiLabel_
bool createHTMLonly
int dataset_seq_number
std::string DatasetName
const HcalElectronicsMapemap
MonitorElementEnergy2Dhbhehf
MonitorElementEnergy2Dho
HcalDetDiagLaserData hb_data [85][72][4]
MonitorElementhb_time_rbx
MonitorElementhbheEnergy
MonitorElementhbheEnergyRMS
MonitorElementhbheTime
MonitorElementhbheTimeRMS
HcalDetDiagLaserData he_data [85][72][4]
MonitorElementhe_time_rbx
HcalDetDiagLaserData hf_data [85][72][4]
MonitorElementhf_time_rbx
MonitorElementhfEnergy
MonitorElementhfEnergyRMS
MonitorElementhfTime
MonitorElementhfTimeRMS
HcalDetDiagLaserData ho_data [85][72][4]
MonitorElementho_time_rbx
MonitorElementhoEnergy
MonitorElementhoEnergyRMS
MonitorElementhoTime
MonitorElementhoTimeRMS
MonitorElementhtmlFolder
std::string htmlOutputPath
int ievt_
edm::InputTag inputLabelDigi_
bool IsReference
std::map< unsigned int, int > KnownBadCells_
double LaserEnergyThreshold
double LaserTimingThreshold
bool LocalRun
MonitorElementmeEVT_
MonitorElementmeRUN_
int nHB
int nHBHEchecks
int nHE
int nHF
int nHFchecks
int nHO
int nHOchecks
bool Online_
std::string OutputFilePath
bool Overwrite
std::string prefixME_
EtaPhiHistsProblemCellsByDepth_energy
EtaPhiHistsProblemCellsByDepth_energy_val
EtaPhiHistsProblemCellsByDepth_timing
EtaPhiHistsProblemCellsByDepth_timing_val
std::vector< std::string > problemnames_
MonitorElementRaddam [56]
bool RaddamRun
double RaddamThreshold1
double RaddamThreshold2
MonitorElementrefEnergy2Dhbhehf
MonitorElementrefEnergy2Dho
std::string ReferenceData
std::string ReferenceRun
MonitorElementRefRun_
MonitorElementrefTime2Dhbhehf
MonitorElementrefTime2Dho
int run_number
TH1F * S1 [56]
TH1F * S2 [56]
MonitorElementTime2Dhbhehf
MonitorElementTime2Dho
std::string XmlFilePath

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 247 of file HcalDetDiagLaserMonitor.cc.


Constructor & Destructor Documentation

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

Definition at line 371 of file HcalDetDiagLaserMonitor.cc.

References calibDigiLabel_, createHTMLonly, dataset_seq_number, DatasetName, HcalBaseDQMonitor::debug_, emap, edm::ParameterSet::getUntrackedParameter(), htmlOutputPath, ievt_, inputLabelDigi_, IsReference, LaserEnergyThreshold, LaserTimingThreshold, LocalRun, nHB, nHBHEchecks, nHE, nHF, nHFchecks, nHO, nHOchecks, Online_, OutputFilePath, Overwrite, prefixME_, RaddamRun, RaddamThreshold1, RaddamThreshold2, ReferenceData, run_number, HcalBaseDQMonitor::subdir_, and XmlFilePath.

                                                                              {
  ievt_=-1;
  emap=0;
  dataset_seq_number=1;
  run_number=-1;
  IsReference=false;
  LocalRun=RaddamRun=false;
  createHTMLonly=false;
  nHB=nHE=nHO=nHF=0;
  nHBHEchecks=nHOchecks=nHFchecks=0;

  inputLabelDigi_  = iConfig.getUntrackedParameter<edm::InputTag>("digiLabel",edm::InputTag("hcalDigis"));
  calibDigiLabel_  = iConfig.getUntrackedParameter<edm::InputTag>("calibDigiLabel",edm::InputTag("hcalDigis"));

  ReferenceData    = iConfig.getUntrackedParameter<std::string>("LaserReferenceData" ,"");
  OutputFilePath   = iConfig.getUntrackedParameter<std::string>("OutputFilePath", "");
  DatasetName      = iConfig.getUntrackedParameter<std::string>("LaserDatasetName", "");
  htmlOutputPath   = iConfig.getUntrackedParameter<std::string>("htmlOutputPath", "");
  XmlFilePath      = iConfig.getUntrackedParameter<std::string>("XmlFilePath", "");
  Online_          = iConfig.getUntrackedParameter<bool>  ("online",false);
  Overwrite        = iConfig.getUntrackedParameter<bool>  ("Overwrite",true);
  prefixME_        = iConfig.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
  if (prefixME_.size()>0 && prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
  prefixME_.append("/");
  subdir_          = iConfig.getUntrackedParameter<std::string>("TaskFolder","DetDiagPedestalMonitor_Hcal/");
  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
    subdir_.append("/");
  subdir_=prefixME_+subdir_;
  debug_           = iConfig.getUntrackedParameter<int>("debug",0);

  LaserTimingThreshold = iConfig.getUntrackedParameter<double>("LaserTimingThreshold",0.2);
  LaserEnergyThreshold = iConfig.getUntrackedParameter<double>("LaserEnergyThreshold",0.1);
  RaddamThreshold1     = iConfig.getUntrackedParameter<double>("RaddamThreshold1",10.0);
  RaddamThreshold2     = iConfig.getUntrackedParameter<double>("RaddamThreshold2",0.95);
}
HcalDetDiagLaserMonitor::~HcalDetDiagLaserMonitor ( )

Definition at line 541 of file HcalDetDiagLaserMonitor.cc.

                                                 {

}

Member Function Documentation

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 546 of file HcalDetDiagLaserMonitor.cc.

References adc2fC, HcalDetDiagLaserData::add_statistics(), calib, calib_data, calibDigiLabel_, createHTMLonly, HcalRaddamData::CUT1EVNT, HcalRaddamData::CUT2EVNT, FEDRawData::data(), AlCaHLTBitMon_QueryRunRegistry::data, HcalBaseDQMonitor::dbe_, eta(), MonitorElement::Fill(), HcalObjRepresent::Fill(), fillHistos(), fillProblems(), edm::Event::getByLabel(), edm::Event::getByType(), hb_data, hc_HBHEHPD, hc_HFPMT, hc_HOHPD, hc_RADDAM, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, he_data, hf_data, ho_data, i, edm::EventBase::id(), ievt_, inputLabelDigi_, edm::HandleBase::isValid(), j, gen::k, LocalRun, FEDNumbering::MAXHCALFEDID, meEVT_, meRUN_, FEDNumbering::MINHCALFEDID, MultiGaussianStateTransform::N, Online_, edm::EventBase::orbitNumber(), phi, Raddam, RaddamRun, RaddamThreshold1, RaddamThreshold2, HcalBaseDQMonitor::reset(), edm::EventID::run(), run_number, HcalRaddamData::s1_adc, S2, HcalRaddamData::s2_adc, SaveReference(), FEDRawData::size(), HcalRaddamData::TOTEVNT, and relativeConstraints::value.

                                                                                        {
 if(createHTMLonly) return;
  HcalBaseDQMonitor::analyze(iEvent,iSetup); // base class increments ievt_, etc. counters
 
int  eta,phi,depth,nTS;
static bool HBHEseq,HOseq,HFseq;
static int  lastHBHEorbit,lastHOorbit,lastHForbit,nChecksHBHE,nChecksHO,nChecksHF,ievt_hbhe,ievt_ho,ievt_hf;
   if(ievt_==-1){ 
       ievt_=0;HBHEseq=HOseq=HFseq=false; lastHBHEorbit=lastHOorbit=lastHForbit=-1;nChecksHBHE=nChecksHO=nChecksHF=0; 
       ievt_hbhe=0,ievt_ho=0,ievt_hf=0;
   }

   if(!dbe_) return; 
   bool LaserEvent=false;
   bool LaserRaddam=false;
   int orbit=iEvent.orbitNumber();
   meRUN_->Fill(iEvent.id().run());
   // for local runs 
   edm::Handle<HcalTBTriggerData> trigger_data;
   iEvent.getByType(trigger_data);
   if(trigger_data.isValid()){
       if(trigger_data->wasLaserTrigger()) LaserEvent=true;
       LocalRun=true;
   }
   if(!LocalRun && Online_){
      if(HBHEseq && (orbit-lastHBHEorbit)>(11223*10) && ievt_hbhe>40){
         HBHEseq=false;
         fillHistos(HcalBarrel);
         fillProblems(HcalBarrel);
         fillProblems(HcalEndcap);
         nChecksHBHE++;
         ievt_hbhe=0;
         for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++) hb_data[i][j][k].reset();
         for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++) he_data[i][j][k].reset();
      }
      if(HOseq && (orbit-lastHOorbit)>(11223*10) && ievt_ho>40){
         HOseq=false;
         fillHistos(HcalOuter);
         fillProblems(HcalOuter);
         nChecksHO++; 
         ievt_ho=0;
         for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++) ho_data[i][j][k].reset();
      }
      if(HFseq && (orbit-lastHForbit)>(11223*10) && ievt_hf>40){
         HFseq=false;
         fillHistos(HcalForward);
         fillProblems(HcalForward);
         nChecksHF++; 
         ievt_hf=0;
         if(nChecksHF==1 || (nChecksHF>1 && ((nChecksHF-1)%12)==0)){
             SaveReference();
         }
         for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++) hf_data[i][j][k].reset();
      }
   }

   // Abort Gap laser 
   if(LocalRun==false || LaserEvent==false){
       edm::Handle<FEDRawDataCollection> rawdata;
       iEvent.getByType(rawdata);
       //checking FEDs for calibration information
       for (int i=FEDNumbering::MINHCALFEDID;i<=FEDNumbering::MAXHCALFEDID; i++) {
          const FEDRawData& fedData = rawdata->FEDData(i) ;
          if ( fedData.size() < 24 ) continue ;
          int value = ((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
          if(value==hc_HBHEHPD){ HBHEseq=true; HOseq=HFseq=false; lastHBHEorbit=orbit; ievt_hbhe++; }
          if(value==hc_HOHPD){   HOseq=true; HBHEseq=HFseq=false; lastHOorbit=orbit;   ievt_ho++;   }
          if(value==hc_HFPMT){   HFseq=true; HBHEseq=HOseq=false; lastHForbit=orbit;   ievt_hf++;   }
          
          if(value==hc_HBHEHPD || value==hc_HOHPD || value==hc_HFPMT){ LaserEvent=true; break;}
          if(value==hc_RADDAM){ LaserEvent=true; LaserRaddam=true; break;} 
       }
   }   
   if(!LaserEvent) return;
   edm::Handle<HBHEDigiCollection> hbhe; 
   iEvent.getByLabel(inputLabelDigi_,hbhe);
   edm::Handle<HODigiCollection> ho; 
   iEvent.getByLabel(inputLabelDigi_,ho);
   edm::Handle<HFDigiCollection> hf;
   iEvent.getByLabel(inputLabelDigi_,hf);
   edm::Handle<HcalCalibDigiCollection> calib;
   iEvent.getByLabel(calibDigiLabel_, calib); 

   if(LocalRun && LaserEvent){
      int N=0; 
      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();
             float e=0;
             for(int i=0;i<digi->size();i++) e+=adc2fC[digi->sample(i).adc()&0xff]-2.5;
             if(e>40){ N++;}
         }
      }
      if(N>50 && N<57){ RaddamRun=true; /*LaserRaddam=true;*/}
   }
   if(RaddamRun){
      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();
             int N;
             for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
             if(N==56) continue; 
             float max1=0,max2=0;
             int   nmax1=0,nmax2=0;
             for(int i=0;i<nTS;i++){
                  if(max1<adc2fC[digi->sample(i).adc()&0xff]){ nmax1=i; max1=adc2fC[digi->sample(i).adc()&0xff]; }
             }
             Raddam_data[N].TOTEVNT++;
             for(int i=0;i<nTS;i++){
                  if(i==nmax1) continue;
                  if(max2<adc2fC[digi->sample(i).adc()&0xff]){ nmax2=i; max2=adc2fC[digi->sample(i).adc()&0xff]; }
             }
             if(nmax1>nmax2){
                int tmp1=nmax2;
                nmax2=nmax1;nmax1=tmp1;
             }
             if(nmax1==0 || nmax2==(nTS-1)) continue;
             if(nmax2!=(nmax1+1)) continue;
     
             if(max1<RaddamThreshold1 || max2<RaddamThreshold1) continue;
             Raddam_data[N].CUT1EVNT++;
             max1-=2.5; max2-=2.5;
             float S2=max1+max2;
             float S4=S2+adc2fC[digi->sample(nmax1-1).adc()&0xff]+adc2fC[digi->sample(nmax2+1).adc()&0xff]-5.0;
             if((S2/S4)<RaddamThreshold2) continue;
             Raddam_data[N].CUT2EVNT++;
             Raddam_data[N].s1_adc[digi->sample(nmax1).adc()&0xff]++;
             Raddam_data[N].s2_adc[digi->sample(nmax2).adc()&0xff]++;
         }
      }
   }

   meEVT_->Fill(++ievt_);
   run_number=iEvent.id().run();
   double data[20];
   if(!LaserRaddam){
      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();
             double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
             if(digi->id().subdet()==HcalBarrel){
                for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
                hb_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
             }   
             if(digi->id().subdet()==HcalEndcap){
                for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
                he_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
             }
         }
      }
      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();
             double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
             if((eta>=11 && eta<=15 && phi>=59 && phi<=70) || (eta>=5 && eta<=10 && phi>=47 && phi<=58)){
                for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
             }else{
                for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
             }
             ho_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
         }
      }
      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();
             double ped=adc2fC[digi->sample(0).adc()&0xff];
             for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
             hf_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
         }   
      }
      if(calib.isValid())for(HcalCalibDigiCollection::const_iterator digi=calib->begin();digi!=calib->end();digi++){
         if(digi->id().cboxChannel()!=0 || digi->id().hcalSubdet()==0) continue; 
         nTS=digi->size();
         float e=0;
         for(int i=0;i<nTS;i++){ data[i]=adc2fC[digi->sample(i).adc()&0xff]; e+=data[i];} 
         if(e<15000) calib_data[digi->id().hcalSubdet()][digi->id().ieta()+2][digi->id().iphi()-1].add_statistics(data,nTS);
      }
   }else{ //Raddam
      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();
             int N;
             for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
             if(N==56) continue;      
             for(int i=0;i<nTS;i++) Raddam[N]->Fill(i,adc2fC[digi->sample(i).adc()&0xff]-2.5);
             
         }   
      }
   }
}
void HcalDetDiagLaserMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
) [private, virtual]

Reimplemented from HcalBaseDQMonitor.

Definition at line 2019 of file HcalDetDiagLaserMonitor.cc.

{}
void HcalDetDiagLaserMonitor::beginRun ( const edm::Run run,
const edm::EventSetup c 
) [private, virtual]

Reimplemented from HcalBaseDQMonitor.

Definition at line 406 of file HcalDetDiagLaserMonitor.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookInt(), DQMStore::bookString(), createHTMLonly, dataset_seq_number, DatasetName, HcalBaseDQMonitor::dbe_, EtaPhiHists::depth, emap, Energy2Dhbhehf, Energy2Dho, eta(), MonitorElement::Fill(), edm::EventSetup::get(), HcalCondObjectContainer< Item >::getAllChannels(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), hb_time_rbx, hbheEnergy, hbheEnergyRMS, hbheTime, hbheTimeRMS, DetId::Hcal, HcalChannelStatus::HcalCellMask, HcalChannelStatus::HcalCellOff, he_time_rbx, hf_time_rbx, hfEnergy, hfEnergyRMS, hfTime, hfTimeRMS, ho_time_rbx, hoEnergy, hoEnergyRMS, hoTime, hoTimeRMS, htmlFolder, htmlOutputPath, i, KnownBadCells_, LoadDataset(), LoadReference(), meEVT_, meRUN_, mergeVDriftHistosByStation::name, nHB, nHE, nHF, nHO, AlCaHLTBitMon_ParallelJobs::p, phi, prefixME_, ProblemCellsByDepth_energy, ProblemCellsByDepth_energy_val, ProblemCellsByDepth_timing, ProblemCellsByDepth_timing_val, problemnames_, edm::ESHandle< T >::product(), Raddam, refEnergy2Dhbhehf, refEnergy2Dho, ReferenceRun, RefRun_, refTime2Dhbhehf, refTime2Dho, run_number, MonitorElement::setAxisRange(), MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), EtaPhiHists::setup(), HcalBaseDQMonitor::setup(), ntuplemaker::status, HcalBaseDQMonitor::subdir_, Time2Dhbhehf, and Time2Dho.

                                                                               {
  edm::ESHandle<HcalChannelQuality> p;
  c.get<HcalChannelQualityRcd>().get(p);
  HcalChannelQuality* chanquality= new HcalChannelQuality(*p.product());
  std::vector<DetId> mydetids = chanquality->getAllChannels();
  KnownBadCells_.clear();

  for (std::vector<DetId>::const_iterator i = mydetids.begin();i!=mydetids.end();++i){
     if (i->det()!=DetId::Hcal) continue; // not an hcal cell
     HcalDetId id=HcalDetId(*i);
     int status=(chanquality->getValues(id))->getValue();
     if((status & HcalChannelStatus::HcalCellOff) || (status & HcalChannelStatus::HcalCellMask)){
         KnownBadCells_[id.rawId()]=status;
     }
  } 

  edm::ESHandle<HcalDbService> conditions_;
  c.get<HcalDbRecord>().get(conditions_);
  emap=conditions_->getHcalMapping();
  
  HcalBaseDQMonitor::setup();
  if (!dbe_) return;
  std::string name;
 
  dbe_->setCurrentFolder(subdir_);   
  meEVT_ = dbe_->bookInt("HcalDetDiagLaserMonitor Event Number");
  meRUN_ = dbe_->bookInt("HcalDetDiagLaserMonitor Run Number");

  ReferenceRun="UNKNOWN";
  LoadReference();
  LoadDataset();
  if(DatasetName.size()>0 && createHTMLonly){
     char str[200]; sprintf(str,"%sHcalDetDiagLaserData_run%i_%i/",htmlOutputPath.c_str(),run_number,dataset_seq_number);
     htmlFolder=dbe_->bookString("HcalDetDiagLaserMonitor HTML folder",str);
     MonitorElement *me;
     dbe_->setCurrentFolder(prefixME_+"HcalInfo");
     me=dbe_->bookInt("HBpresent");
     if(nHB>0) me->Fill(1);
     me=dbe_->bookInt("HEpresent");
     if(nHE>0) me->Fill(1);
     me=dbe_->bookInt("HOpresent");
     if(nHO>0) me->Fill(1);
     me=dbe_->bookInt("HFpresent");
     if(nHF>0) me->Fill(1);
  }
  ProblemCellsByDepth_timing = new EtaPhiHists();
  ProblemCellsByDepth_timing->setup(dbe_," Problem Bad Laser Timing");
  for(unsigned int i=0;i<ProblemCellsByDepth_timing->depth.size();i++)
          problemnames_.push_back(ProblemCellsByDepth_timing->depth[i]->getName());
  ProblemCellsByDepth_energy = new EtaPhiHists();
  ProblemCellsByDepth_energy->setup(dbe_," Problem Bad Laser Energy");
  for(unsigned int i=0;i<ProblemCellsByDepth_energy->depth.size();i++)
          problemnames_.push_back(ProblemCellsByDepth_energy->depth[i]->getName());

  dbe_->setCurrentFolder(subdir_+"Summary Plots");
     
  name="HBHE Laser Energy Distribution";                hbheEnergy        = dbe_->book1D(name,name,200,0,3000);
  name="HBHE Laser Timing Distribution";                hbheTime          = dbe_->book1D(name,name,200,0,10);
  name="HBHE Laser Energy RMS_div_Energy Distribution"; hbheEnergyRMS     = dbe_->book1D(name,name,200,0,0.5);
  name="HBHE Laser Timing RMS Distribution";            hbheTimeRMS       = dbe_->book1D(name,name,200,0,1);
  name="HO Laser Energy Distribution";                  hoEnergy          = dbe_->book1D(name,name,200,0,3000);
  name="HO Laser Timing Distribution";                  hoTime            = dbe_->book1D(name,name,200,0,10);
  name="HO Laser Energy RMS_div_Energy Distribution";   hoEnergyRMS       = dbe_->book1D(name,name,200,0,0.5);
  name="HO Laser Timing RMS Distribution";              hoTimeRMS         = dbe_->book1D(name,name,200,0,1);
  name="HF Laser Energy Distribution";                  hfEnergy          = dbe_->book1D(name,name,200,0,3000);
  name="HF Laser Timing Distribution";                  hfTime            = dbe_->book1D(name,name,200,0,10);
  name="HF Laser Energy RMS_div_Energy Distribution";   hfEnergyRMS       = dbe_->book1D(name,name,200,0,0.7);
  name="HF Laser Timing RMS Distribution";              hfTimeRMS         = dbe_->book1D(name,name,200,0,1);
     
  name="Laser Timing HBHEHF";                           Time2Dhbhehf      = dbe_->book2D(name,name,87,-43,43,74,0,73);
  name="Laser Timing HO";                               Time2Dho          = dbe_->book2D(name,name,33,-16,16,74,0,73);
  name="Laser Energy HBHEHF";                           Energy2Dhbhehf    = dbe_->book2D(name,name,87,-43,43,74,0,73);
  name="Laser Energy HO";                               Energy2Dho        = dbe_->book2D(name,name,33,-16,16,74,0,73);
  name="HBHEHF Laser (Timing-Ref)+1";                   refTime2Dhbhehf   = dbe_->book2D(name,name,87,-43,43,74,0,73);
  name="HO Laser (Timing-Ref)+1";                       refTime2Dho       = dbe_->book2D(name,name,33,-16,16,74,0,73);
  name="HBHEHF Laser Energy_div_Ref";                   refEnergy2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
  name="HO Laser Energy_div_Ref";                       refEnergy2Dho     = dbe_->book2D(name,name,33,-16,16,74,0,73);
     
  name="HB RBX average Time-Ref";                       hb_time_rbx       = dbe_->book1D(name,name,36,0.5,36.5);
  name="HE RBX average Time-Ref";                       he_time_rbx       = dbe_->book1D(name,name,36,0.5,36.5);
  name="HO RBX average Time-Ref";                       ho_time_rbx       = dbe_->book1D(name,name,36,0.5,36.5);
  name="HF RoBox average Time-Ref";                     hf_time_rbx       = dbe_->book1D(name,name,24,0.5,24.5);
  
  char str[200];
  for(int i=1;i<=18;i++){ sprintf(str,"HBM%02i",i);     hb_time_rbx->setBinLabel(i,str);    }
  for(int i=1;i<=18;i++){ sprintf(str,"HBP%02i",i);     hb_time_rbx->setBinLabel(i+18,str); }
  for(int i=1;i<=18;i++){ sprintf(str,"HEM%02i",i);     he_time_rbx->setBinLabel(i,str);    }
  for(int i=1;i<=18;i++){ sprintf(str,"HEP%02i",i);     he_time_rbx->setBinLabel(i+18,str); }
  for(int i=1;i<=12;i++){ sprintf(str,"HFM%02i",i);     hf_time_rbx->setBinLabel(i,str);    }
  for(int i=1;i<=12;i++){ sprintf(str,"HFP%02i",i);     hf_time_rbx->setBinLabel(i+12,str); }
  for(int i=1;i<=6;i++){  sprintf(str,"HO2M%02i",i*2);  ho_time_rbx->setBinLabel(i,str);    }
  for(int i=1;i<=6;i++){  sprintf(str,"HO1M%02i",i*2);  ho_time_rbx->setBinLabel(i+6,str);  }
  for(int i=1;i<=12;i++){ sprintf(str,"HO0%02i",i);     ho_time_rbx->setBinLabel(i+12,str); }
  for(int i=1;i<=6;i++){  sprintf(str,"HO1P%02i",i*2);  ho_time_rbx->setBinLabel(i+24,str); }
  for(int i=1;i<=6;i++){  sprintf(str,"HO2P%02i",i*2);  ho_time_rbx->setBinLabel(i+30,str); }

  Time2Dhbhehf->setAxisTitle("i#eta",1);
  Time2Dhbhehf->setAxisTitle("i#phi",2);
  Time2Dho->setAxisTitle("i#eta",1);
  Time2Dho->setAxisTitle("i#phi",2);
  Energy2Dhbhehf->setAxisTitle("i#eta",1);
  Energy2Dhbhehf->setAxisTitle("i#phi",2);
  Energy2Dho->setAxisTitle("i#eta",1);
  Energy2Dho->setAxisTitle("i#phi",2);
  refTime2Dhbhehf->setAxisTitle("i#eta",1);
  refTime2Dhbhehf->setAxisTitle("i#phi",2);
  refTime2Dho->setAxisTitle("i#eta",1);
  refTime2Dho->setAxisTitle("i#phi",2);
  refEnergy2Dhbhehf->setAxisTitle("i#eta",1);
  refEnergy2Dhbhehf->setAxisTitle("i#phi",2);
  refEnergy2Dho->setAxisTitle("i#eta",1);
  refEnergy2Dho->setAxisTitle("i#phi",2);

  refTime2Dhbhehf->setAxisRange(0,2,3);
  refTime2Dho->setAxisRange(0,2,3);
  refEnergy2Dhbhehf->setAxisRange(0.5,1.5,3);
  refEnergy2Dho->setAxisRange(0.5,1.5,3);

  dbe_->setCurrentFolder(subdir_);
  RefRun_= dbe_->bookString("HcalDetDiagLaserMonitor Reference Run",ReferenceRun);

  dbe_->setCurrentFolder(subdir_+"Raddam Plots");
  for(int i=0;i<56;i++){
     sprintf(str,"RADDAM (%i %i)",RADDAM_CH[i].eta,RADDAM_CH[i].phi);
     Raddam[i] = dbe_->book1D(str,str,10,-0.5,9.5); 
  }

  dbe_->setCurrentFolder(subdir_+"Plots for client");
  ProblemCellsByDepth_timing_val = new EtaPhiHists();
  ProblemCellsByDepth_timing_val->setup(dbe_," Laser Timing difference");
  ProblemCellsByDepth_energy_val = new EtaPhiHists();
  ProblemCellsByDepth_energy_val->setup(dbe_," Laser Energy difference");
}
void HcalDetDiagLaserMonitor::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
) [private, virtual]

Reimplemented from HcalBaseDQMonitor.

Definition at line 2020 of file HcalDetDiagLaserMonitor.cc.

{}
void HcalDetDiagLaserMonitor::endRun ( const edm::Run run,
const edm::EventSetup c 
) [private, virtual]
void HcalDetDiagLaserMonitor::fillHistos ( int  sd) [private]

Definition at line 1107 of file HcalDetDiagLaserMonitor.cc.

References abs, Energy2Dhbhehf, Energy2Dho, eta(), MonitorElement::Fill(), get_ave_rbx(), HcalDetDiagLaserData::get_average_amp(), HcalDetDiagLaserData::get_average_time(), hb_data, hb_time_rbx, hbheEnergy, hbheEnergyRMS, hbheTime, hbheTimeRMS, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, he_data, he_time_rbx, hf_data, hf_time_rbx, hfEnergy, hfEnergyRMS, hfTime, hfTimeRMS, ho_data, ho_time_rbx, hoEnergy, hoEnergyRMS, hoTime, hoTimeRMS, i, isSiPM(), max(), min, phi, refEnergy2Dhbhehf, refEnergy2Dho, refTime2Dhbhehf, refTime2Dho, MonitorElement::Reset(), plotscripts::rms(), MonitorElement::setAxisRange(), MonitorElement::setBinContent(), MonitorElement::setBinError(), cond::rpcobgas::time, Time2Dhbhehf, and Time2Dho.

Referenced by analyze(), and endRun().

                                              {
   if(sd==HcalBarrel || sd==HcalEndcap){
      hbheEnergy->Reset();
      hbheTime->Reset();
      hbheEnergyRMS->Reset();
      hbheTimeRMS->Reset();
      hb_time_rbx->Reset();
      he_time_rbx->Reset();
   }
   if(sd==HcalOuter){
      hoEnergy->Reset();
      hoTime->Reset();
      hoEnergyRMS->Reset();
      hoTimeRMS->Reset();
      Time2Dho->Reset();
      Energy2Dho->Reset();
      refTime2Dho->Reset(); 
      refEnergy2Dho->Reset();
      ho_time_rbx->Reset();
   }
   if(sd==HcalForward){
      hfEnergy->Reset();
      hfTime->Reset();
      hfEnergyRMS->Reset();
      hfTimeRMS->Reset();
      hf_time_rbx->Reset();
   }
   if(sd==HcalBarrel || sd==HcalEndcap){
     // HB histograms
     for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++){ 
        double T=0,nT=0,E=0,nE=0;
        for(int depth=1;depth<=2;depth++){
           if(hb_data[eta+42][phi-1][depth-1].get_statistics()>10){
              double ave=0;
              double rms=0;
              double time=0; 
              double time_rms=0;
              hb_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
              hb_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
              hbheEnergy->Fill(ave);
              if(ave>0)hbheEnergyRMS->Fill(rms/ave);
              hbheTime->Fill(time);
              hbheTimeRMS->Fill(time_rms);
              T+=time; nT++; E+=ave; nE++;
           }
        } 
        if(nT>0){Time2Dhbhehf->setBinContent(eta+44,phi+1,T/nT);Energy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE); }
     } 
     // HE histograms
     for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++){
        double T=0,nT=0,E=0,nE=0;
        for(int depth=1;depth<=3;depth++){
           if(he_data[eta+42][phi-1][depth-1].get_statistics()>10){
              double ave=0; double rms=0; double time=0; double time_rms=0;
              he_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
              he_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
              hbheEnergy->Fill(ave);
              if(ave>0)hbheEnergyRMS->Fill(rms/ave);
              hbheTime->Fill(time);
              hbheTimeRMS->Fill(time_rms);
              T+=time; nT++; E+=ave; nE++;
           }
        }
        if(nT>0 && abs(eta)>16 ){Time2Dhbhehf->setBinContent(eta+44,phi+1,T/nT); Energy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE); }     
        if(nT>0 && abs(eta)>20 ){Time2Dhbhehf->setBinContent(eta+44,phi+2,T/nT); Energy2Dhbhehf->setBinContent(eta+44,phi+2,E/nE);}      
     } 
   }
   if(sd==HcalForward){
     // HF histograms
     for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++){
        double T=0,nT=0,E=0,nE=0;
        for(int depth=1;depth<=2;depth++){
           if(hf_data[eta+42][phi-1][depth-1].get_statistics()>10){
              double ave=0; double rms=0; double time=0; double time_rms=0;
              hf_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
              hf_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
              hfEnergy->Fill(ave);
              if(ave>0)hfEnergyRMS->Fill(rms/ave);
              hfTime->Fill(time);
              T+=time; nT++; E+=ave; nE++;
              hfTimeRMS->Fill(time_rms);
           }
        }       
        if(nT>0 && abs(eta)>29 ){ Time2Dhbhehf->setBinContent(eta+44,phi+1,T/nT);   Time2Dhbhehf->setBinContent(eta+44,phi+2,T/nT);}     
        if(nT>0 && abs(eta)>29 ){ Energy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE); Energy2Dhbhehf->setBinContent(eta+44,phi+2,E/nE);}   
     }
   } 
   if(sd==HcalOuter){
     // HO histograms
     for(int eta=-10;eta<=15;eta++) for(int phi=1;phi<=72;phi++){
        if(eta>10 && !isSiPM(eta,phi,4)) continue;
        double T=0,nT=0,E=0,nE=0;
        for(int depth=4;depth<=4;depth++){
           if(ho_data[eta+42][phi-1][depth-1].get_statistics()>10){
              double ave=0; double rms=0; double time=0; double time_rms=0;
              ho_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
              ho_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
              hoEnergy->Fill(ave);
              if(ave>0)hoEnergyRMS->Fill(rms/ave);
              hoTime->Fill(time);
              T+=time; nT++; E+=ave; nE++;
              hoTimeRMS->Fill(time_rms);
           }
        }
        if(nT>0){ Time2Dho->Fill(eta,phi,T/nT); Energy2Dho->Fill(eta,phi+1,E/nE) ;}
     } 
   }

   // compare with reference...
   if(sd==HcalBarrel || sd==HcalEndcap){
     for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++){ 
        double T=0,nT=0,E=0,nE=0;
        for(int depth=1;depth<=2;depth++){
           if(hb_data[eta+42][phi-1][depth-1].get_statistics()>10){
             double val=0,rms=0,time=0,time_rms=0;
             double VAL=0,RMS=0,TIME=0,TIME_RMS=0;
             if(!hb_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
             if(!hb_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
             if(!hb_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
             E+=VAL/val; nE++;
             T+=TIME-time; nT++;
           }  
        }
        if(nE>0) refEnergy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE);  
        if(nT>0){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01;  refTime2Dhbhehf->setBinContent(eta+44,phi+1,TTT); } 
     } 
     for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++){
        double T=0,nT=0,E=0,nE=0;
        for(int depth=1;depth<=3;depth++){
           if(he_data[eta+42][phi-1][depth-1].get_statistics()>10){
             double val=0,rms=0,time=0,time_rms=0;
             double VAL=0,RMS=0,TIME=0,TIME_RMS=0;
             if(!he_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
             if(!he_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
             if(!he_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
             E+=VAL/val; nE++;
             T+=TIME-time; nT++;
           }  
        }
        if(nE>0 && abs(eta)>16) refEnergy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE);  
        if(nT>0 && abs(eta)>16){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01;  refTime2Dhbhehf->setBinContent(eta+44,phi+1,TTT); } 
        if(nE>0 && abs(eta)>20) refEnergy2Dhbhehf->setBinContent(eta+44,phi+2,E/nE);  
        if(nT>0 && abs(eta)>20){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01;  refTime2Dhbhehf->setBinContent(eta+44,phi+2,TTT); }  
     } 
   }
   if(sd==HcalForward){
     for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++){
        double T=0,nT=0,E=0,nE=0;
        for(int depth=1;depth<=2;depth++){
           if(hf_data[eta+42][phi-1][depth-1].get_statistics()>10){
             double val=0,rms=0,time=0,time_rms=0;
             double VAL=0,RMS=0,TIME=0,TIME_RMS=0;
             if(!hf_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
             if(!hf_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
             if(!hf_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
             E+=VAL/val; nE++;
             T+=TIME-time; nT++;
           }  
        }
        if(nE>0 && abs(eta)>29) refEnergy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE);  
        if(nT>0 && abs(eta)>29){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01; refTime2Dhbhehf->setBinContent(eta+44,phi+1,TTT); }
        if(nE>0 && abs(eta)>29) refEnergy2Dhbhehf->setBinContent(eta+44,phi+2,E/nE);  
        if(nT>0 && abs(eta)>29){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01; refTime2Dhbhehf->setBinContent(eta+44,phi+2,TTT); } 
     }
   } 
   if(sd==HcalOuter){
     for(int eta=-15;eta<=15;eta++) for(int phi=1;phi<=72;phi++){
        if(eta>10 && !isSiPM(eta,phi,4)) continue;
        double T=0,nT=0,E=0,nE=0;
        for(int depth=4;depth<=4;depth++){
           if(ho_data[eta+42][phi-1][depth-1].get_statistics()>10){
             double val=0,rms=0,time=0,time_rms=0;
             double VAL=0,RMS=0,TIME=0,TIME_RMS=0;
             if(!ho_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
             if(!ho_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
             if(!ho_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
             E+=VAL/val; nE++;
             T+=TIME-time; nT++;
           }  
         }
        if(nE>0) refEnergy2Dho->Fill(eta,phi,E/nE);  
        if(nT>0){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01; refTime2Dho->Fill(eta,phi,TTT);}  
     } 
   }
  float min,max;
  if(sd==HcalBarrel || sd==HcalEndcap){
    min=100;max=-100;
    for(int i=1;i<=18;i++){
      float ave=-10,rms=-10;
      if(get_ave_rbx(HcalBarrel,-1,i,&ave,&rms)){
        hb_time_rbx->setBinContent(i,ave);
        hb_time_rbx->setBinError(i,rms);
        if(ave<min) min=ave;
        if(ave>max) max=ave;
      }
    }
    for(int i=1;i<=18;i++){
      float ave=-10,rms=-10;
      if(get_ave_rbx(HcalBarrel,1,i,&ave,&rms)){
        hb_time_rbx->setBinContent(i+18,ave);
        hb_time_rbx->setBinError(i+18,rms);
        if(ave<min) min=ave;
        if(ave>max) max=ave;
      }
    }
    if(max>-100)hb_time_rbx->setAxisRange(min-1,max+1,2);
    min=100;max=-100;
    for(int i=1;i<=18;i++){
      float ave=-10,rms=-10;
      if(get_ave_rbx(HcalEndcap,-1,i,&ave,&rms)){
        he_time_rbx->setBinContent(i,ave);
        he_time_rbx->setBinError(i,rms);
        if(ave<min) min=ave;
        if(ave>max) max=ave;
      }
    }
    for(int i=1;i<=18;i++){
      float ave=-10,rms=-10;
      if(get_ave_rbx(HcalEndcap,1,i,&ave,&rms)){
        he_time_rbx->setBinContent(i+18,ave);
        he_time_rbx->setBinError(i+18,rms);
        if(ave<min) min=ave;
        if(ave>max) max=ave;
      }
    }
    if(max>-100)he_time_rbx->setAxisRange(min-1,max+1,2);
  }
  if(sd==HcalOuter){
    min=100;max=-100;
    for(int i=1;i<=6;i++){
      float ave=-10,rms=-10;
      if(get_ave_rbx(HcalOuter,-2,i,&ave,&rms)){
        ho_time_rbx->setBinContent(i,ave);
        ho_time_rbx->setBinError(i,rms);
        if(ave<min) min=ave;
        if(ave>max) max=ave;
      }
    }
    for(int i=1;i<=6;i++){
      float ave=-10,rms=-10;
      if(get_ave_rbx(HcalOuter,-1,i,&ave,&rms)){
        ho_time_rbx->setBinContent(i+6,ave);
        ho_time_rbx->setBinError(i+6,rms);
        if(ave<min) min=ave;
        if(ave>max) max=ave;
      }
    }
    for(int i=1;i<=12;i++){
      float ave=-10,rms=-10;
      if(get_ave_rbx(HcalOuter,0,i,&ave,&rms)){
        ho_time_rbx->setBinContent(i+12,ave);
        ho_time_rbx->setBinError(i+12,rms);
        if(ave<min) min=ave;
        if(ave>max) max=ave;
      }
    }
    for(int i=1;i<=6;i++){
      float ave=-10,rms=-10;
      if(get_ave_rbx(HcalOuter,1,i,&ave,&rms)){
        ho_time_rbx->setBinContent(i+24,ave);
        ho_time_rbx->setBinError(i+24,rms);
        if(ave<min) min=ave;
        if(ave>max) max=ave;
      }
    }
    for(int i=1;i<=6;i++){
      float ave=-10,rms=-10;
      if(get_ave_rbx(HcalOuter,2,i,&ave,&rms)){
        ho_time_rbx->setBinContent(i+30,ave);
        ho_time_rbx->setBinError(i+30,rms);
        if(ave<min) min=ave;
        if(ave>max) max=ave;
      }
    }
    if(max>-100)ho_time_rbx->setAxisRange(min-1,max+1,2);
  }
  if(sd==HcalForward){
    min=100;max=-100;
    for(int i=1;i<=12;i++){
      float ave=-10,rms=-10;
      if(get_ave_rbx(HcalForward,-1,i,&ave,&rms)){
        hf_time_rbx->setBinContent(i,ave);
        hf_time_rbx->setBinError(i,rms);
        if(ave<min) min=ave;
        if(ave>max) max=ave;
      }
    }
    for(int i=1;i<=12;i++){
      float ave=-10,rms=-10;
      if(get_ave_rbx(HcalForward,1,i,&ave,&rms)){
        hf_time_rbx->setBinContent(i+12,ave);
        hf_time_rbx->setBinError(i+12,rms);
        if(ave<min) min=ave;
        if(ave>max) max=ave;
      }
    }
    if(max>-100)hf_time_rbx->setAxisRange(min-1,max+1,2);
  }
} 
void HcalDetDiagLaserMonitor::fillProblems ( int  sd) [private]

Definition at line 797 of file HcalDetDiagLaserMonitor.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), CalcEtaBin(), EtaPhiHists::depth, HcalDetId::depth(), DetId::det(), cond::rpcobgas::detid, emap, eta(), get_ave_subdet(), hb_data, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalOuter, he_data, hf_data, ho_data, i, HcalDetId::ieta(), HcalDetId::iphi(), KnownBadCells_, LaserEnergyThreshold, LaserTimingThreshold, HcalElectronicsMap::lookup(), HcalDetDiagLaserData::nBadEnergy, HcalDetDiagLaserData::nBadTime, HcalDetDiagLaserData::nChecks, phi, ProblemCellsByDepth_energy, ProblemCellsByDepth_energy_val, ProblemCellsByDepth_timing, ProblemCellsByDepth_timing_val, DetId::rawId(), plotscripts::rms(), DetId::subdetId(), and cond::rpcobgas::time.

Referenced by analyze(), and endRun().

                                                {
float ave_t,ave_e,ave_t_r,ave_e_r;
   if(!get_ave_subdet(sd,&ave_t,&ave_e,&ave_t_r,&ave_e_r)) return;

   for(int i=0;i<4;i++){
      ProblemCellsByDepth_energy->depth[i]->Reset();
      ProblemCellsByDepth_timing->depth[i]->Reset();
   }

   std::vector <HcalElectronicsId> AllElIds = emap->allElectronicsIdPrecision();
   for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++){
     DetId detid=emap->lookup(*eid);
     if (detid.det()!=DetId::Hcal) continue;
     HcalGenericDetId gid(emap->lookup(*eid));
     if(!(!(gid.null()) && 
            (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
             gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap  ||
             gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
             gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
     int eta=0,phi=0,depth=0;
     HcalDetId hid(detid);
     if(KnownBadCells_.find(hid.rawId())==KnownBadCells_.end()) continue;
     eta=hid.ieta();
     phi=hid.iphi();
     depth=hid.depth();

     int e=CalcEtaBin(sd,eta,depth)+1;
     if(detid.subdetId()==HcalBarrel && sd==HcalBarrel){
        double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
        if(!hb_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
        if(!hb_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
        if(!hb_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
        hb_data[eta+42][phi-1][depth-1].nChecks++;
        float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
        if(diff_t>LaserTimingThreshold){
             hb_data[eta+42][phi-1][depth-1].nBadTime++; 
             ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
        }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0); 
        if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
          float diff_e=((VAL/ave_e))/(val/ave_e_r);
          if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
               hb_data[eta+42][phi-1][depth-1].nBadEnergy++;
               ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
          }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
        }
     }
     if(detid.subdetId()==HcalEndcap && sd==HcalEndcap){
        double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
        if(!he_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
        if(!he_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
        if(!he_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
        he_data[eta+42][phi-1][depth-1].nChecks++;
        float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
        if(diff_t>LaserTimingThreshold){
          he_data[eta+42][phi-1][depth-1].nBadTime++;
          ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
        }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0); 
        if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
          float diff_e=((VAL/ave_e))/(val/ave_e_r);
          if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
            he_data[eta+42][phi-1][depth-1].nBadEnergy++;
            ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
          }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
        }
     }
     if(detid.subdetId()==HcalOuter && sd==HcalOuter){
        double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
        if(!ho_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
        if(!ho_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
        if(!ho_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
        ho_data[eta+42][phi-1][depth-1].nChecks++;
        float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
        if(diff_t>LaserTimingThreshold){
           ho_data[eta+42][phi-1][depth-1].nBadTime++;
           ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
        }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0); 
        if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
          float diff_e=((VAL/ave_e))/(val/ave_e_r);
          if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
            ho_data[eta+42][phi-1][depth-1].nBadEnergy++;
            ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
          }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
        }
     }
     if(detid.subdetId()==HcalForward && sd==HcalForward){
        double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
        if(!hf_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
        if(!hf_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
        if(!hf_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
        hf_data[eta+42][phi-1][depth-1].nChecks++;
        float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
        if(diff_t>LaserTimingThreshold){
           hf_data[eta+42][phi-1][depth-1].nBadTime++;
           ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
        }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0); 
        if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
          float diff_e=((VAL/ave_e))/(val/ave_e_r);
          if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
            hf_data[eta+42][phi-1][depth-1].nBadEnergy++;
            ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
          }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
        }
     }
   }
   for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++){
     DetId detid=emap->lookup(*eid);
     if (detid.det()!=DetId::Hcal) continue;
     HcalGenericDetId gid(emap->lookup(*eid));
     if(!(!(gid.null()) && 
            (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
             gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap  ||
             gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
             gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
     int eta=0,phi=0,depth=0;
     HcalDetId hid(detid);
     eta=hid.ieta();
     phi=hid.iphi();
     depth=hid.depth();
   
     if(detid.subdetId()==HcalBarrel){
        if(hb_data[eta+42][phi-1][depth-1].nBadTime>0){
           int e=CalcEtaBin(HcalBarrel,eta,depth)+1; 
           double val=hb_data[eta+42][phi-1][depth-1].nBadTime/hb_data[eta+42][phi-1][depth-1].nChecks;
           ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
        } 
        if(hb_data[eta+42][phi-1][depth-1].nBadEnergy>0){
           int e=CalcEtaBin(HcalBarrel,eta,depth)+1; 
           double val=hb_data[eta+42][phi-1][depth-1].nBadEnergy/hb_data[eta+42][phi-1][depth-1].nChecks;
           ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
        } 
     }
     if(detid.subdetId()==HcalEndcap){
        if(he_data[eta+42][phi-1][depth-1].nBadTime>0){
           int e=CalcEtaBin(HcalEndcap,eta,depth)+1; 
           double val=he_data[eta+42][phi-1][depth-1].nBadTime/he_data[eta+42][phi-1][depth-1].nChecks;
           ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
        } 
        if(he_data[eta+42][phi-1][depth-1].nBadEnergy>0){
           int e=CalcEtaBin(HcalEndcap,eta,depth)+1; 
           double val=he_data[eta+42][phi-1][depth-1].nBadEnergy/he_data[eta+42][phi-1][depth-1].nChecks;
           ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
        } 
     }
     if(detid.subdetId()==HcalOuter){
        if(ho_data[eta+42][phi-1][depth-1].nBadTime>0){
           int e=CalcEtaBin(HcalOuter,eta,depth)+1; 
           double val=ho_data[eta+42][phi-1][depth-1].nBadTime/ho_data[eta+42][phi-1][depth-1].nChecks;
           ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
        } 
        if(ho_data[eta+42][phi-1][depth-1].nBadEnergy>0){
           int e=CalcEtaBin(HcalOuter,eta,depth)+1; 
           double val=ho_data[eta+42][phi-1][depth-1].nBadEnergy/ho_data[eta+42][phi-1][depth-1].nChecks;
           ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val); 
        } 
     }
     if(detid.subdetId()==HcalForward){
        if(hf_data[eta+42][phi-1][depth-1].nBadTime>0){
           int e=CalcEtaBin(HcalForward,eta,depth)+1; 
           double val=hf_data[eta+42][phi-1][depth-1].nBadTime/hf_data[eta+42][phi-1][depth-1].nChecks;
           ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
        } 
        if(hf_data[eta+42][phi-1][depth-1].nBadEnergy>0){
           int e=CalcEtaBin(HcalForward,eta,depth)+1; 
           double val=hf_data[eta+42][phi-1][depth-1].nBadEnergy/hf_data[eta+42][phi-1][depth-1].nChecks;
           ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
        } 
     }
   }
}
bool HcalDetDiagLaserMonitor::get_ave_rbx ( int  sd,
int  side,
int  rbx,
float *  ave,
float *  rms 
) [private]

Definition at line 967 of file HcalDetDiagLaserMonitor.cc.

References hb_data, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, he_data, hf_data, ho_data, i, j, gen::k, n, plotscripts::rms(), mathSSE::sqrt(), and cond::rpcobgas::time.

Referenced by fillHistos().

                                                                                      {
   double xt=0,xxt=0; 
   int eta_min=0,eta_max=0,n=0;
   if(sd==HcalBarrel){
      if(side>0){eta_min=1; eta_max=29;}
      if(side<0){eta_min=-29; eta_max=-1;}
      if(rbx==1){
         for(int i=eta_min;i<=eta_max;i++) for(int j=71;j<=72;j++)for(int k=1;k<=3;k++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!hb_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!hb_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
         }
         for(int i=eta_min;i<=eta_max;i++) for(int j=1;j<=2;j++)for(int k=1;k<=3;k++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!hb_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!hb_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
         }
      
      }else{
         for(int i=eta_min;i<=eta_max;i++) for(int j=((rbx-1)*4-1);j<=((rbx-1)*4+2);j++)for(int k=1;k<=3;k++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!hb_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!hb_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
         }
      }
   }
   if(sd==HcalEndcap){
      if(side>0){eta_min=1; eta_max=29;}
      if(side<0){eta_min=-29; eta_max=-1;}
      if(rbx==1){
         for(int i=eta_min;i<=eta_max;i++) for(int j=71;j<=72;j++)for(int k=1;k<=3;k++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!he_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!he_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
         }
         for(int i=eta_min;i<=eta_max;i++) for(int j=1;j<=2;j++)for(int k=1;k<=3;k++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!he_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!he_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
         }
      
      }else{
         for(int i=eta_min;i<=eta_max;i++) for(int j=((rbx-1)*4-1);j<=((rbx-1)*4+2);j++)for(int k=1;k<=3;k++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!he_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!he_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
         }
      }
   }  
   if(sd==HcalForward){
      if(side>0){eta_min=29; eta_max=40;}
      if(side<0){eta_min=-40; eta_max=-29;}
      for(int i=eta_min;i<=eta_max;i++) for(int j=((rbx-1)*6+1);j<=((rbx-1)*6+6);j++)for(int k=1;k<=2;k++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!hf_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!hf_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
      }
   }   
   if(sd==HcalOuter){
      if(side==0){
        eta_min=-4,eta_max=4;
        if(rbx==1){
          for(int i=eta_min;i<=eta_max;i++) for(int j=71;j<=72;j++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
          }
          for(int i=eta_min;i<=eta_max;i++) for(int j=1;j<=4;j++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
          }
        
        }else{
          for(int i=eta_min;i<=eta_max;i++) for(int j=((rbx-1)*6-1);j<=((rbx-1)*6+4);j++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
          }
        }
      }
      if(side==-1){ eta_min=-10,eta_max=-5;} 
      if(side==-2){ eta_min=-15,eta_max=-11;} 
      if(side==1) { eta_min=5,  eta_max=10;} 
      if(side==2) { eta_min=11, eta_max=15;}
      if(side!=0){
        if(rbx==1){
          for(int i=eta_min;i<=eta_max;i++) for(int j=71;j<=72;j++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
          }
          for(int i=eta_min;i<=eta_max;i++) for(int j=1;j<=10;j++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
          }
        
        }else{
          for(int i=eta_min;i<=eta_max;i++) for(int j=((rbx-1)*12-1);j<=((rbx-1)*12+10);j++){
           double val,rms,time,time_rms;
           double TIME,TIME_RMS;
           if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
           if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
           xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
          }
        }      
      } 
   }
   if(n<10) return false;
   *ave=xt/n;
   *rms=sqrt(xxt/n-(xt*xt)/(n*n));
   return true; 
}
bool HcalDetDiagLaserMonitor::get_ave_subdet ( int  sd,
float *  ave_t,
float *  ave_e,
float *  ave_t_r,
float *  ave_e_r 
) [private]

Definition at line 736 of file HcalDetDiagLaserMonitor.cc.

References eta(), HcalDetDiagLaserData::get_average_amp(), HcalDetDiagLaserData::get_average_time(), hb_data, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, he_data, hf_data, ho_data, phi, plotscripts::rms(), and cond::rpcobgas::time.

Referenced by fillProblems().

                                                                                                          {
double T=0,nT=0,E=0,nE=0,Tr=0,nTr=0,Er=0,nEr=0;
   if(sd==HcalBarrel) for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++){ 
      for(int depth=1;depth<=2;depth++){
         if(hb_data[eta+42][phi-1][depth-1].get_statistics()>10){
            double ave=0,rms=0,time=0,time_rms=0;
            hb_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
            hb_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
            T+=time; nT++; E+=ave; nE++;
            if(hb_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
              Tr+=time; nTr++; Er+=ave; nEr++;}
         }
      } 
   } 
   // HE histograms
   if(sd==HcalEndcap) for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++){
      for(int depth=1;depth<=3;depth++){
         if(he_data[eta+42][phi-1][depth-1].get_statistics()>10){
            double ave=0; double rms=0; double time=0; double time_rms=0;
            he_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
            he_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
            T+=time; nT++; E+=ave; nE++;
            if(he_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
              Tr+=time; nTr++; Er+=ave; nEr++;}
        }
      }
   } 
   // HF histograms
   if(sd==HcalForward) for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++){
      for(int depth=1;depth<=2;depth++){
         if(hf_data[eta+42][phi-1][depth-1].get_statistics()>10){
            double ave=0; double rms=0; double time=0; double time_rms=0;
            hf_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
            hf_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
            T+=time; nT++; E+=ave; nE++;
            if(hf_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
              Tr+=time; nTr++; Er+=ave; nEr++;}
         }
      } 
   } 
   // HO histograms
   if(sd==HcalOuter) for(int eta=-15;eta<=15;eta++) for(int phi=1;phi<=72;phi++){
      for(int depth=4;depth<=4;depth++){
         if(ho_data[eta+42][phi-1][depth-1].get_statistics()>10){
            double ave=0; double rms=0; double time=0; double time_rms=0;
            ho_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
            ho_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
            T+=time; nT++; E+=ave; nE++;
            if(ho_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
              Tr+=time; nTr++; Er+=ave; nEr++;}
         }
      }
   } 
   if(nT<200 || nE<200 || nTr<200 || nEr<200) return false;
   *ave_t=T/nT;
   *ave_e=E/nE;
   *ave_t_r=Tr/nTr;
   *ave_e_r=Er/nEr;
   return true;
}
HcalDetDiagLaserData* HcalDetDiagLaserMonitor::GetCalib ( std::string  sd,
int  eta,
int  phi 
) [inline, private]

Definition at line 253 of file HcalDetDiagLaserMonitor.cc.

References abs, calib_data, ETA, and PHI.

                                                                  {
        int SD=0,ETA=0,PHI=0;
        if(sd.compare("HB")==0) SD=1; 
        if(sd.compare("HE")==0) SD=2; 
        if(sd.compare("HO")==0) SD=3; 
        if(sd.compare("HF")==0) SD=4; 
        if(SD==1 || SD==2){
          if(eta>0) ETA=1; else ETA=-1;
          if(phi==71 ||phi==72 || phi==1 || phi==2) PHI=71; else PHI=((phi-3)/4)*4+3;
        }else if(SD==3){
          if(abs(eta)<=4){
          ETA=0;
          if(phi==71 ||phi==72 || phi==1 || phi==2 || phi==3 || phi==4) PHI=71; else PHI=((phi-5)/6)*6+5;
        }else{
          if(abs(eta)>4  && abs(eta)<=10)  ETA=1;
          if(abs(eta)>10 && abs(eta)<=15)  ETA=2;
          if(eta<0) ETA=-ETA;
          if(phi==71 ||phi==72 || (phi>=1 && phi<=10)) PHI=71; else PHI=((phi-11)/12)*12+11;
        }
        }else if(SD==4){
          if(eta>0) ETA=1; else ETA=-1;
          if(phi>=1  && phi<=18) PHI=1;
          if(phi>=19 && phi<=36) PHI=19;
          if(phi>=37 && phi<=54) PHI=37;
          if(phi>=55 && phi<=72) PHI=55;
      }
      return &calib_data[SD][ETA+2][PHI-1];
      };   
void HcalDetDiagLaserMonitor::LoadDataset ( ) [private]

Definition at line 1778 of file HcalDetDiagLaserMonitor.cc.

References calib_data, createHTMLonly, dataset_seq_number, DatasetName, reco::tau::disc::Eta(), patZpeak::events, f, MonitorElement::Fill(), hb_data, he_data, hf_data, ho_data, ievt_, meEVT_, meRUN_, nHB, nHE, nHF, nHO, colinearityKinematic::Phi, plotscripts::rms(), DTTTrigCorrFirst::run, run_number, HcalDetDiagLaserData::set_data(), HcalDetDiagLaserData::set_statistics(), HcalDetDiagLaserData::set_statistics1(), matplotRender::t, and cond::rpcobgas::time.

Referenced by beginRun().

                                         {
double amp,rms,time,time_rms;
int Eta,Phi,Depth,Statistic;
char subdet[10];
TFile *f;
      if(DatasetName.size()==0) return;
      createHTMLonly=true;
      if(gSystem->AccessPathName(DatasetName.c_str())) return;
      f = new TFile(DatasetName.c_str(),"READ");
 
      if(!f->IsOpen()) return ;

      TTree*  t=0;
      t=(TTree*)f->Get("HCAL Laser data");
      if(!t) return;
      t->SetBranchAddress("Subdet",   subdet);
      t->SetBranchAddress("eta",      &Eta);
      t->SetBranchAddress("phi",      &Phi);
      t->SetBranchAddress("depth",    &Depth);
      t->SetBranchAddress("amp",      &amp);
      t->SetBranchAddress("rms",      &rms);
      t->SetBranchAddress("time",     &time);
      t->SetBranchAddress("time_rms", &time_rms);
      t->SetBranchAddress("statistic",&Statistic);
      for(int ievt=0;ievt<t->GetEntries();ievt++){
         t->GetEntry(ievt);
         if(strcmp(subdet,"HB")==0){ nHB++;
            hb_data[Eta+42][Phi-1][Depth-1].set_data(amp,rms,time,time_rms);
            hb_data[Eta+42][Phi-1][Depth-1].set_statistics(Statistic);
            hb_data[Eta+42][Phi-1][Depth-1].set_statistics1(Statistic);
         }
         if(strcmp(subdet,"HE")==0){ nHE++; 
            he_data[Eta+42][Phi-1][Depth-1].set_data(amp,rms,time,time_rms);
            he_data[Eta+42][Phi-1][Depth-1].set_statistics(Statistic);
            he_data[Eta+42][Phi-1][Depth-1].set_statistics1(Statistic);
         }
         if(strcmp(subdet,"HO")==0){ nHO++;
            ho_data[Eta+42][Phi-1][Depth-1].set_data(amp,rms,time,time_rms);
            ho_data[Eta+42][Phi-1][Depth-1].set_statistics(Statistic);
            ho_data[Eta+42][Phi-1][Depth-1].set_statistics1(Statistic);
         }
         if(strcmp(subdet,"HF")==0){ nHF++;
            hf_data[Eta+42][Phi-1][Depth-1].set_data(amp,rms,time,time_rms);
            hf_data[Eta+42][Phi-1][Depth-1].set_statistics(Statistic);
            hf_data[Eta+42][Phi-1][Depth-1].set_statistics1(Statistic);
        }
        if(strcmp(subdet,"CALIB_HB")==0){
            calib_data[1][Eta+2][Phi-1].set_data(amp,rms,time,time_rms);
            calib_data[1][Eta+2][Phi-1].set_statistics(Statistic);
            calib_data[1][Eta+2][Phi-1].set_statistics1(Statistic);
        }
        if(strcmp(subdet,"CALIB_HE")==0){
            calib_data[2][Eta+2][Phi-1].set_data(amp,rms,time,time_rms);
            calib_data[2][Eta+2][Phi-1].set_statistics(Statistic);
            calib_data[2][Eta+2][Phi-1].set_statistics1(Statistic);
        }
        if(strcmp(subdet,"CALIB_HO")==0){
            calib_data[3][Eta+2][Phi-1].set_data(amp,rms,time,time_rms);
            calib_data[3][Eta+2][Phi-1].set_statistics(Statistic);
            calib_data[3][Eta+2][Phi-1].set_statistics1(Statistic);
        }
        if(strcmp(subdet,"CALIB_HF")==0){
            calib_data[4][Eta+2][Phi-1].set_data(amp,rms,time,time_rms);
            calib_data[4][Eta+2][Phi-1].set_statistics(Statistic);
            calib_data[4][Eta+2][Phi-1].set_statistics1(Statistic); 
        }
      }
      TObjString *STR1=(TObjString *)f->Get("run number");
      if(STR1){ int run; sscanf(STR1->String(),"%i",&run); meRUN_->Fill(run); run_number=run;}

      TObjString *STR2=(TObjString *)f->Get("Total events processed");
      if(STR2){ int events; sscanf(STR2->String(),"%i",&events); meEVT_->Fill(events); ievt_=events;}

      TObjString *STR3=(TObjString *)f->Get("Dataset number");
      if(STR3){ int ds; sscanf(STR3->String(),"%i",&ds); dataset_seq_number=ds;}
      f->Close(); 
} 
void HcalDetDiagLaserMonitor::LoadReference ( ) [private]

Definition at line 1741 of file HcalDetDiagLaserMonitor.cc.

References calib_data, reco::tau::disc::Eta(), f, hb_data, he_data, hf_data, ho_data, IsReference, colinearityKinematic::Phi, ReferenceData, ReferenceRun, plotscripts::rms(), HcalDetDiagLaserData::set_reference(), matplotRender::t, and cond::rpcobgas::time.

Referenced by beginRun().

                                           {
double amp,rms,time,time_rms;
int Eta,Phi,Depth;
char subdet[10];
TFile *f;
 if(gSystem->AccessPathName(ReferenceData.c_str())) return;
 f = new TFile(ReferenceData.c_str(),"READ");
 
 if(!f->IsOpen()) return ;
 TObjString *STR=(TObjString *)f->Get("run number");
 
 if(STR){ std::string Ref(STR->String()); ReferenceRun=Ref;}
 
      TTree*  t=(TTree*)f->Get("HCAL Laser data");
      if(!t) return;
      t->SetBranchAddress("Subdet",   subdet);
      t->SetBranchAddress("eta",      &Eta);
      t->SetBranchAddress("phi",      &Phi);
      t->SetBranchAddress("depth",    &Depth);
      t->SetBranchAddress("amp",      &amp);
      t->SetBranchAddress("rms",      &rms);
      t->SetBranchAddress("time",     &time);
      t->SetBranchAddress("time_rms", &time_rms);
      for(int ievt=0;ievt<t->GetEntries();ievt++){
         t->GetEntry(ievt);
         if(strcmp(subdet,"HB")==0) hb_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
         if(strcmp(subdet,"HE")==0) he_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
         if(strcmp(subdet,"HO")==0) ho_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
         if(strcmp(subdet,"HF")==0) hf_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
         if(strcmp(subdet,"CALIB_HB")==0) calib_data[1][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
         if(strcmp(subdet,"CALIB_HE")==0) calib_data[2][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
         if(strcmp(subdet,"CALIB_HO")==0) calib_data[3][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
         if(strcmp(subdet,"CALIB_HF")==0) calib_data[4][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
     }
      f->Close();
      IsReference=true;
} 
void HcalDetDiagLaserMonitor::SaveRaddamData ( ) [private]

Definition at line 1856 of file HcalDetDiagLaserMonitor.cc.

References adc2fC, HcalRaddamData::CUT1EVNT, HcalRaddamData::CUT2EVNT, dataset_seq_number, Raddam_ch::depth, eta(), Raddam_ch::eta, i, j, MultiGaussianStateTransform::N, n, OutputFilePath, Overwrite, Raddam_ch::phi, phi, run_number, S1, HcalRaddamData::s1_adc, HcalRaddamData::S1BINWIDTH, HcalRaddamData::S1CHI2, HcalRaddamData::S1FITMEAN, HcalRaddamData::S1FITMEANER, HcalRaddamData::S1FITSIGMA, HcalRaddamData::S1MEAN, HcalRaddamData::S1NDF, HcalRaddamData::S1RMS, S2, HcalRaddamData::s2_adc, HcalRaddamData::S2BINWIDTH, HcalRaddamData::S2CHI2, HcalRaddamData::S2FITMEAN, HcalRaddamData::S2FITMEANER, HcalRaddamData::S2FITSIGMA, HcalRaddamData::S2MEAN, HcalRaddamData::S2NDF, HcalRaddamData::S2RMS, matplotRender::t, interactiveExample::theFile, cond::rpcobgas::time, HcalRaddamData::TOTEVNT, xmlFile(), and XmlFilePath.

Referenced by endRun().

                                            {
float adc_range[20]={14,28,40,52,67,132,202,262,322,397,722,1072,1372,1672,2047,3672,5422,6922,8422,10297};
int   adc_bins[20]={1,2,3,4,5,5,10,15,20,25,25,50,75,100,125,125,250,375,500,625};
char str[100];
      TF1 *fitFunc = new TF1("fitFunc","gaus");
      if(fitFunc==0) return;
      for(int i=0;i<56;i++){
          float sum1=0,sum2=0,n=0;
          S1[i]=S2[i]=0;
          for(int j=0;j<128;j++){
            sum1+=(adc2fC[j]-2.5)*Raddam_data[i].s1_adc[j];
            sum2+=(adc2fC[j]-2.5)*Raddam_data[i].s2_adc[j];
            n+=Raddam_data[i].s1_adc[j];
          }
          if(n<100) continue;
          sum1=sum1/n;
          sum2=sum2/n;
          int N=0;
          int Ws1=1,Ws2=1;
          for(N=1;N<19;N++) if(sum1>adc_range[N-1] && sum1<adc_range[N]) break;
          Ws1=adc_bins[N+1];
          for(N=1;N<19;N++) if(sum2>adc_range[N-1] && sum2<adc_range[N]) break;
          Ws2=adc_bins[N+1];
          sprintf(str,"Raddam(%i,%i,%i) S1",RADDAM_CH[i].eta,RADDAM_CH[i].phi,RADDAM_CH[i].depth);
          S1[i]=new TH1F(str,str,10000/Ws1,0,10000);
          sprintf(str,"Raddam(%i,%i,%i) S2",RADDAM_CH[i].eta,RADDAM_CH[i].phi,RADDAM_CH[i].depth);
          S2[i]=new TH1F(str,str,10000/Ws1,0,10000);
          for(int j=0;j<128;j++){
            S1[i]->Fill(adc2fC[j]-2.5,Raddam_data[i].s1_adc[j]);
            S2[i]->Fill(adc2fC[j]-2.5,Raddam_data[i].s2_adc[j]); 
          }
          double parm[3];
          S1[i]->Fit("fitFunc");
          S1[i]->GetFunction("fitFunc")->GetParameters(parm);
          Raddam_data[i].S1MEAN=S1[i]->GetMean();
          Raddam_data[i].S1RMS=S1[i]->GetRMS();
          Raddam_data[i].S1FITMEAN=parm[1];
          Raddam_data[i].S1FITMEANER=S1[i]->GetFunction("fitFunc")->GetParError(1);
          Raddam_data[i].S1FITSIGMA=parm[2];
          Raddam_data[i].S1CHI2=S1[i]->GetFunction("fitFunc")->GetChisquare();
          Raddam_data[i].S1NDF=S1[i]->GetFunction("fitFunc")->GetNDF();
          Raddam_data[i].S1BINWIDTH=Ws1;
          S2[i]->Fit("fitFunc");
          S2[i]->GetFunction("fitFunc")->GetParameters(parm);
          Raddam_data[i].S2MEAN=S2[i]->GetMean();
          Raddam_data[i].S2RMS=S2[i]->GetRMS();
          Raddam_data[i].S2FITMEAN=parm[1];
          Raddam_data[i].S2FITMEANER=S2[i]->GetFunction("fitFunc")->GetParError(1);
          Raddam_data[i].S2FITSIGMA=parm[2];
          Raddam_data[i].S2CHI2=S2[i]->GetFunction("fitFunc")->GetChisquare();
          Raddam_data[i].S2NDF=S2[i]->GetFunction("fitFunc")->GetNDF();
          Raddam_data[i].S2BINWIDTH=Ws2;
      }
      if(XmlFilePath.size()>0){
          char TIME[40];
          Long_t t; t=time(0); strftime(TIME,30,"%F %T",localtime(&t));      
          //create XML file
          if(!Overwrite){
             sprintf(str,"HcalDetDiagRaddam_%i_%i.xml",run_number,dataset_seq_number);
          }else{
             sprintf(str,"HcalDetDiagRaddam.xml");
          }
          std::string xmlName=str;
          ofstream xmlFile;
          xmlFile.open(xmlName.c_str());
          xmlFile<<"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n";
          xmlFile<<"<ROOT>\n";
          xmlFile<<"  <HEADER>\n";
          xmlFile<<"    <TYPE>\n";
          xmlFile<<"      <EXTENSION_TABLE_NAME>HCAL_RADDAM</EXTENSION_TABLE_NAME>\n";
          xmlFile<<"      <NAME>HCAL Raddam</NAME>\n";
          xmlFile<<"    </TYPE>\n";
          xmlFile<<"    <!-- run details -->\n";
          xmlFile<<"    <RUN>\n";
          xmlFile<<"      <RUN_TYPE>TEST LOCAL-RUN</RUN_TYPE>\n";
          xmlFile<<"      <RUN_NUMBER>"<<run_number<<"</RUN_NUMBER>\n";
          xmlFile<<"      <RUN_BEGIN_TIMESTAMP>"<<TIME<<"</RUN_BEGIN_TIMESTAMP>\n";
          xmlFile<<"      <COMMENT_DESCRIPTION>hcal raddam data</COMMENT_DESCRIPTION>\n";
          xmlFile<<"      <LOCATION>P5</LOCATION>\n";
          xmlFile<<"      <INITIATED_BY_USER>dma</INITIATED_BY_USER>\n";
          xmlFile<<"    </RUN>\n";
          xmlFile<<"  </HEADER>\n";
          xmlFile<<"  <DATA_SET>\n";
          xmlFile<<"     <COMMENT_DESCRIPTION>Test Raddam data</COMMENT_DESCRIPTION>\n";
          xmlFile<<"     <CREATE_TIMESTAMP>"<<TIME<<"</CREATE_TIMESTAMP>\n";
          xmlFile<<"     <CREATED_BY_USER>dma</CREATED_BY_USER>\n";
          xmlFile<<"     <VERSION>Test_Version_1</VERSION>\n";
 
          for(int i=0;i<56;i++){
             xmlFile<<"     <DATA>\n";
             xmlFile<<"        <SUBDET>HF</SUBDET>\n";
             xmlFile<<"        <IETA>"<<RADDAM_CH[i].eta<<"</IETA>\n";
             xmlFile<<"        <IPHI>"<<RADDAM_CH[i].phi<<"</IPHI>\n";
             xmlFile<<"        <DEPTH>"<<RADDAM_CH[i].depth<<"</DEPTH>\n";

             xmlFile<<"        <TOTEVNT>"<<Raddam_data[i].TOTEVNT<<"</TOTEVNT>\n";
             xmlFile<<"        <CUT1EVNT>"<<Raddam_data[i].CUT1EVNT<<"</CUT1EVNT>\n";
             xmlFile<<"        <CUT2EVNT>"<<Raddam_data[i].CUT2EVNT<<"</CUT2EVNT>\n";

             xmlFile<<"        <S1MEAN>"<<Raddam_data[i].S1MEAN <<"</S1MEAN>\n";
             xmlFile<<"        <S1RMS>"<<Raddam_data[i].S1RMS <<"</S1RMS>\n";
             xmlFile<<"        <S1FITMEAN>"<<Raddam_data[i].S1FITMEAN <<"</S1FITMEAN>\n";
             xmlFile<<"        <S1FITMEANER>"<<Raddam_data[i].S1FITMEANER <<"</S1FITMEANER>\n";
             xmlFile<<"        <S1FITSIGMA>"<<Raddam_data[i].S1FITSIGMA <<"</S1FITSIGMA>\n";
             xmlFile<<"        <S1CHI2>"<<Raddam_data[i].S1CHI2 <<"</S1CHI2>\n";
             xmlFile<<"        <S1NDF>"<<Raddam_data[i].S1NDF <<"</S1NDF>\n";
             xmlFile<<"        <S1BINWIDTH>"<<Raddam_data[i].S1BINWIDTH <<"</S1BINWIDTH>\n";

             xmlFile<<"        <S2MEAN>"<<Raddam_data[i].S2MEAN <<"</S2MEAN>\n";
             xmlFile<<"        <S2RMS>"<<Raddam_data[i].S2RMS <<"</S2RMS>\n";
             xmlFile<<"        <S2FITMEAN>"<<Raddam_data[i].S2FITMEAN <<"</S2FITMEAN>\n";
             xmlFile<<"        <S2FITMEANER>"<<Raddam_data[i].S2FITMEANER <<"</S2FITMEANER>\n";
             xmlFile<<"        <S2FITSIGMA>"<<Raddam_data[i].S2FITSIGMA <<"</S2FITSIGMA>\n";
             xmlFile<<"        <S2CHI2>"<<Raddam_data[i].S2CHI2 <<"</S2CHI2>\n";
             xmlFile<<"        <S2NDF>"<<Raddam_data[i].S2NDF <<"</S2NDF>\n";
             xmlFile<<"        <S2BINWIDTH>"<<Raddam_data[i].S2BINWIDTH <<"</S2BINWIDTH>\n";
             xmlFile<<"    </DATA>\n";
          }
          xmlFile<<"  </DATA_SET>\n";
          xmlFile<<"</ROOT>\n";

          xmlFile.close();
          sprintf(str,"zip %s.zip %s",xmlName.c_str(),xmlName.c_str());
          system(str);
          sprintf(str,"rm -f %s",xmlName.c_str());
          system(str);
          sprintf(str,"mv -f %s.zip %s",xmlName.c_str(),XmlFilePath.c_str());
          system(str);
      }
      if(OutputFilePath.size()>0){
         if(!Overwrite){
            sprintf(str,"%sHcalDetDiagRaddamData_run%06i_%i.root",OutputFilePath.c_str(),run_number,dataset_seq_number);
         }else{
            sprintf(str,"%sHcalDetDiagRaddamData.root",OutputFilePath.c_str());
         }
         TFile *theFile = new TFile(str, "RECREATE");
         if(!theFile->IsOpen()) return;
         theFile->cd();
         for(int i=0;i<56;i++){
            if(S1[i]!=0)S1[i]->Write();
            if(S2[i]!=0)S2[i]->Write();
         }
         theFile->Write();
         theFile->Close();
      } 
}
void HcalDetDiagLaserMonitor::SaveReference ( ) [private]

Definition at line 1410 of file HcalDetDiagLaserMonitor.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), calib_data, dataset_seq_number, HcalDetId::depth(), DetId::det(), cond::rpcobgas::detid, emap, eta(), reco::tau::disc::Eta(), patZpeak::events, HcalDetDiagLaserData::get_average_amp1(), HcalDetDiagLaserData::get_average_time1(), HcalDetDiagLaserData::get_statistics1(), HcalDetDiagLaserData::get_status(), hb_data, DetId::Hcal, HcalBarrel, HcalEndcap, HcalForward, HcalGenericDetId::HcalGenBarrel, HcalGenericDetId::HcalGenEndcap, HcalGenericDetId::HcalGenForward, HcalGenericDetId::HcalGenOuter, HcalOuter, he_data, hf_data, ho_data, i, HcalDetId::ieta(), ievt_, HcalDetId::iphi(), j, gen::k, HcalElectronicsMap::lookup(), OutputFilePath, Overwrite, phi, colinearityKinematic::Phi, plotscripts::rms(), DTTTrigCorrFirst::run, run_number, step1_ZMM_7Tev::Status, DetId::subdetId(), matplotRender::t, interactiveExample::theFile, cond::rpcobgas::time, diffTreeTool::tree, xmlFile(), and XmlFilePath.

Referenced by analyze(), and endRun().

                                           {
double amp,rms,Time,time_rms;
int    Eta,Phi,Depth,Statistic,Status=0;
char   Subdet[10],str[500];
   if(OutputFilePath.size()>0){
       if(!Overwrite){
          sprintf(str,"%sHcalDetDiagLaserData_run%06i_%i.root",OutputFilePath.c_str(),run_number,dataset_seq_number);
       }else{
          sprintf(str,"%sHcalDetDiagLaserData.root",OutputFilePath.c_str());
       }
       TFile *theFile = new TFile(str, "RECREATE");
       if(!theFile->IsOpen()) return;
       theFile->cd();
       sprintf(str,"%d",run_number); TObjString run(str);    run.Write("run number");
       sprintf(str,"%d",ievt_);      TObjString events(str); events.Write("Total events processed");
       sprintf(str,"%d",dataset_seq_number);      TObjString dsnum(str);  dsnum.Write("Dataset number");
       Long_t t; t=time(0); strftime(str,30,"%F %T",localtime(&t)); TObjString tm(str);  tm.Write("Dataset creation time");

       TTree *tree   =new TTree("HCAL Laser data","HCAL Laser data");
       if(tree==0)   return;
       tree->Branch("Subdet",   &Subdet,         "Subdet/C");
       tree->Branch("eta",      &Eta,            "Eta/I");
       tree->Branch("phi",      &Phi,            "Phi/I");
       tree->Branch("depth",    &Depth,          "Depth/I");
       tree->Branch("statistic",&Statistic,      "Statistic/I");
       tree->Branch("status",   &Status,         "Status/I");
       tree->Branch("amp",      &amp,            "amp/D");
       tree->Branch("rms",      &rms,            "rms/D");
       tree->Branch("time",     &Time,           "time/D");
       tree->Branch("time_rms", &time_rms,       "time_rms/D");
       sprintf(Subdet,"HB");
       for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=2;depth++){
          if((Statistic=hb_data[eta+42][phi-1][depth-1].get_statistics1())>10){
             Eta=eta; Phi=phi; Depth=depth;
             Status=hb_data[eta+42][phi-1][depth-1].get_status();
             hb_data[eta+42][phi-1][depth-1].get_average_amp1(&amp,&rms);
             hb_data[eta+42][phi-1][depth-1].get_average_time1(&Time,&time_rms);
             tree->Fill();
          }
       } 
       sprintf(Subdet,"HE");
       for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=3;depth++){
         if((Statistic=he_data[eta+42][phi-1][depth-1].get_statistics1())>10){
            Eta=eta; Phi=phi; Depth=depth;
            Status=he_data[eta+42][phi-1][depth-1].get_status();
            he_data[eta+42][phi-1][depth-1].get_average_amp1(&amp,&rms);
            he_data[eta+42][phi-1][depth-1].get_average_time1(&Time,&time_rms);
            tree->Fill();
         }
       } 
       sprintf(Subdet,"HO");
       for(int eta=-15;eta<=15;eta++) for(int phi=1;phi<=72;phi++) for(int depth=4;depth<=4;depth++){
         if((Statistic=ho_data[eta+42][phi-1][depth-1].get_statistics1())>10){
             Eta=eta; Phi=phi; Depth=depth;
             Status=ho_data[eta+42][phi-1][depth-1].get_status();
             ho_data[eta+42][phi-1][depth-1].get_average_amp1(&amp,&rms);
             ho_data[eta+42][phi-1][depth-1].get_average_time1(&Time,&time_rms);
             tree->Fill();
         }
       } 
       sprintf(Subdet,"HF");
       for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=2;depth++){
         if((Statistic=hf_data[eta+42][phi-1][depth-1].get_statistics1())>10){
             Eta=eta; Phi=phi; Depth=depth;
             Status=hf_data[eta+42][phi-1][depth-1].get_status();
             hf_data[eta+42][phi-1][depth-1].get_average_amp1(&amp,&rms);
             hf_data[eta+42][phi-1][depth-1].get_average_time1(&Time,&time_rms);
             tree->Fill();
         }
       }
       sprintf(Subdet,"CALIB_HB");
       for(int eta=-1;eta<=1;eta++) for(int phi=1;phi<=72;phi++){
          if((Statistic=calib_data[1][eta+2][phi-1].get_statistics1())>10){
             Eta=eta; Phi=phi; Depth=0;
             Status=calib_data[1][eta+2][phi-1].get_status();
             calib_data[1][eta+2][phi-1].get_average_amp1(&amp,&rms);
             calib_data[1][eta+2][phi-1].get_average_time1(&Time,&time_rms);
             tree->Fill();
          }
       } 
       sprintf(Subdet,"CALIB_HE");
       for(int eta=-1;eta<=1;eta++) for(int phi=1;phi<=72;phi++){
          if((Statistic=calib_data[2][eta+2][phi-1].get_statistics1())>10){
             Eta=eta; Phi=phi; Depth=0;
             Status=calib_data[2][eta+2][phi-1].get_status();
             calib_data[2][eta+2][phi-1].get_average_amp1(&amp,&rms);
             calib_data[2][eta+2][phi-1].get_average_time1(&Time,&time_rms);
             tree->Fill();
          }
       } 
       sprintf(Subdet,"CALIB_HO");
       for(int eta=-2;eta<=2;eta++) for(int phi=1;phi<=72;phi++){
          if((Statistic=calib_data[3][eta+2][phi-1].get_statistics1())>10){
             Eta=eta; Phi=phi; Depth=0;
             Status=calib_data[3][eta+2][phi-1].get_status();
             calib_data[3][eta+2][phi-1].get_average_amp1(&amp,&rms);
             calib_data[3][eta+2][phi-1].get_average_time1(&Time,&time_rms);
             tree->Fill();
          }
       } 
       sprintf(Subdet,"CALIB_HF");
       for(int eta=-2;eta<=2;eta++) for(int phi=1;phi<=72;phi++){
          if((Statistic=calib_data[4][eta+2][phi-1].get_statistics1())>10){
             Eta=eta; Phi=phi; Depth=0;
             Status=calib_data[4][eta+2][phi-1].get_status();
             calib_data[4][eta+2][phi-1].get_average_amp1(&amp,&rms);
             calib_data[4][eta+2][phi-1].get_average_time1(&Time,&time_rms);
             tree->Fill();
          }
       } 
       theFile->Write();
       theFile->Close();
   }
   if(XmlFilePath.size()>0){
      char TIME[40];
      Long_t t; t=time(0); strftime(TIME,30,"%F %T",localtime(&t));
      //create XML file
      if(!Overwrite){
         sprintf(str,"HcalDetDiagLaser_%i_%i.xml",run_number,dataset_seq_number);
      }else{
         sprintf(str,"HcalDetDiagLaser.xml");
      }
      std::string xmlName=str;
      ofstream xmlFile;
      xmlFile.open(xmlName.c_str());

      xmlFile<<"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
      xmlFile<<"<ROOT>\n";
      xmlFile<<"  <HEADER>\n";
      xmlFile<<"    <HINTS mode='only-det-root'/>\n";
      xmlFile<<"    <TYPE>\n";
      xmlFile<<"      <EXTENSION_TABLE_NAME>HCAL_DETMON_LED_LASER_V1</EXTENSION_TABLE_NAME>\n";
      xmlFile<<"      <NAME>HCAL Laser HBHE HPD [abort gap global]</NAME>\n";
      xmlFile<<"    </TYPE>\n";
      xmlFile<<"    <!-- run details -->\n";
      xmlFile<<"    <RUN>\n";
      xmlFile<<"      <RUN_TYPE>GLOBAL-RUN</RUN_TYPE>\n";
      xmlFile<<"      <RUN_NUMBER>"<<run_number<<"</RUN_NUMBER>\n";
      xmlFile<<"      <RUN_BEGIN_TIMESTAMP>2009-01-01 00:00:00</RUN_BEGIN_TIMESTAMP>\n";
      xmlFile<<"      <COMMENT_DESCRIPTION>hcal laser data</COMMENT_DESCRIPTION>\n";
      xmlFile<<"      <LOCATION>P5</LOCATION>\n";
      xmlFile<<"      <INITIATED_BY_USER>dma</INITIATED_BY_USER>\n";
      xmlFile<<"    </RUN>\n";
      xmlFile<<"  </HEADER>\n";
      xmlFile<<"  <DATA_SET>\n";
      xmlFile<<"     <!-- optional dataset metadata -->\n\n";
      xmlFile<<"     <SET_NUMBER>"<<dataset_seq_number<<"</SET_NUMBER>\n";
      xmlFile<<"     <SET_BEGIN_TIMESTAMP>2009-01-01 00:00:00</SET_BEGIN_TIMESTAMP>\n";
      xmlFile<<"     <SET_END_TIMESTAMP>2009-01-01 00:00:00</SET_END_TIMESTAMP>\n";
      xmlFile<<"     <NUMBER_OF_EVENTS_IN_SET>"<<ievt_<<"</NUMBER_OF_EVENTS_IN_SET>\n";
      xmlFile<<"     <COMMENT_DESCRIPTION>Automatic DQM output</COMMENT_DESCRIPTION>\n";
      xmlFile<<"     <DATA_FILE_NAME>"<< xmlName <<"</DATA_FILE_NAME>\n";
      xmlFile<<"     <IMAGE_FILE_NAME>data plot url or file path</IMAGE_FILE_NAME>\n";
      xmlFile<<"     <!-- who and when created this dataset-->\n\n";
      xmlFile<<"     <CREATE_TIMESTAMP>"<<TIME<<"</CREATE_TIMESTAMP>\n";
      xmlFile<<"     <CREATED_BY_USER>dma</CREATED_BY_USER>\n";
      xmlFile<<"     <!-- version (string) and subversion (number) -->\n";
      xmlFile<<"     <!-- fields are used to read data back from the database -->\n\n";
      xmlFile<<"     <VERSION>"<<run_number<<dataset_seq_number<<"</VERSION>\n";
      xmlFile<<"     <SUBVERSION>1</SUBVERSION>\n";
      xmlFile<<"     <!--  Assign predefined dataset attributes -->\n\n";
      xmlFile<<"     <PREDEFINED_ATTRIBUTES>\n";
      xmlFile<<"        <ATTRIBUTE>\n";
      xmlFile<<"           <NAME>HCAL Dataset Status</NAME>\n";
      xmlFile<<"           <VALUE>VALID</VALUE>\n";
      xmlFile<<"        </ATTRIBUTE>\n";
      xmlFile<<"     </PREDEFINED_ATTRIBUTES>\n";
      xmlFile<<"     <!-- multiple data block records -->\n\n";

      std::vector <HcalElectronicsId> AllElIds = emap->allElectronicsIdPrecision();
      for(std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++){
         DetId detid=emap->lookup(*eid);
         if (detid.det()!=DetId::Hcal) continue;
         HcalGenericDetId gid(emap->lookup(*eid));
         if(!(!(gid.null()) && 
            (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
             gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap  ||
             gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
             gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
         int eta,phi,depth; 
         std::string subdet="";
         HcalDetId hid(detid);
         eta=hid.ieta();
         phi=hid.iphi();
         depth=hid.depth(); 
         
         double e=0,e_rms=0,t=0,t_rms=0;
         if(detid.subdetId()==HcalBarrel){
             subdet="HB";
             Statistic=hb_data[eta+42][phi-1][depth-1].get_statistics1();
             Status   =hb_data[eta+42][phi-1][depth-1].get_status();
             hb_data[eta+42][phi-1][depth-1].get_average_amp1(&e,&e_rms);
             hb_data[eta+42][phi-1][depth-1].get_average_time1(&t,&t_rms);
         }else if(detid.subdetId()==HcalEndcap){
             subdet="HE";
             Statistic=he_data[eta+42][phi-1][depth-1].get_statistics1();
             Status   =he_data[eta+42][phi-1][depth-1].get_status();
             he_data[eta+42][phi-1][depth-1].get_average_amp1(&e,&e_rms);
             he_data[eta+42][phi-1][depth-1].get_average_time1(&t,&t_rms);
         }else if(detid.subdetId()==HcalForward){
             subdet="HF";
             Statistic=hf_data[eta+42][phi-1][depth-1].get_statistics1();
             Status   =hf_data[eta+42][phi-1][depth-1].get_status();
             hf_data[eta+42][phi-1][depth-1].get_average_amp1(&e,&e_rms);
             hf_data[eta+42][phi-1][depth-1].get_average_time1(&t,&t_rms);
         }else if(detid.subdetId()==HcalOuter){
             subdet="HO";
             Statistic=ho_data[eta+42][phi-1][depth-1].get_statistics1();
             Status   =ho_data[eta+42][phi-1][depth-1].get_status();
             ho_data[eta+42][phi-1][depth-1].get_average_amp1(&e,&e_rms);
             ho_data[eta+42][phi-1][depth-1].get_average_time1(&t,&t_rms);
         }else continue;
         xmlFile<<"       <DATA>\n";
         xmlFile<<"          <NUMBER_OF_EVENTS_USED>"<<Statistic<<"</NUMBER_OF_EVENTS_USED>\n";
         xmlFile<<"          <SIGNAL_MEAN>"<<e<<"</SIGNAL_MEAN>\n";
         xmlFile<<"          <SIGNAL_RMS>"<<e_rms<<"</SIGNAL_RMS>\n";
         xmlFile<<"          <TIME_MEAN>"<<t<<"</TIME_MEAN>\n";
         xmlFile<<"          <TIME_RMS>"<<t_rms<<"</TIME_RMS>\n";
         xmlFile<<"          <CHANNEL_STATUS_WORD>"<<Status<<"</CHANNEL_STATUS_WORD>\n";
         xmlFile<<"          <CHANNEL_OBJECTNAME>HcalDetId</CHANNEL_OBJECTNAME>\n";
         xmlFile<<"             <SUBDET>"<<subdet<<"</SUBDET>\n";
         xmlFile<<"             <IETA>"<<eta<<"</IETA>\n";
         xmlFile<<"             <IPHI>"<<phi<<"</IPHI>\n";
         xmlFile<<"             <DEPTH>"<<depth<<"</DEPTH>\n";
         xmlFile<<"             <TYPE>0</TYPE>\n";
         xmlFile<<"       </DATA>\n";
      }
      xmlFile<<"  </DATA_SET>\n";
      xmlFile<<"</ROOT>\n";
      xmlFile.close();


      //create CALIB XML file 
      sprintf(str,"HcalDetDiagLaserCalib_%i_%i.xml",run_number,dataset_seq_number);
      std::string xmlNameCalib=str;
      ofstream xmlFileCalib;
      xmlFileCalib.open(xmlNameCalib.c_str());

      xmlFileCalib<<"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
      xmlFileCalib<<"<ROOT>\n";
      xmlFileCalib<<"  <HEADER>\n";
      xmlFileCalib<<"    <HINTS mode='only-det-root'/>\n";
      xmlFileCalib<<"    <TYPE>\n";
      xmlFileCalib<<"      <EXTENSION_TABLE_NAME>HCAL_DETMON_LED_LASER_V1</EXTENSION_TABLE_NAME>\n";
      xmlFileCalib<<"      <NAME>HCAL Laser CALIB [abort gap global]</NAME>\n";
      xmlFileCalib<<"    </TYPE>\n";
      xmlFileCalib<<"    <!-- run details -->\n";
      xmlFileCalib<<"    <RUN>\n";
      xmlFileCalib<<"      <RUN_TYPE>Global-RUN</RUN_TYPE>\n";
      xmlFileCalib<<"      <RUN_NUMBER>"<<run_number<<"</RUN_NUMBER>\n";
      xmlFileCalib<<"      <RUN_BEGIN_TIMESTAMP>2009-01-01 00:00:00</RUN_BEGIN_TIMESTAMP>\n";
      xmlFileCalib<<"      <COMMENT_DESCRIPTION>hcal Laser CALIB data</COMMENT_DESCRIPTION>\n";
      xmlFileCalib<<"      <LOCATION>P5</LOCATION>\n";
      xmlFileCalib<<"      <INITIATED_BY_USER>dma</INITIATED_BY_USER>\n";
      xmlFileCalib<<"    </RUN>\n";
      xmlFileCalib<<"  </HEADER>\n";
      xmlFileCalib<<"  <DATA_SET>\n";
      xmlFileCalib<<"     <!-- optional dataset metadata -->\n\n";
      xmlFileCalib<<"     <SET_NUMBER>"<<dataset_seq_number<<"</SET_NUMBER>\n";
      xmlFileCalib<<"     <SET_BEGIN_TIMESTAMP>2009-01-01 00:00:00</SET_BEGIN_TIMESTAMP>\n";
      xmlFileCalib<<"     <SET_END_TIMESTAMP>2009-01-01 00:00:00</SET_END_TIMESTAMP>\n";
      xmlFileCalib<<"     <NUMBER_OF_EVENTS_IN_SET>"<<ievt_<<"</NUMBER_OF_EVENTS_IN_SET>\n";
      xmlFileCalib<<"     <COMMENT_DESCRIPTION>Automatic DQM output</COMMENT_DESCRIPTION>\n";
      xmlFileCalib<<"     <DATA_FILE_NAME>"<< xmlNameCalib <<"</DATA_FILE_NAME>\n";
      xmlFileCalib<<"     <IMAGE_FILE_NAME>data plot url or file path</IMAGE_FILE_NAME>\n";
      xmlFileCalib<<"     <!-- who and when created this dataset-->\n\n";
      xmlFileCalib<<"     <CREATE_TIMESTAMP>"<<TIME<<"</CREATE_TIMESTAMP>\n";
      xmlFileCalib<<"     <CREATED_BY_USER>dma</CREATED_BY_USER>\n";
      xmlFileCalib<<"     <!-- version (string) and subversion (number) -->\n";
      xmlFileCalib<<"     <!-- fields are used to read data back from the database -->\n\n";
      xmlFileCalib<<"     <VERSION>"<<run_number<<dataset_seq_number<<"</VERSION>\n";
      xmlFileCalib<<"     <SUBVERSION>1</SUBVERSION>\n";
      xmlFileCalib<<"     <!--  Assign predefined dataset attributes -->\n\n";
      xmlFileCalib<<"     <PREDEFINED_ATTRIBUTES>\n";
      xmlFileCalib<<"        <ATTRIBUTE>\n";
      xmlFileCalib<<"           <NAME>HCAL Dataset Status</NAME>\n";
      xmlFileCalib<<"           <VALUE>VALID</VALUE>\n";
      xmlFileCalib<<"        </ATTRIBUTE>\n";
      xmlFileCalib<<"     </PREDEFINED_ATTRIBUTES>\n";
      xmlFileCalib<<"     <!-- multiple data block records -->\n\n";

      for(int sd=1;sd<=4;sd++) for(int eta=-2;eta<=2;eta++) for(int phi=1;phi<=72;phi++){
         std::string subdet="";
         if(sd==1) subdet="HB";
         if(sd==2) subdet="HE";
         if(sd==3) subdet="HO";
         if(sd==4) subdet="HF";
         if((calib_data[sd][eta+2][phi-1].get_statistics())>100){
             double e=0,e_rms=0,t=0,t_rms=0;
             Status=calib_data[sd][eta+2][phi-1].get_status();
             Statistic=calib_data[sd][eta+2][phi-1].get_statistics1(); 
             calib_data[sd][eta+2][phi-1].get_average_amp1(&e,&e_rms);
             calib_data[sd][eta+2][phi-1].get_average_time1(&t,&t_rms);
             xmlFileCalib<<"       <DATA>\n";
             xmlFileCalib<<"          <NUMBER_OF_EVENTS_USED>"<<Statistic<<"</NUMBER_OF_EVENTS_USED>\n";
             xmlFileCalib<<"          <SIGNAL_MEAN>"<<e<<"</SIGNAL_MEAN>\n";
             xmlFileCalib<<"          <SIGNAL_RMS>"<<e_rms<<"</SIGNAL_RMS>\n";
             xmlFileCalib<<"          <TIME_MEAN>"<<t<<"</TIME_MEAN>\n";
             xmlFileCalib<<"          <TIME_RMS>"<<t_rms<<"</TIME_RMS>\n";
             xmlFileCalib<<"          <CHANNEL_STATUS_WORD>"<<Status<<"</CHANNEL_STATUS_WORD>\n";
             xmlFileCalib<<"          <CHANNEL_OBJECTNAME>HcalDetId</CHANNEL_OBJECTNAME>\n";
             xmlFileCalib<<"             <SUBDET>"<<subdet<<"</SUBDET>\n";
             xmlFileCalib<<"             <IETA>"<<eta<<"</IETA>\n";
             xmlFileCalib<<"             <IPHI>"<<phi<<"</IPHI>\n";
             xmlFileCalib<<"             <DEPTH>"<<0<<"</DEPTH>\n";
             xmlFileCalib<<"             <TYPE>0</TYPE>\n";
             xmlFileCalib<<"       </DATA>\n";  
         }
      }
      xmlFileCalib<<"  </DATA_SET>\n";
      xmlFileCalib<<"</ROOT>\n";
      xmlFileCalib.close();

      sprintf(str,"zip %s.zip %s %s",xmlName.c_str(),xmlName.c_str(),xmlNameCalib.c_str());
      system(str);
      sprintf(str,"rm -f %s %s",xmlName.c_str(),xmlNameCalib.c_str());
      system(str);
      sprintf(str,"mv -f %s.zip %s",xmlName.c_str(),XmlFilePath.c_str());
      system(str);

   }
   for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++)   hb_data[i][j][k].reset1();
   for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++)   he_data[i][j][k].reset1();
   for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++)   ho_data[i][j][k].reset1();
   for(int i=0;i<85;i++)for(int j=0;j<72;j++)for(int k=0;k<4;k++)   hf_data[i][j][k].reset1();
   for(int i=1;i<=4;i++)for(int j=-2;j<=2;j++)for(int k=1;k<=72;k++)calib_data[i][j][k].reset1();
   ievt_=0;
   dataset_seq_number++;
}

Member Data Documentation

std::string HcalDetDiagLaserMonitor::baseFolder_ [private]

Definition at line 313 of file HcalDetDiagLaserMonitor.cc.

Definition at line 289 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

std::string HcalDetDiagLaserMonitor::DatasetName [private]

Definition at line 319 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), HcalDetDiagLaserMonitor(), and LoadDataset().

Definition at line 340 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 341 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 347 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 325 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 327 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 326 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 328 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 348 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 350 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 333 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 335 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 334 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 336 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 349 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 329 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 331 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 330 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 332 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 323 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

Definition at line 320 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and HcalDetDiagLaserMonitor().

Reimplemented from HcalBaseDQMonitor.

Definition at line 303 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), endRun(), HcalDetDiagLaserMonitor(), LoadDataset(), and SaveReference().

Definition at line 288 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

Definition at line 306 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

std::map<unsigned int, int> HcalDetDiagLaserMonitor::KnownBadCells_ [private]

Reimplemented from HcalBaseDQMonitor.

Definition at line 368 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

Definition at line 301 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

Definition at line 301 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

Definition at line 307 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), endRun(), and HcalDetDiagLaserMonitor().

Definition at line 323 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), beginRun(), and LoadDataset().

Definition at line 323 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), beginRun(), and LoadDataset().

Definition at line 308 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), HcalDetDiagLaserMonitor(), and LoadDataset().

Definition at line 300 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

Definition at line 308 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), HcalDetDiagLaserMonitor(), and LoadDataset().

Definition at line 308 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), HcalDetDiagLaserMonitor(), and LoadDataset().

Definition at line 300 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

Definition at line 308 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), HcalDetDiagLaserMonitor(), and LoadDataset().

Definition at line 300 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

Reimplemented from HcalBaseDQMonitor.

Definition at line 315 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), endRun(), and HcalDetDiagLaserMonitor().

std::string HcalDetDiagLaserMonitor::prefixME_ [private]

Reimplemented from HcalBaseDQMonitor.

Definition at line 314 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and HcalDetDiagLaserMonitor().

Definition at line 356 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

Definition at line 360 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

Definition at line 355 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

Definition at line 359 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

std::vector<std::string> HcalDetDiagLaserMonitor::problemnames_ [private]

Definition at line 357 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

Definition at line 352 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and beginRun().

Definition at line 307 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), endRun(), and HcalDetDiagLaserMonitor().

Definition at line 301 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

Definition at line 301 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

Definition at line 344 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 345 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 309 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

Definition at line 310 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and LoadReference().

Definition at line 324 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

Definition at line 342 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 343 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

TH1F* HcalDetDiagLaserMonitor::S1[56] [private]

Definition at line 353 of file HcalDetDiagLaserMonitor.cc.

Referenced by SaveRaddamData().

TH1F * HcalDetDiagLaserMonitor::S2[56] [private]

Definition at line 353 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and SaveRaddamData().

Definition at line 338 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

Definition at line 339 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

std::string HcalDetDiagLaserMonitor::XmlFilePath [private]