19 _runHistoProfile(
true),
20 _runHistoBXProfile(
true),
27 m_maxLS(iConfig.getParameter<unsigned
int>(
"maxLSBeforeRebin")),
28 useSlope_(iConfig.getParameter<
bool>(
"useSlope")),
29 _trueOnly(iConfig.getUntrackedParameter<
bool>(
"trueOnly",
true)),
30 _runHisto(iConfig.getUntrackedParameter<
bool>(
"runHisto",
true)),
31 _runHistoProfile(iConfig.getUntrackedParameter<
bool>(
"runHistoProfile",
true)),
32 _runHistoBXProfile(iConfig.getUntrackedParameter<
bool>(
"runHistoBXProfile",
true)),
33 _runHistoBX2D(iConfig.getUntrackedParameter<
bool>(
"runHistoBX2D",
false)),
55 _hdeltax->GetXaxis()->SetTitle(
"#Delta(X) [cm]");
56 _hdeltax->GetYaxis()->SetTitle(
"Vertices");
63 _hdeltay->GetXaxis()->SetTitle(
"#Delta(Y) [cm]");
64 _hdeltay->GetYaxis()->SetTitle(
"Vertices");
71 _hdeltaz->GetXaxis()->SetTitle(
"#Delta(Z) [cm]");
72 _hdeltaz->GetYaxis()->SetTitle(
"Vertices");
75 "(PV-BS) X position vs Z",
80 _hdeltaxvsz->GetYaxis()->SetTitle(
"#Delta(X) [cm]");
83 "(PV-BS) Y position vs Z",
88 _hdeltayvsz->GetYaxis()->SetTitle(
"#Delta(Y) [cm]");
104 "(PV-BS) Z position",
110 "(PV-BS) X position vs Z",
116 "(PV-BS) Y position vs Z",
123 "deltaxvsorbrun",
"(PV-BS) X position vs orbit number", 4 *
m_maxLS, 0.5,
m_maxLS * 262144 + 0.5);
125 "deltayvsorbrun",
"(PV-BS) Y position vs orbit number", 4 *
m_maxLS, 0.5,
m_maxLS * 262144 + 0.5);
127 "deltazvsorbrun",
"(PV-BS) Z position vs orbit number", 4 *
m_maxLS, 0.5,
m_maxLS * 262144 + 0.5);
135 "(PV-BS) X position vs BX number",
143 "(PV-BS) Y position vs BX number",
151 "(PV-BS) Z position vs BX number",
165 sprintf(runname,
"run_%d", nrun);
168 if (currdir ==
nullptr) {
176 (*_hdeltaxrun)->GetXaxis()->SetTitle(
"#Delta(X) [cm]");
177 (*_hdeltaxrun)->GetYaxis()->SetTitle(
"Vertices");
178 (*_hdeltayrun)->GetXaxis()->SetTitle(
"#Delta(Y) [cm]");
179 (*_hdeltayrun)->GetYaxis()->SetTitle(
"Vertices");
180 (*_hdeltazrun)->GetXaxis()->SetTitle(
"#Delta(Z) [cm]");
181 (*_hdeltazrun)->GetYaxis()->SetTitle(
"Vertices");
182 (*_hdeltaxvszrun)->GetXaxis()->SetTitle(
"Z [cm]");
183 (*_hdeltaxvszrun)->GetYaxis()->SetTitle(
"#Delta(X) [cm]");
184 (*_hdeltayvszrun)->GetXaxis()->SetTitle(
"Z [cm]");
185 (*_hdeltayvszrun)->GetYaxis()->SetTitle(
"#Delta(Y) [cm]");
188 (*_hdeltaxvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]");
189 (*_hdeltaxvsorbrun)->GetYaxis()->SetTitle(
"#Delta(X) [cm]");
190 (*_hdeltaxvsorbrun)->SetCanExtend(TH1::kAllAxes);
191 (*_hdeltayvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]");
192 (*_hdeltayvsorbrun)->GetYaxis()->SetTitle(
"#Delta(Y) [cm]");
193 (*_hdeltayvsorbrun)->SetCanExtend(TH1::kAllAxes);
194 (*_hdeltazvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]");
195 (*_hdeltazvsorbrun)->GetYaxis()->SetTitle(
"#Delta(Z) [cm]");
196 (*_hdeltazvsorbrun)->SetCanExtend(TH1::kAllAxes);
199 (*_hdeltaxvsbxrun)->GetXaxis()->SetTitle(
"BX");
200 (*_hdeltaxvsbxrun)->GetYaxis()->SetTitle(
"#Delta(X) [cm]");
201 (*_hdeltayvsbxrun)->GetXaxis()->SetTitle(
"BX");
202 (*_hdeltayvsbxrun)->GetYaxis()->SetTitle(
"#Delta(Y) [cm]");
203 (*_hdeltazvsbxrun)->GetXaxis()->SetTitle(
"BX");
204 (*_hdeltazvsbxrun)->GetYaxis()->SetTitle(
"#Delta(Z) [cm]");
206 (*_hdeltaxvsbx2drun)->GetXaxis()->SetTitle(
"BX");
207 (*_hdeltaxvsbx2drun)->GetYaxis()->SetTitle(
"#Delta(X) [cm]");
208 (*_hdeltayvsbx2drun)->GetXaxis()->SetTitle(
"BX");
209 (*_hdeltayvsbx2drun)->GetYaxis()->SetTitle(
"#Delta(Y) [cm]");
210 (*_hdeltazvsbx2drun)->GetXaxis()->SetTitle(
"BX");
211 (*_hdeltazvsbx2drun)->GetYaxis()->SetTitle(
"#Delta(Z) [cm]");
228 double deltax =
vtx->x() -
x(
bs,
vtx->z());
229 double deltay =
vtx->y() -
y(
bs,
vtx->z());
230 double deltaz =
vtx->z() -
bs.z0();
240 (*_hdeltaxrun)->Fill(deltax);
242 (*_hdeltayrun)->Fill(deltay);
244 (*_hdeltazrun)->Fill(deltaz);
246 (*_hdeltaxvszrun)->Fill(
vtx->z(), deltax);
248 (*_hdeltayvszrun)->Fill(
vtx->z(), deltay);
251 (*_hdeltaxvsorbrun)->Fill(orbit, deltax);
253 (*_hdeltayvsorbrun)->Fill(orbit, deltay);
255 (*_hdeltazvsorbrun)->Fill(orbit, deltaz);
259 (*_hdeltaxvsbxrun)->Fill(
bx % 3564, deltax);
261 (*_hdeltayvsbxrun)->Fill(
bx % 3564, deltay);
263 (*_hdeltazvsbxrun)->Fill(
bx % 3564, deltaz);
266 (*_hdeltaxvsbx2drun)->Fill(
bx % 3564, deltax);
268 (*_hdeltayvsbx2drun)->Fill(
bx % 3564, deltay);
270 (*_hdeltazvsbx2drun)->Fill(
bx % 3564, deltaz);
289 x +=
bs.dxdz() * (
z -
bs.z0());
301 y +=
bs.dydz() * (
z -
bs.z0());
BSvsPVHistogramMaker(edm::ConsumesCollector &&iC)
TProfile ** _hdeltaxvsbxrun
TFileDirectory * _currdir
const unsigned int m_maxLS
TProfile ** _hdeltayvsbxrun
TH2F ** _hdeltazvsbx2drun
const edm::ParameterSet _histoParameters
std::vector< Vertex > VertexCollection
collection of Vertex objects
TProfile ** _hdeltazvsorbrun
T getUntrackedParameter(std::string const &, T const &) const
T * make(const Args &...args) const
make new ROOT object
const bool _runHistoProfile
TFileDirectory & tFileDirectory()
TH1F ** makeTH1F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
double x(const reco::BeamSpot &bs, const double z) const
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
TProfile ** _hdeltayvszrun
TH2F ** _hdeltaxvsbx2drun
TProfile ** _hdeltazvsbxrun
void book(const std::string dirname="")
Log< level::Info, false > LogInfo
double y(const reco::BeamSpot &bs, const double z) const
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
void beginRun(const edm::Run &iRun)
TH2F ** _hdeltayvsbx2drun
TProfile ** _hdeltaxvsorbrun
TProfile ** _hdeltaxvszrun
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)
TProfile ** _hdeltayvsorbrun
void beginRun(const unsigned int nrun)
const bool _runHistoBXProfile
void fill(const unsigned int orbit, const int bx, const reco::VertexCollection &vertices, const reco::BeamSpot &bs)