119 m_maxLS(iConfig.getUntrackedParameter<unsigned
int>(
"maxLSBeforeRebin",100)),
120 m_LSfrac(iConfig.getUntrackedParameter<unsigned
int>(
"startingLSFraction",4)),
127 std::vector<edm::ParameterSet> dbxhistoparams(iConfig.
getUntrackedParameter<std::vector<edm::ParameterSet> >(
"dbxHistosParams",std::vector<edm::ParameterSet>()));
129 for(std::vector<edm::ParameterSet>::const_iterator params=dbxhistoparams.begin();params!=dbxhistoparams.end();++params) {
130 m_dbxindices.push_back(std::pair<unsigned int,unsigned int>(params->getParameter<
unsigned int>(
"firstEvent"),params->getParameter<
unsigned int>(
"secondEvent")));
132 sprintf(hname,
"dbx_%d_%d",params->getParameter<
unsigned int>(
"firstEvent"),params->getParameter<
unsigned int>(
"secondEvent"));
134 sprintf(htitle,
"dbx(%d,%d)",params->getParameter<
unsigned int>(
"firstEvent"),params->getParameter<
unsigned int>(
"secondEvent"));
136 m_dbxhistos.push_back(
_rhm.
makeTH1F(hname,htitle,params->getParameter<
int>(
"nbins"),params->getParameter<
double>(
"min"),
137 params->getParameter<
double>(
"max")));
138 LogDebug(
"DBXHistoPreBooking") <<
"Booked DBX histo named " << hname <<
" untitled " << htitle;
185 std::vector<std::pair<unsigned int,unsigned int> >::const_iterator indices=
m_dbxindices.begin();
186 for(std::vector<TH1F**>::const_iterator dbxhist=
m_dbxhistos.begin();dbxhist!=
m_dbxhistos.end();++dbxhist,++indices) {
187 (*(*dbxhist))->
Fill(he->
deltaBX(indices->first,indices->second));
206 (*_bxincycle)->Fill(tbx%70);
213 LogDebug(
"InvalidPhase") <<
"Invalid APVCyclePhase value : " <<
_phasepart <<
" " << thephase;
224 if(*
_dbx) { (*_dbx)->GetXaxis()->SetTitle(
"#DeltaBX"); }
227 for(std::vector<TH1F**>::const_iterator dbxhist=
m_dbxhistos.begin();dbxhist!=
m_dbxhistos.end();++dbxhist) {
228 LogDebug(
"HistoPointer") << *dbxhist;
229 if(*(*dbxhist)) { (*(*dbxhist))->GetXaxis()->SetTitle(
"#DeltaBX"); }
231 LogDebug(
"LabelDone") <<
"all labels set";
233 if(*
_bx) { (*_bx)->GetXaxis()->SetTitle(
"BX"); }
235 if(*
_bxincycle) { (*_bxincycle)->GetXaxis()->SetTitle(
"Event BX mod(70)"); }
238 (*_orbit)->SetCanExtend(TH1::kXaxis);
239 (*_orbit)->GetXaxis()->SetTitle(
"time [Orb#]");
242 LogDebug(
"StdPlotsDone") <<
"all labels in std plots set";
245 (*_dbxvsbxincycle)->GetXaxis()->SetTitle(
"Event BX mod(70)"); (*_dbxvsbxincycle)->GetYaxis()->SetTitle(
"#DeltaBX");
248 if(
_dbxvsbx && *
_dbxvsbx) { (*_dbxvsbx)->GetXaxis()->SetTitle(
"BX"); (*_dbxvsbx)->GetYaxis()->SetTitle(
"#DeltaBX"); }
251 (*_bxincyclevsbx)->GetXaxis()->SetTitle(
"BX"); (*_bxincyclevsbx)->GetYaxis()->SetTitle(
"Event BX mod(70)");
255 (*_orbitvsbxincycle)->SetCanExtend(TH1::kYaxis);
256 (*_orbitvsbxincycle)->GetXaxis()->SetTitle(
"Event BX mod(70)"); (*_orbitvsbxincycle)->GetYaxis()->SetTitle(
"time [Orb#]");
260 (*m_ewhdepth)->GetXaxis()->SetTitle(
"Depth");
unsigned int depth() const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const bool _wantdbxvsbxincycle
const bool _wantorbitvsbxincycle
long long deltaBX(const unsigned int ev2, const unsigned int ev1) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void beginRun(const edm::Run &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
int bunchCrossing() const
long long absoluteBX(const unsigned int ev1) const
edm::EDGetTokenT< APVCyclePhaseCollection > _apvphasecollToken
std::vector< std::pair< unsigned int, unsigned int > > m_dbxindices
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< EventWithHistory > _historyProductToken
void endRun(const edm::Run &, const edm::EventSetup &) override
TH1F ** makeTH1F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
const int getPhase(const std::string partition) const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
const unsigned int m_LSfrac
const bool _wantbxincyclevsbx
TH2F ** _orbitvsbxincycle
const std::string _phasepart
EventTimeDistribution(const edm::ParameterSet &)
void beginRun(const edm::Run &iRun)
const unsigned int m_maxLS
void analyze(const edm::Event &, const edm::EventSetup &) override
TH2F ** makeTH2F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax, const unsigned int nbiny, const double ymin, const double ymax)
const bool m_ewhdepthHisto
std::vector< TH1F ** > m_dbxhistos
~EventTimeDistribution() override