ATLAS Offline Software
Loading...
Searching...
No Matches
MuonR4::sTgcDigitMaker Class Reference

#include <sTgcDigitMaker.h>

Inheritance diagram for MuonR4::sTgcDigitMaker:
Collaboration diagram for MuonR4::sTgcDigitMaker:

Classes

struct  DigiConditions
 Holds necessary conditions and data for digitization. More...
struct  DigiInput
 Helper struct to carry the digit information around. More...
struct  GammaParameter
 Stores gamma distribution parameters for estimating digit time. More...
struct  Ionization
 Holds information about ionization points in the gas volume. More...

Public Types

enum class  digitMode : std::uint8_t { StripsOnly = 1 , StripsAndPads = 2 , AllChType = 3 }
 Constructor initializing digitization parameters. More...
using TimedHit = TimedHitPtr<xAOD::MuonSimHit>
using ReadoutChannelType = sTgcIdHelper::sTgcChannelTypes
using sTgcDigitVec = std::vector<std::unique_ptr<sTgcDigit>>
 Digitize a given hit.

Public Member Functions

 sTgcDigitMaker (const MuonGMR4::MuonDetectorManager *detMgr, digitMode mode, double meanGasGain, bool doPadChargeSharing)
virtual ~sTgcDigitMaker ()
 Destructor.
StatusCode initialize ()
 Initialize digitization parameters, including reading necessary data files.
sTgcDigitVec executeDigi (const DigiConditions &condContainers, const TimedHit &hit) const
bool msgLvl (const MSG::Level lvl) const
 Test the output level.
MsgStream & msg () const
 The standard message stream.
MsgStream & msg (const MSG::Level lvl) const
 The standard message stream.
void setLevel (MSG::Level lvl)
 Change the current logging level.

Private Member Functions

bool getIonizationPoint (const TimedHit &hit, const DigiConditions &condContainers, Ionization &ionization) const
 Computes the ionization point for a hit.
double calculateTotalCharge (double energyDeposit, CLHEP::HepRandomEngine *rndEngine) const
 Calculates total charge from energy deposit, including gas gain.
sTgcDigitVec processStripDigitization (const DigiConditions &condContainers, const DigiInput &digiInput) const
 Processes strip digitization for a given hit.
sTgcDigitVec processPadDigitization (const DigiInput &digiInput) const
 Processes pad digitization for a given hit.
sTgcDigitVec processWireDigitization (const DigiInput &digiInput) const
 Processes wire digitization for a given hit.
sTgcDigitVec processStripChargeSharing (const DigiInput &digiInput, const double peak_position, const int stripNumber) const
 Handles charge sharing for strip clusters.
sTgcDigitVec processPadChargeSharing (const DigiInput &digiInput, const int padEta, const int padPhi) const
 Handles charge sharing for pad clusters.
StatusCode readFileOfTimeArrival ()
 Reads time arrival data file.
StatusCode readFileOfTimeOffsetStrip ()
 Reads strip time offset data file.
Ionization pointClosestApproach (const MuonGMR4::StripLayer &stripLayer, int wireNumber, const Amg::Vector3D &locHitPos, const Amg::Vector3D &locHitDir, const double stepLength) const
 Computes the closest approach between a trajectory and a wire segment.
double getTimeOffsetStrip (size_t neighbor_index) const
 Gets the time offset for a strip cluster.
GammaParameter getGammaParameter (double distance) const
 Retrieves gamma distribution parameters based on distance.
double getMostProbableArrivalTime (double distance) const
 Computes the most probable arrival time based on the distance of closest approach.
double chargeIntegral (double N, double M) const
void initMessaging () const
 Initialize our message level and MessageSvc.

Static Private Member Functions

static void addDigit (sTgcDigitVec &digits, const Identifier &id, double digittime, double charge)
 Adds a digit to the appropriate cache.
static double getPadChargeFraction (double distance)
 Computes charge fraction shared among pads.

Private Attributes

std::vector< GammaParameterm_gammaParameter
std::array< double, 5 > m_mostProbableArrivalTime {make_array<double, 5>(0.)}
std::array< double, 6 > m_timeOffsetStrip {make_array<double, 6>(0.)}
const MuonGMR4::MuonDetectorManagerm_detMgr {nullptr}
const Muon::IMuonIdHelperSvcm_idHelperSvc {m_detMgr->idHelperSvc()}
const sTgcIdHelperm_idHelper {m_idHelperSvc->stgcIdHelper()}
digitMode m_digitMode {digitMode::AllChType}
 define offsets and widths of time windows for signals from wiregroups and strips.
double m_theta {10}
double m_meanGasGain {5.e4}
bool m_doPadSharing {false}
bool m_doTimeOffsetStrip {false}
double m_StripResolution {0.0949}
double m_posResIncident {1.}
double m_posResAngular {0.305/m_StripResolution}
double m_chargeAngularFactor {4.0}
std::string m_nm
 Message source name.
boost::thread_specific_ptr< MsgStream > m_msg_tls
 MsgStream instance (a std::cout like with print-out levels)
std::atomic< IMessageSvc * > m_imsg { nullptr }
 MessageSvc pointer.
std::atomic< MSG::Level > m_lvl { MSG::NIL }
 Current logging level.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
 Messaging initialized (initMessaging)

Static Private Attributes

static constexpr std::array< double, 2 > m_clusterParams {0.573, 1.092}

Detailed Description

Member Typedef Documentation

◆ ReadoutChannelType

◆ sTgcDigitVec

using MuonR4::sTgcDigitMaker::sTgcDigitVec = std::vector<std::unique_ptr<sTgcDigit>>

Digitize a given hit.

Parameters
condContainersConditions required for digitization.
hitThe simulated hit to be digitized.

Definition at line 79 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/sTgcDigitizationR4/sTgcDigitMaker.h.

◆ TimedHit

Member Enumeration Documentation

◆ digitMode

enum class MuonR4::sTgcDigitMaker::digitMode : std::uint8_t
strong

Constructor initializing digitization parameters.

Enumerator
StripsOnly 
StripsAndPads 
AllChType 

Definition at line 41 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/sTgcDigitizationR4/sTgcDigitMaker.h.

41 : std::uint8_t {
42 StripsOnly = 1,
43 StripsAndPads = 2,
44 AllChType = 3,
45 };

Constructor & Destructor Documentation

◆ sTgcDigitMaker()

sTgcDigitMaker::sTgcDigitMaker ( const MuonGMR4::MuonDetectorManager * detMgr,
digitMode mode,
double meanGasGain,
bool doPadChargeSharing )

