67 std::map< double, int > fShapingTimeOrder;
68 fShapingTimeOrder = { {0.5, 0}, {1.0, 1}, {2.0, 2}, {3.0, 3} };
71 if ( fShapingTimeOrder.find(fShapingTime) != fShapingTimeOrder.end() ) {
73 fNoiseFactVec.resize(2);
74 for (
auto& item : tempNoiseVec ) {
75 fNoiseFactVec[i] = item.at(fShapingTimeOrder.find( fShapingTime )->second);
76 fNoiseFactVec[i] *= fASICGain/4.7;
82 <<
"Shaping Time received from signalservices_dune.fcl is not one of allowed values" 84 <<
"Allowed values: 0.5, 1.0, 2.0, 3.0 usec" 90 CLHEP::HepRandomEngine& engine = *
m_pran;
91 CLHEP::RandGaussQ rGauss_Ind(engine, 0.0, fNoiseFactVec[0]);
92 CLHEP::RandGaussQ rGauss_Col(engine, 0.0, fNoiseFactVec[1]);
95 if ( view==
geo::kU ) tnoise = rGauss_Ind.fire();
96 else if ( view==
geo::kV ) tnoise = rGauss_Ind.fire();
97 else tnoise = rGauss_Col.fire();
double GetShapingTime(Channel channel) const override
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
std::vector< DoubleVec > GetNoiseFactVec() const override
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
CLHEP::HepRandomEngine * m_pran
double GetASICGain(Channel channel) const override
LArSoft geometry interface.
cet::coded_exception< error, detail::translate > exception
QTextStream & endl(QTextStream &s)
std::vector< double > DoubleVec