108 _phasepart(iConfig.getUntrackedParameter<std::
string>(
"phasePartition",
"None")),
109 _wantdbxvsbxincycle(iConfig.getUntrackedParameter<bool>(
"wantDBXvsBXincycle",
false)),
110 _wantdbxvsbx(iConfig.getUntrackedParameter<bool>(
"wantDBXvsBX",
false)),
111 _wantbxincyclevsbx(iConfig.getUntrackedParameter<bool>(
"wantBXincyclevsBX",
false)),
112 _wantorbitvsbxincycle(iConfig.getUntrackedParameter<bool>(
"wantOrbitvsBXincycle",
false)),
114 m_maxLS(iConfig.getUntrackedParameter<unsigned int>(
"maxLSBeforeRebin", 100)),
115 m_LSfrac(iConfig.getUntrackedParameter<unsigned int>(
"startingLSFraction", 4)),
116 m_ewhdepthHisto(iConfig.getUntrackedParameter<bool>(
"wantEWHDepthHisto",
false)),
117 _rhm(consumesCollector()),
118 _dbxvsbxincycle(nullptr),
120 _bxincyclevsbx(nullptr),
121 _orbitvsbxincycle(nullptr),
122 m_ewhdepth(nullptr) {
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);
191 (*_dbx)->Fill(
he->deltaBX());
192 std::vector<std::pair<unsigned int, unsigned int> >::const_iterator
indices =
m_dbxindices.begin();
203 (*m_ewhdepth)->Fill(
he->depth());
208 long long tbx =
he->absoluteBX();
209 if (apvphase.isValid() && !apvphase.failedToGet()) {
210 const int thephase = apvphase->getPhase(
_phasepart);
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");
T getUntrackedParameter(std::string const &, T const &) const
const bool _wantdbxvsbxincycle
const bool _wantorbitvsbxincycle
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
edm::EDGetTokenT< APVCyclePhaseCollection > _apvphasecollToken
_rhm(consumesCollector())
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
TH2F ** _orbitvsbxincycle
_phasepart(iConfig.getUntrackedParameter< std::string >("phasePartition","None"))
const std::string _phasepart
EventTimeDistribution(const edm::ParameterSet &)
Log< level::Info, false > LogInfo
void beginRun(const edm::Run &iRun)
T getParameter(std::string const &) const
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