114 m_maxLS(iConfig.getUntrackedParameter<unsigned
int>(
"maxLSBeforeRebin", 100)),
115 m_LSfrac(iConfig.getUntrackedParameter<unsigned
int>(
"startingLSFraction", 4)),
125 std::vector<edm::ParameterSet> dbxhistoparams(iConfig.
getUntrackedParameter<std::vector<edm::ParameterSet> >(
126 "dbxHistosParams", std::vector<edm::ParameterSet>()));
128 for (std::vector<edm::ParameterSet>::const_iterator
params = dbxhistoparams.begin();
params != dbxhistoparams.end();
130 m_dbxindices.push_back(std::pair<unsigned int, unsigned int>(
params->getParameter<
unsigned int>(
"firstEvent"),
131 params->getParameter<
unsigned int>(
"secondEvent")));
135 params->getParameter<
unsigned int>(
"firstEvent"),
136 params->getParameter<
unsigned int>(
"secondEvent"));
140 params->getParameter<
unsigned int>(
"firstEvent"),
141 params->getParameter<
unsigned int>(
"secondEvent"));
145 params->getParameter<
int>(
"nbins"),
146 params->getParameter<
double>(
"min"),
147 params->getParameter<
double>(
"max")));
148 LogDebug(
"DBXHistoPreBooking") <<
"Booked DBX histo named " << hname <<
" untitled " << htitle;
163 _rhm.
makeTH2F(
"orbitvsbxincycle",
"orbitvsbxincycle", 70, -0.5, 69.5, m_maxLS, 0, m_maxLS * 262144);
192 std::vector<std::pair<unsigned int, unsigned int> >::const_iterator
indices =
m_dbxindices.begin();
195 (*(*dbxhist))->
Fill(he->
deltaBX(indices->first, indices->second));
203 (*m_ewhdepth)->Fill(he->
depth());
214 (*_bxincycle)->Fill(tbx % 70);
216 (*_dbxvsbxincycle)->Fill(tbx % 70, he->
deltaBX());
218 (*_bxincyclevsbx)->Fill(iEvent.
bunchCrossing() % 3564, tbx % 70);
220 (*_orbitvsbxincycle)->Fill(tbx % 70, iEvent.
orbitNumber());
223 LogDebug(
"InvalidPhase") <<
"Invalid APVCyclePhase value : " <<
_phasepart <<
" " << thephase;
232 (*_dbx)->GetXaxis()->SetTitle(
"#DeltaBX");
236 for (std::vector<TH1F**>::const_iterator dbxhist =
m_dbxhistos.begin(); dbxhist !=
m_dbxhistos.end(); ++dbxhist) {
237 LogDebug(
"HistoPointer") << *dbxhist;
239 (*(*dbxhist))->GetXaxis()->SetTitle(
"#DeltaBX");
242 LogDebug(
"LabelDone") <<
"all labels set";
245 (*_bx)->GetXaxis()->SetTitle(
"BX");
249 (*_bxincycle)->GetXaxis()->SetTitle(
"Event BX mod(70)");
253 (*_orbit)->SetCanExtend(TH1::kXaxis);
254 (*_orbit)->GetXaxis()->SetTitle(
"time [Orb#]");
257 LogDebug(
"StdPlotsDone") <<
"all labels in std plots set";
260 (*_dbxvsbxincycle)->GetXaxis()->SetTitle(
"Event BX mod(70)");
261 (*_dbxvsbxincycle)->GetYaxis()->SetTitle(
"#DeltaBX");
265 (*_dbxvsbx)->GetXaxis()->SetTitle(
"BX");
266 (*_dbxvsbx)->GetYaxis()->SetTitle(
"#DeltaBX");
270 (*_bxincyclevsbx)->GetXaxis()->SetTitle(
"BX");
271 (*_bxincyclevsbx)->GetYaxis()->SetTitle(
"Event BX mod(70)");
275 (*_orbitvsbxincycle)->SetCanExtend(TH1::kYaxis);
276 (*_orbitvsbxincycle)->GetXaxis()->SetTitle(
"Event BX mod(70)");
277 (*_orbitvsbxincycle)->GetYaxis()->SetTitle(
"time [Orb#]");
281 (*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
int bunchCrossing() const
long long absoluteBX(const unsigned int ev1) const
edm::EDGetTokenT< APVCyclePhaseCollection > _apvphasecollToken
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)
#define DEFINE_FWK_MODULE(type)
std::vector< std::pair< unsigned int, unsigned int > > m_dbxindices
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