46 for (std::size_t
i = 1;
i < nInput; ++
i)
72 const std::vector<const HBHERecHit*>&
rechits)
const 75 constexpr float TIME_IF_NO_ENERGY = -999.f;
77 const unsigned nRecHits = rechits.size();
79 assert(nRecHits <= MAXLEN);
82 double energy = 0.0, eraw = 0.0, eaux = 0.0, chisq = 0.0;
84 unsigned nADCTimes = 0;
86 for (
unsigned i=0;
i<nRecHits; ++
i)
94 times[
i].first = rh.
time();
100 adctimes[nADCTimes].first = tADC;
101 adctimes[nADCTimes].second =
e;
120 const std::vector<const HBHERecHit*>&
rechits,
130 const unsigned nRecHits = rechits.size();
132 assert(nRecHits <= MAXLEN);
134 uint32_t
flags = 0, auxPhase1 = 0;
135 unsigned tripleFitCount = 0;
140 for (
unsigned i=0;
i<nRecHits; ++
i)
143 const uint32_t rhflags = rh.
flags();
144 const uint32_t rhAuxPhase1 = rh.
auxPhase1();
167 unsigned* pmaxsoi = std::max_element(soiVote, soiVote+
sizeof(soiVote)/
sizeof(soiVote[0]));
171 unsigned* pmaxcapid = std::max_element(capidVote, capidVote+
sizeof(capidVote)/
sizeof(capidVote[0]));
172 const unsigned capid =
std::distance(&capidVote[0], pmaxcapid);
195 unsigned depthValues[MAXLEN];
196 for (
unsigned i=0;
i<nRecHits; ++
i)
197 depthValues[
i] = rechits[
i]->
id().depth();
199 std::sort(depthValues, depthValues+nRecHits);
203 uint32_t auxHBHE = 0;
204 for (
unsigned i=0;
i<nRecHits; ++
i)
std::vector< MapItem > rechitMap_
std::vector< const HBHERecHit * > ptrbuf_
void orBit(uint32_t *u, const unsigned bitnum, const bool b)
static const unsigned MASK_NSAMPLES
virtual void combineAuxInfo(const std::vector< const HBHERecHit * > &rechits, HBHERecHit *rh) const
static const unsigned OFF_SOI
unsigned getField(const uint32_t u, const unsigned mask, const unsigned offset)
virtual HBHERecHit makeRechit(HcalDetId idToMake, const std::vector< const HBHERecHit * > &rechits) const
HcalDetId id() const
get the id
static const unsigned MASK_CAPID
uint32_t auxPhase1() const
void push_back(T const &t)
std::vector< Variable::Flags > flags
virtual void clear() override
static const unsigned OFF_NSAMPLES
static const unsigned OFF_DROPPED
HcalDetId mergedDepthDetId(const HcalDetId &id) const
static const unsigned OFF_CAPID
uint32_t rawId() const
get the raw id
U second(std::pair< T, U > const &p)
static const unsigned OFF_TDC_TIME
void setField(uint32_t *u, const unsigned mask, const unsigned offset, const unsigned value)
static const unsigned OFF_CAPID_ERR
static float energyWeightedAverage(const FPair *data, unsigned len, float valueToReturnOnFailure)
static const unsigned OFF_LINK_ERR
bool isSpecial(const float t)
static const unsigned OFF_ADC
SimplePlan1RechitCombiner()
std::pair< HcalDetId, const HBHERecHit * > MapItem
static const unsigned MASK_SOI
std::pair< float, float > FPair
void setAuxHBHE(const uint32_t aux)
const HcalTopology * topo_
float timeFalling() const
get the hit falling time
void setFlags(uint32_t flags)
void setBit(int &_bitArray, unsigned _iBit)
void setAuxEnergy(const float en)
constexpr float UNKNOWN_T_NOTDC
void setChiSquared(const float chi2)
static const unsigned OFF_COMBINED
virtual void combine(HBHERecHitCollection *toFill) override
bool getBit(const uint32_t u, const unsigned bitnum)
void setRawEnergy(const float en)
void setAuxPhase1(const uint32_t aux)
bool getBit(int &_bitArray, unsigned _iBit)
virtual HcalDetId mapRechit(HcalDetId from) const
virtual void add(const HBHERecHit &rh) override
virtual void setTopo(const HcalTopology *topo) override