◆ ~sTgcDigitMaker()

sTgcDigitMaker::~sTgcDigitMaker ( )
virtualdefault

Destructor.

Member Function Documentation

◆ addDigit()

void sTgcDigitMaker::addDigit ( sTgcDigitVec & digits,
const Identifier & id,
double digittime,
double charge )
staticprivate

Adds a digit to the appropriate cache.

Definition at line 576 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

579 {
580
581 constexpr double tolerance = 0.1;
582 if (!std::ranges::any_of(digits, [&](std::unique_ptr<sTgcDigit>& known) {
583 return known->identify() == id && std::abs(digittime - known->time()) < tolerance;
584 })) {
585 digits.push_back(std::make_unique<sTgcDigit>(id, 0, digittime, charge, 0, 0));
586 }
587}
double charge(const T &p)
Definition AtlasPID.h:997
constexpr double tolerance

◆ calculateTotalCharge()

double sTgcDigitMaker::calculateTotalCharge ( double energyDeposit,
CLHEP::HepRandomEngine * rndEngine ) const
private

Calculates total charge from energy deposit, including gas gain.

Definition at line 146 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

146 {
147 // Ionized charge in pC per keV deposited
148 const double ionized_charge = (5.65E-6) * energyDeposit / CLHEP::keV;
149
150 // Calculate avalanche gain using gamma distribution (Polya function approximation)
151 const double gain = CLHEP::RandGamma::shoot(rndEngine, 1. + m_theta, (1. + m_theta) / m_meanGasGain);
152
153 return gain * ionized_charge;
154}

◆ chargeIntegral()

double sTgcDigitMaker::chargeIntegral ( double N,
double M ) const
private

Definition at line 655 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

655 {
656
657 double term1 = 0.25 * std::erf( M / (std::sqrt(2) * m_clusterParams[0]));
658 double term2 = 0.25 * std::erf( N / (std::sqrt(2) * m_clusterParams[0]));
659 double term3 = 0.25 * std::erf( M / (std::sqrt(2) * m_clusterParams[1]));
660 double term4 = 0.25 * std::erf( N / (std::sqrt(2) * m_clusterParams[1]));
661
662 return (term1 - term2 + term3 - term4);
663}

◆ executeDigi()

sTgcDigitVec sTgcDigitMaker::executeDigi ( const DigiConditions & condContainers,
const TimedHit & hit ) const

Definition at line 159 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

160 {
161 sTgcDigitVec allDigits{};
162 // Extract energy deposit from the hit
163 const double energyDeposit = hit->energyDeposit();
164 if (energyDeposit < std::numeric_limits<float>::epsilon()) {
165 return allDigits; // Ignore hits with no energy deposit
166 }
167
168 // Retrieve the detector element for the given hit
169 const Identifier hitId = hit->identify();
170
171 // HV efficiency correction
172 if (condContainers.efficiencies) {
173 const double efficiency = condContainers.efficiencies->getEfficiency(hitId);
174 if (CLHEP::RandFlat::shoot(condContainers.rndEngine,0.0,1.0) > efficiency) {
175 return allDigits;
176 }
177 }
178
179
180 ATH_MSG_DEBUG("Retrieving detector element for: "<< m_idHelperSvc->toStringDetEl(hitId)
181 << " energyDeposit "<< energyDeposit );
182
183
184 // Get ionization point and time
185 Ionization ionization{};
186 if (!getIonizationPoint(hit, condContainers, ionization)) {
187 ATH_MSG_DEBUG("Failed to get ionization point for hit "<< m_idHelperSvc->toStringDetEl(hitId));
188 return allDigits;
189 }
190
191 DigiInput digiInput{};
192 digiInput.hitId = hitId;
193 digiInput.totalCharge = calculateTotalCharge(energyDeposit, condContainers.rndEngine);
194 digiInput.time = ionization.time;
195 digiInput.posOnSurf = ionization.posOnWire;
196 digiInput.hitDir = xAOD::toEigen(hit->localDirection());
197 digiInput.reEle = m_detMgr->getsTgcReadoutElement(hitId);
198
199
200 //##################################################################################
201 //######################################### strip readout ##########################
202 //##################################################################################
203 sTgcDigitVec stripDigits = processStripDigitization(condContainers, digiInput);
204
206 ATH_MSG_WARNING("Only digitize strip response !");
207 return stripDigits;
208 }
209 allDigits.insert(allDigits.end(),
210 std::make_move_iterator(stripDigits.begin()),
211 std::make_move_iterator(stripDigits.end()));
212
213 //##################################################################################
214 //######################################### pad readout ############################
215 //##################################################################################
216 sTgcDigitVec padDigits = processPadDigitization(digiInput);
217
218 allDigits.insert(allDigits.end(),
219 std::make_move_iterator(padDigits.begin()),
220 std::make_move_iterator(padDigits.end()));
221
223 ATH_MSG_WARNING("Only digitize strip/pad response !");
224 return allDigits;
225 }
226
227 //##################################################################################
228 //######################################### wire readout ###########################
229 //##################################################################################
230 sTgcDigitVec wireDigits = processWireDigitization(digiInput);
231 allDigits.insert(allDigits.end(),
232 std::make_move_iterator(wireDigits.begin()),
233 std::make_move_iterator(wireDigits.end()));
234
235 return allDigits;
236}
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
std::vector< std::unique_ptr< sTgcDigit > > sTgcDigitVec
Digitize a given hit.
sTgcDigitVec processWireDigitization(const DigiInput &digiInput) const
Processes wire digitization for a given hit.
sTgcDigitVec processPadDigitization(const DigiInput &digiInput) const
Processes pad digitization for a given hit.
bool getIonizationPoint(const TimedHit &hit, const DigiConditions &condContainers, Ionization &ionization) const
Computes the ionization point for a hit.
sTgcDigitVec processStripDigitization(const DigiConditions &condContainers, const DigiInput &digiInput) const
Processes strip digitization for a given hit.
double calculateTotalCharge(double energyDeposit, CLHEP::HepRandomEngine *rndEngine) const
Calculates total charge from energy deposit, including gas gain.
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
@ energyDeposit

◆ getGammaParameter()

sTgcDigitMaker::GammaParameter sTgcDigitMaker::getGammaParameter ( double distance) const
private

Retrieves gamma distribution parameters based on distance.

Definition at line 629 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

