28 bool ignorelowest,
bool ignorehighest,
29 double win_offset,
double win_gain)
44 if (v_userEnvelope.size()%3)
46 "Must be one energy and two times per point";
48 for (
unsigned int i=0;
i<v_userEnvelope.size();
i+=3) {
49 int intGeV = (int)(v_userEnvelope[
i]+0.5);
50 std::pair<double,double> pairOfTimes = std::make_pair(v_userEnvelope[
i+1],
52 if ((pairOfTimes.first > 0) ||
53 (pairOfTimes.second < 0) )
55 "Min and max time values must straddle t=0; use win_offset to shift";
64 std::cout <<
"Timing Energy/Time parameters are:"<<std::endl;
65 TfilterEnvelope_t::const_iterator it;
67 std::cout <<
"\t"<<it->first<<
" GeV\t"<<it->second.first<<
" ns\t"<<it->second.second<<
" ns"<<std::endl;
89 double twinmin, twinmax;
90 double rhtime=hbhe.
time();
106 TfilterEnvelope_t::const_iterator it;
110 if (energy < (
double)it->first)
128 std::map<int,std::pair<double,double> >::const_iterator prev = it; prev--;
131 double energy1 = prev->first;
132 double lim1 = prev->second.second;
133 double energy2 = it->first;
134 double lim2 = it->second.second;
136 twinmax=lim1+((lim2-lim1)*(energy-energy1)/(energy2-energy1));
139 lim1 = prev->second.first;
140 lim2 = it->second.first;
142 twinmin=lim1+((lim2-lim1)*(energy-energy1)/(energy2-energy1));
151 if (rhtime<=twinmin || rhtime >= twinmax)
void makeTfilterEnvelope(std::vector< double > v_userEnvelope)
void setFlagField(uint32_t value, int base, int width=1)
HBHETimingShapedFlagSetter()
int timingStatus(const HBHERecHit &hbhe)
TfilterEnvelope_t tfilterEnvelope_
void SetTimingShapedFlags(HBHERecHit &hbhe)