107 _phasepart(iConfig.getUntrackedParameter<
std::
string>(
"phasePartition",
"None")),
108 _wantdbxvsbxincycle(iConfig.getUntrackedParameter<
bool>(
"wantDBXvsBXincycle",
false)),
109 _wantdbxvsbx(iConfig.getUntrackedParameter<
bool>(
"wantDBXvsBX",
false)),
110 _wantbxincyclevsbx(iConfig.getUntrackedParameter<
bool>(
"wantBXincyclevsBX",
false)),
111 _wantorbitvsbxincycle(iConfig.getUntrackedParameter<
bool>(
"wantOrbitvsBXincycle",
false)),
113 m_maxLS(iConfig.getUntrackedParameter<unsigned
int>(
"maxLSBeforeRebin", 100)),
114 m_LSfrac(iConfig.getUntrackedParameter<unsigned
int>(
"startingLSFraction", 4)),
115 m_ewhdepthHisto(iConfig.getUntrackedParameter<
bool>(
"wantEWHDepthHisto",
false)),
116 _rhm(consumesCollector()),
117 _dbxvsbxincycle(nullptr),
119 _bxincyclevsbx(nullptr),
120 _orbitvsbxincycle(nullptr),
121 m_ewhdepth(nullptr) {
124 std::vector<edm::ParameterSet> dbxhistoparams(iConfig.
getUntrackedParameter<std::vector<edm::ParameterSet> >(
125 "dbxHistosParams", std::vector<edm::ParameterSet>()));
127 for (std::vector<edm::ParameterSet>::const_iterator
params = dbxhistoparams.begin();
params != dbxhistoparams.end();
129 m_dbxindices.push_back(std::pair<unsigned int, unsigned int>(
params->getParameter<
unsigned int>(
"firstEvent"),
130 params->getParameter<
unsigned int>(
"secondEvent")));
134 params->getParameter<
unsigned int>(
"firstEvent"),
135 params->getParameter<
unsigned int>(
"secondEvent"));
139 params->getParameter<
unsigned int>(
"firstEvent"),
140 params->getParameter<
unsigned int>(
"secondEvent"));
144 params->getParameter<
int>(
"nbins"),
145 params->getParameter<
double>(
"min"),
146 params->getParameter<
double>(
"max")));
147 LogDebug(
"DBXHistoPreBooking") <<
"Booked DBX histo named " << hname <<
" untitled " << htitle;
190 (*_dbx)->Fill(
he->deltaBX());
191 std::vector<std::pair<unsigned int, unsigned int> >::const_iterator
indices =
m_dbxindices.begin();
197 (*_bx)->Fill(
iEvent.bunchCrossing() % 3564);
198 (*_orbit)->Fill(
iEvent.orbitNumber());
200 (*_dbxvsbx)->Fill(
iEvent.bunchCrossing() % 3564,
he->deltaBX());
202 (*m_ewhdepth)->Fill(
he->depth());
207 long long tbx =
he->absoluteBX();
213 (*_bxincycle)->Fill(tbx % 70);
215 (*_dbxvsbxincycle)->Fill(tbx % 70,
he->deltaBX());
217 (*_bxincyclevsbx)->Fill(
iEvent.bunchCrossing() % 3564, tbx % 70);
219 (*_orbitvsbxincycle)->Fill(tbx % 70,
iEvent.orbitNumber());
222 LogDebug(
"InvalidPhase") <<
"Invalid APVCyclePhase value : " <<
_phasepart <<
" " << thephase;
231 (*_dbx)->GetXaxis()->SetTitle(
"#DeltaBX");
235 for (std::vector<TH1F**>::const_iterator dbxhist =
m_dbxhistos.begin(); dbxhist !=
m_dbxhistos.end(); ++dbxhist) {
236 LogDebug(
"HistoPointer") << *dbxhist;
238 (*(*dbxhist))->GetXaxis()->SetTitle(
"#DeltaBX");
241 LogDebug(
"LabelDone") <<
"all labels set";
244 (*_bx)->GetXaxis()->SetTitle(
"BX");
248 (*_bxincycle)->GetXaxis()->SetTitle(
"Event BX mod(70)");
252 (*_orbit)->SetCanExtend(TH1::kXaxis);
253 (*_orbit)->GetXaxis()->SetTitle(
"time [Orb#]");
256 LogDebug(
"StdPlotsDone") <<
"all labels in std plots set";
259 (*_dbxvsbxincycle)->GetXaxis()->SetTitle(
"Event BX mod(70)");
260 (*_dbxvsbxincycle)->GetYaxis()->SetTitle(
"#DeltaBX");
264 (*_dbxvsbx)->GetXaxis()->SetTitle(
"BX");
265 (*_dbxvsbx)->GetYaxis()->SetTitle(
"#DeltaBX");
269 (*_bxincyclevsbx)->GetXaxis()->SetTitle(
"BX");
270 (*_bxincyclevsbx)->GetYaxis()->SetTitle(
"Event BX mod(70)");
274 (*_orbitvsbxincycle)->SetCanExtend(TH1::kYaxis);
275 (*_orbitvsbxincycle)->GetXaxis()->SetTitle(
"Event BX mod(70)");
276 (*_orbitvsbxincycle)->GetYaxis()->SetTitle(
"time [Orb#]");
280 (*m_ewhdepth)->GetXaxis()->SetTitle(
"Depth");
const bool _wantdbxvsbxincycle
T getParameter(std::string const &) const
const bool _wantorbitvsbxincycle
void beginRun(const edm::Run &, const edm::EventSetup &) override
edm::EDGetTokenT< APVCyclePhaseCollection > _apvphasecollToken
T getUntrackedParameter(std::string const &, T const &) const
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)
std::vector< std::pair< unsigned int, unsigned int > > m_dbxindices
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
const unsigned int m_LSfrac
const bool _wantbxincyclevsbx
#define DEFINE_FWK_MODULE(type)
TH2F ** _orbitvsbxincycle
const std::string _phasepart
EventTimeDistribution(const edm::ParameterSet &)
Log< level::Info, false > LogInfo
void beginRun(const edm::Run &iRun)
const unsigned int m_maxLS
const int getPhase(const std::string partition) const
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