15 _currdir(0), m_maxLS(100), useSlope_(
true), _trueOnly(
true),
16 _runHisto(
true), _runHistoProfile(
true), _runHistoBXProfile(
true), _runHistoBX2D(
false), _histoParameters(), _rhm(iC) { }
20 m_maxLS(iConfig.getParameter<unsigned int>(
"maxLSBeforeRebin")),
21 useSlope_(iConfig.getParameter<bool>(
"useSlope")),
22 _trueOnly(iConfig.getUntrackedParameter<bool>(
"trueOnly",
true)),
23 _runHisto(iConfig.getUntrackedParameter<bool>(
"runHisto",
true)),
24 _runHistoProfile(iConfig.getUntrackedParameter<bool>(
"runHistoProfile",
true)),
25 _runHistoBXProfile(iConfig.getUntrackedParameter<bool>(
"runHistoBXProfile",
true)),
26 _runHistoBX2D(iConfig.getUntrackedParameter<bool>(
"runHistoBX2D",
false)),
51 _hdeltax = currdir->
make<TH1F>(
"deltax",
"(PV-BS) X position",
56 _hdeltax->GetXaxis()->SetTitle(
"#Delta(X) [cm]");
_hdeltax->GetYaxis()->SetTitle(
"Vertices");
58 _hdeltay = currdir->
make<TH1F>(
"deltay",
"(PV-BS) Y position",
63 _hdeltay->GetXaxis()->SetTitle(
"#Delta(Y) [cm]");
_hdeltay->GetYaxis()->SetTitle(
"Vertices");
65 _hdeltaz = currdir->
make<TH1F>(
"deltaz",
"(PV-BS) Z position",
70 _hdeltaz->GetXaxis()->SetTitle(
"#Delta(Z) [cm]");
_hdeltaz->GetYaxis()->SetTitle(
"Vertices");
72 _hdeltaxvsz = currdir->
make<TProfile>(
"deltaxvsz",
"(PV-BS) X position vs Z",
79 _hdeltayvsz = currdir->
make<TProfile>(
"deltayvsz",
"(PV-BS) Y position vs Z",
148 sprintf(runname,
"run_%d",nrun);
159 (*_hdeltaxrun)->GetXaxis()->SetTitle(
"#Delta(X) [cm]"); (*_hdeltaxrun)->GetYaxis()->SetTitle(
"Vertices");
160 (*_hdeltayrun)->GetXaxis()->SetTitle(
"#Delta(Y) [cm]"); (*_hdeltayrun)->GetYaxis()->SetTitle(
"Vertices");
161 (*_hdeltazrun)->GetXaxis()->SetTitle(
"#Delta(Z) [cm]"); (*_hdeltazrun)->GetYaxis()->SetTitle(
"Vertices");
162 (*_hdeltaxvszrun)->GetXaxis()->SetTitle(
"Z [cm]"); (*_hdeltaxvszrun)->GetYaxis()->SetTitle(
"#Delta(X) [cm]");
163 (*_hdeltayvszrun)->GetXaxis()->SetTitle(
"Z [cm]"); (*_hdeltayvszrun)->GetYaxis()->SetTitle(
"#Delta(Y) [cm]");
166 (*_hdeltaxvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]"); (*_hdeltaxvsorbrun)->GetYaxis()->SetTitle(
"#Delta(X) [cm]");
167 (*_hdeltaxvsorbrun)->SetCanExtend(TH1::kAllAxes);
168 (*_hdeltayvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]"); (*_hdeltayvsorbrun)->GetYaxis()->SetTitle(
"#Delta(Y) [cm]");
169 (*_hdeltayvsorbrun)->SetCanExtend(TH1::kAllAxes);
170 (*_hdeltazvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]"); (*_hdeltazvsorbrun)->GetYaxis()->SetTitle(
"#Delta(Z) [cm]");
171 (*_hdeltazvsorbrun)->SetCanExtend(TH1::kAllAxes);
174 (*_hdeltaxvsbxrun)->GetXaxis()->SetTitle(
"BX"); (*_hdeltaxvsbxrun)->GetYaxis()->SetTitle(
"#Delta(X) [cm]");
175 (*_hdeltayvsbxrun)->GetXaxis()->SetTitle(
"BX"); (*_hdeltayvsbxrun)->GetYaxis()->SetTitle(
"#Delta(Y) [cm]");
176 (*_hdeltazvsbxrun)->GetXaxis()->SetTitle(
"BX"); (*_hdeltazvsbxrun)->GetYaxis()->SetTitle(
"#Delta(Z) [cm]");
178 (*_hdeltaxvsbx2drun)->GetXaxis()->SetTitle(
"BX"); (*_hdeltaxvsbx2drun)->GetYaxis()->SetTitle(
"#Delta(X) [cm]");
179 (*_hdeltayvsbx2drun)->GetXaxis()->SetTitle(
"BX"); (*_hdeltayvsbx2drun)->GetYaxis()->SetTitle(
"#Delta(Y) [cm]");
180 (*_hdeltazvsbx2drun)->GetXaxis()->SetTitle(
"BX"); (*_hdeltazvsbx2drun)->GetYaxis()->SetTitle(
"#Delta(Z) [cm]");
189 for(reco::VertexCollection::const_iterator vtx=vertices.begin();vtx!=vertices.end();++vtx) {
198 double deltax = vtx->x()-
x(bs,vtx->z());
199 double deltay = vtx->y()-
y(bs,vtx->z());
200 double deltaz = vtx->z()-bs.
z0();
BSvsPVHistogramMaker(edm::ConsumesCollector &&iC)
double z0() const
z coordinate
T getUntrackedParameter(std::string const &, T const &) const
TProfile ** _hdeltaxvsbxrun
TFileDirectory * _currdir
const unsigned int m_maxLS
TProfile ** _hdeltayvsbxrun
TH2F ** _hdeltazvsbx2drun
const edm::ParameterSet _histoParameters
int bunchCrossing() const
std::vector< Vertex > VertexCollection
collection of Vertex objects
TProfile ** _hdeltazvsorbrun
double dydz() const
dydz slope
const bool _runHistoProfile
TFileDirectory & tFileDirectory()
TH1F ** makeTH1F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
TProfile ** _hdeltayvszrun
T * make(const Args &...args) const
make new ROOT object
TH2F ** _hdeltaxvsbx2drun
TProfile ** _hdeltazvsbxrun
double dxdz() const
dxdz slope
void book(const std::string dirname="")
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
double y(const reco::BeamSpot &bs, const double z) const
void beginRun(const edm::Run &iRun)
TH2F ** _hdeltayvsbx2drun
TProfile ** _hdeltaxvsorbrun
TProfile ** _hdeltaxvszrun
double y0() const
y coordinate
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
volatile std::atomic< bool > shutdown_flag false
void fill(const unsigned int orbit, const int bx, const reco::VertexCollection &vertices, const reco::BeamSpot &bs)
double x(const reco::BeamSpot &bs, const double z) const
double x0() const
x coordinate