|
|
Go to the documentation of this file.
26 double fitf(
double* x,
double* par) {
29 double v1 =
pow(wc /
n * (x[0] - par[1]),
n);
30 double v2 = TMath::Exp(
n - wc * (x[0] - par[1]));
31 double v = par[0] * v1 * v2;
45 fit_ =
new TF1(
"fitShape",
fitf, -200, 200, 4);
46 fit_->SetParameters(50, 10, 0, 0);
49 for (
int i = 0;
i < 2; ++
i)
50 for (
int j = 0;
j < 2; ++
j)
51 hTiming_[
i][
j] =
nullptr;
53 htESP_ =
new TH1F(
"htESP",
"Timing ES+", 81, -20.5, 20.5);
54 htESM_ =
new TH1F(
"htESM",
"Timing ES-", 81, -20.5, 20.5);
63 for (
int i = 0;
i < 2; ++
i)
64 for (
int j = 0;
j < 2; ++
j) {
65 int iz = (
i == 0) ? 1 : -1;
66 sprintf(
histo,
"ES Timing Z %d P %d", iz,
j + 1);
71 sprintf(
histo,
"ES 2D Timing");
74 h2DTiming_->setAxisTitle(
"ES+ Timing (ns)", 2);
86 runNum_ =
e.id().run();
93 int zside, plane, ix, iy, is;
98 if (
e.getByToken(digilabel_, digis)) {
110 if (
zside == 1 && plane == 1 && ix == 7 && iy == 28)
112 if (
zside == 1 && plane == 1 && ix == 24 && iy == 9 && is == 21)
114 if (
zside == -1 && plane == 2 && ix == 35 && iy == 17 && is == 23)
117 int i = (
zside == 1) ? 0 : 1;
120 for (
int k = 0;
k < dataframe.
size(); ++
k)
126 if (fabs(
adc[0]) > 10)
128 if (
adc[1] < 0 ||
adc[2] < 0)
139 double aaa = (A2 > 0 && A1 > 0) ?
log(A2 / A1) / n_ : 20.;
140 double bbb = wc_ / n_ * DeltaT;
141 double ccc =
exp(aaa + bbb);
143 double t0 = (2. - ccc) / (1. - ccc) * DeltaT - 5;
144 hTiming_[
i][
j]->Fill(
t0);
161 else if (
zside == -1)
166 LogWarning(
"ESTimingTask") <<
"DigiCollection not available";
169 if (htESP_->GetEntries() > 0 && htESM_->GetEntries() > 0)
170 h2DTiming_->Fill(htESM_->GetMean(), htESP_->GetMean());
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
int adc() const
get the ADC sample (singed 16 bits)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
virtual void setCurrentFolder(std::string const &fullpath)
T getUntrackedParameter(std::string const &, T const &) const
const ESSample & sample(int i) const
void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
ESTimingTask(const edm::ParameterSet &ps)
const_iterator begin() const
The iterator returned can not safely be used across threads.
double fitf(double *x, double *par)
T getParameter(std::string const &) const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Power< A, B >::type pow(const A &a, const B &b)
void set(const edm::EventSetup &es)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
const_iterator end() const
const ESDetId & id() const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Namespace of DDCMS conversion namespace.