41 topFolder_(iConfig.getParameter<std::
string>(
"TopFolder")),
42 nbarrelLayers_(iConfig.getParameter<uint32_t>(
"NbarrelLayers")),
43 ndisk1Rings_(iConfig.getParameter<uint32_t>(
"NDisk1Rings")),
44 ndisk2Rings_(iConfig.getParameter<uint32_t>(
"NDisk2Rings")),
45 fitThreshold_(iConfig.getParameter<uint32_t>(
"NFitThreshold")),
46 ecapdisk1Name_(iConfig.getParameter<std::
string>(
"EcapDisk1Name")),
47 ecapdisk2Name_(iConfig.getParameter<std::
string>(
"EcapDisk2Name")),
48 deltaXvsEtaname_(iConfig.getParameter<std::
string>(
"ResidualXvsEta")),
49 deltaXvsPhiname_(iConfig.getParameter<std::
string>(
"ResidualXvsPhi")),
50 deltaYvsEtaname_(iConfig.getParameter<std::
string>(
"ResidualYvsEta")),
51 deltaYvsPhiname_(iConfig.getParameter<std::
string>(
"ResidualYvsPhi")) {}
60 for (
unsigned int iSide = 1; iSide <= 2; iSide++) {
66 for (
unsigned int epixr = 1; epixr <=
ndisk1Rings_; epixr++) {
67 std::string iFolder = ecapbasedisk1 + std::to_string(epixr);
71 for (
unsigned int fpixr = 1; fpixr <=
ndisk2Rings_; fpixr++) {
72 std::string iFolder = ecapbasedisk2 + std::to_string(fpixr);
86 std::string resFolder = iFolder +
"/ResolutionFromFit/";
122 TH1* histoY = histo->ProjectionY(
" ",
i,
i);
123 const unsigned int cont = histoY->GetEntries();
125 if (cont >= cont_min) {
126 float minfit = histoY->GetMean() - histoY->GetRMS();
127 float maxfit = histoY->GetMean() + histoY->GetRMS();
129 std::unique_ptr<TF1> fitFcn{
new TF1(TString(
"g") + histo->GetName() + iString,
"gaus", minfit, maxfit)};
130 histoY->Fit(fitFcn.get(),
"QR0 SERIAL",
"", minfit, maxfit);
132 double* par = fitFcn->GetParameters();
133 const double*
err = fitFcn->GetParErrors();
157 desc.
add<
unsigned int>(
"NbarrelLayers", 4);
158 desc.
add<
unsigned int>(
"NDisk1Rings", 5);
159 desc.
add<
unsigned int>(
"NDisk2Rings", 4);
169 psd0.add<
std::string>(
"title",
";|#eta|; X-Resolution from fit [#mum]");
170 psd0.add<
int>(
"NxBins", 41);
171 psd0.add<
double>(
"xmax", 4.1);
172 psd0.add<
double>(
"xmin", 0.);
173 psd0.add<
bool>(
"switch",
true);
178 psd1.add<
std::string>(
"title",
";|#eta|; Y-Resolution from fit [#mum]");
179 psd1.add<
int>(
"NxBins", 41);
180 psd1.add<
double>(
"xmax", 4.1);
181 psd1.add<
double>(
"xmin", 0.);
182 psd1.add<
bool>(
"switch",
true);
187 psd2.add<
std::string>(
"title",
";#phi; X-Resolution from fit [#mum]");
188 psd2.add<
int>(
"NxBins", 36);
189 psd2.add<
double>(
"xmax",
M_PI);
190 psd2.add<
double>(
"xmin", -
M_PI);
191 psd2.add<
bool>(
"switch",
true);
196 psd3.add<
std::string>(
"title",
";#phi; Y-Resolution from fit [#mum]");
197 psd3.add<
int>(
"NxBins", 36);
198 psd3.add<
double>(
"xmax",
M_PI);
199 psd3.add<
double>(
"xmin", -
M_PI);
200 psd3.add<
bool>(
"switch",
true);
205 psd4.add<
std::string>(
"title",
";|#eta|; Mean residual X from fit [#mum]");
206 psd4.add<
int>(
"NxBins", 41);
207 psd4.add<
double>(
"xmax", 4.1);
208 psd4.add<
double>(
"xmin", 0.);
209 psd4.add<
bool>(
"switch",
true);
214 psd5.add<
std::string>(
"title",
";|#eta|; Mean residual Y from fit [#mum]");
215 psd5.add<
int>(
"NxBins", 41);
216 psd5.add<
double>(
"xmax", 4.1);
217 psd5.add<
double>(
"xmin", 0.);
218 psd5.add<
bool>(
"switch",
true);
223 psd6.add<
std::string>(
"title",
";#phi; Mean residual X from fit [#mum]");
224 psd6.add<
int>(
"NxBins", 36);
225 psd6.add<
double>(
"xmax",
M_PI);
226 psd6.add<
double>(
"xmin", -
M_PI);
227 psd6.add<
bool>(
"switch",
true);
232 psd7.add<
std::string>(
"title",
";#phi; Mean residual Y from fit [#mum]");
233 psd7.add<
int>(
"NxBins", 36);
234 psd7.add<
double>(
"xmax",
M_PI);
235 psd7.add<
double>(
"xmin", -
M_PI);
236 psd7.add<
bool>(
"switch",
true);
239 desc.
add<
unsigned int>(
"NFitThreshold", 100);
241 descriptions.
add(
"Phase2ITRechitHarvester", desc);
virtual TH2F * getTH2F() const
tuple cont
load Luminosity info ##
virtual void setCurrentFolder(std::string const &fullpath)
#define DEFINE_FWK_MODULE(type)
MonitorElement * book1DFromPSet(const edm::ParameterSet &hpars, DQMStore::IBooker &ibooker)
const std::string deltaXvsPhiname_
void gausFitslices(MonitorElement *srcME, MonitorElement *meanME, MonitorElement *sigmaME)
const std::string histoPhiname_
const unsigned int nbarrelLayers_
const std::string ecapdisk2Name_
const unsigned int ndisk2Rings_
const edm::ParameterSet config_
virtual int getNbinsX() const
get # of bins in X-axis
virtual MonitorElement * get(std::string const &fullpath) const
void dqmEndJob(DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter) override
const std::string topFolder_
const unsigned int ndisk1Rings_
const std::string ecapdisk1Name_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Phase2ITRecHitHarvester(const edm::ParameterSet &)
const unsigned int fitThreshold_
void dofitsForLayer(const std::string &iFolder, DQMStore::IBooker &ibooker, DQMStore::IGetter &igetter)
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T getParameter(std::string const &) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const std::string deltaYvsEtaname_
~Phase2ITRecHitHarvester() override
const std::string deltaYvsPhiname_
virtual void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
const std::string deltaXvsEtaname_