12 float stripPitch,
int stripID,
int minstripID,
int maxstripID) :
14 for (
auto& IonizationCluster : IonizationClusters)
22 for (
const std::unique_ptr<MM_Electron>& electron :
m_Electrons) { qtot += electron->getCharge(); }
31 [](
const std::unique_ptr<MM_Electron>&
a,
const std::unique_ptr<MM_Electron>& b) ->
bool { return a->getTime() < b->getTime(); });
49 if (stripVal < m_minstripID - 2 || stripVal >
m_maxstripID + 1) stripVal = -1;
56 if (crossTalk1 > 0.) {
60 std::map<int, std::map<int, float>> stripChargesCopy1;
66 for (
auto& stripTimeSeries : stripChargesCopy1) {
67 int timeBin = stripTimeSeries.first;
68 for (
auto& stripCharge : stripTimeSeries.second) {
69 int stripVal = stripCharge.first;
70 float stripChargeVal = stripCharge.second;
72 if (stripChargeVal == 0.)
continue;
75 float chargeScaleFactor = 1.0 / (1. + ((stripVal - 1 > 0) + (stripVal + 1 <
m_maxstripID)) * crossTalk1 +
76 ((stripVal - 2 > 0) + (stripVal + 2 <
m_maxstripID)) * crossTalk2);
77 stripChargeVal *= chargeScaleFactor;
83 if (stripVal - 1 > 0)
m_stripCharges[timeBin][stripVal - 1] += stripChargeVal * crossTalk1;
86 if (crossTalk2 > 0.) {
87 if (stripVal - 2 > 0)
m_stripCharges[timeBin][stripVal - 2] += stripChargeVal * crossTalk2;
96 std::map<int, std::map<int, float>> stripChargesCopy2;
98 for (
auto& stripTimeSeries : stripChargesCopy2) {
99 int timeBin = stripTimeSeries.first;
100 for (
auto& stripCharge : stripTimeSeries.second) {
101 int stripVal = stripCharge.first;
105 if (stripVal < m_minstripID || stripVal >
m_maxstripID - 1)
continue;
107 if (stripVal == 1024 || stripVal == 1025 || stripVal == 2048 || stripVal == 2049 || stripVal == 3072 || stripVal == 3073 ||
108 stripVal == 4096 || stripVal == 4097)
110 float stripChargeVal = stripCharge.second;
111 if (stripChargeVal < chargeThreshold)
continue;
114 for (
size_t ii = 0; ii <
m_v_strip.size(); ii++) {
std::map< int, float > m_stripMaxCharge
std::vector< std::unique_ptr< MM_Electron > > & getElectrons()
std::vector< int > m_v_strip
const std::map< int, float > & getTotalCharge() const
const std::vector< std::vector< float > > & getTimeThresholdVec() const
void timeOrderElectrons()
std::map< int, int > m_stripTimeMaxCharge
std::vector< std::vector< float > > m_v_stripTimeThreshold
void calculateSummaries(float chargeThreshold)
const std::map< int, int > & getTimeThreshold() const
const std::vector< float > & getMaxChargeVec() const
std::vector< float > m_v_stripTimeMaxCharge
int getNElectrons() const
std::map< int, std::map< int, float > > m_stripCharges
const std::vector< float > & getTimeMaxChargeVec() const
const std::map< int, int > & getTimeMaxCharge() const
void calculateTimeSeries(float thetaD, int gasgap)
std::vector< float > m_v_stripMaxCharge
void simulateCrossTalk(float crossTalk1, float crossTalk2)
const std::vector< std::vector< float > > & getTotalChargeVec() const
std::map< int, int > m_stripTimeThreshold
float totalCharge() const
const std::map< int, float > & getMaxCharge() const
MM_StripResponse()=default
std::vector< std::vector< float > > m_v_stripTotalCharge
std::vector< std::unique_ptr< MM_Electron > > m_Electrons
std::map< int, float > m_stripTotalCharge
const std::vector< int > & getStripVec() const
Class describing an electron.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.