34 for (std::size_t
i = 1;
i < nInput; ++
i) {
54 const std::vector<const HBHERecHit*>& rechits)
const {
56 constexpr float TIME_IF_NO_ENERGY = -999.f;
58 const unsigned nRecHits = rechits.size();
60 assert(nRecHits <= MAXLEN);
63 double energy = 0.0, eraw = 0.0, eaux = 0.0, chisq = 0.0;
64 FPair times[MAXLEN], adctimes[MAXLEN];
65 unsigned nADCTimes = 0;
67 for (
unsigned i = 0;
i < nRecHits; ++
i) {
74 times[
i].first = rh.
time();
79 adctimes[nADCTimes].first = tADC;
80 adctimes[nADCTimes].second =
e;
107 const unsigned nRecHits = rechits.size();
109 assert(nRecHits <= MAXLEN);
111 uint32_t
flags = 0, auxPhase1 = 0;
112 unsigned tripleFitCount = 0;
117 for (
unsigned i = 0;
i < nRecHits; ++
i) {
119 const uint32_t rhflags = rh.
flags();
120 const uint32_t rhAuxPhase1 = rh.
auxPhase1();
139 unsigned* pmaxsoi = std::max_element(soiVote, soiVote +
sizeof(soiVote) /
sizeof(soiVote[0]));
143 unsigned* pmaxcapid = std::max_element(capidVote, capidVote +
sizeof(capidVote) /
sizeof(capidVote[0]));
144 const unsigned capid =
std::distance(&capidVote[0], pmaxcapid);
165 unsigned depthValues[MAXLEN];
166 for (
unsigned i = 0;
i < nRecHits; ++
i)
167 depthValues[
i] = rechits[
i]->
id().depth();
169 std::sort(depthValues, depthValues + nRecHits);
173 uint32_t auxHBHE = 0;
174 for (
unsigned i = 0;
i < nRecHits; ++
i)
175 setField(&auxHBHE, 0xf,
i * 4, depthValues[
i]);
std::vector< MapItem > rechitMap_
std::vector< const HBHERecHit * > ptrbuf_
static const unsigned MASK_NSAMPLES
constexpr void orBit(uint32_t *u, const unsigned bitnum, const bool b)
constexpr void setField(uint32_t *u, const unsigned mask, const unsigned offset, const unsigned value)
constexpr float chi2() const
static const unsigned OFF_SOI
static const unsigned MASK_CAPID
void push_back(T const &t)
static const unsigned OFF_NSAMPLES
static const unsigned OFF_DROPPED
constexpr void setChiSquared(const float chi2)
constexpr float energy() const
constexpr void setAuxEnergy(const float en)
static const unsigned OFF_CAPID
constexpr void setAuxPhase1(const uint32_t aux)
U second(std::pair< T, U > const &p)
static const unsigned OFF_TDC_TIME
virtual HcalDetId mapRechit(HcalDetId from) const
constexpr float eaux() const
constexpr float timeFalling() const
get the hit falling time
static const unsigned OFF_CAPID_ERR
constexpr uint32_t flags() const
static float energyWeightedAverage(const FPair *data, unsigned len, float valueToReturnOnFailure)
static const unsigned OFF_LINK_ERR
constexpr float eraw() const
static const unsigned OFF_ADC
constexpr uint32_t auxPhase1() const
SimplePlan1RechitCombiner()
constexpr unsigned getField(const uint32_t u, const unsigned mask, const unsigned offset)
constexpr void setAuxHBHE(const uint32_t aux)
std::pair< HcalDetId, const HBHERecHit * > MapItem
static const unsigned MASK_SOI
std::pair< float, float > FPair
constexpr bool isSpecial(const float t)
const HcalTopology * topo_
void setBit(int &_bitArray, unsigned _iBit)
constexpr bool getBit(const uint32_t u, const unsigned bitnum)
constexpr HcalDetId id() const
get the id
constexpr uint32_t rawId() const
get the raw id
constexpr float time() const
virtual HBHERecHit makeRechit(HcalDetId idToMake, const std::vector< const HBHERecHit *> &rechits) const
HcalDetId mergedDepthDetId(const HcalDetId &id) const
constexpr float UNKNOWN_T_NOTDC
virtual void combineAuxInfo(const std::vector< const HBHERecHit *> &rechits, HBHERecHit *rh) const
static const unsigned OFF_COMBINED
void combine(HBHERecHitCollection *toFill) override
constexpr void setFlags(uint32_t flags)
bool getBit(int &_bitArray, unsigned _iBit)
constexpr void setRawEnergy(const float en)
void add(const HBHERecHit &rh) override
void setTopo(const HcalTopology *topo) override