629 {
630 const double d = std::abs(distance);
631 // Find the parameters assuming the container is sorted in ascending order of 'lowEdge'
632 if (d < m_gammaParameter.front().lowEdge) {
633 return m_gammaParameter.front();
634 }
635 int index{-1};
636 for (const auto& par: m_gammaParameter) {
637 if (d < par.lowEdge) {
638 break;
639 }
640 ++index;
641 }
642 return m_gammaParameter.at(index);
643}
str index
Definition DeMoScan.py:362

◆ getIonizationPoint()

bool sTgcDigitMaker::getIonizationPoint ( const TimedHit & hit,
const DigiConditions & condContainers,
Ionization & ionization ) const
private

Computes the ionization point for a hit.

Definition at line 57 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

59 {
60 const MuonGMR4::sTgcReadoutElement* reEle = m_detMgr->getsTgcReadoutElement(hit->identify());
61
62 // Projecting the hit position on wire surface
63 const Amg::Vector3D locHitDir = xAOD::toEigen(hit->localDirection());
64 const Amg::Vector3D locHitPos = xAOD::toEigen(hit->localPosition());
65 ATH_MSG_VERBOSE("sTgc hit: time " << hit->globalTime()
66 << " position " << Amg::toString(locHitPos, 2) << " direction" << Amg::toString(locHitDir, 2)
67 << " mclink " << hit->genParticleLink() << " PDG ID " << hit->pdgId() );
68
69 const double scale = Amg::intersect<3>(locHitPos, locHitDir, Amg::Vector3D::UnitZ(), 0.).value_or(0);
70 Amg::Vector3D hitOnWireSurf = locHitPos + scale * locHitDir;
71
72 const Identifier hitId = hit->identify();
73 const IdentifierHash wireLayHash = reEle->createHash(m_idHelper.gasGap(hitId),
74 ReadoutChannelType::Wire, 1);
75 const MuonGMR4::WireGroupDesign& wireDesign{reEle->wireDesign(wireLayHash)};
76 const MuonGMR4::StripLayer& stripLayer = reEle->stripLayer(wireLayHash);
77 const Amg::Vector2D hitOnWire2D = stripLayer.to2D(hitOnWireSurf, true);
78
79 if(!wireDesign.insideTrapezoid(hitOnWire2D)) {
80 return false;
81 }
82
83 std::pair<int, int> wireGrpWireNum = wireDesign.wireNumber(hitOnWire2D);
84 if (wireGrpWireNum.first < 0) {
85 ATH_MSG_WARNING(__func__<<"() "<<__LINE__<<" - Unable to retrieve the wire number, skipping the hit: "
86 << m_idHelperSvc->toString(hitId)<<" @"<<Amg::toString(hitOnWire2D));
87 return false;
88 }
89 int wireNumber = wireDesign.numPitchesToGroup(wireGrpWireNum.first) + wireGrpWireNum.second;
90 const int numWires = wireDesign.nAllWires();
91
92 if((wireNumber < 1) || (wireNumber > numWires)) {
93 ATH_MSG_WARNING(__func__<<"() "<<__LINE__<<" - Unable to retrieve the wire number, skipping the hit: "
94 << m_idHelperSvc->toString(hitId)<<" @"<<Amg::toString(hitOnWire2D));
95 return false;
96 }
97
98 // Compute the position of the ionization and its distance to the closest wire
99 ionization = pointClosestApproach(stripLayer, wireNumber, locHitPos, locHitDir, hit->stepLength());
100 double distToWire = ionization.distance;
101
102 if(distToWire > 0.) {
103 // Determine on which side of the wire does the particle cross
104 int adjacent = Acts::copySign(1, ionization.posOnSegment.y() - ionization.posOnWire.y());
105
106 Ionization ionizationAdj = pointClosestApproach(stripLayer, wireNumber+adjacent, locHitPos, locHitDir, hit->stepLength());
107 double distToWireAdj = ionizationAdj.distance;
108
109 if ((distToWireAdj > 0.) && (distToWireAdj < distToWire)) {
110 distToWire = distToWireAdj;
111 wireNumber += adjacent;
112 ionization = std::move(ionizationAdj);
113 }
114 } else {
115 ATH_MSG_DEBUG("Failed to get the distance between the wire and hit");
116 return false;
117 }
118
119 // Do not digitize hits that are too far from the nearest wire
120 if (distToWire > wireDesign.stripPitch()) {
121 return false;
122 }
123
124 // Get the gamma pdf parameters and calculate digit time
125 const GammaParameter gamParam = getGammaParameter(distToWire);
126 const double most_prob_time = getMostProbableArrivalTime(distToWire);
127 const double gamma_mpv = std::max((gamParam.kParameter - 1) * gamParam.thetaParameter, 0.);
128 const double t0_par = most_prob_time - gamma_mpv;
129 const double inv_theta = 1./gamParam.thetaParameter;
130
131 double digitTime = t0_par + CLHEP::RandGamma::shoot(condContainers.rndEngine, gamParam.kParameter, inv_theta);
132
133 constexpr unsigned shoot_limit = 4;
134 unsigned shoot_counter = 0;
135 while (digitTime < 0. && ++shoot_counter <= shoot_limit) {
136 digitTime = t0_par + CLHEP::RandGamma::shoot(condContainers.rndEngine, gamParam.kParameter,inv_theta);
137 }
138
139 ionization.time = std::max(0., digitTime);
140 return true;
141}
#define ATH_MSG_VERBOSE(x)
double stripPitch() const
Distance between two adjacent strips.
bool insideTrapezoid(const Amg::Vector2D &extPos) const
Checks whether an external point is inside the trapezoidal area.
Amg::Vector2D to2D(const Amg::Vector3D &vec, const bool phiView) const
Transforms a 3D vector from the strip design into a 2D vector.
unsigned int numPitchesToGroup(unsigned int groupNum) const
Returns the number of wire pitches to reach the given group.
std::pair< int, int > wireNumber(const Amg::Vector2D &extPos) const
Returns a pair where the first component indicate the wire group number and the second one returns th...
unsigned int nAllWires() const
Returns the number of all wires.
const WireGroupDesign & wireDesign(const IdentifierHash &measHash) const
Retrieves the readoutElement Layer given the Identifier/Hash.
static IdentifierHash createHash(const unsigned gasGap, const unsigned channelType, const unsigned channel, const unsigned wireInGrp=0)
Create a measurement hash from the Identifier fields.
const StripLayer & stripLayer(const IdentifierHash &measId) const
GammaParameter getGammaParameter(double distance) const
Retrieves gamma distribution parameters based on distance.
double getMostProbableArrivalTime(double distance) const
Computes the most probable arrival time based on the distance of closest approach.
Ionization pointClosestApproach(const MuonGMR4::StripLayer &stripLayer, int wireNumber, const Amg::Vector3D &locHitPos, const Amg::Vector3D &locHitDir, const double stepLength) const
Computes the closest approach between a trajectory and a wire segment.
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
bool adjacent(unsigned int strip1, unsigned int strip2)

