CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
HcalDetDiagLaserMonitor Class Reference

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

Inheritance diagram for HcalDetDiagLaserMonitor:
HcalBaseDQMonitor edm::EDAnalyzer

Public Member Functions

 HcalDetDiagLaserMonitor (const edm::ParameterSet &)
 
 ~HcalDetDiagLaserMonitor ()
 
- Public Member Functions inherited from HcalBaseDQMonitor
 HcalBaseDQMonitor (const edm::ParameterSet &ps)
 
 HcalBaseDQMonitor ()
 
 ~HcalBaseDQMonitor ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

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
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from HcalBaseDQMonitor
virtual void beginJob ()
 
virtual void cleanup (void)
 
virtual void endJob (void)
 
bool IsAllowedCalibType ()
 
bool LumiInOrder (int lumisec)
 
virtual void reset (void)
 
virtual void setup (void)
 
void SetupEtaPhiHists (EtaPhiHists &hh, std::string Name, std::string Units)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 
- Protected Attributes inherited from HcalBaseDQMonitor
std::vector< int > AllowedCalibTypes_
 
int badChannelStatusMask_
 
int currentLS
 
int currenttype_
 
DQMStoredbe_
 
int debug_
 
bool enableCleanup_
 
bool eventAllowed_
 
bool HBpresent_
 
bool HEpresent_
 
bool HFpresent_
 
bool HOpresent_
 
int ievt_
 
std::map< unsigned int, int > KnownBadCells_
 
int levt_
 
bool makeDiagnostics_
 
MonitorElementmeIevt_
 
MonitorElementmeLevt_
 
bool mergeRuns_
 
MonitorElementmeTevt_
 
MonitorElementmeTevtHist_
 
int NLumiBlocks_
 
bool Online_
 
std::string prefixME_
 
MonitorElementProblemsCurrentLB
 
MonitorElementProblemsVsLB
 
MonitorElementProblemsVsLB_HB
 
MonitorElementProblemsVsLB_HBHEHF
 
MonitorElementProblemsVsLB_HE
 
MonitorElementProblemsVsLB_HF
 
MonitorElementProblemsVsLB_HO
 
bool skipOutOfOrderLS_
 
std::string subdir_
 
int tevt_
 

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.

371  {
372  ievt_=-1;
373  emap=0;
375  run_number=-1;
376  IsReference=false;
377  LocalRun=RaddamRun=false;
378  createHTMLonly=false;
379  nHB=nHE=nHO=nHF=0;
381 
382  inputLabelDigi_ = iConfig.getUntrackedParameter<edm::InputTag>("digiLabel",edm::InputTag("hcalDigis"));
383  calibDigiLabel_ = iConfig.getUntrackedParameter<edm::InputTag>("calibDigiLabel",edm::InputTag("hcalDigis"));
384 
385  ReferenceData = iConfig.getUntrackedParameter<std::string>("LaserReferenceData" ,"");
386  OutputFilePath = iConfig.getUntrackedParameter<std::string>("OutputFilePath", "");
387  DatasetName = iConfig.getUntrackedParameter<std::string>("LaserDatasetName", "");
388  htmlOutputPath = iConfig.getUntrackedParameter<std::string>("htmlOutputPath", "");
389  XmlFilePath = iConfig.getUntrackedParameter<std::string>("XmlFilePath", "");
390  Online_ = iConfig.getUntrackedParameter<bool> ("online",false);
391  Overwrite = iConfig.getUntrackedParameter<bool> ("Overwrite",true);
392  prefixME_ = iConfig.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
393  if (prefixME_.size()>0 && prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
394  prefixME_.append("/");
395  subdir_ = iConfig.getUntrackedParameter<std::string>("TaskFolder","DetDiagPedestalMonitor_Hcal/");
396  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
397  subdir_.append("/");
398  subdir_=prefixME_+subdir_;
399  debug_ = iConfig.getUntrackedParameter<int>("debug",0);
400 
401  LaserTimingThreshold = iConfig.getUntrackedParameter<double>("LaserTimingThreshold",0.2);
402  LaserEnergyThreshold = iConfig.getUntrackedParameter<double>("LaserEnergyThreshold",0.1);
403  RaddamThreshold1 = iConfig.getUntrackedParameter<double>("RaddamThreshold1",10.0);
404  RaddamThreshold2 = iConfig.getUntrackedParameter<double>("RaddamThreshold2",0.95);
405 }
T getUntrackedParameter(std::string const &, T const &) const
const HcalElectronicsMap * emap
HcalDetDiagLaserMonitor::~HcalDetDiagLaserMonitor ( )

Definition at line 541 of file HcalDetDiagLaserMonitor.cc.

541  {
542 
543 }

Member Function Documentation

void HcalDetDiagLaserMonitor::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 546 of file HcalDetDiagLaserMonitor.cc.

References adc2fC, HcalDetDiagLaserData::add_statistics(), HcalBaseDQMonitor::analyze(), calib, calib_data, calibDigiLabel_, createHTMLonly, HcalRaddamData::CUT1EVNT, HcalRaddamData::CUT2EVNT, FEDRawData::data(), runTheMatrix::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.

546  {
547  if(createHTMLonly) return;
548  HcalBaseDQMonitor::analyze(iEvent,iSetup); // base class increments ievt_, etc. counters
549 
550 int eta,phi,depth,nTS;
551 static bool HBHEseq,HOseq,HFseq;
552 static int lastHBHEorbit,lastHOorbit,lastHForbit,nChecksHBHE,nChecksHO,nChecksHF,ievt_hbhe,ievt_ho,ievt_hf;
553  if(ievt_==-1){
554  ievt_=0;HBHEseq=HOseq=HFseq=false; lastHBHEorbit=lastHOorbit=lastHForbit=-1;nChecksHBHE=nChecksHO=nChecksHF=0;
555  ievt_hbhe=0,ievt_ho=0,ievt_hf=0;
556  }
557 
558  if(!dbe_) return;
559  bool LaserEvent=false;
560  bool LaserRaddam=false;
561  int orbit=iEvent.orbitNumber();
562  meRUN_->Fill(iEvent.id().run());
563  // for local runs
564  edm::Handle<HcalTBTriggerData> trigger_data;
565  iEvent.getByType(trigger_data);
566  if(trigger_data.isValid()){
567  if(trigger_data->wasLaserTrigger()) LaserEvent=true;
568  LocalRun=true;
569  }
570  if(!LocalRun && Online_){
571  if(HBHEseq && (orbit-lastHBHEorbit)>(11223*10) && ievt_hbhe>40){
572  HBHEseq=false;
576  nChecksHBHE++;
577  ievt_hbhe=0;
578  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();
579  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();
580  }
581  if(HOseq && (orbit-lastHOorbit)>(11223*10) && ievt_ho>40){
582  HOseq=false;
585  nChecksHO++;
586  ievt_ho=0;
587  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();
588  }
589  if(HFseq && (orbit-lastHForbit)>(11223*10) && ievt_hf>40){
590  HFseq=false;
593  nChecksHF++;
594  ievt_hf=0;
595  if(nChecksHF==1 || (nChecksHF>1 && ((nChecksHF-1)%12)==0)){
596  SaveReference();
597  }
598  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();
599  }
600  }
601 
602  // Abort Gap laser
603  if(LocalRun==false || LaserEvent==false){
605  iEvent.getByType(rawdata);
606  //checking FEDs for calibration information
608  const FEDRawData& fedData = rawdata->FEDData(i) ;
609  if ( fedData.size() < 24 ) continue ;
610  int value = ((const HcalDCCHeader*)(fedData.data()))->getCalibType() ;
611  if(value==hc_HBHEHPD){ HBHEseq=true; HOseq=HFseq=false; lastHBHEorbit=orbit; ievt_hbhe++; }
612  if(value==hc_HOHPD){ HOseq=true; HBHEseq=HFseq=false; lastHOorbit=orbit; ievt_ho++; }
613  if(value==hc_HFPMT){ HFseq=true; HBHEseq=HOseq=false; lastHForbit=orbit; ievt_hf++; }
614 
615  if(value==hc_HBHEHPD || value==hc_HOHPD || value==hc_HFPMT){ LaserEvent=true; break;}
616  if(value==hc_RADDAM){ LaserEvent=true; LaserRaddam=true; break;}
617  }
618  }
619  if(!LaserEvent) return;
621  iEvent.getByLabel(inputLabelDigi_,hbhe);
623  iEvent.getByLabel(inputLabelDigi_,ho);
625  iEvent.getByLabel(inputLabelDigi_,hf);
627  iEvent.getByLabel(calibDigiLabel_, calib);
628 
629  if(LocalRun && LaserEvent){
630  int N=0;
631  if(hf.isValid()){
632  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
633  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth();
634  float e=0;
635  for(int i=0;i<digi->size();i++) e+=adc2fC[digi->sample(i).adc()&0xff]-2.5;
636  if(e>40){ N++;}
637  }
638  }
639  if(N>50 && N<57){ RaddamRun=true; /*LaserRaddam=true;*/}
640  }
641  if(RaddamRun){
642  if(hf.isValid()){
643  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
644  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
645  int N;
646  for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
647  if(N==56) continue;
648  float max1=0,max2=0;
649  int nmax1=0,nmax2=0;
650  for(int i=0;i<nTS;i++){
651  if(max1<adc2fC[digi->sample(i).adc()&0xff]){ nmax1=i; max1=adc2fC[digi->sample(i).adc()&0xff]; }
652  }
653  Raddam_data[N].TOTEVNT++;
654  for(int i=0;i<nTS;i++){
655  if(i==nmax1) continue;
656  if(max2<adc2fC[digi->sample(i).adc()&0xff]){ nmax2=i; max2=adc2fC[digi->sample(i).adc()&0xff]; }
657  }
658  if(nmax1>nmax2){
659  int tmp1=nmax2;
660  nmax2=nmax1;nmax1=tmp1;
661  }
662  if(nmax1==0 || nmax2==(nTS-1)) continue;
663  if(nmax2!=(nmax1+1)) continue;
664 
665  if(max1<RaddamThreshold1 || max2<RaddamThreshold1) continue;
667  max1-=2.5; max2-=2.5;
668  float S2=max1+max2;
669  float S4=S2+adc2fC[digi->sample(nmax1-1).adc()&0xff]+adc2fC[digi->sample(nmax2+1).adc()&0xff]-5.0;
670  if((S2/S4)<RaddamThreshold2) continue;
672  Raddam_data[N].s1_adc[digi->sample(nmax1).adc()&0xff]++;
673  Raddam_data[N].s2_adc[digi->sample(nmax2).adc()&0xff]++;
674  }
675  }
676  }
677 
678  meEVT_->Fill(++ievt_);
679  run_number=iEvent.id().run();
680  double data[20];
681  if(!LaserRaddam){
682  if(hbhe.isValid()){
683  for(HBHEDigiCollection::const_iterator digi=hbhe->begin();digi!=hbhe->end();digi++){
684  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
685  double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
686  if(digi->id().subdet()==HcalBarrel){
687  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
688  hb_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
689  }
690  if(digi->id().subdet()==HcalEndcap){
691  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
692  he_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
693  }
694  }
695  }
696  if(ho.isValid()){
697  for(HODigiCollection::const_iterator digi=ho->begin();digi!=ho->end();digi++){
698  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
699  double ped=(adc2fC[digi->sample(0).adc()&0xff]+adc2fC[digi->sample(1).adc()&0xff])/2.0;
700  if((eta>=11 && eta<=15 && phi>=59 && phi<=70) || (eta>=5 && eta<=10 && phi>=47 && phi<=58)){
701  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
702  }else{
703  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
704  }
705  ho_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
706  }
707  }
708  if(hf.isValid()){
709  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
710  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
711  double ped=adc2fC[digi->sample(0).adc()&0xff];
712  for(int i=0;i<nTS;i++) data[i]=adc2fC[digi->sample(i).adc()&0xff]-ped;
713  hf_data[eta+42][phi-1][depth-1].add_statistics(data,nTS);
714  }
715  }
716  if(calib.isValid())for(HcalCalibDigiCollection::const_iterator digi=calib->begin();digi!=calib->end();digi++){
717  if(digi->id().cboxChannel()!=0 || digi->id().hcalSubdet()==0) continue;
718  nTS=digi->size();
719  float e=0;
720  for(int i=0;i<nTS;i++){ data[i]=adc2fC[digi->sample(i).adc()&0xff]; e+=data[i];}
721  if(e<15000) calib_data[digi->id().hcalSubdet()][digi->id().ieta()+2][digi->id().iphi()-1].add_statistics(data,nTS);
722  }
723  }else{ //Raddam
724  if(hf.isValid()){
725  for(HFDigiCollection::const_iterator digi=hf->begin();digi!=hf->end();digi++){
726  eta=digi->id().ieta(); phi=digi->id().iphi(); depth=digi->id().depth(); nTS=digi->size();
727  int N;
728  for(N=0;N<56;N++)if(eta==RADDAM_CH[N].eta && phi==RADDAM_CH[N].phi && depth==RADDAM_CH[N].depth) break;
729  if(N==56) continue;
730  for(int i=0;i<nTS;i++) Raddam[N]->Fill(i,adc2fC[digi->sample(i).adc()&0xff]-2.5);
731 
732  }
733  }
734  }
735 }
RunNumber_t run() const
Definition: EventID.h:42
int i
Definition: DBlmapReader.cc:9
void add_statistics(double *data, int nTS)
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
static const float adc2fC[128]
std::vector< T >::const_iterator const_iterator
bool getByType(Handle< PROD > &result) const
Definition: Event.h:397
HcalRaddamData Raddam_data[56]
T eta() const
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
void Fill(long long x)
Raddam_ch RADDAM_CH[56]
MVATrainerComputer * calib
Definition: MVATrainer.cc:64
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
int j
Definition: DBlmapReader.cc:9
int orbitNumber() const
Definition: EventBase.h:63
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
int k[5][pyjets_maxn]
HcalDetDiagLaserData hb_data[85][72][4]
virtual void reset(void)
edm::EventID id() const
Definition: EventBase.h:56
HcalDetDiagLaserData hf_data[85][72][4]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:29
HcalDetDiagLaserData he_data[85][72][4]
HcalDetDiagLaserData ho_data[85][72][4]
HcalDetDiagLaserData calib_data[5][5][72]
Definition: DDAxes.h:10
void HcalDetDiagLaserMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 2019 of file HcalDetDiagLaserMonitor.cc.

