1 #ifndef HcalDeterministicFit_h
2 #define HcalDeterministicFit_h 1
24 float& reconstructedEnergy,
25 float& reconstructedTime)
const;
30 void getLandauFrac(
float tStart,
float tEnd,
float &sum)
const;
48 0.0204177, 0.0360559, 0.057596, 0.0848493, 0.117069, 0.153152, 0.191858, 0.23198, 0.272461, 0.312438,
49 0.351262, 0.388476, 0.423788, 0.457036, 0.488159, 0.517167, 0.54412, 0.569112, 0.592254, 0.613668,
50 0.633402, 0.651391, 0.667242, 0.680131, 0.688868, 0.692188, 0.689122, 0.67928, 0.662924, 0.64087,
51 0.614282, 0.584457, 0.552651, 0.51997, 0.487317, 0.455378, 0.424647, 0.395445, 0.367963, 0.342288,
52 0.318433, 0.29636, 0.275994, 0.257243, 0.24, 0.224155, 0.2096, 0.196227, 0.183937, 0.172635,
53 0.162232, 0.15265, 0.143813, 0.135656, 0.128117, 0.12114, 0.114677, 0.108681, 0.103113, 0.0979354,
54 0.0931145, 0.0886206, 0.0844264, 0.0805074, 0.0768411, 0.0734075, 0.0701881, 0.0671664, 0.0643271,
55 0.0616564, 0.0591418, 0.0567718, 0.054536, 0.0524247, 0.0504292, 0.0485414, 0.046754, 0.0450602,
56 0.0434538, 0.041929, 0.0404806, 0.0391037, 0.0377937, 0.0365465, 0.0353583, 0.0342255, 0.0331447,
57 0.032113, 0.0311274, 0.0301854, 0.0292843, 0.0284221, 0.0275964, 0.0268053, 0.0253052, 0.0238536,
58 0.0224483, 0.0210872, 0.0197684, 0.0184899, 0.01725, 0.0160471, 0.0148795, 0.0137457, 0.0126445,
59 0.0115743, 0.0105341, 0.00952249, 0.00853844, 0.00758086, 0.00664871,0.00574103, 0.00485689, 0.00399541,
60 0.00315576, 0.00233713, 0.00153878, 0.000759962, 0 };
65 std::vector<double> corrCharge;
66 std::vector<double> inputCharge;
67 std::vector<double> inputPedestal;
71 for(
int ip=0; ip<cs.
size(); ip++){
72 const int capid = capidvec[ip];
77 inputCharge.push_back(charge);
78 inputPedestal.push_back(ped);
84 double fpar0, fpar1, fpar2;
129 if (i3 != 0 && i4 != 0 && i5 != 0) {
131 ch3=corrCharge[3]/i3;
132 ch4=(i3*corrCharge[4]-n3*corrCharge[3])/(i3*i4);
133 ch5=(n3*n4*corrCharge[3]-i4*nn3*corrCharge[3]-i3*n4*corrCharge[4]+i3*i4*corrCharge[5])/(i3*i4*i5);
137 ch4=corrCharge[4]/i4;
138 ch5=(i4*corrCharge[5]-n4*corrCharge[4])/(i4*i5);
141 double ratio = (corrCharge[4]-ch3*i3)/(corrCharge[5]-
negThresh[0]*i5);
142 if (ratio < 5 && ratio > 0.5) {
147 ch4=(corrCharge[4]-ch3*n3)/(iG);
158 double ampl=ch4*gainCorr*respCorr;
159 reconstructedEnergy=ampl;
160 reconstructedTime=tsShift4;
164 #endif // HLTAnalyzer_h
static constexpr int tsWidth
double respcorrgain(int fCapId) const
get response corrected gain for capid=0..3
auto_ptr< ClusterSequence > cs
static constexpr float rCorr[2]
static constexpr float rCorrSiPM[2]
static constexpr int HcalRegion[2]
static constexpr float landauFrac[]
void phase1Apply(const HBHEChannelInfo &channelData, float &reconstructedEnergy, float &reconstructedTime) const
double pedestal(int fCapId) const
get pedestal for capid=0..3
std::tuple< unsigned int, int, int, DigiType, int, int, int, float > Digi
HcalTimeSlew::ParaSource fTimeSlew
PedestalSub fPedestalSubFxn_
int ieta() const
get the cell ieta
Abs< T >::type abs(const T &t)
void getLandauFrac(float tStart, float tEnd, float &sum) const
void calculate(const std::vector< double > &inputCharge, const std::vector< double > &inputPedestal, std::vector< double > &corrCharge) const
void apply(const CaloSamples &cs, const std::vector< int > &capidvec, const HcalCalibrations &calibs, const Digi &digi, double &l, float &time) const
int size() const
get the size
void init(HcalTimeSlew::ParaSource tsParam, HcalTimeSlew::BiasSetting bias, bool iApplyTimeSlew, PedestalSub pedSubFxn_, std::vector< double > pars, double respCorr)
static constexpr float negThresh[2]
HcalTimeSlew::BiasSetting fTimeSlewBias
static double delay(double fC, BiasSetting bias=Medium)
Returns the amount (ns) by which a pulse of the given number of fC will be delayed by the timeslew ef...
static constexpr float invGpar[3]