◆ getMostProbableArrivalTime()

double sTgcDigitMaker::getMostProbableArrivalTime ( double distance) const
private

Computes the most probable arrival time based on the distance of closest approach.

Definition at line 648 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

648 {
649 return Acts::detail::polynomialSum(std::abs(distance), m_mostProbableArrivalTime);
650}

◆ getPadChargeFraction()

double sTgcDigitMaker::getPadChargeFraction ( double distance)
staticprivate

Computes charge fraction shared among pads.

Definition at line 712 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

712 {
713 // The charge fraction that is found past a distance x away from the
714 // centre of a 2D gaussian distribution of width of cluster profile is
715 // described by a modified error function.
716
717 // The modified error function perfectly describes
718 // the pad charge sharing distribution figure 16 of the sTGC
719 // testbeam paper https://arxiv.org/pdf/1509.06329.pdf
720 return 0.5 * (1.0 - std::erf( distance / (std::sqrt(2) * m_clusterParams[1])));
721}

◆ getTimeOffsetStrip()

double sTgcDigitMaker::getTimeOffsetStrip ( size_t neighbor_index) const
private

Gets the time offset for a strip cluster.

Get digit time offset of a strip depending on its relative position to the strip at the centre of the cluster. It returns 0 ns by default, as well as when it fails or container is empty.

Definition at line 705 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

705 {
706 return m_timeOffsetStrip.at(std::min(neighbor_index, m_timeOffsetStrip.size() -1));
707}

◆ initialize()

StatusCode sTgcDigitMaker::initialize ( )

Initialize digitization parameters, including reading necessary data files.

Definition at line 42 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

42 {
43 // Read arrival time data
45
46 // Read strip time correction if enabled
49 }
50
51 return StatusCode::SUCCESS;
52}
#define ATH_CHECK
Evaluate an expression and check for errors.
StatusCode readFileOfTimeOffsetStrip()
Reads strip time offset data file.

◆ initMessaging()

void AthMessaging::initMessaging ( ) const
privateinherited

Initialize our message level and MessageSvc.

This method should only be called once.

Definition at line 39 of file AthMessaging.cxx.

40{
42 // If user did not set an explicit level, set a default
43 if (m_lvl == MSG::NIL) {
44 m_lvl = m_imsg ?
45 static_cast<MSG::Level>( m_imsg.load()->outputLevel(m_nm) ) :
46 MSG::INFO;
47 }
48}
std::string m_nm
Message source name.
std::atomic< IMessageSvc * > m_imsg
MessageSvc pointer.
std::atomic< MSG::Level > m_lvl
Current logging level.
IMessageSvc * getMessageSvc(bool quiet=false)

◆ msg() [1/2]

MsgStream & AthMessaging::msg ( ) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 163 of file AthMessaging.h.

164{
165 MsgStream* ms = m_msg_tls.get();
166 if (!ms) {
167 if (!m_initialized.test_and_set()) initMessaging();
168 ms = new MsgStream(m_imsg,m_nm);
169 m_msg_tls.reset( ms );
170 }
171
172 ms->setLevel (m_lvl);
173 return *ms;
174}
boost::thread_specific_ptr< MsgStream > m_msg_tls
MsgStream instance (a std::cout like with print-out levels)
void initMessaging() const
Initialize our message level and MessageSvc.

◆ msg() [2/2]

MsgStream & AthMessaging::msg ( const MSG::Level lvl) const
inlineinherited

The standard message stream.

Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.

Definition at line 178 of file AthMessaging.h.

179{ return msg() << lvl; }
MsgStream & msg() const
The standard message stream.

◆ msgLvl()

bool AthMessaging::msgLvl ( const MSG::Level lvl) const
inlineinherited

Test the output level.

Parameters
lvlThe message level to test against
Returns
boolean Indicating if messages at given level will be printed
Return values
trueMessages at level "lvl" will be printed

Definition at line 151 of file AthMessaging.h.

152{
153 if (m_lvl <= lvl) {
154 msg() << lvl;
155 return true;
156 } else {
157 return false;
158 }
159}

◆ pointClosestApproach()

sTgcDigitMaker::Ionization sTgcDigitMaker::pointClosestApproach ( const MuonGMR4::StripLayer & stripLayer,
int wireNumber,
const Amg::Vector3D & locHitPos,
const Amg::Vector3D & locHitDir,
const double stepLength ) const
private

Computes the closest approach between a trajectory and a wire segment.

Given two segments, e.g. a particle trajectory and a sTGC wire, solve for the two points, the point on the trajectory and the point on the wire, where the distance between the two segments is the smallest.

Positions returned are in the local coordinate frame of the wire plane. Returns an object with distance of -9.99 in case of error.

Definition at line 511 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

