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