2019 {}
void HcalDetDiagLaserMonitor::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

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, L1TEmulatorMonitor_cff::p, phi, prefixME_, ProblemCellsByDepth_energy, ProblemCellsByDepth_energy_val, ProblemCellsByDepth_timing, ProblemCellsByDepth_timing_val, problemnames_, edm::ESHandle< class >::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.

406  {
408  c.get<HcalChannelQualityRcd>().get(p);
409  HcalChannelQuality* chanquality= new HcalChannelQuality(*p.product());
410  std::vector<DetId> mydetids = chanquality->getAllChannels();
411  KnownBadCells_.clear();
412 
413  for (std::vector<DetId>::const_iterator i = mydetids.begin();i!=mydetids.end();++i){
414  if (i->det()!=DetId::Hcal) continue; // not an hcal cell
415  HcalDetId id=HcalDetId(*i);
416  int status=(chanquality->getValues(id))->getValue();
418  KnownBadCells_[id.rawId()]=status;
419  }
420  }
421 
422  edm::ESHandle<HcalDbService> conditions_;
423  c.get<HcalDbRecord>().get(conditions_);
424  emap=conditions_->getHcalMapping();
425 
427  if (!dbe_) return;
428  std::string name;
429 
431  meEVT_ = dbe_->bookInt("HcalDetDiagLaserMonitor Event Number");
432  meRUN_ = dbe_->bookInt("HcalDetDiagLaserMonitor Run Number");
433 
434  ReferenceRun="UNKNOWN";
435  LoadReference();
436  LoadDataset();
437  if(DatasetName.size()>0 && createHTMLonly){
438  char str[200]; sprintf(str,"%sHcalDetDiagLaserData_run%i_%i/",htmlOutputPath.c_str(),run_number,dataset_seq_number);
439  htmlFolder=dbe_->bookString("HcalDetDiagLaserMonitor HTML folder",str);
440  MonitorElement *me;
441  dbe_->setCurrentFolder(prefixME_+"HcalInfo");
442  me=dbe_->bookInt("HBpresent");
443  if(nHB>0) me->Fill(1);
444  me=dbe_->bookInt("HEpresent");
445  if(nHE>0) me->Fill(1);
446  me=dbe_->bookInt("HOpresent");
447  if(nHO>0) me->Fill(1);
448  me=dbe_->bookInt("HFpresent");
449  if(nHF>0) me->Fill(1);
450  }
452  ProblemCellsByDepth_timing->setup(dbe_," Problem Bad Laser Timing");
453  for(unsigned int i=0;i<ProblemCellsByDepth_timing->depth.size();i++)
454  problemnames_.push_back(ProblemCellsByDepth_timing->depth[i]->getName());
456  ProblemCellsByDepth_energy->setup(dbe_," Problem Bad Laser Energy");
457  for(unsigned int i=0;i<ProblemCellsByDepth_energy->depth.size();i++)
458  problemnames_.push_back(ProblemCellsByDepth_energy->depth[i]->getName());
459 
460  dbe_->setCurrentFolder(subdir_+"Summary Plots");
461 
462  name="HBHE Laser Energy Distribution"; hbheEnergy = dbe_->book1D(name,name,200,0,3000);
463  name="HBHE Laser Timing Distribution"; hbheTime = dbe_->book1D(name,name,200,0,10);
464  name="HBHE Laser Energy RMS_div_Energy Distribution"; hbheEnergyRMS = dbe_->book1D(name,name,200,0,0.5);
465  name="HBHE Laser Timing RMS Distribution"; hbheTimeRMS = dbe_->book1D(name,name,200,0,1);
466  name="HO Laser Energy Distribution"; hoEnergy = dbe_->book1D(name,name,200,0,3000);
467  name="HO Laser Timing Distribution"; hoTime = dbe_->book1D(name,name,200,0,10);
468  name="HO Laser Energy RMS_div_Energy Distribution"; hoEnergyRMS = dbe_->book1D(name,name,200,0,0.5);
469  name="HO Laser Timing RMS Distribution"; hoTimeRMS = dbe_->book1D(name,name,200,0,1);
470  name="HF Laser Energy Distribution"; hfEnergy = dbe_->book1D(name,name,200,0,3000);
471  name="HF Laser Timing Distribution"; hfTime = dbe_->book1D(name,name,200,0,10);
472  name="HF Laser Energy RMS_div_Energy Distribution"; hfEnergyRMS = dbe_->book1D(name,name,200,0,0.7);
473  name="HF Laser Timing RMS Distribution"; hfTimeRMS = dbe_->book1D(name,name,200,0,1);
474 
475  name="Laser Timing HBHEHF"; Time2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
476  name="Laser Timing HO"; Time2Dho = dbe_->book2D(name,name,33,-16,16,74,0,73);
477  name="Laser Energy HBHEHF"; Energy2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
478  name="Laser Energy HO"; Energy2Dho = dbe_->book2D(name,name,33,-16,16,74,0,73);
479  name="HBHEHF Laser (Timing-Ref)+1"; refTime2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
480  name="HO Laser (Timing-Ref)+1"; refTime2Dho = dbe_->book2D(name,name,33,-16,16,74,0,73);
481  name="HBHEHF Laser Energy_div_Ref"; refEnergy2Dhbhehf = dbe_->book2D(name,name,87,-43,43,74,0,73);
482  name="HO Laser Energy_div_Ref"; refEnergy2Dho = dbe_->book2D(name,name,33,-16,16,74,0,73);
483 
484  name="HB RBX average Time-Ref"; hb_time_rbx = dbe_->book1D(name,name,36,0.5,36.5);
485  name="HE RBX average Time-Ref"; he_time_rbx = dbe_->book1D(name,name,36,0.5,36.5);
486  name="HO RBX average Time-Ref"; ho_time_rbx = dbe_->book1D(name,name,36,0.5,36.5);
487  name="HF RoBox average Time-Ref"; hf_time_rbx = dbe_->book1D(name,name,24,0.5,24.5);
488 
489  char str[200];
490  for(int i=1;i<=18;i++){ sprintf(str,"HBM%02i",i); hb_time_rbx->setBinLabel(i,str); }
491  for(int i=1;i<=18;i++){ sprintf(str,"HBP%02i",i); hb_time_rbx->setBinLabel(i+18,str); }
492  for(int i=1;i<=18;i++){ sprintf(str,"HEM%02i",i); he_time_rbx->setBinLabel(i,str); }
493  for(int i=1;i<=18;i++){ sprintf(str,"HEP%02i",i); he_time_rbx->setBinLabel(i+18,str); }
494  for(int i=1;i<=12;i++){ sprintf(str,"HFM%02i",i); hf_time_rbx->setBinLabel(i,str); }
495  for(int i=1;i<=12;i++){ sprintf(str,"HFP%02i",i); hf_time_rbx->setBinLabel(i+12,str); }
496  for(int i=1;i<=6;i++){ sprintf(str,"HO2M%02i",i*2); ho_time_rbx->setBinLabel(i,str); }
497  for(int i=1;i<=6;i++){ sprintf(str,"HO1M%02i",i*2); ho_time_rbx->setBinLabel(i+6,str); }
498  for(int i=1;i<=12;i++){ sprintf(str,"HO0%02i",i); ho_time_rbx->setBinLabel(i+12,str); }
499  for(int i=1;i<=6;i++){ sprintf(str,"HO1P%02i",i*2); ho_time_rbx->setBinLabel(i+24,str); }
500  for(int i=1;i<=6;i++){ sprintf(str,"HO2P%02i",i*2); ho_time_rbx->setBinLabel(i+30,str); }
501 
502  Time2Dhbhehf->setAxisTitle("i#eta",1);
503  Time2Dhbhehf->setAxisTitle("i#phi",2);
504  Time2Dho->setAxisTitle("i#eta",1);
505  Time2Dho->setAxisTitle("i#phi",2);
506  Energy2Dhbhehf->setAxisTitle("i#eta",1);
507  Energy2Dhbhehf->setAxisTitle("i#phi",2);
508  Energy2Dho->setAxisTitle("i#eta",1);
509  Energy2Dho->setAxisTitle("i#phi",2);
510  refTime2Dhbhehf->setAxisTitle("i#eta",1);
511  refTime2Dhbhehf->setAxisTitle("i#phi",2);
512  refTime2Dho->setAxisTitle("i#eta",1);
513  refTime2Dho->setAxisTitle("i#phi",2);
514  refEnergy2Dhbhehf->setAxisTitle("i#eta",1);
515  refEnergy2Dhbhehf->setAxisTitle("i#phi",2);
516  refEnergy2Dho->setAxisTitle("i#eta",1);
517  refEnergy2Dho->setAxisTitle("i#phi",2);
518 
520  refTime2Dho->setAxisRange(0,2,3);
521  refEnergy2Dhbhehf->setAxisRange(0.5,1.5,3);
522  refEnergy2Dho->setAxisRange(0.5,1.5,3);
523 
525  RefRun_= dbe_->bookString("HcalDetDiagLaserMonitor Reference Run",ReferenceRun);
526 
527  dbe_->setCurrentFolder(subdir_+"Raddam Plots");
528  for(int i=0;i<56;i++){
529  sprintf(str,"RADDAM (%i %i)",RADDAM_CH[i].eta,RADDAM_CH[i].phi);
530  Raddam[i] = dbe_->book1D(str,str,10,-0.5,9.5);
531  }
532 
533  dbe_->setCurrentFolder(subdir_+"Plots for client");
535  ProblemCellsByDepth_timing_val->setup(dbe_," Laser Timing difference");
537  ProblemCellsByDepth_energy_val->setup(dbe_," Laser Energy difference");
538 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
const HcalElectronicsMap * emap
void setup(DQMStore *&m_dbe, std::string Name, std::string Units="")
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
T eta() const
std::map< unsigned int, int > KnownBadCells_
void Fill(long long x)
Raddam_ch RADDAM_CH[56]
std::vector< MonitorElement * > depth
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:480
std::vector< DetId > getAllChannels() const
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
tuple status
Definition: ntuplemaker.py:245
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:421
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
virtual void setup(void)
const Item * getValues(DetId fId) const
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
std::vector< std::string > problemnames_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
Definition: DDAxes.h:10
void HcalDetDiagLaserMonitor::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 2020 of file HcalDetDiagLaserMonitor.cc.

2020 {}
void HcalDetDiagLaserMonitor::endRun ( const edm::Run run,
const edm::EventSetup c 
)
privatevirtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 2003 of file HcalDetDiagLaserMonitor.cc.

References createHTMLonly, fillHistos(), fillProblems(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, ievt_, LocalRun, Online_, RaddamRun, SaveRaddamData(), and SaveReference().

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().

1107  {
1108  if(sd==HcalBarrel || sd==HcalEndcap){
1109  hbheEnergy->Reset();
1110  hbheTime->Reset();
1111  hbheEnergyRMS->Reset();
1112  hbheTimeRMS->Reset();
1113  hb_time_rbx->Reset();
1114  he_time_rbx->Reset();
1115  }
1116  if(sd==HcalOuter){
1117  hoEnergy->Reset();
1118  hoTime->Reset();
1119  hoEnergyRMS->Reset();
1120  hoTimeRMS->Reset();
1121  Time2Dho->Reset();
1122  Energy2Dho->Reset();
1123  refTime2Dho->Reset();
1124  refEnergy2Dho->Reset();
1125  ho_time_rbx->Reset();
1126  }
1127  if(sd==HcalForward){
1128  hfEnergy->Reset();
1129  hfTime->Reset();
1130  hfEnergyRMS->Reset();
1131  hfTimeRMS->Reset();
1132  hf_time_rbx->Reset();
1133  }
1134  if(sd==HcalBarrel || sd==HcalEndcap){
1135  // HB histograms
1136  for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++){
1137  double T=0,nT=0,E=0,nE=0;
1138  for(int depth=1;depth<=2;depth++){
1139  if(hb_data[eta+42][phi-1][depth-1].get_statistics()>10){
1140  double ave=0;
1141  double rms=0;
1142  double time=0;
1143  double time_rms=0;
1144  hb_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
1145  hb_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
1146  hbheEnergy->Fill(ave);
1147  if(ave>0)hbheEnergyRMS->Fill(rms/ave);
1148  hbheTime->Fill(time);
1149  hbheTimeRMS->Fill(time_rms);
1150  T+=time; nT++; E+=ave; nE++;
1151  }
1152  }
1153  if(nT>0){Time2Dhbhehf->setBinContent(eta+44,phi+1,T/nT);Energy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE); }
1154  }
1155  // HE histograms
1156  for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++){
1157  double T=0,nT=0,E=0,nE=0;
1158  for(int depth=1;depth<=3;depth++){
1159  if(he_data[eta+42][phi-1][depth-1].get_statistics()>10){
1160  double ave=0; double rms=0; double time=0; double time_rms=0;
1161  he_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
1162  he_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
1163  hbheEnergy->Fill(ave);
1164  if(ave>0)hbheEnergyRMS->Fill(rms/ave);
1165  hbheTime->Fill(time);
1166  hbheTimeRMS->Fill(time_rms);
1167  T+=time; nT++; E+=ave; nE++;
1168  }
1169  }
1170  if(nT>0 && abs(eta)>16 ){Time2Dhbhehf->setBinContent(eta+44,phi+1,T/nT); Energy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE); }
1171  if(nT>0 && abs(eta)>20 ){Time2Dhbhehf->setBinContent(eta+44,phi+2,T/nT); Energy2Dhbhehf->setBinContent(eta+44,phi+2,E/nE);}
1172  }
1173  }
1174  if(sd==HcalForward){
1175  // HF histograms
1176  for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++){
1177  double T=0,nT=0,E=0,nE=0;
1178  for(int depth=1;depth<=2;depth++){
1179  if(hf_data[eta+42][phi-1][depth-1].get_statistics()>10){
1180  double ave=0; double rms=0; double time=0; double time_rms=0;
1181  hf_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
1182  hf_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
1183  hfEnergy->Fill(ave);
1184  if(ave>0)hfEnergyRMS->Fill(rms/ave);
1185  hfTime->Fill(time);
1186  T+=time; nT++; E+=ave; nE++;
1187  hfTimeRMS->Fill(time_rms);
1188  }
1189  }
1190  if(nT>0 && abs(eta)>29 ){ Time2Dhbhehf->setBinContent(eta+44,phi+1,T/nT); Time2Dhbhehf->setBinContent(eta+44,phi+2,T/nT);}
1191  if(nT>0 && abs(eta)>29 ){ Energy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE); Energy2Dhbhehf->setBinContent(eta+44,phi+2,E/nE);}
1192  }
1193  }
1194  if(sd==HcalOuter){
1195  // HO histograms
1196  for(int eta=-10;eta<=15;eta++) for(int phi=1;phi<=72;phi++){
1197  if(eta>10 && !isSiPM(eta,phi,4)) continue;
1198  double T=0,nT=0,E=0,nE=0;
1199  for(int depth=4;depth<=4;depth++){
1200  if(ho_data[eta+42][phi-1][depth-1].get_statistics()>10){
1201  double ave=0; double rms=0; double time=0; double time_rms=0;
1202  ho_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
1203  ho_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
1204  hoEnergy->Fill(ave);
1205  if(ave>0)hoEnergyRMS->Fill(rms/ave);
1206  hoTime->Fill(time);
1207  T+=time; nT++; E+=ave; nE++;
1208  hoTimeRMS->Fill(time_rms);
1209  }
1210  }
1211  if(nT>0){ Time2Dho->Fill(eta,phi,T/nT); Energy2Dho->Fill(eta,phi+1,E/nE) ;}
1212  }
1213  }
1214 
1215  // compare with reference...
1216  if(sd==HcalBarrel || sd==HcalEndcap){
1217  for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++){
1218  double T=0,nT=0,E=0,nE=0;
1219  for(int depth=1;depth<=2;depth++){
1220  if(hb_data[eta+42][phi-1][depth-1].get_statistics()>10){
1221  double val=0,rms=0,time=0,time_rms=0;
1222  double VAL=0,RMS=0,TIME=0,TIME_RMS=0;
1223  if(!hb_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1224  if(!hb_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
1225  if(!hb_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
1226  E+=VAL/val; nE++;
1227  T+=TIME-time; nT++;
1228  }
1229  }
1230  if(nE>0) refEnergy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE);
1231  if(nT>0){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01; refTime2Dhbhehf->setBinContent(eta+44,phi+1,TTT); }
1232  }
1233  for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++){
1234  double T=0,nT=0,E=0,nE=0;
1235  for(int depth=1;depth<=3;depth++){
1236  if(he_data[eta+42][phi-1][depth-1].get_statistics()>10){
1237  double val=0,rms=0,time=0,time_rms=0;
1238  double VAL=0,RMS=0,TIME=0,TIME_RMS=0;
1239  if(!he_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1240  if(!he_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
1241  if(!he_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
1242  E+=VAL/val; nE++;
1243  T+=TIME-time; nT++;
1244  }
1245  }
1246  if(nE>0 && abs(eta)>16) refEnergy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE);
1247  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); }
1248  if(nE>0 && abs(eta)>20) refEnergy2Dhbhehf->setBinContent(eta+44,phi+2,E/nE);
1249  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); }
1250  }
1251  }
1252  if(sd==HcalForward){
1253  for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++){
1254  double T=0,nT=0,E=0,nE=0;
1255  for(int depth=1;depth<=2;depth++){
1256  if(hf_data[eta+42][phi-1][depth-1].get_statistics()>10){
1257  double val=0,rms=0,time=0,time_rms=0;
1258  double VAL=0,RMS=0,TIME=0,TIME_RMS=0;
1259  if(!hf_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1260  if(!hf_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
1261  if(!hf_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
1262  E+=VAL/val; nE++;
1263  T+=TIME-time; nT++;
1264  }
1265  }
1266  if(nE>0 && abs(eta)>29) refEnergy2Dhbhehf->setBinContent(eta+44,phi+1,E/nE);
1267  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); }
1268  if(nE>0 && abs(eta)>29) refEnergy2Dhbhehf->setBinContent(eta+44,phi+2,E/nE);
1269  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); }
1270  }
1271  }
1272  if(sd==HcalOuter){
1273  for(int eta=-15;eta<=15;eta++) for(int phi=1;phi<=72;phi++){
1274  if(eta>10 && !isSiPM(eta,phi,4)) continue;
1275  double T=0,nT=0,E=0,nE=0;
1276  for(int depth=4;depth<=4;depth++){
1277  if(ho_data[eta+42][phi-1][depth-1].get_statistics()>10){
1278  double val=0,rms=0,time=0,time_rms=0;
1279  double VAL=0,RMS=0,TIME=0,TIME_RMS=0;
1280  if(!ho_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1281  if(!ho_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
1282  if(!ho_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
1283  E+=VAL/val; nE++;
1284  T+=TIME-time; nT++;
1285  }
1286  }
1287  if(nE>0) refEnergy2Dho->Fill(eta,phi,E/nE);
1288  if(nT>0){ double TTT=T/nT+1; if(TTT<0.01) TTT=0.01; refTime2Dho->Fill(eta,phi,TTT);}
1289  }
1290  }
1292  float min,max;
1293  if(sd==HcalBarrel || sd==HcalEndcap){
1294  min=100;max=-100;
1295  for(int i=1;i<=18;i++){
1296  float ave=-10,rms=-10;
1297  if(get_ave_rbx(HcalBarrel,-1,i,&ave,&rms)){
1298  hb_time_rbx->setBinContent(i,ave);
1299  hb_time_rbx->setBinError(i,rms);
1300  if(ave<min) min=ave;
1301  if(ave>max) max=ave;
1302  }
1303  }
1304  for(int i=1;i<=18;i++){
1305  float ave=-10,rms=-10;
1306  if(get_ave_rbx(HcalBarrel,1,i,&ave,&rms)){
1307  hb_time_rbx->setBinContent(i+18,ave);
1308  hb_time_rbx->setBinError(i+18,rms);
1309  if(ave<min) min=ave;
1310  if(ave>max) max=ave;
1311  }
1312  }
1313  if(max>-100)hb_time_rbx->setAxisRange(min-1,max+1,2);
1314  min=100;max=-100;
1315  for(int i=1;i<=18;i++){
1316  float ave=-10,rms=-10;
1317  if(get_ave_rbx(HcalEndcap,-1,i,&ave,&rms)){
1318  he_time_rbx->setBinContent(i,ave);
1319  he_time_rbx->setBinError(i,rms);
1320  if(ave<min) min=ave;
1321  if(ave>max) max=ave;
1322  }
1323  }
1324  for(int i=1;i<=18;i++){
1325  float ave=-10,rms=-10;
1326  if(get_ave_rbx(HcalEndcap,1,i,&ave,&rms)){
1327  he_time_rbx->setBinContent(i+18,ave);
1328  he_time_rbx->setBinError(i+18,rms);
1329  if(ave<min) min=ave;
1330  if(ave>max) max=ave;
1331  }
1332  }
1333  if(max>-100)he_time_rbx->setAxisRange(min-1,max+1,2);
1334  }
1336  if(sd==HcalOuter){
1337  min=100;max=-100;
1338  for(int i=1;i<=6;i++){
1339  float ave=-10,rms=-10;
1340  if(get_ave_rbx(HcalOuter,-2,i,&ave,&rms)){
1341  ho_time_rbx->setBinContent(i,ave);
1342  ho_time_rbx->setBinError(i,rms);
1343  if(ave<min) min=ave;
1344  if(ave>max) max=ave;
1345  }
1346  }
1347  for(int i=1;i<=6;i++){
1348  float ave=-10,rms=-10;
1349  if(get_ave_rbx(HcalOuter,-1,i,&ave,&rms)){
1350  ho_time_rbx->setBinContent(i+6,ave);
1351  ho_time_rbx->setBinError(i+6,rms);
1352  if(ave<min) min=ave;
1353  if(ave>max) max=ave;
1354  }
1355  }
1356  for(int i=1;i<=12;i++){
1357  float ave=-10,rms=-10;
1358  if(get_ave_rbx(HcalOuter,0,i,&ave,&rms)){
1359  ho_time_rbx->setBinContent(i+12,ave);
1360  ho_time_rbx->setBinError(i+12,rms);
1361  if(ave<min) min=ave;
1362  if(ave>max) max=ave;
1363  }
1364  }
1365  for(int i=1;i<=6;i++){
1366  float ave=-10,rms=-10;
1367  if(get_ave_rbx(HcalOuter,1,i,&ave,&rms)){
1368  ho_time_rbx->setBinContent(i+24,ave);
1369  ho_time_rbx->setBinError(i+24,rms);
1370  if(ave<min) min=ave;
1371  if(ave>max) max=ave;
1372  }
1373  }
1374  for(int i=1;i<=6;i++){
1375  float ave=-10,rms=-10;
1376  if(get_ave_rbx(HcalOuter,2,i,&ave,&rms)){
1377  ho_time_rbx->setBinContent(i+30,ave);
1378  ho_time_rbx->setBinError(i+30,rms);
1379  if(ave<min) min=ave;
1380  if(ave>max) max=ave;
1381  }
1382  }
1383  if(max>-100)ho_time_rbx->setAxisRange(min-1,max+1,2);
1384  }
1386  if(sd==HcalForward){
1387  min=100;max=-100;
1388  for(int i=1;i<=12;i++){
1389  float ave=-10,rms=-10;
1390  if(get_ave_rbx(HcalForward,-1,i,&ave,&rms)){
1391  hf_time_rbx->setBinContent(i,ave);
1392  hf_time_rbx->setBinError(i,rms);
1393  if(ave<min) min=ave;
1394  if(ave>max) max=ave;
1395  }
1396  }
1397  for(int i=1;i<=12;i++){
1398  float ave=-10,rms=-10;
1399  if(get_ave_rbx(HcalForward,1,i,&ave,&rms)){
1400  hf_time_rbx->setBinContent(i+12,ave);
1401  hf_time_rbx->setBinError(i+12,rms);
1402  if(ave<min) min=ave;
1403  if(ave>max) max=ave;
1404  }
1405  }
1406  if(max>-100)hf_time_rbx->setAxisRange(min-1,max+1,2);
1407  }
1408 }
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
void setAxisRange(double xmin, double xmax, int axis=1)
set x-, y- or z-axis range (axis=1, 2, 3 respectively)
bool get_average_amp(double *ave, double *rms)
#define abs(x)
Definition: mlp_lapack.h:159
#define min(a, b)
Definition: mlp_lapack.h:161
T eta() const
bool get_ave_rbx(int sd, int side, int rbx, float *ave, float *rms)
bool get_average_time(double *ave, double *rms)
void Fill(long long x)
bool isSiPM(int ieta, int iphi, int depth)
const T & max(const T &a, const T &b)
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
HcalDetDiagLaserData hb_data[85][72][4]
HcalDetDiagLaserData hf_data[85][72][4]
HcalDetDiagLaserData he_data[85][72][4]
long double T
HcalDetDiagLaserData ho_data[85][72][4]
void Reset(void)
reset ME (ie. contents, errors, etc)
Definition: DDAxes.h:10
void HcalDetDiagLaserMonitor::fillProblems ( int  sd)
private

Definition at line 797 of file HcalDetDiagLaserMonitor.cc.

References HcalElectronicsMap::allElectronicsIdPrecision(), CalcEtaBin(), HcalDetId::depth(), EtaPhiHists::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().

797  {
798 float ave_t,ave_e,ave_t_r,ave_e_r;
799  if(!get_ave_subdet(sd,&ave_t,&ave_e,&ave_t_r,&ave_e_r)) return;
800 
801  for(int i=0;i<4;i++){
804  }
805 
806  std::vector <HcalElectronicsId> AllElIds = emap->allElectronicsIdPrecision();
807  for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++){
808  DetId detid=emap->lookup(*eid);
809  if (detid.det()!=DetId::Hcal) continue;
810  HcalGenericDetId gid(emap->lookup(*eid));
811  if(!(!(gid.null()) &&
812  (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
813  gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap ||
814  gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
815  gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
816  int eta=0,phi=0,depth=0;
817  HcalDetId hid(detid);
818  if(KnownBadCells_.find(hid.rawId())==KnownBadCells_.end()) continue;
819  eta=hid.ieta();
820  phi=hid.iphi();
821  depth=hid.depth();
822 
823  int e=CalcEtaBin(sd,eta,depth)+1;
824  if(detid.subdetId()==HcalBarrel && sd==HcalBarrel){
825  double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
826  if(!hb_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
827  if(!hb_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
828  if(!hb_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
829  hb_data[eta+42][phi-1][depth-1].nChecks++;
830  float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
831  if(diff_t>LaserTimingThreshold){
832  hb_data[eta+42][phi-1][depth-1].nBadTime++;
833  ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
834  }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0);
835  if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
836  float diff_e=((VAL/ave_e))/(val/ave_e_r);
837  if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
838  hb_data[eta+42][phi-1][depth-1].nBadEnergy++;
839  ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
840  }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
841  }
842  }
843  if(detid.subdetId()==HcalEndcap && sd==HcalEndcap){
844  double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
845  if(!he_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
846  if(!he_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
847  if(!he_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
848  he_data[eta+42][phi-1][depth-1].nChecks++;
849  float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
850  if(diff_t>LaserTimingThreshold){
851  he_data[eta+42][phi-1][depth-1].nBadTime++;
852  ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
853  }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0);
854  if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
855  float diff_e=((VAL/ave_e))/(val/ave_e_r);
856  if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
857  he_data[eta+42][phi-1][depth-1].nBadEnergy++;
858  ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
859  }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
860  }
861  }
862  if(detid.subdetId()==HcalOuter && sd==HcalOuter){
863  double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
864  if(!ho_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
865  if(!ho_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
866  if(!ho_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
867  ho_data[eta+42][phi-1][depth-1].nChecks++;
868  float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
869  if(diff_t>LaserTimingThreshold){
870  ho_data[eta+42][phi-1][depth-1].nBadTime++;
871  ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
872  }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0);
873  if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
874  float diff_e=((VAL/ave_e))/(val/ave_e_r);
875  if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
876  ho_data[eta+42][phi-1][depth-1].nBadEnergy++;
877  ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
878  }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
879  }
880  }
881  if(detid.subdetId()==HcalForward && sd==HcalForward){
882  double val=0,rms=0,time=0,time_rms=0,VAL=0,RMS=0,TIME=0,TIME_RMS=0;
883  if(!hf_data[eta+42][phi-1][depth-1].get_reference(&val,&rms,&time,&time_rms)) continue;
884  if(!hf_data[eta+42][phi-1][depth-1].get_average_amp(&VAL,&RMS)) continue;
885  if(!hf_data[eta+42][phi-1][depth-1].get_average_time(&TIME,&TIME_RMS)) continue;
886  hf_data[eta+42][phi-1][depth-1].nChecks++;
887  float diff_t=(TIME-ave_t)-(time-ave_t_r); if(diff_t<0) diff_t=-diff_t;
888  if(diff_t>LaserTimingThreshold){
889  hf_data[eta+42][phi-1][depth-1].nBadTime++;
890  ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,(TIME-ave_t)-(time-ave_t_r));
891  }else ProblemCellsByDepth_timing_val->depth[depth-1]->setBinContent(e,phi,0);
892  if(VAL!=0 && val!=0 && ave_e!=0 && ave_e_r!=0){
893  float diff_e=((VAL/ave_e))/(val/ave_e_r);
894  if(diff_e>(1+LaserEnergyThreshold) ||diff_e<(1-LaserEnergyThreshold) ){
895  hf_data[eta+42][phi-1][depth-1].nBadEnergy++;
896  ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,((VAL/ave_e))/(val/ave_e_r));
897  }else ProblemCellsByDepth_energy_val->depth[depth-1]->setBinContent(e,phi,0);
898  }
899  }
900  }
901  for (std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++){
902  DetId detid=emap->lookup(*eid);
903  if (detid.det()!=DetId::Hcal) continue;
904  HcalGenericDetId gid(emap->lookup(*eid));
905  if(!(!(gid.null()) &&
906  (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
907  gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap ||
908  gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
909  gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
910  int eta=0,phi=0,depth=0;
911  HcalDetId hid(detid);
912  eta=hid.ieta();
913  phi=hid.iphi();
914  depth=hid.depth();
915 
916  if(detid.subdetId()==HcalBarrel){
917  if(hb_data[eta+42][phi-1][depth-1].nBadTime>0){
918  int e=CalcEtaBin(HcalBarrel,eta,depth)+1;
919  double val=hb_data[eta+42][phi-1][depth-1].nBadTime/hb_data[eta+42][phi-1][depth-1].nChecks;
920  ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
921  }
922  if(hb_data[eta+42][phi-1][depth-1].nBadEnergy>0){
923  int e=CalcEtaBin(HcalBarrel,eta,depth)+1;
924  double val=hb_data[eta+42][phi-1][depth-1].nBadEnergy/hb_data[eta+42][phi-1][depth-1].nChecks;
925  ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
926  }
927  }
928  if(detid.subdetId()==HcalEndcap){
929  if(he_data[eta+42][phi-1][depth-1].nBadTime>0){
930  int e=CalcEtaBin(HcalEndcap,eta,depth)+1;
931  double val=he_data[eta+42][phi-1][depth-1].nBadTime/he_data[eta+42][phi-1][depth-1].nChecks;
932  ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
933  }
934  if(he_data[eta+42][phi-1][depth-1].nBadEnergy>0){
935  int e=CalcEtaBin(HcalEndcap,eta,depth)+1;
936  double val=he_data[eta+42][phi-1][depth-1].nBadEnergy/he_data[eta+42][phi-1][depth-1].nChecks;
937  ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
938  }
939  }
940  if(detid.subdetId()==HcalOuter){
941  if(ho_data[eta+42][phi-1][depth-1].nBadTime>0){
942  int e=CalcEtaBin(HcalOuter,eta,depth)+1;
943  double val=ho_data[eta+42][phi-1][depth-1].nBadTime/ho_data[eta+42][phi-1][depth-1].nChecks;
944  ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
945  }
946  if(ho_data[eta+42][phi-1][depth-1].nBadEnergy>0){
947  int e=CalcEtaBin(HcalOuter,eta,depth)+1;
948  double val=ho_data[eta+42][phi-1][depth-1].nBadEnergy/ho_data[eta+42][phi-1][depth-1].nChecks;
949  ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
950  }
951  }
952  if(detid.subdetId()==HcalForward){
953  if(hf_data[eta+42][phi-1][depth-1].nBadTime>0){
954  int e=CalcEtaBin(HcalForward,eta,depth)+1;
955  double val=hf_data[eta+42][phi-1][depth-1].nBadTime/hf_data[eta+42][phi-1][depth-1].nChecks;
956  ProblemCellsByDepth_timing->depth[depth-1]->setBinContent(e,phi,val);
957  }
958  if(hf_data[eta+42][phi-1][depth-1].nBadEnergy>0){
959  int e=CalcEtaBin(HcalForward,eta,depth)+1;
960  double val=hf_data[eta+42][phi-1][depth-1].nBadEnergy/hf_data[eta+42][phi-1][depth-1].nChecks;
961  ProblemCellsByDepth_energy->depth[depth-1]->setBinContent(e,phi,val);
962  }
963  }
964  }
965 }
int i
Definition: DBlmapReader.cc:9
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
const HcalElectronicsMap * emap
bool get_ave_subdet(int sd, float *ave_t, float *ave_e, float *ave_t_r, float *ave_e_r)
T eta() const
std::map< unsigned int, int > KnownBadCells_
std::vector< MonitorElement * > depth
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
Definition: DetId.h:20
HcalDetDiagLaserData hb_data[85][72][4]
int CalcEtaBin(int subdet, int ieta, int depth)
HcalDetDiagLaserData hf_data[85][72][4]
HcalDetDiagLaserData he_data[85][72][4]
Detector det() const
get the detector field from this detid
Definition: DetId.h:37
HcalDetDiagLaserData ho_data[85][72][4]
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
Definition: DDAxes.h:10
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().

967  {
968  double xt=0,xxt=0;
969  int eta_min=0,eta_max=0,n=0;
970  if(sd==HcalBarrel){
971  if(side>0){eta_min=1; eta_max=29;}
972  if(side<0){eta_min=-29; eta_max=-1;}
973  if(rbx==1){
974  for(int i=eta_min;i<=eta_max;i++) for(int j=71;j<=72;j++)for(int k=1;k<=3;k++){
975  double val,rms,time,time_rms;
976  double TIME,TIME_RMS;
977  if(!hb_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
978  if(!hb_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
979  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
980  }
981  for(int i=eta_min;i<=eta_max;i++) for(int j=1;j<=2;j++)for(int k=1;k<=3;k++){
982  double val,rms,time,time_rms;
983  double TIME,TIME_RMS;
984  if(!hb_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
985  if(!hb_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
986  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
987  }
988 
989  }else{
990  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++){
991  double val,rms,time,time_rms;
992  double TIME,TIME_RMS;
993  if(!hb_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
994  if(!hb_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
995  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
996  }
997  }
998  }
999  if(sd==HcalEndcap){
1000  if(side>0){eta_min=1; eta_max=29;}
1001  if(side<0){eta_min=-29; eta_max=-1;}
1002  if(rbx==1){
1003  for(int i=eta_min;i<=eta_max;i++) for(int j=71;j<=72;j++)for(int k=1;k<=3;k++){
1004  double val,rms,time,time_rms;
1005  double TIME,TIME_RMS;
1006  if(!he_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1007  if(!he_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
1008  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1009  }
1010  for(int i=eta_min;i<=eta_max;i++) for(int j=1;j<=2;j++)for(int k=1;k<=3;k++){
1011  double val,rms,time,time_rms;
1012  double TIME,TIME_RMS;
1013  if(!he_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1014  if(!he_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
1015  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1016  }
1017 
1018  }else{
1019  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++){
1020  double val,rms,time,time_rms;
1021  double TIME,TIME_RMS;
1022  if(!he_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1023  if(!he_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
1024  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1025  }
1026  }
1027  }
1028  if(sd==HcalForward){
1029  if(side>0){eta_min=29; eta_max=40;}
1030  if(side<0){eta_min=-40; eta_max=-29;}
1031  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++){
1032  double val,rms,time,time_rms;
1033  double TIME,TIME_RMS;
1034  if(!hf_data[i+42][j-1][k-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1035  if(!hf_data[i+42][j-1][k-1].get_average_time(&TIME,&TIME_RMS)) continue;
1036  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1037  }
1038  }
1039  if(sd==HcalOuter){
1040  if(side==0){
1041  eta_min=-4,eta_max=4;
1042  if(rbx==1){
1043  for(int i=eta_min;i<=eta_max;i++) for(int j=71;j<=72;j++){
1044  double val,rms,time,time_rms;
1045  double TIME,TIME_RMS;
1046  if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1047  if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
1048  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1049  }
1050  for(int i=eta_min;i<=eta_max;i++) for(int j=1;j<=4;j++){
1051  double val,rms,time,time_rms;
1052  double TIME,TIME_RMS;
1053  if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1054  if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
1055  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1056  }
1057 
1058  }else{
1059  for(int i=eta_min;i<=eta_max;i++) for(int j=((rbx-1)*6-1);j<=((rbx-1)*6+4);j++){
1060  double val,rms,time,time_rms;
1061  double TIME,TIME_RMS;
1062  if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1063  if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
1064  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1065  }
1066  }
1067  }
1068  if(side==-1){ eta_min=-10,eta_max=-5;}
1069  if(side==-2){ eta_min=-15,eta_max=-11;}
1070  if(side==1) { eta_min=5, eta_max=10;}
1071  if(side==2) { eta_min=11, eta_max=15;}
1072  if(side!=0){
1073  if(rbx==1){
1074  for(int i=eta_min;i<=eta_max;i++) for(int j=71;j<=72;j++){
1075  double val,rms,time,time_rms;
1076  double TIME,TIME_RMS;
1077  if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1078  if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
1079  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1080  }
1081  for(int i=eta_min;i<=eta_max;i++) for(int j=1;j<=10;j++){
1082  double val,rms,time,time_rms;
1083  double TIME,TIME_RMS;
1084  if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1085  if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
1086  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1087  }
1088 
1089  }else{
1090  for(int i=eta_min;i<=eta_max;i++) for(int j=((rbx-1)*12-1);j<=((rbx-1)*12+10);j++){
1091  double val,rms,time,time_rms;
1092  double TIME,TIME_RMS;
1093  if(!ho_data[i+42][j-1][4-1].get_reference(&val,&rms,&time,&time_rms)) continue;
1094  if(!ho_data[i+42][j-1][4-1].get_average_time(&TIME,&TIME_RMS)) continue;
1095  xt+=TIME-time; xxt+=(TIME-time)*(TIME-time); n++;
1096  }
1097  }
1098  }
1099  }
1100  if(n<10) return false;
1101  *ave=xt/n;
1102  *rms=sqrt(xxt/n-(xt*xt)/(n*n));
1103  return true;
1104 }
int i
Definition: DBlmapReader.cc:9
T sqrt(T t)
Definition: SSEVec.h:28
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
HcalDetDiagLaserData hb_data[85][72][4]
HcalDetDiagLaserData hf_data[85][72][4]
HcalDetDiagLaserData he_data[85][72][4]
HcalDetDiagLaserData ho_data[85][72][4]
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().

736  {
737 double T=0,nT=0,E=0,nE=0,Tr=0,nTr=0,Er=0,nEr=0;
738  if(sd==HcalBarrel) for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++){
739  for(int depth=1;depth<=2;depth++){
740  if(hb_data[eta+42][phi-1][depth-1].get_statistics()>10){
741  double ave=0,rms=0,time=0,time_rms=0;
742  hb_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
743  hb_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
744  T+=time; nT++; E+=ave; nE++;
745  if(hb_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
746  Tr+=time; nTr++; Er+=ave; nEr++;}
747  }
748  }
749  }
750  // HE histograms
751  if(sd==HcalEndcap) for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++){
752  for(int depth=1;depth<=3;depth++){
753  if(he_data[eta+42][phi-1][depth-1].get_statistics()>10){
754  double ave=0; double rms=0; double time=0; double time_rms=0;
755  he_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
756  he_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
757  T+=time; nT++; E+=ave; nE++;
758  if(he_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
759  Tr+=time; nTr++; Er+=ave; nEr++;}
760  }
761  }
762  }
763  // HF histograms
764  if(sd==HcalForward) for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++){
765  for(int depth=1;depth<=2;depth++){
766  if(hf_data[eta+42][phi-1][depth-1].get_statistics()>10){
767  double ave=0; double rms=0; double time=0; double time_rms=0;
768  hf_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
769  hf_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
770  T+=time; nT++; E+=ave; nE++;
771  if(hf_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
772  Tr+=time; nTr++; Er+=ave; nEr++;}
773  }
774  }
775  }
776  // HO histograms
777  if(sd==HcalOuter) for(int eta=-15;eta<=15;eta++) for(int phi=1;phi<=72;phi++){
778  for(int depth=4;depth<=4;depth++){
779  if(ho_data[eta+42][phi-1][depth-1].get_statistics()>10){
780  double ave=0; double rms=0; double time=0; double time_rms=0;
781  ho_data[eta+42][phi-1][depth-1].get_average_amp(&ave,&rms);
782  ho_data[eta+42][phi-1][depth-1].get_average_time(&time,&time_rms);
783  T+=time; nT++; E+=ave; nE++;
784  if(ho_data[eta+42][phi-1][depth-1].get_reference(&ave,&rms,&time,&time_rms)){
785  Tr+=time; nTr++; Er+=ave; nEr++;}
786  }
787  }
788  }
789  if(nT<200 || nE<200 || nTr<200 || nEr<200) return false;
790  *ave_t=T/nT;
791  *ave_e=E/nE;
792  *ave_t_r=Tr/nTr;
793  *ave_e_r=Er/nEr;
794  return true;
795 }
bool get_average_amp(double *ave, double *rms)
T eta() const
bool get_average_time(double *ave, double *rms)
HcalDetDiagLaserData hb_data[85][72][4]
HcalDetDiagLaserData hf_data[85][72][4]
HcalDetDiagLaserData he_data[85][72][4]
long double T
HcalDetDiagLaserData ho_data[85][72][4]
Definition: DDAxes.h:10
HcalDetDiagLaserData* HcalDetDiagLaserMonitor::GetCalib ( std::string  sd,
int  eta,
int  phi 
)
inlineprivate

Definition at line 253 of file HcalDetDiagLaserMonitor.cc.

References abs, calib_data, ETA, and PHI.

253  {
254  int SD=0,ETA=0,PHI=0;
255  if(sd.compare("HB")==0) SD=1;
256  if(sd.compare("HE")==0) SD=2;
257  if(sd.compare("HO")==0) SD=3;
258  if(sd.compare("HF")==0) SD=4;
259  if(SD==1 || SD==2){
260  if(eta>0) ETA=1; else ETA=-1;
261  if(phi==71 ||phi==72 || phi==1 || phi==2) PHI=71; else PHI=((phi-3)/4)*4+3;
262  }else if(SD==3){
263  if(abs(eta)<=4){
264  ETA=0;
265  if(phi==71 ||phi==72 || phi==1 || phi==2 || phi==3 || phi==4) PHI=71; else PHI=((phi-5)/6)*6+5;
266  }else{
267  if(abs(eta)>4 && abs(eta)<=10) ETA=1;
268  if(abs(eta)>10 && abs(eta)<=15) ETA=2;
269  if(eta<0) ETA=-ETA;
270  if(phi==71 ||phi==72 || (phi>=1 && phi<=10)) PHI=71; else PHI=((phi-11)/12)*12+11;
271  }
272  }else if(SD==4){
273  if(eta>0) ETA=1; else ETA=-1;
274  if(phi>=1 && phi<=18) PHI=1;
275  if(phi>=19 && phi<=36) PHI=19;
276  if(phi>=37 && phi<=54) PHI=37;
277  if(phi>=55 && phi<=72) PHI=55;
278  }
279  return &calib_data[SD][ETA+2][PHI-1];
280  };
#define abs(x)
Definition: mlp_lapack.h:159
T eta() const
#define ETA
#define PHI
HcalDetDiagLaserData calib_data[5][5][72]
Definition: DDAxes.h:10
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().

1778  {
1779 double amp,rms,time,time_rms;
1780 int Eta,Phi,Depth,Statistic;
1781 char subdet[10];
1782 TFile *f;
1783  if(DatasetName.size()==0) return;
1784  createHTMLonly=true;
1785  if(gSystem->AccessPathName(DatasetName.c_str())) return;
1786  f = new TFile(DatasetName.c_str(),"READ");
1787 
1788  if(!f->IsOpen()) return ;
1789 
1790  TTree* t=0;
1791  t=(TTree*)f->Get("HCAL Laser data");
1792  if(!t) return;
1793  t->SetBranchAddress("Subdet", subdet);
1794  t->SetBranchAddress("eta", &Eta);
1795  t->SetBranchAddress("phi", &Phi);
1796  t->SetBranchAddress("depth", &Depth);
1797  t->SetBranchAddress("amp", &amp);
1798  t->SetBranchAddress("rms", &rms);
1799  t->SetBranchAddress("time", &time);
1800  t->SetBranchAddress("time_rms", &time_rms);
1801  t->SetBranchAddress("statistic",&Statistic);
1802  for(int ievt=0;ievt<t->GetEntries();ievt++){
1803  t->GetEntry(ievt);
1804  if(strcmp(subdet,"HB")==0){ nHB++;
1805  hb_data[Eta+42][Phi-1][Depth-1].set_data(amp,rms,time,time_rms);
1806  hb_data[Eta+42][Phi-1][Depth-1].set_statistics(Statistic);
1807  hb_data[Eta+42][Phi-1][Depth-1].set_statistics1(Statistic);
1808  }
1809  if(strcmp(subdet,"HE")==0){ nHE++;
1810  he_data[Eta+42][Phi-1][Depth-1].set_data(amp,rms,time,time_rms);
1811  he_data[Eta+42][Phi-1][Depth-1].set_statistics(Statistic);
1812  he_data[Eta+42][Phi-1][Depth-1].set_statistics1(Statistic);
1813  }
1814  if(strcmp(subdet,"HO")==0){ nHO++;
1815  ho_data[Eta+42][Phi-1][Depth-1].set_data(amp,rms,time,time_rms);
1816  ho_data[Eta+42][Phi-1][Depth-1].set_statistics(Statistic);
1817  ho_data[Eta+42][Phi-1][Depth-1].set_statistics1(Statistic);
1818  }
1819  if(strcmp(subdet,"HF")==0){ nHF++;
1820  hf_data[Eta+42][Phi-1][Depth-1].set_data(amp,rms,time,time_rms);
1821  hf_data[Eta+42][Phi-1][Depth-1].set_statistics(Statistic);
1822  hf_data[Eta+42][Phi-1][Depth-1].set_statistics1(Statistic);
1823  }
1824  if(strcmp(subdet,"CALIB_HB")==0){
1825  calib_data[1][Eta+2][Phi-1].set_data(amp,rms,time,time_rms);
1826  calib_data[1][Eta+2][Phi-1].set_statistics(Statistic);
1827  calib_data[1][Eta+2][Phi-1].set_statistics1(Statistic);
1828  }
1829  if(strcmp(subdet,"CALIB_HE")==0){
1830  calib_data[2][Eta+2][Phi-1].set_data(amp,rms,time,time_rms);
1831  calib_data[2][Eta+2][Phi-1].set_statistics(Statistic);
1832  calib_data[2][Eta+2][Phi-1].set_statistics1(Statistic);
1833  }
1834  if(strcmp(subdet,"CALIB_HO")==0){
1835  calib_data[3][Eta+2][Phi-1].set_data(amp,rms,time,time_rms);
1836  calib_data[3][Eta+2][Phi-1].set_statistics(Statistic);
1837  calib_data[3][Eta+2][Phi-1].set_statistics1(Statistic);
1838  }
1839  if(strcmp(subdet,"CALIB_HF")==0){
1840  calib_data[4][Eta+2][Phi-1].set_data(amp,rms,time,time_rms);
1841  calib_data[4][Eta+2][Phi-1].set_statistics(Statistic);
1842  calib_data[4][Eta+2][Phi-1].set_statistics1(Statistic);
1843  }
1844  }
1845  TObjString *STR1=(TObjString *)f->Get("run number");
1846  if(STR1){ int run; sscanf(STR1->String(),"%i",&run); meRUN_->Fill(run); run_number=run;}
1847 
1848  TObjString *STR2=(TObjString *)f->Get("Total events processed");
1849  if(STR2){ int events; sscanf(STR2->String(),"%i",&events); meEVT_->Fill(events); ievt_=events;}
1850 
1851  TObjString *STR3=(TObjString *)f->Get("Dataset number");
1852  if(STR3){ int ds; sscanf(STR3->String(),"%i",&ds); dataset_seq_number=ds;}
1853  f->Close();
1854 }
void Fill(long long x)
double f[11][100]
HcalDetDiagLaserData hb_data[85][72][4]
HcalDetDiagLaserData hf_data[85][72][4]
tuple events
Definition: patZpeak.py:19
void set_data(float val, float rms, float time, float time_rms)
HcalDetDiagLaserData he_data[85][72][4]
HcalDetDiagLaserData ho_data[85][72][4]
HcalDetDiagLaserData calib_data[5][5][72]
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().

1741  {
1742 double amp,rms,time,time_rms;
1743 int Eta,Phi,Depth;
1744 char subdet[10];
1745 TFile *f;
1746  if(gSystem->AccessPathName(ReferenceData.c_str())) return;
1747  f = new TFile(ReferenceData.c_str(),"READ");
1748 
1749  if(!f->IsOpen()) return ;
1750  TObjString *STR=(TObjString *)f->Get("run number");
1751 
1752  if(STR){ std::string Ref(STR->String()); ReferenceRun=Ref;}
1753 
1754  TTree* t=(TTree*)f->Get("HCAL Laser data");
1755  if(!t) return;
1756  t->SetBranchAddress("Subdet", subdet);
1757  t->SetBranchAddress("eta", &Eta);
1758  t->SetBranchAddress("phi", &Phi);
1759  t->SetBranchAddress("depth", &Depth);
1760  t->SetBranchAddress("amp", &amp);
1761  t->SetBranchAddress("rms", &rms);
1762  t->SetBranchAddress("time", &time);
1763  t->SetBranchAddress("time_rms", &time_rms);
1764  for(int ievt=0;ievt<t->GetEntries();ievt++){
1765  t->GetEntry(ievt);
1766  if(strcmp(subdet,"HB")==0) hb_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1767  if(strcmp(subdet,"HE")==0) he_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1768  if(strcmp(subdet,"HO")==0) ho_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1769  if(strcmp(subdet,"HF")==0) hf_data[Eta+42][Phi-1][Depth-1].set_reference(amp,rms,time,time_rms);
1770  if(strcmp(subdet,"CALIB_HB")==0) calib_data[1][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1771  if(strcmp(subdet,"CALIB_HE")==0) calib_data[2][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1772  if(strcmp(subdet,"CALIB_HO")==0) calib_data[3][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1773  if(strcmp(subdet,"CALIB_HF")==0) calib_data[4][Eta+2][Phi-1].set_reference(amp,rms,time,time_rms);
1774  }
1775  f->Close();
1776  IsReference=true;
1777 }
void set_reference(float val, float rms, float time, float time_rms)
double f[11][100]
HcalDetDiagLaserData hb_data[85][72][4]
HcalDetDiagLaserData hf_data[85][72][4]
HcalDetDiagLaserData he_data[85][72][4]
HcalDetDiagLaserData ho_data[85][72][4]
HcalDetDiagLaserData calib_data[5][5][72]
void HcalDetDiagLaserMonitor::SaveRaddamData ( )
private

Definition at line 1856 of file HcalDetDiagLaserMonitor.cc.

References adc2fC, HcalRaddamData::CUT1EVNT, HcalRaddamData::CUT2EVNT, dataset_seq_number, Raddam_ch::depth, Raddam_ch::eta, eta(), i, j, MultiGaussianStateTransform::N, n, OutputFilePath, Overwrite, phi, Raddam_ch::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().

1856  {
1857 float adc_range[20]={14,28,40,52,67,132,202,262,322,397,722,1072,1372,1672,2047,3672,5422,6922,8422,10297};
1858 int adc_bins[20]={1,2,3,4,5,5,10,15,20,25,25,50,75,100,125,125,250,375,500,625};
1859 char str[100];
1860  TF1 *fitFunc = new TF1("fitFunc","gaus");
1861  if(fitFunc==0) return;
1862  for(int i=0;i<56;i++){
1863  float sum1=0,sum2=0,n=0;
1864  S1[i]=S2[i]=0;
1865  for(int j=0;j<128;j++){
1866  sum1+=(adc2fC[j]-2.5)*Raddam_data[i].s1_adc[j];
1867  sum2+=(adc2fC[j]-2.5)*Raddam_data[i].s2_adc[j];
1868  n+=Raddam_data[i].s1_adc[j];
1869  }
1870  if(n<100) continue;
1871  sum1=sum1/n;
1872  sum2=sum2/n;
1873  int N=0;
1874  int Ws1=1,Ws2=1;
1875  for(N=1;N<19;N++) if(sum1>adc_range[N-1] && sum1<adc_range[N]) break;
1876  Ws1=adc_bins[N+1];
1877  for(N=1;N<19;N++) if(sum2>adc_range[N-1] && sum2<adc_range[N]) break;
1878  Ws2=adc_bins[N+1];
1879  sprintf(str,"Raddam(%i,%i,%i) S1",RADDAM_CH[i].eta,RADDAM_CH[i].phi,RADDAM_CH[i].depth);
1880  S1[i]=new TH1F(str,str,10000/Ws1,0,10000);
1881  sprintf(str,"Raddam(%i,%i,%i) S2",RADDAM_CH[i].eta,RADDAM_CH[i].phi,RADDAM_CH[i].depth);
1882  S2[i]=new TH1F(str,str,10000/Ws1,0,10000);
1883  for(int j=0;j<128;j++){
1884  S1[i]->Fill(adc2fC[j]-2.5,Raddam_data[i].s1_adc[j]);
1885  S2[i]->Fill(adc2fC[j]-2.5,Raddam_data[i].s2_adc[j]);
1886  }
1887  double parm[3];
1888  S1[i]->Fit("fitFunc");
1889  S1[i]->GetFunction("fitFunc")->GetParameters(parm);
1890  Raddam_data[i].S1MEAN=S1[i]->GetMean();
1891  Raddam_data[i].S1RMS=S1[i]->GetRMS();
1892  Raddam_data[i].S1FITMEAN=parm[1];
1893  Raddam_data[i].S1FITMEANER=S1[i]->GetFunction("fitFunc")->GetParError(1);
1894  Raddam_data[i].S1FITSIGMA=parm[2];
1895  Raddam_data[i].S1CHI2=S1[i]->GetFunction("fitFunc")->GetChisquare();
1896  Raddam_data[i].S1NDF=S1[i]->GetFunction("fitFunc")->GetNDF();
1897  Raddam_data[i].S1BINWIDTH=Ws1;
1898  S2[i]->Fit("fitFunc");
1899  S2[i]->GetFunction("fitFunc")->GetParameters(parm);
1900  Raddam_data[i].S2MEAN=S2[i]->GetMean();
1901  Raddam_data[i].S2RMS=S2[i]->GetRMS();
1902  Raddam_data[i].S2FITMEAN=parm[1];
1903  Raddam_data[i].S2FITMEANER=S2[i]->GetFunction("fitFunc")->GetParError(1);
1904  Raddam_data[i].S2FITSIGMA=parm[2];
1905  Raddam_data[i].S2CHI2=S2[i]->GetFunction("fitFunc")->GetChisquare();
1906  Raddam_data[i].S2NDF=S2[i]->GetFunction("fitFunc")->GetNDF();
1907  Raddam_data[i].S2BINWIDTH=Ws2;
1908  }
1909  if(XmlFilePath.size()>0){
1910  char TIME[40];
1911  Long_t t; t=time(0); strftime(TIME,30,"%F %T",localtime(&t));
1912  //create XML file
1913  if(!Overwrite){
1914  sprintf(str,"HcalDetDiagRaddam_%i_%i.xml",run_number,dataset_seq_number);
1915  }else{
1916  sprintf(str,"HcalDetDiagRaddam.xml");
1917  }
1918  std::string xmlName=str;
1919  ofstream xmlFile;
1920  xmlFile.open(xmlName.c_str());
1921  xmlFile<<"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>\n";
1922  xmlFile<<"<ROOT>\n";
1923  xmlFile<<" <HEADER>\n";
1924  xmlFile<<" <TYPE>\n";
1925  xmlFile<<" <EXTENSION_TABLE_NAME>HCAL_RADDAM</EXTENSION_TABLE_NAME>\n";
1926  xmlFile<<" <NAME>HCAL Raddam</NAME>\n";
1927  xmlFile<<" </TYPE>\n";
1928  xmlFile<<" <!-- run details -->\n";
1929  xmlFile<<" <RUN>\n";
1930  xmlFile<<" <RUN_TYPE>TEST LOCAL-RUN</RUN_TYPE>\n";
1931  xmlFile<<" <RUN_NUMBER>"<<run_number<<"</RUN_NUMBER>\n";
1932  xmlFile<<" <RUN_BEGIN_TIMESTAMP>"<<TIME<<"</RUN_BEGIN_TIMESTAMP>\n";
1933  xmlFile<<" <COMMENT_DESCRIPTION>hcal raddam data</COMMENT_DESCRIPTION>\n";
1934  xmlFile<<" <LOCATION>P5</LOCATION>\n";
1935  xmlFile<<" <INITIATED_BY_USER>dma</INITIATED_BY_USER>\n";
1936  xmlFile<<" </RUN>\n";
1937  xmlFile<<" </HEADER>\n";
1938  xmlFile<<" <DATA_SET>\n";
1939  xmlFile<<" <COMMENT_DESCRIPTION>Test Raddam data</COMMENT_DESCRIPTION>\n";
1940  xmlFile<<" <CREATE_TIMESTAMP>"<<TIME<<"</CREATE_TIMESTAMP>\n";
1941  xmlFile<<" <CREATED_BY_USER>dma</CREATED_BY_USER>\n";
1942  xmlFile<<" <VERSION>Test_Version_1</VERSION>\n";
1943 
1944  for(int i=0;i<56;i++){
1945  xmlFile<<" <DATA>\n";
1946  xmlFile<<" <SUBDET>HF</SUBDET>\n";
1947  xmlFile<<" <IETA>"<<RADDAM_CH[i].eta<<"</IETA>\n";
1948  xmlFile<<" <IPHI>"<<RADDAM_CH[i].phi<<"</IPHI>\n";
1949  xmlFile<<" <DEPTH>"<<RADDAM_CH[i].depth<<"</DEPTH>\n";
1950 
1951  xmlFile<<" <TOTEVNT>"<<Raddam_data[i].TOTEVNT<<"</TOTEVNT>\n";
1952  xmlFile<<" <CUT1EVNT>"<<Raddam_data[i].CUT1EVNT<<"</CUT1EVNT>\n";
1953  xmlFile<<" <CUT2EVNT>"<<Raddam_data[i].CUT2EVNT<<"</CUT2EVNT>\n";
1954 
1955  xmlFile<<" <S1MEAN>"<<Raddam_data[i].S1MEAN <<"</S1MEAN>\n";
1956  xmlFile<<" <S1RMS>"<<Raddam_data[i].S1RMS <<"</S1RMS>\n";
1957  xmlFile<<" <S1FITMEAN>"<<Raddam_data[i].S1FITMEAN <<"</S1FITMEAN>\n";
1958  xmlFile<<" <S1FITMEANER>"<<Raddam_data[i].S1FITMEANER <<"</S1FITMEANER>\n";
1959  xmlFile<<" <S1FITSIGMA>"<<Raddam_data[i].S1FITSIGMA <<"</S1FITSIGMA>\n";
1960  xmlFile<<" <S1CHI2>"<<Raddam_data[i].S1CHI2 <<"</S1CHI2>\n";
1961  xmlFile<<" <S1NDF>"<<Raddam_data[i].S1NDF <<"</S1NDF>\n";
1962  xmlFile<<" <S1BINWIDTH>"<<Raddam_data[i].S1BINWIDTH <<"</S1BINWIDTH>\n";
1963 
1964  xmlFile<<" <S2MEAN>"<<Raddam_data[i].S2MEAN <<"</S2MEAN>\n";
1965  xmlFile<<" <S2RMS>"<<Raddam_data[i].S2RMS <<"</S2RMS>\n";
1966  xmlFile<<" <S2FITMEAN>"<<Raddam_data[i].S2FITMEAN <<"</S2FITMEAN>\n";
1967  xmlFile<<" <S2FITMEANER>"<<Raddam_data[i].S2FITMEANER <<"</S2FITMEANER>\n";
1968  xmlFile<<" <S2FITSIGMA>"<<Raddam_data[i].S2FITSIGMA <<"</S2FITSIGMA>\n";
1969  xmlFile<<" <S2CHI2>"<<Raddam_data[i].S2CHI2 <<"</S2CHI2>\n";
1970  xmlFile<<" <S2NDF>"<<Raddam_data[i].S2NDF <<"</S2NDF>\n";
1971  xmlFile<<" <S2BINWIDTH>"<<Raddam_data[i].S2BINWIDTH <<"</S2BINWIDTH>\n";
1972  xmlFile<<" </DATA>\n";
1973  }
1974  xmlFile<<" </DATA_SET>\n";
1975  xmlFile<<"</ROOT>\n";
1976 
1977  xmlFile.close();
1978  sprintf(str,"zip %s.zip %s",xmlName.c_str(),xmlName.c_str());
1979  system(str);
1980  sprintf(str,"rm -f %s",xmlName.c_str());
1981  system(str);
1982  sprintf(str,"mv -f %s.zip %s",xmlName.c_str(),XmlFilePath.c_str());
1983  system(str);
1984  }
1985  if(OutputFilePath.size()>0){
1986  if(!Overwrite){
1987  sprintf(str,"%sHcalDetDiagRaddamData_run%06i_%i.root",OutputFilePath.c_str(),run_number,dataset_seq_number);
1988  }else{
1989  sprintf(str,"%sHcalDetDiagRaddamData.root",OutputFilePath.c_str());
1990  }
1991  TFile *theFile = new TFile(str, "RECREATE");
1992  if(!theFile->IsOpen()) return;
1993  theFile->cd();
1994  for(int i=0;i<56;i++){
1995  if(S1[i]!=0)S1[i]->Write();
1996  if(S2[i]!=0)S2[i]->Write();
1997  }
1998  theFile->Write();
1999  theFile->Close();
2000  }
2001 }
int i
Definition: DBlmapReader.cc:9
static const float adc2fC[128]
HcalRaddamData Raddam_data[56]
T eta() const
Raddam_ch RADDAM_CH[56]
int j
Definition: DBlmapReader.cc:9
bool xmlFile(const std::string fParam)
Definition: DDAxes.h:10
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, reco::tau::disc::Eta(), 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().

1410  {
1411 double amp,rms,Time,time_rms;
1412 int Eta,Phi,Depth,Statistic,Status=0;
1413 char Subdet[10],str[500];
1414  if(OutputFilePath.size()>0){
1415  if(!Overwrite){
1416  sprintf(str,"%sHcalDetDiagLaserData_run%06i_%i.root",OutputFilePath.c_str(),run_number,dataset_seq_number);
1417  }else{
1418  sprintf(str,"%sHcalDetDiagLaserData.root",OutputFilePath.c_str());
1419  }
1420  TFile *theFile = new TFile(str, "RECREATE");
1421  if(!theFile->IsOpen()) return;
1422  theFile->cd();
1423  sprintf(str,"%d",run_number); TObjString run(str); run.Write("run number");
1424  sprintf(str,"%d",ievt_); TObjString events(str); events.Write("Total events processed");
1425  sprintf(str,"%d",dataset_seq_number); TObjString dsnum(str); dsnum.Write("Dataset number");
1426  Long_t t; t=time(0); strftime(str,30,"%F %T",localtime(&t)); TObjString tm(str); tm.Write("Dataset creation time");
1427 
1428  TTree *tree =new TTree("HCAL Laser data","HCAL Laser data");
1429  if(tree==0) return;
1430  tree->Branch("Subdet", &Subdet, "Subdet/C");
1431  tree->Branch("eta", &Eta, "Eta/I");
1432  tree->Branch("phi", &Phi, "Phi/I");
1433  tree->Branch("depth", &Depth, "Depth/I");
1434  tree->Branch("statistic",&Statistic, "Statistic/I");
1435  tree->Branch("status", &Status, "Status/I");
1436  tree->Branch("amp", &amp, "amp/D");
1437  tree->Branch("rms", &rms, "rms/D");
1438  tree->Branch("time", &Time, "time/D");
1439  tree->Branch("time_rms", &time_rms, "time_rms/D");
1440  sprintf(Subdet,"HB");
1441  for(int eta=-16;eta<=16;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=2;depth++){
1442  if((Statistic=hb_data[eta+42][phi-1][depth-1].get_statistics1())>10){
1443  Eta=eta; Phi=phi; Depth=depth;
1444  Status=hb_data[eta+42][phi-1][depth-1].get_status();
1445  hb_data[eta+42][phi-1][depth-1].get_average_amp1(&amp,&rms);
1446  hb_data[eta+42][phi-1][depth-1].get_average_time1(&Time,&time_rms);
1447  tree->Fill();
1448  }
1449  }
1450  sprintf(Subdet,"HE");
1451  for(int eta=-29;eta<=29;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=3;depth++){
1452  if((Statistic=he_data[eta+42][phi-1][depth-1].get_statistics1())>10){
1453  Eta=eta; Phi=phi; Depth=depth;
1454  Status=he_data[eta+42][phi-1][depth-1].get_status();
1455  he_data[eta+42][phi-1][depth-1].get_average_amp1(&amp,&rms);
1456  he_data[eta+42][phi-1][depth-1].get_average_time1(&Time,&time_rms);
1457  tree->Fill();
1458  }
1459  }
1460  sprintf(Subdet,"HO");
1461  for(int eta=-15;eta<=15;eta++) for(int phi=1;phi<=72;phi++) for(int depth=4;depth<=4;depth++){
1462  if((Statistic=ho_data[eta+42][phi-1][depth-1].get_statistics1())>10){
1463  Eta=eta; Phi=phi; Depth=depth;
1464  Status=ho_data[eta+42][phi-1][depth-1].get_status();
1465  ho_data[eta+42][phi-1][depth-1].get_average_amp1(&amp,&rms);
1466  ho_data[eta+42][phi-1][depth-1].get_average_time1(&Time,&time_rms);
1467  tree->Fill();
1468  }
1469  }
1470  sprintf(Subdet,"HF");
1471  for(int eta=-42;eta<=42;eta++) for(int phi=1;phi<=72;phi++) for(int depth=1;depth<=2;depth++){
1472  if((Statistic=hf_data[eta+42][phi-1][depth-1].get_statistics1())>10){
1473  Eta=eta; Phi=phi; Depth=depth;
1474  Status=hf_data[eta+42][phi-1][depth-1].get_status();
1475  hf_data[eta+42][phi-1][depth-1].get_average_amp1(&amp,&rms);
1476  hf_data[eta+42][phi-1][depth-1].get_average_time1(&Time,&time_rms);
1477  tree->Fill();
1478  }
1479  }
1480  sprintf(Subdet,"CALIB_HB");
1481  for(int eta=-1;eta<=1;eta++) for(int phi=1;phi<=72;phi++){
1482  if((Statistic=calib_data[1][eta+2][phi-1].get_statistics1())>10){
1483  Eta=eta; Phi=phi; Depth=0;
1484  Status=calib_data[1][eta+2][phi-1].get_status();
1485  calib_data[1][eta+2][phi-1].get_average_amp1(&amp,&rms);
1486  calib_data[1][eta+2][phi-1].get_average_time1(&Time,&time_rms);
1487  tree->Fill();
1488  }
1489  }
1490  sprintf(Subdet,"CALIB_HE");
1491  for(int eta=-1;eta<=1;eta++) for(int phi=1;phi<=72;phi++){
1492  if((Statistic=calib_data[2][eta+2][phi-1].get_statistics1())>10){
1493  Eta=eta; Phi=phi; Depth=0;
1494  Status=calib_data[2][eta+2][phi-1].get_status();
1495  calib_data[2][eta+2][phi-1].get_average_amp1(&amp,&rms);
1496  calib_data[2][eta+2][phi-1].get_average_time1(&Time,&time_rms);
1497  tree->Fill();
1498  }
1499  }
1500  sprintf(Subdet,"CALIB_HO");
1501  for(int eta=-2;eta<=2;eta++) for(int phi=1;phi<=72;phi++){
1502  if((Statistic=calib_data[3][eta+2][phi-1].get_statistics1())>10){
1503  Eta=eta; Phi=phi; Depth=0;
1504  Status=calib_data[3][eta+2][phi-1].get_status();
1505  calib_data[3][eta+2][phi-1].get_average_amp1(&amp,&rms);
1506  calib_data[3][eta+2][phi-1].get_average_time1(&Time,&time_rms);
1507  tree->Fill();
1508  }
1509  }
1510  sprintf(Subdet,"CALIB_HF");
1511  for(int eta=-2;eta<=2;eta++) for(int phi=1;phi<=72;phi++){
1512  if((Statistic=calib_data[4][eta+2][phi-1].get_statistics1())>10){
1513  Eta=eta; Phi=phi; Depth=0;
1514  Status=calib_data[4][eta+2][phi-1].get_status();
1515  calib_data[4][eta+2][phi-1].get_average_amp1(&amp,&rms);
1516  calib_data[4][eta+2][phi-1].get_average_time1(&Time,&time_rms);
1517  tree->Fill();
1518  }
1519  }
1520  theFile->Write();
1521  theFile->Close();
1522  }
1523  if(XmlFilePath.size()>0){
1524  char TIME[40];
1525  Long_t t; t=time(0); strftime(TIME,30,"%F %T",localtime(&t));
1526  //create XML file
1527  if(!Overwrite){
1528  sprintf(str,"HcalDetDiagLaser_%i_%i.xml",run_number,dataset_seq_number);
1529  }else{
1530  sprintf(str,"HcalDetDiagLaser.xml");
1531  }
1532  std::string xmlName=str;
1533  ofstream xmlFile;
1534  xmlFile.open(xmlName.c_str());
1535 
1536  xmlFile<<"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
1537  xmlFile<<"<ROOT>\n";
1538  xmlFile<<" <HEADER>\n";
1539  xmlFile<<" <HINTS mode='only-det-root'/>\n";
1540  xmlFile<<" <TYPE>\n";
1541  xmlFile<<" <EXTENSION_TABLE_NAME>HCAL_DETMON_LED_LASER_V1</EXTENSION_TABLE_NAME>\n";
1542  xmlFile<<" <NAME>HCAL Laser HBHE HPD [abort gap global]</NAME>\n";
1543  xmlFile<<" </TYPE>\n";
1544  xmlFile<<" <!-- run details -->\n";
1545  xmlFile<<" <RUN>\n";
1546  xmlFile<<" <RUN_TYPE>GLOBAL-RUN</RUN_TYPE>\n";
1547  xmlFile<<" <RUN_NUMBER>"<<run_number<<"</RUN_NUMBER>\n";
1548  xmlFile<<" <RUN_BEGIN_TIMESTAMP>2009-01-01 00:00:00</RUN_BEGIN_TIMESTAMP>\n";
1549  xmlFile<<" <COMMENT_DESCRIPTION>hcal laser data</COMMENT_DESCRIPTION>\n";
1550  xmlFile<<" <LOCATION>P5</LOCATION>\n";
1551  xmlFile<<" <INITIATED_BY_USER>dma</INITIATED_BY_USER>\n";
1552  xmlFile<<" </RUN>\n";
1553  xmlFile<<" </HEADER>\n";
1554  xmlFile<<" <DATA_SET>\n";
1555  xmlFile<<" <!-- optional dataset metadata -->\n\n";
1556  xmlFile<<" <SET_NUMBER>"<<dataset_seq_number<<"</SET_NUMBER>\n";
1557  xmlFile<<" <SET_BEGIN_TIMESTAMP>2009-01-01 00:00:00</SET_BEGIN_TIMESTAMP>\n";
1558  xmlFile<<" <SET_END_TIMESTAMP>2009-01-01 00:00:00</SET_END_TIMESTAMP>\n";
1559  xmlFile<<" <NUMBER_OF_EVENTS_IN_SET>"<<ievt_<<"</NUMBER_OF_EVENTS_IN_SET>\n";
1560  xmlFile<<" <COMMENT_DESCRIPTION>Automatic DQM output</COMMENT_DESCRIPTION>\n";
1561  xmlFile<<" <DATA_FILE_NAME>"<< xmlName <<"</DATA_FILE_NAME>\n";
1562  xmlFile<<" <IMAGE_FILE_NAME>data plot url or file path</IMAGE_FILE_NAME>\n";
1563  xmlFile<<" <!-- who and when created this dataset-->\n\n";
1564  xmlFile<<" <CREATE_TIMESTAMP>"<<TIME<<"</CREATE_TIMESTAMP>\n";
1565  xmlFile<<" <CREATED_BY_USER>dma</CREATED_BY_USER>\n";
1566  xmlFile<<" <!-- version (string) and subversion (number) -->\n";
1567  xmlFile<<" <!-- fields are used to read data back from the database -->\n\n";
1568  xmlFile<<" <VERSION>"<<run_number<<dataset_seq_number<<"</VERSION>\n";
1569  xmlFile<<" <SUBVERSION>1</SUBVERSION>\n";
1570  xmlFile<<" <!-- Assign predefined dataset attributes -->\n\n";
1571  xmlFile<<" <PREDEFINED_ATTRIBUTES>\n";
1572  xmlFile<<" <ATTRIBUTE>\n";
1573  xmlFile<<" <NAME>HCAL Dataset Status</NAME>\n";
1574  xmlFile<<" <VALUE>VALID</VALUE>\n";
1575  xmlFile<<" </ATTRIBUTE>\n";
1576  xmlFile<<" </PREDEFINED_ATTRIBUTES>\n";
1577  xmlFile<<" <!-- multiple data block records -->\n\n";
1578 
1579  std::vector <HcalElectronicsId> AllElIds = emap->allElectronicsIdPrecision();
1580  for(std::vector <HcalElectronicsId>::iterator eid = AllElIds.begin(); eid != AllElIds.end(); eid++){
1581  DetId detid=emap->lookup(*eid);
1582  if (detid.det()!=DetId::Hcal) continue;
1583  HcalGenericDetId gid(emap->lookup(*eid));
1584  if(!(!(gid.null()) &&
1585  (gid.genericSubdet()==HcalGenericDetId::HcalGenBarrel ||
1586  gid.genericSubdet()==HcalGenericDetId::HcalGenEndcap ||
1587  gid.genericSubdet()==HcalGenericDetId::HcalGenForward ||
1588  gid.genericSubdet()==HcalGenericDetId::HcalGenOuter))) continue;
1589  int eta,phi,depth;
1590  std::string subdet="";
1591  HcalDetId hid(detid);
1592  eta=hid.ieta();
1593  phi=hid.iphi();
1594  depth=hid.depth();
1595 
1596  double e=0,e_rms=0,t=0,t_rms=0;
1597  if(detid.subdetId()==HcalBarrel){
1598  subdet="HB";
1599  Statistic=hb_data[eta+42][phi-1][depth-1].get_statistics1();
1600  Status =hb_data[eta+42][phi-1][depth-1].get_status();
1601  hb_data[eta+42][phi-1][depth-1].get_average_amp1(&e,&e_rms);
1602  hb_data[eta+42][phi-1][depth-1].get_average_time1(&t,&t_rms);
1603  }else if(detid.subdetId()==HcalEndcap){
1604  subdet="HE";
1605  Statistic=he_data[eta+42][phi-1][depth-1].get_statistics1();
1606  Status =he_data[eta+42][phi-1][depth-1].get_status();
1607  he_data[eta+42][phi-1][depth-1].get_average_amp1(&e,&e_rms);
1608  he_data[eta+42][phi-1][depth-1].get_average_time1(&t,&t_rms);
1609  }else if(detid.subdetId()==HcalForward){
1610  subdet="HF";
1611  Statistic=hf_data[eta+42][phi-1][depth-1].get_statistics1();
1612  Status =hf_data[eta+42][phi-1][depth-1].get_status();
1613  hf_data[eta+42][phi-1][depth-1].get_average_amp1(&e,&e_rms);
1614  hf_data[eta+42][phi-1][depth-1].get_average_time1(&t,&t_rms);
1615  }else if(detid.subdetId()==HcalOuter){
1616  subdet="HO";
1617  Statistic=ho_data[eta+42][phi-1][depth-1].get_statistics1();
1618  Status =ho_data[eta+42][phi-1][depth-1].get_status();
1619  ho_data[eta+42][phi-1][depth-1].get_average_amp1(&e,&e_rms);
1620  ho_data[eta+42][phi-1][depth-1].get_average_time1(&t,&t_rms);
1621  }else continue;
1622  xmlFile<<" <DATA>\n";
1623  xmlFile<<" <NUMBER_OF_EVENTS_USED>"<<Statistic<<"</NUMBER_OF_EVENTS_USED>\n";
1624  xmlFile<<" <SIGNAL_MEAN>"<<e<<"</SIGNAL_MEAN>\n";
1625  xmlFile<<" <SIGNAL_RMS>"<<e_rms<<"</SIGNAL_RMS>\n";
1626  xmlFile<<" <TIME_MEAN>"<<t<<"</TIME_MEAN>\n";
1627  xmlFile<<" <TIME_RMS>"<<t_rms<<"</TIME_RMS>\n";
1628  xmlFile<<" <CHANNEL_STATUS_WORD>"<<Status<<"</CHANNEL_STATUS_WORD>\n";
1629  xmlFile<<" <CHANNEL_OBJECTNAME>HcalDetId</CHANNEL_OBJECTNAME>\n";
1630  xmlFile<<" <SUBDET>"<<subdet<<"</SUBDET>\n";
1631  xmlFile<<" <IETA>"<<eta<<"</IETA>\n";
1632  xmlFile<<" <IPHI>"<<phi<<"</IPHI>\n";
1633  xmlFile<<" <DEPTH>"<<depth<<"</DEPTH>\n";
1634  xmlFile<<" <TYPE>0</TYPE>\n";
1635  xmlFile<<" </DATA>\n";
1636  }
1638  xmlFile<<" </DATA_SET>\n";
1639  xmlFile<<"</ROOT>\n";
1640  xmlFile.close();
1641 
1642 
1643  //create CALIB XML file
1644  sprintf(str,"HcalDetDiagLaserCalib_%i_%i.xml",run_number,dataset_seq_number);
1645  std::string xmlNameCalib=str;
1646  ofstream xmlFileCalib;
1647  xmlFileCalib.open(xmlNameCalib.c_str());
1648 
1649  xmlFileCalib<<"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
1650  xmlFileCalib<<"<ROOT>\n";
1651  xmlFileCalib<<" <HEADER>\n";
1652  xmlFileCalib<<" <HINTS mode='only-det-root'/>\n";
1653  xmlFileCalib<<" <TYPE>\n";
1654  xmlFileCalib<<" <EXTENSION_TABLE_NAME>HCAL_DETMON_LED_LASER_V1</EXTENSION_TABLE_NAME>\n";
1655  xmlFileCalib<<" <NAME>HCAL Laser CALIB [abort gap global]</NAME>\n";
1656  xmlFileCalib<<" </TYPE>\n";
1657  xmlFileCalib<<" <!-- run details -->\n";
1658  xmlFileCalib<<" <RUN>\n";
1659  xmlFileCalib<<" <RUN_TYPE>Global-RUN</RUN_TYPE>\n";
1660  xmlFileCalib<<" <RUN_NUMBER>"<<run_number<<"</RUN_NUMBER>\n";
1661  xmlFileCalib<<" <RUN_BEGIN_TIMESTAMP>2009-01-01 00:00:00</RUN_BEGIN_TIMESTAMP>\n";
1662  xmlFileCalib<<" <COMMENT_DESCRIPTION>hcal Laser CALIB data</COMMENT_DESCRIPTION>\n";
1663  xmlFileCalib<<" <LOCATION>P5</LOCATION>\n";
1664  xmlFileCalib<<" <INITIATED_BY_USER>dma</INITIATED_BY_USER>\n";
1665  xmlFileCalib<<" </RUN>\n";
1666  xmlFileCalib<<" </HEADER>\n";
1667  xmlFileCalib<<" <DATA_SET>\n";
1668  xmlFileCalib<<" <!-- optional dataset metadata -->\n\n";
1669  xmlFileCalib<<" <SET_NUMBER>"<<dataset_seq_number<<"</SET_NUMBER>\n";
1670  xmlFileCalib<<" <SET_BEGIN_TIMESTAMP>2009-01-01 00:00:00</SET_BEGIN_TIMESTAMP>\n";
1671  xmlFileCalib<<" <SET_END_TIMESTAMP>2009-01-01 00:00:00</SET_END_TIMESTAMP>\n";
1672  xmlFileCalib<<" <NUMBER_OF_EVENTS_IN_SET>"<<ievt_<<"</NUMBER_OF_EVENTS_IN_SET>\n";
1673  xmlFileCalib<<" <COMMENT_DESCRIPTION>Automatic DQM output</COMMENT_DESCRIPTION>\n";
1674  xmlFileCalib<<" <DATA_FILE_NAME>"<< xmlNameCalib <<"</DATA_FILE_NAME>\n";
1675  xmlFileCalib<<" <IMAGE_FILE_NAME>data plot url or file path</IMAGE_FILE_NAME>\n";
1676  xmlFileCalib<<" <!-- who and when created this dataset-->\n\n";
1677  xmlFileCalib<<" <CREATE_TIMESTAMP>"<<TIME<<"</CREATE_TIMESTAMP>\n";
1678  xmlFileCalib<<" <CREATED_BY_USER>dma</CREATED_BY_USER>\n";
1679  xmlFileCalib<<" <!-- version (string) and subversion (number) -->\n";
1680  xmlFileCalib<<" <!-- fields are used to read data back from the database -->\n\n";
1681  xmlFileCalib<<" <VERSION>"<<run_number<<dataset_seq_number<<"</VERSION>\n";
1682  xmlFileCalib<<" <SUBVERSION>1</SUBVERSION>\n";
1683  xmlFileCalib<<" <!-- Assign predefined dataset attributes -->\n\n";
1684  xmlFileCalib<<" <PREDEFINED_ATTRIBUTES>\n";
1685  xmlFileCalib<<" <ATTRIBUTE>\n";
1686  xmlFileCalib<<" <NAME>HCAL Dataset Status</NAME>\n";
1687  xmlFileCalib<<" <VALUE>VALID</VALUE>\n";
1688  xmlFileCalib<<" </ATTRIBUTE>\n";
1689  xmlFileCalib<<" </PREDEFINED_ATTRIBUTES>\n";
1690  xmlFileCalib<<" <!-- multiple data block records -->\n\n";
1691 
1692  for(int sd=1;sd<=4;sd++) for(int eta=-2;eta<=2;eta++) for(int phi=1;phi<=72;phi++){
1693  std::string subdet="";
1694  if(sd==1) subdet="HB";
1695  if(sd==2) subdet="HE";
1696  if(sd==3) subdet="HO";
1697  if(sd==4) subdet="HF";
1698  if((calib_data[sd][eta+2][phi-1].get_statistics())>100){
1699  double e=0,e_rms=0,t=0,t_rms=0;
1700  Status=calib_data[sd][eta+2][phi-1].get_status();
1701  Statistic=calib_data[sd][eta+2][phi-1].get_statistics1();
1702  calib_data[sd][eta+2][phi-1].get_average_amp1(&e,&e_rms);
1703  calib_data[sd][eta+2][phi-1].get_average_time1(&t,&t_rms);
1704  xmlFileCalib<<" <DATA>\n";
1705  xmlFileCalib<<" <NUMBER_OF_EVENTS_USED>"<<Statistic<<"</NUMBER_OF_EVENTS_USED>\n";
1706  xmlFileCalib<<" <SIGNAL_MEAN>"<<e<<"</SIGNAL_MEAN>\n";
1707  xmlFileCalib<<" <SIGNAL_RMS>"<<e_rms<<"</SIGNAL_RMS>\n";
1708  xmlFileCalib<<" <TIME_MEAN>"<<t<<"</TIME_MEAN>\n";
1709  xmlFileCalib<<" <TIME_RMS>"<<t_rms<<"</TIME_RMS>\n";
1710  xmlFileCalib<<" <CHANNEL_STATUS_WORD>"<<Status<<"</CHANNEL_STATUS_WORD>\n";
1711  xmlFileCalib<<" <CHANNEL_OBJECTNAME>HcalDetId</CHANNEL_OBJECTNAME>\n";
1712  xmlFileCalib<<" <SUBDET>"<<subdet<<"</SUBDET>\n";
1713  xmlFileCalib<<" <IETA>"<<eta<<"</IETA>\n";
1714  xmlFileCalib<<" <IPHI>"<<phi<<"</IPHI>\n";
1715  xmlFileCalib<<" <DEPTH>"<<0<<"</DEPTH>\n";
1716  xmlFileCalib<<" <TYPE>0</TYPE>\n";
1717  xmlFileCalib<<" </DATA>\n";
1718  }
1719  }
1721  xmlFileCalib<<" </DATA_SET>\n";
1722  xmlFileCalib<<"</ROOT>\n";
1723  xmlFileCalib.close();
1724 
1725  sprintf(str,"zip %s.zip %s %s",xmlName.c_str(),xmlName.c_str(),xmlNameCalib.c_str());
1726  system(str);
1727  sprintf(str,"rm -f %s %s",xmlName.c_str(),xmlNameCalib.c_str());
1728  system(str);
1729  sprintf(str,"mv -f %s.zip %s",xmlName.c_str(),XmlFilePath.c_str());
1730  system(str);
1731 
1732  }
1733  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();
1734  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();
1735  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();
1736  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();
1737  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();
1738  ievt_=0;
1739  dataset_seq_number++;
1740 }
int i
Definition: DBlmapReader.cc:9
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
bool get_average_amp1(double *ave, double *rms)
const HcalElectronicsMap * emap
T eta() const
int j
Definition: DBlmapReader.cc:9
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
int k[5][pyjets_maxn]
Definition: DetId.h:20
HcalDetDiagLaserData hb_data[85][72][4]
bool get_average_time1(double *ave, double *rms)
bool xmlFile(const std::string fParam)
HcalDetDiagLaserData hf_data[85][72][4]
tuple events
Definition: patZpeak.py:19
HcalDetDiagLaserData he_data[85][72][4]
Detector det() const
get the detector field from this detid
Definition: DetId.h:37
HcalDetDiagLaserData ho_data[85][72][4]
HcalDetDiagLaserData calib_data[5][5][72]
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
Definition: DDAxes.h:10

Member Data Documentation

std::string HcalDetDiagLaserMonitor::baseFolder_
private

Definition at line 313 of file HcalDetDiagLaserMonitor.cc.

HcalDetDiagLaserData HcalDetDiagLaserMonitor::calib_data[5][5][72]
private
edm::InputTag HcalDetDiagLaserMonitor::calibDigiLabel_
private

Definition at line 289 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::createHTMLonly
private
int HcalDetDiagLaserMonitor::dataset_seq_number
private
std::string HcalDetDiagLaserMonitor::DatasetName
private

Definition at line 319 of file HcalDetDiagLaserMonitor.cc.

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

const HcalElectronicsMap* HcalDetDiagLaserMonitor::emap
private
MonitorElement* HcalDetDiagLaserMonitor::Energy2Dhbhehf
private

Definition at line 340 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::Energy2Dho
private

Definition at line 341 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

HcalDetDiagLaserData HcalDetDiagLaserMonitor::hb_data[85][72][4]
private
MonitorElement* HcalDetDiagLaserMonitor::hb_time_rbx
private

Definition at line 347 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheEnergy
private

Definition at line 325 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheEnergyRMS
private

Definition at line 327 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheTime
private

Definition at line 326 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hbheTimeRMS
private

Definition at line 328 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

HcalDetDiagLaserData HcalDetDiagLaserMonitor::he_data[85][72][4]
private
MonitorElement* HcalDetDiagLaserMonitor::he_time_rbx
private

Definition at line 348 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

HcalDetDiagLaserData HcalDetDiagLaserMonitor::hf_data[85][72][4]
private
MonitorElement* HcalDetDiagLaserMonitor::hf_time_rbx
private

Definition at line 350 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfEnergy
private

Definition at line 333 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfEnergyRMS
private

Definition at line 335 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfTime
private

Definition at line 334 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hfTimeRMS
private

Definition at line 336 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

HcalDetDiagLaserData HcalDetDiagLaserMonitor::ho_data[85][72][4]
private
MonitorElement* HcalDetDiagLaserMonitor::ho_time_rbx
private

Definition at line 349 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoEnergy
private

Definition at line 329 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoEnergyRMS
private

Definition at line 331 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoTime
private

Definition at line 330 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::hoTimeRMS
private

Definition at line 332 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement * HcalDetDiagLaserMonitor::htmlFolder
private

Definition at line 323 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

std::string HcalDetDiagLaserMonitor::htmlOutputPath
private

Definition at line 320 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::ievt_
private
edm::InputTag HcalDetDiagLaserMonitor::inputLabelDigi_
private

Definition at line 288 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::IsReference
private

Definition at line 306 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

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

Definition at line 368 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

double HcalDetDiagLaserMonitor::LaserEnergyThreshold
private

Definition at line 301 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::LaserTimingThreshold
private

Definition at line 301 of file HcalDetDiagLaserMonitor.cc.

Referenced by fillProblems(), and HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::LocalRun
private

Definition at line 307 of file HcalDetDiagLaserMonitor.cc.

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

MonitorElement* HcalDetDiagLaserMonitor::meEVT_
private

Definition at line 323 of file HcalDetDiagLaserMonitor.cc.

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

MonitorElement * HcalDetDiagLaserMonitor::meRUN_
private

Definition at line 323 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHB
private

Definition at line 308 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHBHEchecks
private

Definition at line 300 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::nHE
private

Definition at line 308 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHF
private

Definition at line 308 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHFchecks
private

Definition at line 300 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

int HcalDetDiagLaserMonitor::nHO
private

Definition at line 308 of file HcalDetDiagLaserMonitor.cc.

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

int HcalDetDiagLaserMonitor::nHOchecks
private

Definition at line 300 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor().

bool HcalDetDiagLaserMonitor::Online_
private

Definition at line 315 of file HcalDetDiagLaserMonitor.cc.

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

std::string HcalDetDiagLaserMonitor::OutputFilePath
private
bool HcalDetDiagLaserMonitor::Overwrite
private
std::string HcalDetDiagLaserMonitor::prefixME_
private

Definition at line 314 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and HcalDetDiagLaserMonitor().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_energy
private

Definition at line 356 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_energy_val
private

Definition at line 360 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_timing
private

Definition at line 355 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillProblems().

EtaPhiHists* HcalDetDiagLaserMonitor::ProblemCellsByDepth_timing_val
private

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().

MonitorElement* HcalDetDiagLaserMonitor::Raddam[56]
private

Definition at line 352 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and beginRun().

bool HcalDetDiagLaserMonitor::RaddamRun
private

Definition at line 307 of file HcalDetDiagLaserMonitor.cc.

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

double HcalDetDiagLaserMonitor::RaddamThreshold1
private

Definition at line 301 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

double HcalDetDiagLaserMonitor::RaddamThreshold2
private

Definition at line 301 of file HcalDetDiagLaserMonitor.cc.

Referenced by analyze(), and HcalDetDiagLaserMonitor().

MonitorElement* HcalDetDiagLaserMonitor::refEnergy2Dhbhehf
private

Definition at line 344 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::refEnergy2Dho
private

Definition at line 345 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

std::string HcalDetDiagLaserMonitor::ReferenceData
private

Definition at line 309 of file HcalDetDiagLaserMonitor.cc.

Referenced by HcalDetDiagLaserMonitor(), and LoadReference().

std::string HcalDetDiagLaserMonitor::ReferenceRun
private

Definition at line 310 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and LoadReference().

MonitorElement* HcalDetDiagLaserMonitor::RefRun_
private

Definition at line 324 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun().

MonitorElement* HcalDetDiagLaserMonitor::refTime2Dhbhehf
private

Definition at line 342 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::refTime2Dho
private

Definition at line 343 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

int HcalDetDiagLaserMonitor::run_number
private
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().

MonitorElement* HcalDetDiagLaserMonitor::Time2Dhbhehf
private

Definition at line 338 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

MonitorElement* HcalDetDiagLaserMonitor::Time2Dho
private

Definition at line 339 of file HcalDetDiagLaserMonitor.cc.

Referenced by beginRun(), and fillHistos().

std::string HcalDetDiagLaserMonitor::XmlFilePath
private