515 {
516
517 constexpr double angular_tolerance = 1e-3;
518 // Position of the ionization
519 Ionization ionization;
520 // Finding smallest distance and the points at the smallest distance.
521 // The smallest distance between two lines is perpendicular to both lines.
522 // Previous logic was to find the perpendicular distance between two lines using projection geometry
523 // We can construct two lines in the wire surface local coordinate frame:
524 // - one for the hit segment with equation h0 + t * v_h, where h0 is a point
525 // and v_h is the unit vector of the hit segment
526 // - another for the wire with similar equation w0 + s * v_w, where w0 is a
527 // point and v_w is the unit vector of the wire line
528 // Then it is possible to determine the closest points on each line
529 // by requiring that the vector between them is perpendicular to both:
530 // 1. (h0 + t*v_h - w0 - s*v_w) · v_h = 0
531 // 2. (h0 + t*v_h - w0 - s*v_w) · v_w = 0
532
533 // We have replaced this logic with using Amg::intersect<3> method
534 const MuonGMR4::WireGroupDesign& wireDesign = static_cast<const MuonGMR4::WireGroupDesign&>(stripLayer.design(true));
535 // Geometry setup defined in the eta surface local coordinate frame
536 const double wirePitch = wireDesign.stripPitch();
537 const double wirePosX = wireDesign.firstStripPos().x() + (wireNumber - 1) * wirePitch;
538 const Amg::Vector3D wireDir{stripLayer.to3D(wireDesign.stripDir(),true)};
539 const Amg::Vector3D wirePos(locHitPos.x(), wirePosX, 0.);
540
541 // Use Amg::intersect to find closest point on hit segment to wire plane
542 std::optional<double> scaleHit = Amg::intersect<3>(locHitPos, locHitDir, Amg::Vector3D::UnitZ(), 0);
543 if (!scaleHit || std::abs(std::abs(wireDir.dot(locHitDir)) - 1.0) < angular_tolerance) {
544 ATH_MSG_DEBUG("The track segment is parallel to the wire, position of digit is undefined");
545 ionization.posOnSegment = locHitPos;
546 ionization.posOnWire = wirePos;
547 ionization.distance = std::hypot(locHitPos.y() - wirePosX, locHitPos.z());
548 return ionization;
549 }
550 // Position on hit segment
551 Amg::Vector3D ionizationPos = locHitPos + scaleHit.value() * locHitDir;
552
553 if (scaleHit.value() > stepLength) {
554 ionization.posOnSegment = locHitPos;
555 const Amg::Vector3D closestPointToWirePlane = locHitPos + stepLength * locHitDir;
556 ionization.posOnWire = wirePos;
557 ionization.distance = std::abs(closestPointToWirePlane.z());
558 return ionization;
559 }
560
561 // Project ionization position onto the wire line
562 const double scaleWire = (ionizationPos - wirePos).dot(wireDir);
563 const Amg::Vector3D closestPointOnWire = wirePos + scaleWire * wireDir;
564
565 // Fill ionization result
566 ionization.posOnSegment = ionizationPos;
567 ionization.posOnWire = closestPointOnWire;
568 ionization.distance = (ionizationPos - closestPointOnWire).mag();
569
570 return ionization;
571}
Scalar mag() const
mag method
const Amg::Vector2D & firstStripPos() const
Vector indicating the first strip position.
const Amg::Vector2D & stripDir() const
Vector pointing along the strip.
const StripDesign & design(bool phiView=false) const
Returns the underlying strip design.
Amg::Vector3D to3D(CheckVector2D &&vec, const bool phiView) const
Transforms the 2D vector from the strip design into a 3D vector If phi view is switched on,...
dot(G, fn, nodesToHighlight=[])
Definition dot.py:5

◆ processPadChargeSharing()

sTgcDigitVec sTgcDigitMaker::processPadChargeSharing ( const DigiInput & digiInput,
const int padEta,
const int padPhi ) const
private

Handles charge sharing for pad clusters.

Definition at line 384 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

386 {
387
388 bool isValid = false;
389 const int gasGap = m_idHelper.gasGap(digiInput.hitId);
390 const Identifier padHitId = m_idHelper.padID(digiInput.hitId,
391 digiInput.reEle->multilayer(),
392 gasGap, ReadoutChannelType::Pad, padEta, padPhi, isValid);
393 if(!isValid) {
394 return {};
395 }
396 sTgcDigitVec digits{};
397
398 const IdentifierHash padHitHash = digiInput.reEle->measurementHash(padHitId);
399 const MuonGMR4::PadDesign& padDesign{digiInput.reEle->padDesign(padHitHash)};
400
401 const Amg::Vector2D padPos = digiInput.reEle->localChannelPosition(padHitHash);
402 const Amg::Vector2D hitOnPadSurf = digiInput.reEle->stripLayer(padHitHash).to2D(digiInput.posOnSurf, true);
403
404 const Amg::Vector2D diff = hitOnPadSurf - padPos;
405 const double halfPadHeight = 0.5 * digiInput.reEle->padHeight(padHitHash);
406
407 const std::array<Amg::Vector2D, 4> padHitCorners = padDesign.padCorners(std::make_pair(padEta, padPhi));
408 const double padBottomBase = (padHitCorners[0] - padHitCorners[1]).norm();
409 const double padTopBase = (padHitCorners[2] - padHitCorners[3]).norm();
410 const double halfPadWidth = 0.5 * padBottomBase + 0.25 * (1 + diff.y()/halfPadHeight) * (padTopBase - padBottomBase);
411
412 double deltaX = halfPadWidth - std::abs(diff.x());
413 double deltaY = halfPadHeight - std::abs(diff.y());
414 const bool isNeighX = deltaX < 2.5*m_clusterParams[1];
415 const bool isNeighY = deltaY < 2.5*m_clusterParams[1];
416
417 if (deltaX < 0.) {
418 deltaX = 0.1;
419 }
420 if (deltaY < 0.) {
421 deltaY = 0.1;
422 }
423
424 if (m_doPadSharing && (isNeighX || isNeighY)) {
425 unsigned newPhi = padPhi - Acts::copySign(1, diff.x());
426 unsigned newEta = padEta + Acts::copySign(1, diff.y());
427 bool validEta = newEta > 0 && newEta <= digiInput.reEle->numPadEta(padHitHash);
428 bool validPhi = newPhi > 0 && newPhi <= digiInput.reEle->numPadPhi(padHitHash);
429
430 if (isNeighX && isNeighY && validEta && validPhi) {
431 const Identifier neigh_ID_X = m_idHelper.padID(padHitId, digiInput.reEle->multilayer(),
432 gasGap, ReadoutChannelType::Pad,
433 padEta, newPhi);
434 const Identifier neigh_ID_Y = m_idHelper.padID(padHitId, digiInput.reEle->multilayer(), gasGap,
435 ReadoutChannelType::Pad, newEta, padPhi);
436 const Identifier neigh_ID_XY = m_idHelper.padID(padHitId, digiInput.reEle->multilayer(), gasGap,
437 ReadoutChannelType::Pad, newEta, newPhi);
438 double xQfraction = getPadChargeFraction(deltaX);
439 double yQfraction = getPadChargeFraction(deltaY);
440
441 addDigit(digits, neigh_ID_X, digiInput.time, xQfraction*(1.-yQfraction)*0.5*digiInput.totalCharge);
442 addDigit(digits, neigh_ID_Y, digiInput.time, yQfraction*(1.-xQfraction)*0.5*digiInput.totalCharge);
443 addDigit(digits, neigh_ID_XY, digiInput.time, xQfraction*yQfraction*0.5*digiInput.totalCharge);
444 addDigit(digits, padHitId, digiInput.time, (1.-xQfraction-yQfraction+xQfraction*yQfraction)*0.5*digiInput.totalCharge);
445 } else if (isNeighX && validPhi){
446 const Identifier neigh_ID = m_idHelper.padID(padHitId, digiInput.reEle->multilayer(), gasGap,
447 ReadoutChannelType::Pad, padEta, newPhi);
448 double xQfraction = getPadChargeFraction(deltaX);
449 addDigit(digits, padHitId, digiInput.time, (1.-xQfraction)*0.5*digiInput.totalCharge);
450 addDigit(digits, neigh_ID, digiInput.time, xQfraction*0.5*digiInput.totalCharge);
451 }
452 else if (isNeighY && validEta){
453 const Identifier neigh_ID = m_idHelper.padID(padHitId, digiInput.reEle->multilayer(), gasGap,
454 ReadoutChannelType::Pad, newEta, padPhi);
455 double yQfraction = getPadChargeFraction(deltaY);
456 addDigit(digits, padHitId, digiInput.time, (1.-yQfraction)*0.5*digiInput.totalCharge);
457 addDigit(digits, neigh_ID, digiInput.time, yQfraction*0.5*digiInput.totalCharge);
458 }
459 } else{
460 addDigit(digits, padHitId, digiInput.time, 0.5*digiInput.totalCharge);
461 }
462 return digits;
463}
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition AtlasPID.h:878
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
Definition Jet.cxx:631
static double getPadChargeFraction(double distance)
Computes charge fraction shared among pads.
static void addDigit(sTgcDigitVec &digits, const Identifier &id, double digittime, double charge)
Adds a digit to the appropriate cache.

