|
|
Go to the documentation of this file.
34 for (std::size_t
i = 1;
i < nInput; ++
i) {
54 const std::vector<const HBHERecHit*>&
rechits)
const {
55 constexpr
unsigned MAXLEN = 8
U;
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;
105 constexpr
unsigned MAXLEN = 8
U;
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]);
static const unsigned MASK_CAPID
constexpr void setField(uint32_t *u, const unsigned mask, const unsigned offset, const unsigned value)
static const unsigned OFF_COMBINED
void combine(HBHERecHitCollection *toFill) override
constexpr bool isSpecial(const float t)
constexpr float energy() const
constexpr void setAuxEnergy(const float en)
constexpr float eraw() const
constexpr void orBit(uint32_t *u, const unsigned bitnum, const bool b)
static const unsigned OFF_CAPID_ERR
U second(std::pair< T, U > const &p)
static const unsigned OFF_TDC_TIME
std::pair< float, float > FPair
constexpr float chi2() const
bool getBit(int &_bitArray, unsigned _iBit)
HcalDetId mergedDepthDetId(const HcalDetId &id) const
static const unsigned OFF_DROPPED
constexpr float timeFalling() const
get the hit falling time
virtual HBHERecHit makeRechit(HcalDetId idToMake, const std::vector< const HBHERecHit * > &rechits) const
void push_back(T const &t)
static const unsigned OFF_CAPID
static const unsigned MASK_NSAMPLES
constexpr void setAuxHBHE(const uint32_t aux)
std::vector< MapItem > rechitMap_
std::vector< const HBHERecHit * > ptrbuf_
void setBit(int &_bitArray, unsigned _iBit)
static float energyWeightedAverage(const FPair *data, unsigned len, float valueToReturnOnFailure)
constexpr float UNKNOWN_T_NOTDC
virtual HcalDetId mapRechit(HcalDetId from) const
static const unsigned MASK_SOI
constexpr unsigned getField(const uint32_t u, const unsigned mask, const unsigned offset)
constexpr float time() const
constexpr void setChiSquared(const float chi2)
constexpr void setRawEnergy(const float en)
virtual void combineAuxInfo(const std::vector< const HBHERecHit * > &rechits, HBHERecHit *rh) const
constexpr void setFlags(uint32_t flags)
const HcalTopology * topo_
constexpr uint32_t auxPhase1() const
constexpr bool getBit(const uint32_t u, const unsigned bitnum)
static const unsigned OFF_ADC
SimplePlan1RechitCombiner()
constexpr uint32_t rawId() const
get the raw id
std::pair< HcalDetId, const HBHERecHit * > MapItem
void add(const HBHERecHit &rh) override
static const unsigned OFF_NSAMPLES
static const unsigned OFF_LINK_ERR
void setTopo(const HcalTopology *topo) override
constexpr HcalDetId id() const
get the id
static const unsigned OFF_SOI
constexpr float eaux() const
constexpr uint32_t flags() const
constexpr void setAuxPhase1(const uint32_t aux)