12 : _currdir(nullptr), _histoParameters(),
_rhm(iC) {}
25 if (!dirname.empty()) {
35 "BeamSpot X position",
41 "BeamSpot Y position",
47 "BeamSpot Z position",
71 _rhm.
makeTProfile(
"bsxvsorbrun",
"BeamSpot X position vs orbit number", 1600, 0.5, 1600. * 16384 + 0.5);
73 _rhm.
makeTProfile(
"bsyvsorbrun",
"BeamSpot Y position vs orbit number", 1600, 0.5, 1600. * 16384 + 0.5);
75 _rhm.
makeTProfile(
"bszvsorbrun",
"BeamSpot Z position vs orbit number", 1600, 0.5, 1600. * 16384 + 0.5);
77 _rhm.
makeTProfile(
"bssigmaxvsorbrun",
"BeamSpot sigmaX vs orbit number", 1600, 0.5, 1600. * 16384 + 0.5);
79 _rhm.
makeTProfile(
"bssigmayvsorbrun",
"BeamSpot sigmaY vs orbit number", 1600, 0.5, 1600. * 16384 + 0.5);
81 _rhm.
makeTProfile(
"bssigmazvsorbrun",
"BeamSpot sigmaZ vs orbit number", 1600, 0.5, 1600. * 16384 + 0.5);
86 sprintf(runname,
"run_%d", nrun);
89 if (currdir ==
nullptr) {
96 (*_hbsxrun)->GetXaxis()->SetTitle(
"X [cm]");
97 (*_hbsxrun)->GetYaxis()->SetTitle(
"Events");
98 (*_hbsyrun)->GetXaxis()->SetTitle(
"Y [cm]");
99 (*_hbsyrun)->GetYaxis()->SetTitle(
"Events");
100 (*_hbszrun)->GetXaxis()->SetTitle(
"Z [cm]");
101 (*_hbszrun)->GetYaxis()->SetTitle(
"Events");
102 (*_hbssigmaxrun)->GetXaxis()->SetTitle(
"sigmaX [cm]");
103 (*_hbssigmaxrun)->GetYaxis()->SetTitle(
"Events");
104 (*_hbssigmayrun)->GetXaxis()->SetTitle(
"sigmaY [cm]");
105 (*_hbssigmayrun)->GetYaxis()->SetTitle(
"Events");
106 (*_hbssigmazrun)->GetXaxis()->SetTitle(
"sigmaZ [cm]");
107 (*_hbssigmazrun)->GetYaxis()->SetTitle(
"Events");
109 (*_hbsxvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]");
110 (*_hbsxvsorbrun)->GetYaxis()->SetTitle(
"X [cm]");
111 (*_hbsxvsorbrun)->SetCanExtend(TH1::kAllAxes);
112 (*_hbsyvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]");
113 (*_hbsyvsorbrun)->GetYaxis()->SetTitle(
"Y [cm]");
114 (*_hbsyvsorbrun)->SetCanExtend(TH1::kAllAxes);
115 (*_hbszvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]");
116 (*_hbszvsorbrun)->GetYaxis()->SetTitle(
"Z [cm]");
117 (*_hbszvsorbrun)->SetCanExtend(TH1::kAllAxes);
118 (*_hbssigmaxvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]");
119 (*_hbssigmaxvsorbrun)->GetYaxis()->SetTitle(
"sigmaX [cm]");
120 (*_hbssigmaxvsorbrun)->SetCanExtend(TH1::kAllAxes);
121 (*_hbssigmayvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]");
122 (*_hbssigmayvsorbrun)->GetYaxis()->SetTitle(
"sigmaY [cm]");
123 (*_hbssigmayvsorbrun)->SetCanExtend(TH1::kAllAxes);
124 (*_hbssigmazvsorbrun)->GetXaxis()->SetTitle(
"time [orbit#]");
125 (*_hbssigmazvsorbrun)->GetYaxis()->SetTitle(
"sigmaZ [cm]");
126 (*_hbssigmazvsorbrun)->SetCanExtend(TH1::kAllAxes);
131 (*_hbsxrun)->Fill(bs.
x0());
133 (*_hbsxvsorbrun)->Fill(orbit, bs.
x0());
136 (*_hbsyrun)->Fill(bs.
y0());
138 (*_hbsyvsorbrun)->Fill(orbit, bs.
y0());
141 (*_hbszrun)->Fill(bs.
z0());
143 (*_hbszvsorbrun)->Fill(orbit, bs.
z0());
150 (*_hbssigmazrun)->Fill(bs.
sigmaZ());
152 (*_hbssigmaxvsorbrun)->Fill(orbit, bs.
BeamWidthX());
154 (*_hbssigmayvsorbrun)->Fill(orbit, bs.
BeamWidthY());
156 (*_hbssigmazvsorbrun)->Fill(orbit, bs.
sigmaZ());
BeamSpotHistogramMaker(edm::ConsumesCollector &&iC)
TProfile ** _hbssigmaxvsorbrun
double z0() const
z coordinate
T getUntrackedParameter(std::string const &, T const &) const
TProfile ** _hbsxvsorbrun
TFileDirectory * _currdir
void book(const std::string dirname="")
TProfile ** _hbssigmayvsorbrun
_rhm(consumesCollector())
void beginRun(const unsigned int nrun)
TFileDirectory & tFileDirectory()
TH1F ** makeTH1F(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
TProfile ** _hbsyvsorbrun
TProfile ** _hbszvsorbrun
void fill(const unsigned int orbit, const reco::BeamSpot &bs)
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
double BeamWidthX() const
beam width X
~BeamSpotHistogramMaker()
Log< level::Info, false > LogInfo
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
void beginRun(const edm::Run &iRun)
double sigmaZ() const
sigma z
double BeamWidthY() const
beam width Y
double y0() const
y coordinate
const edm::ParameterSet _histoParameters
TProfile ** _hbssigmazvsorbrun
double x0() const
x coordinate