#include <DQMOffline/CalibCalo/src/DQMSourcePhiSym.h>
Definition at line 22 of file DQMSourcePhiSym.h.
DQMSourcePhiSym::DQMSourcePhiSym | ( | const edm::ParameterSet & | ps | ) |
Definition at line 43 of file DQMSourcePhiSym.cc.
References dbe_, fileName_, folderName_, edm::ParameterSet::getUntrackedParameter(), hEventEnergyEB_max_, hEventEnergyEB_min_, hEventEnergyEB_nbin_, hEventEnergyEE_max_, hEventEnergyEE_min_, hEventEnergyEE_nbin_, hiEtaDistrEB_max_, hiEtaDistrEB_min_, hiEtaDistrEB_nbin_, hiPhiDistrEB_max_, hiPhiDistrEB_min_, hiPhiDistrEB_nbin_, hMeanRecHitEnergyEB_max_, hMeanRecHitEnergyEB_min_, hMeanRecHitEnergyEB_nbin_, hMeanRecHitEnergyEE_max_, hMeanRecHitEnergyEE_min_, hMeanRecHitEnergyEE_nbin_, hNRecHitsEB_max_, hNRecHitsEB_min_, hNRecHitsEB_nbin_, hNRecHitsEE_max_, hNRecHitsEE_min_, hNRecHitsEE_nbin_, hRechitEnergyEB_max_, hRechitEnergyEB_min_, hRechitEnergyEB_nbin_, hRechitEnergyEE_max_, hRechitEnergyEE_min_, hRechitEnergyEE_nbin_, prescaleFactor_, productMonitoredEB_, productMonitoredEE_, and saveToFile_.
00043 : 00044 eventCounter_(0) 00045 { 00046 dbe_ = Service<DQMStore>().operator->(); 00047 folderName_ = ps.getUntrackedParameter<string>("FolderName","ALCAStreamEcalPhiSym"); 00048 prescaleFactor_ = ps.getUntrackedParameter<int>("prescaleFactor",1); 00049 productMonitoredEB_= ps.getUntrackedParameter<edm::InputTag>("AlCaStreamEBTag"); 00050 productMonitoredEE_= ps.getUntrackedParameter<edm::InputTag>("AlCaStreamEETag"); 00051 00052 saveToFile_=ps.getUntrackedParameter<bool>("SaveToFile",false); 00053 fileName_= ps.getUntrackedParameter<string>("FileName","MonitorAlCaEcalPhiSym.root"); 00054 00055 // histogram parameters 00056 00057 // Distribution of rechits in iPhi 00058 hiPhiDistrEB_nbin_= ps.getUntrackedParameter<int>("hiPhiDistrEB_nbin",361); 00059 hiPhiDistrEB_min_= ps.getUntrackedParameter<double>("hiPhiDistrEB_min",1.); 00060 hiPhiDistrEB_max_= ps.getUntrackedParameter<double>("hiPhiDistrEB_max",361.); 00061 00062 // Distribution of rechits in iEta 00063 hiEtaDistrEB_nbin_= ps.getUntrackedParameter<int>("hiEtaDistrEB_nbin",171); 00064 hiEtaDistrEB_min_ = ps.getUntrackedParameter<double>("hiEtaDistrEB_min",1.); 00065 hiEtaDistrEB_max_ = ps.getUntrackedParameter<double>("hiEtaDistrEB_max",171.); 00066 00067 // Energy Distribution of rechits 00068 hRechitEnergyEB_nbin_=ps.getUntrackedParameter<int>("hRechitEnergyEB_nbin",160); 00069 hRechitEnergyEB_min_=ps.getUntrackedParameter<double>("hRechitEnergyEB_min",0.); 00070 hRechitEnergyEB_max_= ps.getUntrackedParameter<double>("hRechitEnergyEB_max",2.); 00071 00072 // Distribution of total event energy 00073 hEventEnergyEB_nbin_= ps.getUntrackedParameter<int>("hEventEnergyEB_nbin",100); 00074 hEventEnergyEB_min_ = ps.getUntrackedParameter<double>("hEventEnergyEB_min",0.); 00075 hEventEnergyEB_max_ = ps.getUntrackedParameter<double>("hEventEnergyEB_max",20.); 00076 00077 // Distribution of number of RecHits 00078 hNRecHitsEB_nbin_= ps.getUntrackedParameter<int>("hNRecHitsEB_nbin",100); 00079 hNRecHitsEB_min_ = ps.getUntrackedParameter<double>("hNRecHitsEB_min",0); 00080 hNRecHitsEB_max_ = ps.getUntrackedParameter<double>("hNRecHitsEB_max",250); 00081 00082 // Distribution of Mean energy per rechit 00083 hMeanRecHitEnergyEB_nbin_= ps.getUntrackedParameter<int>("hMeanRecHitEnergyEB_nbin",50); 00084 hMeanRecHitEnergyEB_min_ = ps.getUntrackedParameter<int>("hMeanRecHitEnergyEB_min",0); 00085 hMeanRecHitEnergyEB_max_ = ps.getUntrackedParameter<int>("hMeanRecHitEnergyEB_max",2); 00086 00087 // Energy Distribution of rechits 00088 hRechitEnergyEE_nbin_=ps.getUntrackedParameter<int>("hRechitEnergyEE_nbin",160); 00089 hRechitEnergyEE_min_ =ps.getUntrackedParameter<double>("hRechitEnergyEE_min",0.); 00090 hRechitEnergyEE_max_ =ps.getUntrackedParameter<double>("hRechitEnergyEE_max",3.); 00091 00092 // Distribution of total event energy 00093 hEventEnergyEE_nbin_= ps.getUntrackedParameter<int>("hEventEnergyEE_nbin",100); 00094 hEventEnergyEE_min_ = ps.getUntrackedParameter<double>("hEventEnergyEE_min",0.); 00095 hEventEnergyEE_max_ = ps.getUntrackedParameter<double>("hEventEnergyEE_max",20.); 00096 00097 // Distribution of number of RecHits 00098 hNRecHitsEE_nbin_= ps.getUntrackedParameter<int>("hNRecHitsEE_nbin",100); 00099 hNRecHitsEE_min_ = ps.getUntrackedParameter<double>("hNRecHitsEE_min",0); 00100 hNRecHitsEE_max_ = ps.getUntrackedParameter<double>("hNRecHitsEE_max",250); 00101 00102 // Distribution of Mean energy per rechit 00103 hMeanRecHitEnergyEE_nbin_= ps.getUntrackedParameter<int>("hMeanRecHitEnergyEE_nbin",50); 00104 hMeanRecHitEnergyEE_min_ = ps.getUntrackedParameter<double>("hMeanRecHitEnergyEE_min",0); 00105 hMeanRecHitEnergyEE_max_ = ps.getUntrackedParameter<double>("hMeanRecHitEnergyEE_max",5); 00106 00107 00108 00109 }
DQMSourcePhiSym::~DQMSourcePhiSym | ( | ) |
void DQMSourcePhiSym::analyze | ( | const edm::Event & | e, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
Implements edm::EDAnalyzer.
Definition at line 217 of file DQMSourcePhiSym.cc.
References eventCounter_, MonitorElement::Fill(), edm::Event::getByLabel(), hEventEnergyEB_, hEventEnergyEE_, hiEtaDistrEB_, hiPhiDistrEB_, hMeanRecHitEnergyEB_, hMeanRecHitEnergyEE_, hNRecHitsEB_, hNRecHitsEE_, hRechitEnergyEB_, hRechitEnergyEE_, id, edm::Handle< T >::isValid(), prescaleFactor_, productMonitoredEB_, and productMonitoredEE_.
00218 { 00219 00220 if (eventCounter_% prescaleFactor_ ) return; 00221 eventCounter_++; 00222 00223 edm::Handle<EcalRecHitCollection> rhEB; 00224 edm::Handle<EcalRecHitCollection> rhEE; 00225 00226 iEvent.getByLabel(productMonitoredEB_, rhEB); 00227 iEvent.getByLabel(productMonitoredEE_, rhEE); 00228 00229 EcalRecHitCollection::const_iterator itb; 00230 00231 // fill EB histos 00232 if (rhEB.isValid()){ 00233 float etot =0; 00234 for(itb=rhEB->begin(); itb!=rhEB->end(); ++itb){ 00235 00236 EBDetId id(itb->id()); 00237 00238 hiPhiDistrEB_->Fill(id.iphi()); 00239 hiEtaDistrEB_->Fill(id.ieta()); 00240 hRechitEnergyEB_->Fill(itb->energy()); 00241 00242 etot+= itb->energy(); 00243 } // Eb rechits 00244 00245 hNRecHitsEB_->Fill(rhEB->size()); 00246 hMeanRecHitEnergyEB_->Fill(etot/rhEB->size()); 00247 hEventEnergyEB_->Fill(etot); 00248 00249 } // if valid 00250 00251 // fill EE histos 00252 00253 EcalRecHitCollection::const_iterator ite; 00254 00255 if (rhEE.isValid()){ 00256 00257 float etot =0; 00258 for(ite=rhEE->begin(); ite!=rhEE->end(); ++ite){ 00259 00260 EEDetId id(ite->id()); 00261 hRechitEnergyEE_->Fill(ite->energy()); 00262 etot+= ite->energy(); 00263 } // EE rechits 00264 00265 hNRecHitsEE_->Fill(rhEE->size()); 00266 hMeanRecHitEnergyEE_->Fill(etot/rhEE->size()); 00267 hEventEnergyEE_->Fill(etot); 00268 } 00269 00270 00271 } //analyze
void DQMSourcePhiSym::beginJob | ( | const edm::EventSetup & | c | ) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 117 of file DQMSourcePhiSym.cc.
References DQMStore::book1D(), dbe_, folderName_, hEventEnergyEB_, hEventEnergyEB_max_, hEventEnergyEB_min_, hEventEnergyEB_nbin_, hEventEnergyEE_, hEventEnergyEE_max_, hEventEnergyEE_min_, hEventEnergyEE_nbin_, hiEtaDistrEB_, hiEtaDistrEB_max_, hiEtaDistrEB_min_, hiEtaDistrEB_nbin_, hiPhiDistrEB_, hiPhiDistrEB_max_, hiPhiDistrEB_min_, hiPhiDistrEB_nbin_, hMeanRecHitEnergyEB_, hMeanRecHitEnergyEB_max_, hMeanRecHitEnergyEB_min_, hMeanRecHitEnergyEB_nbin_, hMeanRecHitEnergyEE_, hMeanRecHitEnergyEE_max_, hMeanRecHitEnergyEE_min_, hMeanRecHitEnergyEE_nbin_, hNRecHitsEB_, hNRecHitsEB_max_, hNRecHitsEB_min_, hNRecHitsEB_nbin_, hNRecHitsEE_, hNRecHitsEE_max_, hNRecHitsEE_min_, hNRecHitsEE_nbin_, hRechitEnergyEB_, hRechitEnergyEB_max_, hRechitEnergyEB_min_, hRechitEnergyEB_nbin_, hRechitEnergyEE_, hRechitEnergyEE_max_, hRechitEnergyEE_min_, hRechitEnergyEE_nbin_, MonitorElement::setAxisTitle(), and DQMStore::setCurrentFolder().
00117 { 00118 00119 00120 // create and cd into new folder 00121 dbe_->setCurrentFolder(folderName_); 00122 00123 // book some histograms 1D 00124 hiPhiDistrEB_ = 00125 dbe_->book1D("iphiDistributionEB", "RechitEB iphi", 00126 hiPhiDistrEB_nbin_, 00127 hiPhiDistrEB_min_, 00128 hiPhiDistrEB_max_); 00129 00130 hiPhiDistrEB_->setAxisTitle("i#phi ", 1); 00131 hiPhiDistrEB_->setAxisTitle("# rechits", 2); 00132 00133 00134 hiEtaDistrEB_ = dbe_->book1D("iEtaDistributionEB", "RechitEB ieta", 00135 hiEtaDistrEB_nbin_, 00136 hiEtaDistrEB_min_, 00137 hiEtaDistrEB_max_ ); 00138 00139 hiEtaDistrEB_->setAxisTitle("eta", 1); 00140 hiEtaDistrEB_->setAxisTitle("#rechits", 2); 00141 00142 00143 hRechitEnergyEB_ = dbe_->book1D("rhEnergyEB","rechits energy EB", 00144 hRechitEnergyEB_nbin_, 00145 hRechitEnergyEB_min_, 00146 hRechitEnergyEB_max_); 00147 00148 hRechitEnergyEB_->setAxisTitle("energy (GeV) ",1); 00149 hRechitEnergyEB_->setAxisTitle("#rechits",2); 00150 00151 hEventEnergyEB_ = dbe_->book1D("eventEnergyEB","event energy EB", 00152 hEventEnergyEB_nbin_, 00153 hEventEnergyEB_min_, 00154 hEventEnergyEB_max_); 00155 00156 hEventEnergyEB_->setAxisTitle("energy (GeV) ",1); 00157 00158 hNRecHitsEB_ = dbe_->book1D("nRechitsEB","#rechits in event EB", 00159 hNRecHitsEB_nbin_, 00160 hNRecHitsEB_min_, 00161 hNRecHitsEB_max_); 00162 00163 hNRecHitsEB_->setAxisTitle("rechits ",1); 00164 00165 hMeanRecHitEnergyEB_ = dbe_->book1D("meanEnergyEB","Mean rechit energy EB", 00166 hMeanRecHitEnergyEB_nbin_, 00167 hMeanRecHitEnergyEB_min_, 00168 hMeanRecHitEnergyEB_max_); 00169 00170 hMeanRecHitEnergyEB_-> setAxisTitle("Mean Energy [GeV] ",1); 00171 00172 00173 hRechitEnergyEE_ = dbe_->book1D("rhEnergyEE","rechits energy EE", 00174 hRechitEnergyEE_nbin_ , 00175 hRechitEnergyEE_min_ , 00176 hRechitEnergyEE_max_ ); 00177 00178 hRechitEnergyEE_->setAxisTitle("energy (GeV) ",1); 00179 hRechitEnergyEE_->setAxisTitle("#rechits",2); 00180 00181 hEventEnergyEE_ = dbe_->book1D("eventEnergyEE","event energy EE", 00182 hEventEnergyEE_nbin_, 00183 hEventEnergyEE_min_, 00184 hEventEnergyEE_max_); 00185 00186 hEventEnergyEE_->setAxisTitle("energy (GeV) ",1); 00187 00188 hNRecHitsEE_ = dbe_->book1D("nRechitsEE","#rechits in event EE" , 00189 hNRecHitsEE_nbin_, 00190 hNRecHitsEE_min_, 00191 hNRecHitsEE_max_); 00192 00193 hNRecHitsEE_->setAxisTitle("rechits ",1); 00194 00195 hMeanRecHitEnergyEE_ = dbe_->book1D("meanEnergyEE","Mean rechit energy EE", 00196 hMeanRecHitEnergyEE_nbin_ , 00197 hMeanRecHitEnergyEE_min_ , 00198 hMeanRecHitEnergyEE_max_ ); 00199 00200 hMeanRecHitEnergyEE_-> setAxisTitle("Mean Energy [GeV] ",1); 00201 00202 }
void DQMSourcePhiSym::beginLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, | |
const edm::EventSetup & | context | |||
) | [protected, virtual] |
void DQMSourcePhiSym::beginRun | ( | const edm::Run & | r, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
Reimplemented from edm::EDAnalyzer.
Definition at line 285 of file DQMSourcePhiSym.cc.
References dbe_, fileName_, DQMStore::save(), and saveToFile_.
00285 { 00286 00287 if (saveToFile_) { 00288 dbe_->save(fileName_); 00289 } 00290 00291 }
void DQMSourcePhiSym::endLuminosityBlock | ( | const edm::LuminosityBlock & | lumiSeg, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
void DQMSourcePhiSym::endRun | ( | const edm::Run & | r, | |
const edm::EventSetup & | c | |||
) | [protected, virtual] |
DQMStore* DQMSourcePhiSym::dbe_ [private] |
Definition at line 50 of file DQMSourcePhiSym.h.
Referenced by beginJob(), DQMSourcePhiSym(), and endJob().
int DQMSourcePhiSym::eventCounter_ [private] |
std::string DQMSourcePhiSym::fileName_ [private] |
Output file name if required.
Definition at line 131 of file DQMSourcePhiSym.h.
Referenced by DQMSourcePhiSym(), and endJob().
std::string DQMSourcePhiSym::folderName_ [private] |
DQM folder name.
Definition at line 125 of file DQMSourcePhiSym.h.
Referenced by beginJob(), and DQMSourcePhiSym().
MonitorElement* DQMSourcePhiSym::hEventEnergyEB_ [private] |
Distribution of total event energy.
Definition at line 73 of file DQMSourcePhiSym.h.
Referenced by analyze(), and beginJob().
double DQMSourcePhiSym::hEventEnergyEB_max_ [private] |
double DQMSourcePhiSym::hEventEnergyEB_min_ [private] |
int DQMSourcePhiSym::hEventEnergyEB_nbin_ [private] |
MonitorElement* DQMSourcePhiSym::hEventEnergyEE_ [private] |
Distribution of total event energy.
Definition at line 97 of file DQMSourcePhiSym.h.
Referenced by analyze(), and beginJob().
double DQMSourcePhiSym::hEventEnergyEE_max_ [private] |
double DQMSourcePhiSym::hEventEnergyEE_min_ [private] |
int DQMSourcePhiSym::hEventEnergyEE_nbin_ [private] |
MonitorElement* DQMSourcePhiSym::hiEtaDistrEB_ [private] |
Distribution of rechits in iEta.
Definition at line 61 of file DQMSourcePhiSym.h.
Referenced by analyze(), and beginJob().
double DQMSourcePhiSym::hiEtaDistrEB_max_ [private] |
double DQMSourcePhiSym::hiEtaDistrEB_min_ [private] |
int DQMSourcePhiSym::hiEtaDistrEB_nbin_ [private] |
MonitorElement* DQMSourcePhiSym::hiPhiDistrEB_ [private] |
Distribution of rechits in iPhi.
Definition at line 55 of file DQMSourcePhiSym.h.
Referenced by analyze(), and beginJob().
double DQMSourcePhiSym::hiPhiDistrEB_max_ [private] |
double DQMSourcePhiSym::hiPhiDistrEB_min_ [private] |
int DQMSourcePhiSym::hiPhiDistrEB_nbin_ [private] |
Distribution of Mean energy per rechit.
Definition at line 85 of file DQMSourcePhiSym.h.
Referenced by analyze(), and beginJob().
double DQMSourcePhiSym::hMeanRecHitEnergyEB_max_ [private] |
double DQMSourcePhiSym::hMeanRecHitEnergyEB_min_ [private] |
Distribution of Mean energy per rechit.
Definition at line 109 of file DQMSourcePhiSym.h.
Referenced by analyze(), and beginJob().
double DQMSourcePhiSym::hMeanRecHitEnergyEE_max_ [private] |
double DQMSourcePhiSym::hMeanRecHitEnergyEE_min_ [private] |
MonitorElement* DQMSourcePhiSym::hNRecHitsEB_ [private] |
Distribution of number of RecHits.
Definition at line 79 of file DQMSourcePhiSym.h.
Referenced by analyze(), and beginJob().
double DQMSourcePhiSym::hNRecHitsEB_max_ [private] |
double DQMSourcePhiSym::hNRecHitsEB_min_ [private] |
int DQMSourcePhiSym::hNRecHitsEB_nbin_ [private] |
MonitorElement* DQMSourcePhiSym::hNRecHitsEE_ [private] |
Distribution of number of RecHits.
Definition at line 103 of file DQMSourcePhiSym.h.
Referenced by analyze(), and beginJob().
double DQMSourcePhiSym::hNRecHitsEE_max_ [private] |
double DQMSourcePhiSym::hNRecHitsEE_min_ [private] |
int DQMSourcePhiSym::hNRecHitsEE_nbin_ [private] |
MonitorElement* DQMSourcePhiSym::hRechitEnergyEB_ [private] |
Energy Distribution of rechits.
Definition at line 67 of file DQMSourcePhiSym.h.
Referenced by analyze(), and beginJob().
double DQMSourcePhiSym::hRechitEnergyEB_max_ [private] |
double DQMSourcePhiSym::hRechitEnergyEB_min_ [private] |
int DQMSourcePhiSym::hRechitEnergyEB_nbin_ [private] |
MonitorElement* DQMSourcePhiSym::hRechitEnergyEE_ [private] |
Energy Distribution of rechits.
Definition at line 91 of file DQMSourcePhiSym.h.
Referenced by analyze(), and beginJob().
double DQMSourcePhiSym::hRechitEnergyEE_max_ [private] |
double DQMSourcePhiSym::hRechitEnergyEE_min_ [private] |
int DQMSourcePhiSym::hRechitEnergyEE_nbin_ [private] |
unsigned int DQMSourcePhiSym::prescaleFactor_ [private] |
Monitor every prescaleFactor_ events.
Definition at line 122 of file DQMSourcePhiSym.h.
Referenced by analyze(), and DQMSourcePhiSym().
object to monitor
Definition at line 115 of file DQMSourcePhiSym.h.
Referenced by analyze(), and DQMSourcePhiSym().
object to monitor
Definition at line 118 of file DQMSourcePhiSym.h.
Referenced by analyze(), and DQMSourcePhiSym().
bool DQMSourcePhiSym::saveToFile_ [private] |
Write to file.
Definition at line 128 of file DQMSourcePhiSym.h.
Referenced by DQMSourcePhiSym(), and endJob().