◆ processPadDigitization()

sTgcDigitVec sTgcDigitMaker::processPadDigitization ( const DigiInput & digiInput) const
private

Processes pad digitization for a given hit.

Definition at line 348 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

348 {
349 ATH_MSG_DEBUG("sTgcDigitMaker::pad response ");
350
351 const int gasGap = m_idHelper.gasGap(digiInput.hitId);
352 const IdentifierHash padLayHash = digiInput.reEle->createHash(gasGap,ReadoutChannelType::Pad, 1);
353 const Amg::Vector2D hitOnPadSurf = digiInput.reEle->stripLayer(padLayHash).to2D(digiInput.posOnSurf, true);
354 const MuonGMR4::PadDesign& padDesign{digiInput.reEle->padDesign(padLayHash)};
355 if(!padDesign.insideTrapezoid(hitOnPadSurf)) {
356 ATH_MSG_DEBUG(__func__<<"() -"<<__LINE__<<" Outside of the pad surface boundary :"
357 << m_idHelperSvc->toString(digiInput.hitId)
358 << " local position " <<Amg::toString(hitOnPadSurf, 2));
359 return {};
360 }
361
362 constexpr double tolerance_length = 0.01*Gaudi::Units::mm;
363 auto [padEta, padPhi] = padDesign.channelNumber(hitOnPadSurf);
364
365 if( padEta < 1 || padPhi < 1){
366 const double newPosX = hitOnPadSurf.x() - std::copysign(tolerance_length, hitOnPadSurf.x());
367 const double newPosY = hitOnPadSurf.y() - std::copysign(tolerance_length, hitOnPadSurf.y());
368 const Amg::Vector2D newPosition(newPosX, newPosY);
369 auto [newPadEta, newPadPhi] = padDesign.channelNumber(newPosition);
370 padEta = newPadEta;
371 padPhi = newPadPhi;
372 if( padEta < 1 || padPhi < 1) {
373 ATH_MSG_WARNING("Failed to obtain pad number for " << m_idHelperSvc->toString(digiInput.hitId) );
374 return {};
375 }
376 }
377
378 return processPadChargeSharing(digiInput, padEta, padPhi);
379}
std::pair< int, int > channelNumber(const Amg::Vector2D &hitPos) const
Function to retrieve the pad eta and phi given a local position coordinate.
sTgcDigitVec processPadChargeSharing(const DigiInput &digiInput, const int padEta, const int padPhi) const
Handles charge sharing for pad clusters.

◆ processStripChargeSharing()

sTgcDigitVec sTgcDigitMaker::processStripChargeSharing ( const DigiInput & digiInput,
const double peak_position,
const int stripNumber ) const
private

Handles charge sharing for strip clusters.

Definition at line 286 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

288 {
289
290 const double norm = 0.5 * digiInput.totalCharge;
291
292 sTgcDigitVec digits{};
293 const double tan_theta = digiInput.hitDir.perp() / digiInput.hitDir.z();
294
295 constexpr double tolerance_charge = 0.0005;
296 constexpr int max_neighbor = 10;
297
298 const int gasGap = m_idHelper.gasGap(digiInput.hitId);
299 const auto& design = digiInput.reEle->stripDesign(digiInput.reEle->measurementHash(digiInput.hitId));
300 // Upper half of the strip cluster
301 for (int iStrip = 0; iStrip <= max_neighbor; ++iStrip) {
302 for (int sign : {-1 , 1}) {
303 int currentStrip = stripNumber + sign*iStrip;
304 if (currentStrip > design.numStrips() || currentStrip < 1) {
305 ATH_MSG_VERBOSE(__func__<<"() - "<<__LINE__<<" Breaking the upper half strip loop stripNumber: "
306 << currentStrip << " > " << design.numStrips());
307 break;
308 }
309 bool isValid = false;
310 const Identifier currentStripId = m_idHelper.channelID(digiInput.hitId,
311 digiInput.reEle->multilayer(),
312 gasGap, ReadoutChannelType::Strip,
313 currentStrip, isValid);
314 if (!isValid) {
315 continue;
316 }
317 const Amg::Vector2D currentStripPos = digiInput.reEle->localChannelPosition(digiInput.reEle->measurementHash(currentStripId));
318 const double x_relative = (currentStripPos.x() - peak_position);
319 const double normX = x_relative / design.stripPitch();
320 const double charge = std::hypot(1., m_chargeAngularFactor * tan_theta) * norm *
321 chargeIntegral(normX - 0.5, normX + 0.5);
322
323 if (charge < tolerance_charge) {
324 ATH_MSG_VERBOSE(__func__<<"() - "<<__LINE__<<" Breaking the upper half strip loop stripCharge: "
325 << charge << " < " << tolerance_charge);
326 break;
327 }
328
329 double strip_time = digiInput.time;
331 const bool shift = ((iStrip > 0) && ((x_relative + (0.5*0.75 - iStrip) * design.stripPitch()) < 0));
332 strip_time += getTimeOffsetStrip(iStrip - shift);
333 }
334
335 addDigit(digits, currentStripId, strip_time, charge);
336 ATH_MSG_VERBOSE(__func__<<"() - "<<__LINE__<<" Created a strip digit: strip number = "
337 << currentStrip << ", charge = " << charge);
338 }
339 }
340
341 return digits;
342}
int sign(int a)
double getTimeOffsetStrip(size_t neighbor_index) const
Gets the time offset for a strip cluster.

