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)
constexpr float energy() const
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)
virtual void combineAuxInfo(const std::vector< const HBHERecHit * > &rechits, HBHERecHit *rh) const
static const unsigned OFF_SOI
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
constexpr uint32_t rawId() const
get the raw id
void push_back(T const &t)
std::vector< Variable::Flags > flags
static const unsigned OFF_NSAMPLES
static const unsigned OFF_DROPPED
HcalDetId mergedDepthDetId(const HcalDetId &id) const
static const unsigned OFF_CAPID
U second(std::pair< T, U > const &p)
static const unsigned OFF_TDC_TIME
static const unsigned OFF_CAPID_ERR
static float energyWeightedAverage(const FPair *data, unsigned len, float valueToReturnOnFailure)
static const unsigned OFF_LINK_ERR
static const unsigned OFF_ADC
constexpr float time() const
SimplePlan1RechitCombiner()
constexpr unsigned getField(const uint32_t u, const unsigned mask, const unsigned offset)
std::pair< HcalDetId, const HBHERecHit * > MapItem
static const unsigned MASK_SOI
std::pair< float, float > FPair
constexpr bool isSpecial(const float t)
void setAuxHBHE(const uint32_t aux)
const HcalTopology * topo_
float timeFalling() const
get the hit falling time
void setBit(int &_bitArray, unsigned _iBit)
constexpr bool getBit(const uint32_t u, const unsigned bitnum)
void setAuxEnergy(const float en)
constexpr float UNKNOWN_T_NOTDC
void setChiSquared(const float chi2)
static const unsigned OFF_COMBINED
void combine(HBHERecHitCollection *toFill) override
constexpr void setFlags(uint32_t flags)
void setRawEnergy(const float en)
void setAuxPhase1(const uint32_t aux)
constexpr uint32_t flags() const
bool getBit(int &_bitArray, unsigned _iBit)
virtual HcalDetId mapRechit(HcalDetId from) const
void add(const HBHERecHit &rh) override
void setTopo(const HcalTopology *topo) override