16 #include "CLHEP/Random/RandFlat.h"
17 #include "CLHEP/Random/RandGauss.h"
20 #include <gsl/gsl_sf_erf.h>
30 edm::LogInfo(
"SimRomanPotSimFP420") <<
"Creating a FP420DigiMain";
47 edm::LogInfo(
"SimRomanPotSimFP420") <<
"theApplyTofCut=" << theApplyTofCut <<
" tofCut=" << tofCut <<
"\n"
48 <<
"FP420DigiMain theElectronPerADC=" << theElectronPerADC
49 <<
" theThreshold=" << theThreshold <<
" noNoise=" <<
noNoise;
123 edm::LogInfo(
"SimRomanPotSimFP420") <<
"FP420DigiMain end of constructor";
145 std::vector<PSimHit>::const_iterator simHitIter = input.begin();
146 std::vector<PSimHit>::const_iterator simHitIterEnd = input.end();
147 for (; simHitIter != simHitIterEnd; ++simHitIter) {
148 const PSimHit ihit = *simHitIter;
157 float tof = ihit.
tof();
161 std::cout <<
" *******FP420DigiMain: intindex= " << iu << std::endl;
162 std::cout <<
" tof= " << tof <<
" EnergyLoss= " << losenergy <<
" pabs= " << ihit.
pabs() << std::endl;
169 <<
" trackId= " << ihit.
trackId() << std::endl;
172 std::cout <<
" bfield= " << bfield << std::endl;
176 std::cout <<
" tof= " << tof <<
" EnergyLoss= " << losenergy <<
" pabs= " << ihit.
pabs() << std::endl;
183 std::cout <<
" inside tof: OK " << std::endl;
200 afterNoise = theSignal;
217 std::cout <<
" ****FP420DigiMain: push_digis start: do for loop dm.size()=" << dm.size() << std::endl;
223 for (DigitalMapType::const_iterator
i = dm.begin();
i != dm.end();
i++) {
231 std::cout <<
" ****FP420DigiMain:push_digis: ndigis = " <<
ndigis << std::endl;
232 std::cout <<
"push_digis: strip = " << (*i).first <<
" adc = " << (*i).second << std::endl;
240 for (HitToDigisMapType::const_iterator mi = htd.begin(); mi != htd.end(); mi++) {
242 if (dm.find((*mi).first) != dm.end()) {
245 map<const PSimHit *, Amplitude> totalAmplitudePerSimHit;
246 for (
std::vector<std::pair<const PSimHit *, Amplitude>>::const_iterator simul = (*mi).second.begin();
247 simul != (*mi).second.end();
249 totalAmplitudePerSimHit[(*simul).first] += (*simul).second;
T getUntrackedParameter(std::string const &, T const &) const
DConverterFP420::DigitalMapType DigitalMapType
float tof() const
deprecated name for timeOfFlight()
GaussNoiseFP420 * theGNoiseFP420
std::map< int, float, std::less< int > > hit_map_type
ZSuppressFP420::DigitalMapType zeroSuppress(const DigitalMapType &, int) override
std::vector< HDigiFP420 > digis
PileUpFP420::HitToDigisMapType HitToDigisMapType
static std::string const input
std::vector< HDigiFP420 > run(const std::vector< PSimHit > &input, const G4ThreeVector &, unsigned int)
Local3DPoint exitPoint() const
Exit point in the local Det frame.
virtual void add(const HitDigitizerFP420::hit_map_type &, const PSimHit &hit, int)
DigiConverterFP420 * theDConverterFP420
FP420DigiMain(const edm::ParameterSet &conf)
Abs< T >::type abs(const T &t)
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
std::map< int, Amplitude, std::less< int > > signal_map_type
Log< level::Info, false > LogInfo
ZeroSuppressFP420 * theZSuppressFP420
T getParameter(std::string const &) const
std::map< int, std::vector< std::pair< const PSimHit *, Amplitude > >, std::less< int > > HitToDigisMapType
signal_map_type dumpSignal()
float energyLoss() const
The energy deposit in the PSimHit, in ???.
void push_digis(const DigitalMapType &, const HitToDigisMapType &, const PileUpFP420::signal_map_type &)
PileUpFP420 * thePileUpFP420
unsigned int trackId() const
DigitalMapType convert(const signal_map_type &) override
PileUpFP420::signal_map_type addNoise(const PileUpFP420::signal_map_type &) override
Local3DPoint entryPoint() const
Entry point in the local Det frame.
HitToDigisMapType dumpLink()
HitDigitizerFP420 * theHitDigitizerFP420
unsigned int detUnitId() const
hit_map_type processHit(const PSimHit &, const G4ThreeVector &, int, int, double, int, double, double, int)