◆ processStripDigitization()

sTgcDigitVec sTgcDigitMaker::processStripDigitization ( const DigiConditions & condContainers,
const DigiInput & digiInput ) const
private

Processes strip digitization for a given hit.

Definition at line 241 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

242 {
243 ATH_MSG_DEBUG("sTgcDigitMaker::strip response ");
244
245 const int gasGap = m_idHelper.gasGap(digiInput.hitId);
246 const IdentifierHash stripLayHash = digiInput.reEle->createHash(gasGap,
247 ReadoutChannelType::Strip, 1);
248 const Identifier stripLayId = digiInput.reEle->measurementId(stripLayHash);
249 const MuonGMR4::StripDesign& stripDesign{digiInput.reEle->stripDesign(stripLayHash)};
250 const Amg::Vector2D hitOnStripSurf = digiInput.reEle->stripLayer(stripLayHash).to2D(digiInput.posOnSurf, false);
251
252 if(!stripDesign.insideTrapezoid(hitOnStripSurf)) {
253 ATH_MSG_DEBUG("Outside of the strip surface boundary : "
254 << m_idHelperSvc->toString(stripLayId)
255 << "; local position " <<Amg::toString(hitOnStripSurf, 2));
256 return {};
257 }
258
259 constexpr double tolerance_length = 0.01*Gaudi::Units::mm;
260 int stripNumber = stripDesign.stripNumber(hitOnStripSurf);
261 if( stripNumber < 0){
262 const double newPosX = hitOnStripSurf.x() - std::copysign(tolerance_length, hitOnStripSurf.x());
263 const Amg::Vector2D newPos(newPosX, hitOnStripSurf.y());
264 stripNumber = stripDesign.stripNumber(newPos);
265 if (stripNumber < 0) {
266 ATH_MSG_WARNING("Failed to obtain strip number " << m_idHelperSvc->toString(stripLayId) );
267 return {};
268 }
269 }
270
271
272 const double tan_theta = digiInput.hitDir.perp() / digiInput.hitDir.z();
273 const double angle_dependency = std::hypot(m_posResIncident, m_posResAngular * tan_theta);
274
275 const double peak_position = CLHEP::RandGaussZiggurat::shoot(condContainers.rndEngine,
276 hitOnStripSurf.x(), m_StripResolution*angle_dependency);
277 ATH_MSG_VERBOSE(__func__<<"() - "<<__LINE__<<" Smeared hit from "<<hitOnStripSurf.x()<<" -> "<<
278 peak_position<<". Assign strip charges");
279 return processStripChargeSharing(digiInput,
280 peak_position,
281 stripNumber);
282}
virtual int stripNumber(const Amg::Vector2D &pos) const
Calculates the number of the strip whose center is closest to the given point.
sTgcDigitVec processStripChargeSharing(const DigiInput &digiInput, const double peak_position, const int stripNumber) const
Handles charge sharing for strip clusters.

◆ processWireDigitization()

sTgcDigitVec sTgcDigitMaker::processWireDigitization ( const DigiInput & digiInput) const
private

Processes wire digitization for a given hit.

Definition at line 469 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

469 {
470 ATH_MSG_DEBUG("sTgcDigitMaker::wire response ");
471
472 const int gasGap = m_idHelper.gasGap(digiInput.hitId);
473 const IdentifierHash wireLayHash = digiInput.reEle->createHash(gasGap,
474 ReadoutChannelType::Wire, 1);
475 const MuonGMR4::WireGroupDesign& wireDesign{digiInput.reEle->wireDesign(wireLayHash)};
476
477 const Amg::Vector2D hitOnWireSurf = digiInput.reEle->stripLayer(wireLayHash).to2D(digiInput.posOnSurf, true);
478 if(!wireDesign.insideTrapezoid(hitOnWireSurf)) {
479 ATH_MSG_DEBUG("Outside of the wire surface boundary :" << m_idHelperSvc->toString(digiInput.hitId)
480 << " local position " <<Amg::toString(hitOnWireSurf, 2));
481 return {};
482 }
483
484 constexpr double tolerance_length = 0.01*Gaudi::Units::mm;
485 int wiregroupNumber = (wireDesign.wireNumber(hitOnWireSurf)).first;
486 if( wiregroupNumber < 1) {
487 const double newPosX = hitOnWireSurf.x() - std::copysign(tolerance_length, hitOnWireSurf.x());
488 const Amg::Vector2D newPos{newPosX, hitOnWireSurf.y()};
489 wiregroupNumber = (wireDesign.wireNumber(newPos)).first;
490 if (wiregroupNumber < 1) {
491 ATH_MSG_WARNING("Failed to obtain wire number " << m_idHelperSvc->toString(digiInput.hitId) );
492 return {};
493 }
494 }
495
496 bool isValid = false;
497 const Identifier wireGroupHitId = m_idHelper.channelID(digiInput.hitId, digiInput.reEle->multilayer(), gasGap,
498 ReadoutChannelType::Wire, wiregroupNumber, isValid);
499
500 if(!isValid) {
501 return {};
502 }
503 sTgcDigitVec digits{};
504 addDigit(digits, wireGroupHitId, digiInput.time, digiInput.totalCharge);
505 return digits;
506}

◆ readFileOfTimeArrival()

StatusCode sTgcDigitMaker::readFileOfTimeArrival ( )
private

Reads time arrival data file.

Definition at line 592 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

