ATLAS Offline Software
MM_StripResponse.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MM_DIGITIZATION_MM_STRIPRESPONSE_H
6 #define MM_DIGITIZATION_MM_STRIPRESPONSE_H
7 //
8 // MM_MM_StripResponse.cxx
9 // Simulate strip response
10 //
11 
12 
13 #include <map>
14 #include <memory>
15 #include <vector>
16 
18 
20 
22 public:
23  MM_StripResponse() = default;
24  MM_StripResponse(std::vector<std::unique_ptr<MM_IonizationCluster>>& IonizationClusters, float timeResolution, float stripPitch,
25  int stripID, int minstripID, int maxstripID);
26  void timeOrderElectrons();
27  void calculateTimeSeries(float thetaD, int gasgap);
28 
29  void simulateCrossTalk(float crossTalk1, float crossTalk2);
30  void calculateSummaries(float chargeThreshold);
31  const std::map<int, int>& getTimeThreshold() const;
32  const std::map<int, float>& getTotalCharge() const;
33  const std::map<int, float>& getMaxCharge() const;
34  const std::map<int, int>& getTimeMaxCharge() const;
35 
36  const std::vector<int>& getStripVec() const;
37  const std::vector<std::vector<float>>& getTimeThresholdVec() const;
38  const std::vector<std::vector<float>>& getTotalChargeVec() const;
39  const std::vector<float>& getMaxChargeVec() const;
40  const std::vector<float>& getTimeMaxChargeVec() const;
41 
42  int getNElectrons() const;
43  float totalCharge() const;
44  std::vector<std::unique_ptr<MM_Electron>>& getElectrons();
45 
46 private:
47  float m_timeResolution{0.f};
48  float m_stripPitch{0.f};
49  int m_stripID{0};
50  int m_minstripID{0};
51  int m_maxstripID{0};
52 
53  std::vector<std::unique_ptr<MM_Electron>> m_Electrons{};
54 
55  // First argument is time bin, second argument is strip ID
56  std::map<int, std::map<int, float>> m_stripCharges{};
57 
58  // Useful info for clustering later
59  std::map<int, int> m_stripTimeThreshold{};
60  std::map<int, float> m_stripTotalCharge{};
61  std::map<int, float> m_stripMaxCharge{};
62  std::map<int, int> m_stripTimeMaxCharge{};
63 
64  // using vector for the moment -- hopefully this has better access and is not so expensive on the memory
65  std::vector<int> m_v_strip{};
66  std::vector<std::vector<float>> m_v_stripTimeThreshold{};
67  std::vector<std::vector<float>> m_v_stripTotalCharge{};
68  std::vector<float> m_v_stripMaxCharge{};
69  std::vector<float> m_v_stripTimeMaxCharge{};
70 };
71 
72 #endif
MM_StripResponse::m_v_stripTimeMaxCharge
std::vector< float > m_v_stripTimeMaxCharge
Definition: MM_StripResponse.h:69
MM_StripResponse::getTimeThresholdVec
const std::vector< std::vector< float > > & getTimeThresholdVec() const
Definition: MM_StripResponse.cxx:139
MM_StripResponse::m_timeResolution
float m_timeResolution
Definition: MM_StripResponse.h:47
MM_StripResponse::m_stripPitch
float m_stripPitch
Definition: MM_StripResponse.h:48
MM_StripResponse::getTimeThreshold
const std::map< int, int > & getTimeThreshold() const
Definition: MM_StripResponse.cxx:134
MM_StripResponse::m_stripMaxCharge
std::map< int, float > m_stripMaxCharge
Definition: MM_StripResponse.h:61
MM_StripResponse::getMaxChargeVec
const std::vector< float > & getMaxChargeVec() const
Definition: MM_StripResponse.cxx:141
MM_StripResponse::calculateSummaries
void calculateSummaries(float chargeThreshold)
Definition: MM_StripResponse.cxx:95
MM_Electron.h
MM_StripResponse::calculateTimeSeries
void calculateTimeSeries(float thetaD, int gasgap)
Definition: MM_StripResponse.cxx:34
MM_StripResponse::getTotalCharge
const std::map< int, float > & getTotalCharge() const
Definition: MM_StripResponse.cxx:135
MM_StripResponse::m_v_stripTotalCharge
std::vector< std::vector< float > > m_v_stripTotalCharge
Definition: MM_StripResponse.h:67
MM_IonizationCluster
Definition: MM_IonizationCluster.h:17
MM_StripResponse::getTotalChargeVec
const std::vector< std::vector< float > > & getTotalChargeVec() const
Definition: MM_StripResponse.cxx:140
MM_StripResponse::m_v_stripTimeThreshold
std::vector< std::vector< float > > m_v_stripTimeThreshold
Definition: MM_StripResponse.h:66
MM_StripResponse::getStripVec
const std::vector< int > & getStripVec() const
Definition: MM_StripResponse.cxx:138
MM_StripResponse::MM_StripResponse
MM_StripResponse()=default
MM_StripResponse::totalCharge
float totalCharge() const
Definition: MM_StripResponse.cxx:20
MM_StripResponse::m_stripID
int m_stripID
Definition: MM_StripResponse.h:49
MM_StripResponse::m_minstripID
int m_minstripID
Definition: MM_StripResponse.h:50
MM_StripResponse::m_stripTotalCharge
std::map< int, float > m_stripTotalCharge
Definition: MM_StripResponse.h:60
MM_StripResponse::timeOrderElectrons
void timeOrderElectrons()
Definition: MM_StripResponse.cxx:28
MM_StripResponse::getMaxCharge
const std::map< int, float > & getMaxCharge() const
Definition: MM_StripResponse.cxx:136
MM_StripResponse::simulateCrossTalk
void simulateCrossTalk(float crossTalk1, float crossTalk2)
Definition: MM_StripResponse.cxx:54
MM_StripResponse::getElectrons
std::vector< std::unique_ptr< MM_Electron > > & getElectrons()
Definition: MM_StripResponse.cxx:26
MM_StripResponse::m_stripTimeThreshold
std::map< int, int > m_stripTimeThreshold
Definition: MM_StripResponse.h:59
MM_StripResponse::getTimeMaxCharge
const std::map< int, int > & getTimeMaxCharge() const
Definition: MM_StripResponse.cxx:137
MM_StripResponse::m_Electrons
std::vector< std::unique_ptr< MM_Electron > > m_Electrons
Definition: MM_StripResponse.h:53
MM_StripResponse::getTimeMaxChargeVec
const std::vector< float > & getTimeMaxChargeVec() const
Definition: MM_StripResponse.cxx:142
MM_StripResponse::m_maxstripID
int m_maxstripID
Definition: MM_StripResponse.h:51
MM_StripResponse::getNElectrons
int getNElectrons() const
Definition: MM_StripResponse.cxx:18
MM_StripResponse
Definition: MM_StripResponse.h:21
MM_StripResponse::m_stripTimeMaxCharge
std::map< int, int > m_stripTimeMaxCharge
Definition: MM_StripResponse.h:62
MM_StripResponse::m_stripCharges
std::map< int, std::map< int, float > > m_stripCharges
Definition: MM_StripResponse.h:56
MM_StripResponse::m_v_stripMaxCharge
std::vector< float > m_v_stripMaxCharge
Definition: MM_StripResponse.h:68
MM_StripResponse::m_v_strip
std::vector< int > m_v_strip
Definition: MM_StripResponse.h:65