|
void | accumulate (edm::Event const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre) override |
| handle SimHit accumulation More...
|
|
void | accumulate (PileUpEventPrincipal const &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre) override |
|
void | accumulate (edm::Handle< edm::PSimHitContainer > const &hits, int bxCrossing, CLHEP::HepRandomEngine *hre) override |
|
void | beginRun (const edm::EventSetup &es) override |
| actions at the start/end of run More...
|
|
void | endRun () override |
|
void | finalizeEvent (edm::Event &e, edm::EventSetup const &c, CLHEP::HepRandomEngine *hre) override |
|
| FTLDigitizer (const edm::ParameterSet &config, edm::ConsumesCollector &iC, edm::ProducerBase &parent) |
|
void | initializeEvent (edm::Event const &e, edm::EventSetup const &c) override |
| actions at the start/end of event More...
|
|
| ~FTLDigitizer () override |
|
| FTLDigitizerBase (const edm::ParameterSet &config, edm::ConsumesCollector &iC, edm::ProducerBase &parent) |
|
const std::string & | name () const |
|
virtual | ~FTLDigitizerBase () |
|
template<class SensorPhysics, class ElectronicsSim>
class ftl_digitizer::FTLDigitizer< SensorPhysics, ElectronicsSim >
Definition at line 48 of file FTLDigitizer.h.
template<class SensorPhysics , class ElectronicsSim >
Implements FTLDigitizerBase.
Definition at line 126 of file FTLDigitizer.h.
References ALCARECOTkAlJpsiMuMu_cff::charge, TauDecayModes::dec, f, mps_fire::i, createfilelist::int, ftl_digitizer::FTLHelpers::orderByDetIdThenTime(), jetUpdater_cfi::sort, and HGCalUncalibRecHit_cfi::tdcOnset.
129 using namespace FTLHelpers;
131 bool weightToAbyEnergy(
false);
135 int nchits=(
int)hits->size();
136 std::vector< FTLCaloHitTuple_t > hitRefs;
137 hitRefs.reserve(nchits);
138 for(
int i=0;
i<nchits; ++
i) {
139 const auto& the_hit = hits->at(
i);
141 DetId id = (
validIds_.count(the_hit.detUnitId()) ? the_hit.detUnitId() : 0 );
145 <<
" o/p " <<
id.rawId() << std::endl;
148 if( 0 !=
id.rawId() ) {
149 hitRefs.emplace_back(
i,
id.rawId(), the_hit.tof() );
155 nchits = hitRefs.size();
156 for(
int i=0;
i<nchits; ++
i) {
157 const int hitidx = std::get<0>(hitRefs[
i]);
158 const uint32_t
id = std::get<1>(hitRefs[
i]);
167 const float toa = std::get<2>(hitRefs[
i]);
172 const float dist2center( 0.1
f*hit.entryPoint().mag() );
177 const int itime= std::floor( tof/
bxTime_ ) + 9;
179 if(itime<0 || itime>14)
continue;
182 if(itime >= (
int)simHitIt->second.hit_info[0].size() )
continue;
184 (simHitIt->second).hit_info[0][itime] += charge;
185 float accCharge=(simHitIt->second).hit_info[0][itime];
188 if(weightToAbyEnergy) (simHitIt->second).hit_info[1][itime] += charge*tof;
189 else if((simHitIt->second).hit_info[1][itime]==0)
197 uint32_t prev_id = std::get<1>(hitRefs[
i-1]);
200 float prev_toa = std::get<2>(hitRefs[
i-1]);
201 float prev_tof(prev_toa-dist2center/
refSpeed_+tofDelay_);
202 float deltaQ2TDCOnset =
tdcOnset-((simHitIt->second).hit_info[0][itime]-charge);
204 float deltaT = (tof-prev_tof);
205 fireTDC = deltaT*(deltaQ2TDCOnset/deltaQ)+prev_tof;
209 (simHitIt->second).hit_info[1][itime]=fireTDC;
std::unordered_set< DetId > validIds_
const uint32_t verbosity_
FTLSimHitDataAccumulator simHitAccumulator_
bool orderByDetIdThenTime(const FTLCaloHitTuple_t &a, const FTLCaloHitTuple_t &b)