592 {
593 const std::string file_name = "sTGC_Digitization_timeArrival.dat";
594 std::string file_path = PathResolver::find_file(file_name, "DATAPATH");
595 if(file_path.empty()) {
596 ATH_MSG_FATAL("readFileOfTimeWindowOffset(): Could not find file " << file_name );
597 return StatusCode::FAILURE;
598 }
599
600 std::ifstream ifs{file_path, std::ios::in};
601 if(ifs.bad()) {
602 ATH_MSG_FATAL("sTgcDigitMaker: Failed to open time of arrival file " << file_name );
603 return StatusCode::FAILURE;
604 }
605
606 // Read the sTGC_Digitization_timeWindowOffset.dat file
607 std::string line;
608 GammaParameter param{};
609 while (std::getline(ifs, line)) {
610 std::string key;
611 std::istringstream iss(line);
612 iss >> key;
613 if (key == "bin") {
614 iss >> param.lowEdge >> param.kParameter >> param.thetaParameter;
615 m_gammaParameter.push_back(param);
616 } else if (key == "mpv") {
617 double mpt{};
618 int idx{0};
619 while (iss >> mpt) {m_mostProbableArrivalTime[idx++] = mpt;}
620 }
621 }
622 ifs.close();
623 return StatusCode::SUCCESS;
624}
#define ATH_MSG_FATAL(x)
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
file_path
Definition athena.py:94

◆ readFileOfTimeOffsetStrip()

StatusCode sTgcDigitMaker::readFileOfTimeOffsetStrip ( )
private

Reads strip time offset data file.

Definition at line 667 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/src/sTgcDigitMaker.cxx.

667 {
668 const std::string file_name = "sTGC_Digitization_timeOffsetStrip.dat";
669 std::string file_path = PathResolver::find_file(file_name, "DATAPATH");
670 if(file_path.empty()) {
671 ATH_MSG_FATAL("readFileOfTimeWindowOffset(): Could not find file " << file_name );
672 return StatusCode::FAILURE;
673 }
674
675 // Open the sTGC_Digitization_timeOffsetStrip.dat file
676 std::ifstream ifs{file_path, std::ios::in};
677 if(ifs.bad()) {
678 ATH_MSG_FATAL("Failed to open time of arrival file " << file_name );
679 return StatusCode::FAILURE;
680 }
681
682 // Initialize the container to store the time offset.
683 // The number of parameters, 6, corresponds to the number of lines to be read
684 // from sTGC_Digitization_timeOffsetStrip.dat.
685 // Setting the default offset to 0 ns.
686 std::string line;
687 size_t index{0};
688 double value{0.0};
689 while (std::getline(ifs, line)) {
690 std::string key;
691 std::istringstream iss(line);
692 iss >> key;
693 if (key == "strip") {
694 iss >> index >> value;
695 if (index >= m_timeOffsetStrip.size()) continue;
696 m_timeOffsetStrip.at(index) = value;
697 }
698 }
699 return StatusCode::SUCCESS;
700}

◆ setLevel()

void AthMessaging::setLevel ( MSG::Level lvl)
inherited

Change the current logging level.

Use this rather than msg().setLevel() for proper operation with MT.

Definition at line 28 of file AthMessaging.cxx.

29{
30 m_lvl = lvl;
31}

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT
mutableprivateinherited

Messaging initialized (initMessaging)

Definition at line 141 of file AthMessaging.h.

◆ m_chargeAngularFactor

double MuonR4::sTgcDigitMaker::m_chargeAngularFactor {4.0}
private

◆ m_clusterParams

std::array<double, 2> MuonR4::sTgcDigitMaker::m_clusterParams {0.573, 1.092}
staticconstexprprivate

◆ m_detMgr

const MuonGMR4::MuonDetectorManager* MuonR4::sTgcDigitMaker::m_detMgr {nullptr}
private

◆ m_digitMode

digitMode MuonR4::sTgcDigitMaker::m_digitMode {digitMode::AllChType}
private

define offsets and widths of time windows for signals from wiregroups and strips.

The offsets are defined as relative time diffference with respect to the time after TOF and cable length corrections. Bunch crossing time is specified.

Definition at line 241 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/sTgcDigitizationR4/sTgcDigitMaker.h.

◆ m_doPadSharing

bool MuonR4::sTgcDigitMaker::m_doPadSharing {false}
private

◆ m_doTimeOffsetStrip

bool MuonR4::sTgcDigitMaker::m_doTimeOffsetStrip {false}
private

◆ m_gammaParameter

std::vector<GammaParameter> MuonR4::sTgcDigitMaker::m_gammaParameter
private

◆ m_idHelper

const sTgcIdHelper& MuonR4::sTgcDigitMaker::m_idHelper {m_idHelperSvc->stgcIdHelper()}
private

◆ m_idHelperSvc

const Muon::IMuonIdHelperSvc* MuonR4::sTgcDigitMaker::m_idHelperSvc {m_detMgr->idHelperSvc()}
private

◆ m_imsg

std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr }
mutableprivateinherited

MessageSvc pointer.

Definition at line 135 of file AthMessaging.h.

135{ nullptr };

◆ m_lvl

std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL }
mutableprivateinherited

Current logging level.

Definition at line 138 of file AthMessaging.h.

138{ MSG::NIL };

◆ m_meanGasGain

double MuonR4::sTgcDigitMaker::m_meanGasGain {5.e4}
private

Definition at line 243 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/sTgcDigitizationR4/sTgcDigitMaker.h.

243{5.e4}; // mean gain estimated from ATLAS note "ATL-MUON-PUB-2014-001"

◆ m_mostProbableArrivalTime

std::array<double, 5> MuonR4::sTgcDigitMaker::m_mostProbableArrivalTime {make_array<double, 5>(0.)}
private

Definition at line 219 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/sTgcDigitizationR4/sTgcDigitMaker.h.

constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
Definition ArrayHelper.h:10

◆ m_msg_tls

boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls
mutableprivateinherited

MsgStream instance (a std::cout like with print-out levels)

Definition at line 132 of file AthMessaging.h.

◆ m_nm

std::string AthMessaging::m_nm
privateinherited

Message source name.

Definition at line 129 of file AthMessaging.h.

◆ m_posResAngular

double MuonR4::sTgcDigitMaker::m_posResAngular {0.305/m_StripResolution}
private

◆ m_posResIncident

double MuonR4::sTgcDigitMaker::m_posResIncident {1.}
private

◆ m_StripResolution

double MuonR4::sTgcDigitMaker::m_StripResolution {0.0949}
private

◆ m_theta

double MuonR4::sTgcDigitMaker::m_theta {10}
private

Definition at line 242 of file MuonPhaseII/MuonDigitization/sTgcDigitizationR4/sTgcDigitizationR4/sTgcDigitMaker.h.

242{10}; // theta=10 value best matches the PDF

◆ m_timeOffsetStrip

std::array<double, 6> MuonR4::sTgcDigitMaker::m_timeOffsetStrip {make_array<double, 6>(0.)}
private

The documentation for this class was generated from the following files: