 |
ATLAS Offline Software
|
#include <MM_DigitizationTool.h>
|
SG::WriteHandleKey< MmDigitContainer > | m_writeKey {this, "OutputObjectName", "MM_DIGITS"} |
|
SG::ReadCondHandleKey< Muon::DigitEffiData > | m_effiDataKey {this, "EffiDataKey", "MmDigitEff", "Efficiency constants of the individual MM gasGaps"} |
|
SG::ReadCondHandleKey< NswErrorCalibData > | m_uncertCalibKey {this, "ErrorCalibKey", "NswUncertData", "Key of the parametrized NSW uncertainties"} |
|
SG::ReadCondHandleKey< NswCalibDbThresholdData > | m_condThrshldsKey |
|
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > | m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj"} |
|
ToolHandle< Muon::INSWCalibSmearingTool > | m_smearingTool {this, "SmearingTool", "Muon::NSWCalibSmearingTool/MMCalibSmearingTool"} |
|
ToolHandle< Muon::INSWCalibTool > | m_calibrationTool {this, "CalibrationTool", "Muon::NSWCalibTool/NSWCalibTool"} |
|
Gaudi::Property< bool > | m_digitizeMuonOnly {this, "ProcessTrueMuonsOnly", true, "If set to true hit with pdgId != 13 are skipped"} |
|
Gaudi::Property< std::string > | m_vmmReadoutMode {this, "vmmReadoutMode", "peak", "For readout (DAQ) path. Can be peak or threshold"} |
|
Gaudi::Property< std::string > | m_vmmARTMode {this, "vmmARTMode", "threshold", "For ART (trigger) path. Can be peak or threshold"} |
|
Gaudi::Property< double > | m_energyThreshold {this, "EnergyThreshold", 50, "Minimal energy to process an electron sim hit"} |
|
Gaudi::Property< double > | m_timeWindowLowerOffset |
|
Gaudi::Property< double > | m_timeWindowUpperOffset |
|
Gaudi::Property< double > | m_DiffMagSecondMuonHit {this, "DiffMagSecondMuonHit", 0.1} |
|
Gaudi::Property< int > | m_maskMultiplet {this, "MaskMultiplet", 0, "0: all, 1: first, 2: second, 3: both"} |
|
Gaudi::Property< bool > | m_writeOutputFile {this, "SaveInternalHistos", false} |
|
Gaudi::Property< bool > | m_needsMcEventCollHelper {this, "UseMcEventCollectionHelper", false} |
|
Gaudi::Property< bool > | m_checkMMSimHits {this, "CheckSimHits", true, "Control on the hit validity"} |
|
Gaudi::Property< bool > | m_useTimeWindow {this, "UseTimeWindow", true} |
|
Gaudi::Property< bool > | m_vmmNeighborLogic {this, "VMMNeighborLogic", false} |
|
Gaudi::Property< bool > | m_doSmearing |
|
Gaudi::Property< float > | m_qThreshold {this, "qThreshold", 0.001, "Charge Threshold"} |
|
Gaudi::Property< float > | m_driftGapWidth {this, "DriftGapWidth", 5.04, "Drift Gap Width of 5.04 mm"} |
|
Gaudi::Property< float > | m_crossTalk1 {this, "crossTalk1", 0.3, "Strip Cross Talk with Nearest Neighbor"} |
|
Gaudi::Property< float > | m_crossTalk2 {this, "crossTalk2", 0.09, "Strip Cross Talk with 2nd Nearest Neighbor"} |
|
Gaudi::Property< float > | m_avalancheGain {this, "AvalancheGain", 6.0e3, "avalanche Gain for rach gas mixture"} |
|
Gaudi::Property< float > | m_electronicsThreshold |
|
Gaudi::Property< float > | m_stripdeadtime {this, "StripDeadTime", 200, "dead-time for strip, default value 200 ns = 8 BCs"} |
|
Gaudi::Property< float > | m_ARTdeadtime {this, "ARTDeadTime", 200, "dead-time for ART, default value 200 ns = 8 BCs"} |
|
Gaudi::Property< bool > | m_useCondThresholds |
|
Gaudi::Property< bool > | m_useThresholdScaling |
|
Gaudi::Property< float > | m_thresholdScaleFactor |
|
Gaudi::Property< float > | m_vmmDeadtime {this, "vmmDeadtime", 200, "Specifies how much before the lower time limit the VMM simulation should start evaluating the signal"} |
|
Gaudi::Property< float > | m_vmmUpperGrazeWindow {this, "vmmUpperGrazeWindow", 150, "Specifies how much above the upper time window boundary the VMM sim evaluates the signal."} |
|
Gaudi::Property< double > | m_deadTime {this, "deadTime", 300. * Gaudi::Units::ns} |
|
std::unique_ptr< MM_StripsResponseSimulation > | m_StripsResponseSimulation {} |
|
std::unique_ptr< MM_ElectronicsResponseSimulation > | m_ElectronicsResponseSimulation {} |
|
std::map< int, NoiseCalibConstants > | m_noiseParams {} |
| Define a map to cache the noise parameters individually Key: stationName * std::abs(stationEta) More...
|
|
std::array< std::atomic< unsigned >, 8 > m_allHits | ATLAS_THREAD_SAFE {} |
|
std::array< std::atomic< unsigned >, 8 > m_acceptedHits | ATLAS_THREAD_SAFE {} |
|
SG::ReadHandleKey< xAOD::MuonSimHitContainer > | m_simHitKey {this, "SimHitKey", ""} |
|
SG::ReadHandleKey< ActsGeometryContext > | m_geoCtxKey |
|
ServiceHandle< PileUpMergeSvc > | m_mergeSvc {this, "PileUpMergeSvc", "PileUpMergeSvc", ""} |
|
Gaudi::Property< std::string > | m_streamName {this, "StreamName", ""} |
|
ServiceHandle< IAthRNGSvc > | m_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""} |
|
SG::WriteHandleKey< xAOD::MuonSimHitContainer > | m_sdoKey {this, "OutputSDOName", ""} |
|
Gaudi::Property< bool > | m_onlyUseContainerName |
|
Gaudi::Property< bool > | m_includePileUpTruth {this, "IncludePileUpTruth", true, "Include pile-up truth info"} |
|
std::string | m_inputObjectName {""} |
|
TimedHits | m_timedHits {} |
|
std::vector< SimHitLocalCopy > | m_simHits {} |
|
◆ DeadTimeMap
◆ DigiCache
◆ NoiseCalibConstants
◆ OutDigitCache_t
DigitContainers are sorted by DigitCollections which are the ensemble of all hits in a given MuonChamber.
To fill the final DigitContainer thread-safely, the DigitCollections shall be cached pre cached in a OutDigitCache_t vector which is later moved to the final DigitContainer
Definition at line 80 of file MuonDigitizationTool.h.
◆ PileUpHits
◆ SimHitLocalCopy
Create a local copy of the sim hits to ensure overlayed hits across the events remain valid.
Definition at line 143 of file MuonDigitizationTool.h.
◆ TimedHit
◆ TimedHits
◆ MM_DigitizationTool()
MM_DigitizationTool::MM_DigitizationTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
pIID |
|
) |
| |
◆ addSDO()
Adds the timed simHit to the output SDO container.
The hit may be rejected if it's originating from pile-up and the pile-up truth skimming strategy is applied
Definition at line 142 of file MuonDigitizationTool.cxx.
159 acc_eventTime(*sdoHit) = hit.eventTime();
160 acc_eventID(*sdoHit) = hit.eventId();
161 acc_puType(*sdoHit) = hit.pileupType();
◆ combinedStripResponseAllHits()
Definition at line 427 of file MuonPhaseII/MuonDigitization/MmDigitizationR4/src/MM_DigitizationTool.cxx.
435 THROW_EXCEPTION(
"Cannot find conditions data container for VMM thresholds!");
438 std::vector<int> v_stripStripResponseAllHits{};
439 std::vector<std::vector<float>> v_timeStripResponseAllHits{}, v_qStripResponseAllHits{};
440 std::vector<float> v_stripThresholdResponseAllHits{};
442 Identifier digitID = v_stripDigitOutput.at(0).digitID();
443 double max_kineticEnergy = 0.0;
448 if (i_stripDigitOutput.kineticEnergy() > max_kineticEnergy) {
449 digitID = i_stripDigitOutput.digitID();
450 max_kineticEnergy = i_stripDigitOutput.kineticEnergy();
453 for (
size_t i = 0;
i < i_stripDigitOutput.NumberOfStripsPos().
size(); ++
i) {
454 int strip_id = i_stripDigitOutput.NumberOfStripsPos().at(
i);
457 for (
size_t ii = 0; ii < v_stripStripResponseAllHits.size(); ++ii) {
458 if (v_stripStripResponseAllHits.at(ii) == strip_id) {
459 v_timeStripResponseAllHits.at(ii).insert(v_timeStripResponseAllHits.at(ii).end(),
460 i_stripDigitOutput.chipTime().at(
i).begin(), i_stripDigitOutput.chipTime().at(
i).end());
462 v_qStripResponseAllHits.at(ii).insert(v_qStripResponseAllHits.at(ii).end(),
463 i_stripDigitOutput.chipCharge().at(
i).begin(), i_stripDigitOutput.chipCharge().at(
i).end());
472 v_stripStripResponseAllHits.push_back(strip_id);
473 v_timeStripResponseAllHits.push_back(i_stripDigitOutput.chipTime().at(
i));
474 v_qStripResponseAllHits.push_back(i_stripDigitOutput.chipCharge().at(
i));
476 const Identifier id = idHelper.channelID(digitID,
477 idHelper.multilayer(digitID),
478 idHelper.gasGap(digitID), strip_id);
480 if (!thresholdData->getThreshold(
id,
threshold)) {
481 THROW_EXCEPTION(
"Cannot find retrieve VMM threshold from conditions data base!");
483 v_stripThresholdResponseAllHits.push_back(
threshold);
486 idHelper.multilayer(digitID),
487 idHelper.gasGap(digitID), strip_id);
495 v_stripThresholdResponseAllHits.push_back(
threshold);
502 std::move(v_timeStripResponseAllHits), std::move(v_stripThresholdResponseAllHits),
503 digitID, max_kineticEnergy);
◆ digitize()
|
finaloverrideprotectedvirtual |
Digitize the time ordered hits and write them to the digit format specific for the detector technology.
A new MuonSimHitContainer pointer is parsed to also create the MuonSDO. If a new SDO should be added to the container plese use the addSDO() method as defined below.
Reject hit within the dead time interval
Implements MuonR4::MuonDigitizationTool.
Definition at line 197 of file MuonPhaseII/MuonDigitization/MmDigitizationR4/src/MM_DigitizationTool.cxx.
218 fieldCondObj->getInitializedCache(fieldCache);
223 std::array<std::vector<MM_ElectronicsToolInput>, 8> v_stripDigitOutput{};
226 for (
const TimedHit &simHit : viewer) {
235 const double hitKineticEnergy = simHit->kineticEnergy();
245 const Amg::Vector3D locPos{xAOD::toEigen(simHit->localPosition())};
254 const double globalHitTime = simHit->globalTime();
255 const double tofCorrection = globalHitPosition.mag() /
CLHEP::c_light;
256 const double eventTime = simHit.eventTime();
257 const double bunchTime = globalHitTime - tofCorrection + eventTime;
261 ATH_MSG_VERBOSE(
"hitID " <<
m_idHelperSvc->toString(hitId) <<
" ("<< simHit.get()<<
") Hit bunch time " << bunchTime <<
" tof/G4 hit time " << globalHitTime
262 <<
" globalHitPosition " <<
Amg::toString(globalHitPosition) <<
" hit: r " << globalHitPosition.perp() <<
" z " << globalHitPosition.z()
263 <<
" mclink " << particleLink <<
"Kinetic energy " << hitKineticEnergy);
272 if (inAngleCompliment_XZ < 0.0)
273 inAngleCompliment_XZ += 180;
274 if (inAngleCompliment_YZ < 0.0)
275 inAngleCompliment_YZ += 180;
278 double inAngle_XZ = 90. - inAngleCompliment_XZ;
279 double inAngle_YZ = 90. - inAngleCompliment_YZ;
282 int readoutSide = readOutEle->
readoutSide(measHash);
283 if (readoutSide == 1) {
284 inAngle_XZ = (-inAngle_XZ);
288 int gasGap = idHelper.gasGap(hitId);
292 std::optional<double> lambda{std::nullopt};
294 lambda = Amg::intersect<3>(locPos,
locDir, Amg::Vector3D::UnitZ(), -shift);
296 lambda = Amg::intersect<3>(locPos,
locDir, Amg::Vector3D::UnitZ(), shift);
300 const Amg::Vector2D positionOnSurface{hitOnSurface.x(), hitOnSurface.y()};
304 const Amg::Vector3D hitAfterTimeShift(hitOnSurface.x(), hitOnSurface.y(), shiftTimeOffset);
305 lambda = Amg::intersect<3>(hitAfterTimeShift,
locDir, Amg::Vector3D::UnitZ(), -shiftTimeOffset);
306 const Amg::Vector3D hitAfterTimeShiftOnSurface = hitAfterTimeShift + lambda.value_or(0.) *
locDir;
308 if (std::abs(hitAfterTimeShiftOnSurface.z()) > 0.1) {
313 const unsigned int hitGapInNsw = (idHelper.multilayer(hitId) - 1) * 4 + idHelper.gasGap(hitId) - 1;
314 ++m_allHits[hitGapInNsw];
318 int channelNumber = design.stripNumber(positionOnSurface);
320 if (channelNumber < 0) {
322 if (!design.insideTrapezoid(positionOnSurface)) {
324 <<
" is outside bounds " << std::endl
325 << design <<
" rejecting it");
329 const Identifier clusId = idHelper.channelID(hitId, idHelper.multilayer(hitId),
330 idHelper.gasGap(hitId), channelNumber,
isValid);
334 <<
" positionOnSurface " <<
Amg::toString(positionOnSurface));
338 if (efficiencyMap && efficiencyMap->getEfficiency(clusId) < CLHEP::RandFlat::shoot(rndEngine, 0., 1.)) {
340 <<
" is rejected because of effiency modelling");
348 double distToStrip = design.distanceToStrip(positionOnSurface, channelNumber);
351 Amg::Vector3D hitOnSurfaceGlobal{locToGlobal * hitOnSurface};
353 fieldCache.
getField(hitOnSurfaceGlobal.data(), magneticField.data());
356 Amg::Vector3D localMagneticField{locToGlobal.linear().inverse() * magneticField};
357 if (readoutSide == -1) {
358 localMagneticField[
Amg::y] = -localMagneticField[
Amg::y];
362 const MM_DigitToolInput stripDigitInput(channelNumber, distToStrip, inAngle_XZ, inAngle_YZ, localMagneticField,
363 design.firstStripNumber(),
364 design.numStrips() + design.firstStripNumber() - 1,
365 idHelper.gasGap(hitId), eventTime + globalHitTime);
366 constexpr
double gainFraction = 1.0;
371 tmpStripOutput.
chipTime(), clusId, hitKineticEnergy);
374 v_stripDigitOutput[hitGapInNsw].push_back(std::move(stripDigitOutput));
377 ++m_acceptedHits[hitGapInNsw];
381 for (std::vector<MM_ElectronicsToolInput> &elecHitsPerLayer : v_stripDigitOutput) {
382 if (elecHitsPerLayer.empty()) {
393 if (!electronicsOutputForReadout.isValid()) {
395 <<
" there is no electronics response (peak or threshold finding mode) even though there is a strip response.");
398 for (
unsigned int firedCh = 0; firedCh < electronicsOutputForReadout.stripPos().
size(); ++firedCh) {
400 const int channel = electronicsOutputForReadout.stripPos()[firedCh];
401 double time = electronicsOutputForReadout.stripTime()[firedCh];
402 double charge = electronicsOutputForReadout.stripCharge()[firedCh];
405 idHelper.multilayer(stripDigitOutputAllHits.
digitID()),
406 idHelper.gasGap(stripDigitOutputAllHits.
digitID()),
414 <<
", time: "<<time<<
", charge: "<<
charge);
419 }
while (viewer.next());
423 return StatusCode::SUCCESS;
◆ fetchCollection()
template<class DigitColl >
Helper function that provides fetches the proper DigitCollection from the DigitCache for a given hit identifier If the Collection is fetched for the first time, it's inserted into the cache first.
◆ fillTimedHits()
StatusCode MuonR4::MuonDigitizationTool::fillTimedHits |
( |
PileUpHits && |
hitColl, |
|
|
TimedHits & |
timedHits |
|
) |
| const |
|
privateinherited |
Translates the PileUpHits into the timed hits format.
Definition at line 44 of file MuonDigitizationTool.cxx.
45 for (
const auto& [timeIndex, simHitColl] : hitColl) {
46 timedHits.reserve(timedHits.capacity() + simHitColl->size());
48 timedHits.emplace_back(timeIndex.time(), timeIndex.index(), simHit, timeIndex.type());
53 if (a->identify() != b->identify()){
54 return a->identify() < b->identify();
56 if (
a.eventId() !=
b.eventId()) {
57 return a.eventId() < b.eventId();
59 return a.eventTime() <
b.eventTime();
61 return StatusCode::SUCCESS;
◆ filterPassed()
virtual bool PileUpToolBase::filterPassed |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ finalize()
StatusCode MM_DigitizationTool::finalize |
( |
| ) |
|
|
finaloverride |
Definition at line 180 of file MuonPhaseII/MuonDigitization/MmDigitizationR4/src/MM_DigitizationTool.cxx.
182 std::stringstream statstr{};
184 for (
unsigned int g = 0;
g < m_allHits.size(); ++
g) {
185 allHits += m_allHits[
g];
186 statstr <<
" *** Layer " << (
g + 1) <<
" " << percentage(m_acceptedHits[
g], m_allHits[
g])
187 <<
"% of " << m_allHits[
g] << std::endl;
190 return StatusCode::SUCCESS;
192 ATH_MSG_INFO(
"Tried to convert " << allHits <<
" hits. Successes rate per layer " << std::endl
194 return StatusCode::SUCCESS;
◆ getGeoCtx()
◆ getRandomEngine()
CLHEP::HepRandomEngine * MuonR4::MuonDigitizationTool::getRandomEngine |
( |
const EventContext & |
ctx | ) |
const |
|
protectedinherited |
◆ hitTime()
double MuonR4::MuonDigitizationTool::hitTime |
( |
const TimedHit & |
hit | ) |
|
|
staticprotectedinherited |
Returns the global time of the hit which is the sum of eventTime & individual hit time.
Definition at line 63 of file MuonDigitizationTool.cxx.
64 return hit.eventTime() + hit->globalTime();
◆ initialize()
StatusCode MM_DigitizationTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
Reimplemented from PileUpToolBase.
Definition at line 39 of file MuonPhaseII/MuonDigitization/MmDigitizationR4/src/MM_DigitizationTool.cxx.
57 strip_cfg.NSWCalib::MicroMegaGas::operator=(prop);
85 std::for_each(vmmReadoutMode.begin(), vmmReadoutMode.end(), [](
char &
c){ c = ::tolower(c); });
86 if (vmmReadoutMode.find(
"peak") != std::string::npos) {
88 }
else if (vmmReadoutMode.find(
"threshold") != std::string::npos){
91 ATH_MSG_ERROR(
"MM_DigitizationTool can't interperet vmmReadoutMode option! (Should be 'peak' or 'threshold'.) Contains: "
93 return StatusCode::FAILURE;
97 std::for_each(vmmARTMode.begin(), vmmARTMode.end(), [](
char &
c){ c = ::tolower(c); });
98 if (vmmARTMode.find(
"peak") != std::string::npos) {
101 else if (vmmARTMode.find(
"threshold") != std::string::npos) {
105 ATH_MSG_ERROR(
"MM_DigitizationTool can't interperet vmmARTMode option! (Should be 'peak' or 'threshold'.) Contains: " <<
m_vmmARTMode);
106 return StatusCode::FAILURE;
115 int stripNumberShortestStrip{-1}, stripNumberLongestStrip{-1};
116 Identifier tmpIdShortestStrip{0}, tmpIdLongestStrip{0};
117 double shortestStripLength{FLT_MAX}, longestStripLength{0};
118 IdentifierHash tmpIdHashShortestStrip{0}, tmpIdHashLongestStrip{0};
119 NoiseCalibConstants noise_smallEta1{}, noise_smallEta2{}, noise_largeEta1{}, noise_largeEta2{};
121 for (std::string sectorType : {
"MML",
"MMS"}) {
122 for (
int etaStation : {1, 2}) {
124 tmpId =
m_idHelperSvc->mmIdHelper().channelID(sectorType, etaStation, 1, 1, 1, 1);
128 tmpIdShortestStrip =
m_idHelperSvc->mmIdHelper().channelID(sectorType, etaStation, 1, 1, 1, stripNumberShortestStrip);
129 tmpIdHashShortestStrip = detectorReadoutElement->
measurementHash(tmpIdShortestStrip);
130 shortestStripLength = detectorReadoutElement->
stripLength(tmpIdHashShortestStrip);
131 stripNumberLongestStrip = design.numStrips() + stripNumberShortestStrip - 1;
132 tmpIdLongestStrip =
m_idHelperSvc->mmIdHelper().channelID(sectorType, etaStation, 1, 1, 1, stripNumberLongestStrip);
133 tmpIdHashLongestStrip = detectorReadoutElement->
measurementHash(tmpIdLongestStrip);
134 longestStripLength = design.stripLength(tmpIdHashLongestStrip);
138 if (sectorType ==
"MMS") {
139 if (etaStation == 1) {
141 noise_smallEta1.slope = (maxNoiseSmall_eta1 - minNoiseSmall_eta1) / (longestStripLength - shortestStripLength);
142 noise_smallEta1.intercept = minNoiseSmall_eta1 - noise_smallEta1.slope * shortestStripLength;
144 else if (etaStation == 2) {
146 noise_smallEta2.slope = (maxNoiseSmall_eta2 - minNoiseSmall_eta2) / (longestStripLength - shortestStripLength);
147 noise_smallEta2.intercept = minNoiseSmall_eta2 - noise_smallEta2.slope * shortestStripLength;
149 }
else if (sectorType ==
"MML") {
150 if (etaStation == 1) {
152 noise_largeEta1.slope = (maxNoiseLarge_eta1 - minNoiseLarge_eta1) / (longestStripLength - shortestStripLength);
153 noise_largeEta1.intercept = minNoiseLarge_eta1 - noise_largeEta1.slope * shortestStripLength;
154 }
else if (etaStation == 2) {
156 noise_largeEta2.slope = (maxNoiseLarge_eta2 - minNoiseLarge_eta2) / (longestStripLength - shortestStripLength);
157 noise_largeEta2.intercept = minNoiseLarge_eta2 - noise_largeEta2.slope * shortestStripLength;
177 return StatusCode::SUCCESS;
◆ mergeEvent()
StatusCode MuonR4::MuonDigitizationTool::mergeEvent |
( |
const EventContext & |
ctx | ) |
|
|
finaloverrideinherited |
Definition at line 92 of file MuonDigitizationTool.cxx.
98 ATH_CHECK(sdoContainer.record(std::make_unique<xAOD::MuonSimHitContainer>(),
99 std::make_unique<xAOD::MuonSimHitAuxContainer>()));
104 return StatusCode::SUCCESS;
◆ passDeadTime()
Returns whether the new digit is within the dead time window.
channelId: Identifier of the fired channel
hitTime: Current hit time
deadTimeWindow: Dead time to pass before the next hit may be accepted
deadTimeMap: Map storing the last hit times from each Identifier
Channel not seen before
Update dead time map & accept hit
Definition at line 164 of file MuonDigitizationTool.cxx.
170 if (insertItr.second) {
173 if (
hitTime - insertItr.first->second < deadTimeWindow) {
177 insertItr.first->second =
hitTime;
◆ PileUpToolBase()
PileUpToolBase::PileUpToolBase |
|
inherited |
◆ prepareEvent()
StatusCode MuonR4::MuonDigitizationTool::prepareEvent |
( |
const EventContext & |
ctx, |
|
|
const unsigned int |
nInputEvents |
|
) |
| |
|
finaloverrideinherited |
When being run from PileUpToolsAlgs, this method is called at the start of the subevts loop.
Not able to access SubEvents
Definition at line 35 of file MuonDigitizationTool.cxx.
38 ATH_MSG_DEBUG(
"prepareEvent() called for " << nInputEvents <<
" input events");
41 return StatusCode::SUCCESS;
◆ processAllSubEvents() [1/3]
StatusCode MuonR4::MuonDigitizationTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
const |
|
inherited |
Reentrant version of the digitization tool.
In case of single hits container just load the collection using read handles
Definition at line 71 of file MuonDigitizationTool.cxx.
86 ATH_CHECK(sdoContainer.record(std::make_unique<xAOD::MuonSimHitContainer>(),
87 std::make_unique<xAOD::MuonSimHitAuxContainer>()));
90 return StatusCode::SUCCESS;
◆ processAllSubEvents() [2/3]
StatusCode MuonR4::MuonDigitizationTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtualinherited |
alternative interface which uses the PileUpMergeSvc to obtain all the required SubEvents.
Reimplemented from PileUpToolBase.
Definition at line 66 of file MuonDigitizationTool.cxx.
67 const MuonDigitizationTool* digiTool =
this;
68 return digiTool->processAllSubEvents(ctx);
◆ processAllSubEvents() [3/3]
virtual StatusCode IPileUpTool::processAllSubEvents |
|
inherited |
dummy implementation to allow compilation while all Digitization packages are migrated to use this new interface.
◆ processBunchXing()
|
finaloverridevirtualinherited |
Reimplemented from PileUpToolBase.
Definition at line 108 of file MuonDigitizationTool.cxx.
115 for (
auto& [hitPtr, hitContainer] : hitList) {
116 auto copyContainer = std::make_unique<xAOD::MuonSimHitContainer>();
117 auto copyAuxContainer = std::make_unique<xAOD::MuonSimHitAuxContainer>();
118 copyContainer->setStore(copyAuxContainer.get());
120 (*copyContainer->push_back(std::make_unique<xAOD::MuonSimHit>())) = (*copyMe);
122 hitListPermanent.emplace_back(hitPtr, copyContainer.get());
123 m_simHits.emplace_back(std::move(copyContainer), std::move(copyAuxContainer));
126 return StatusCode::SUCCESS;
◆ resetFilter()
virtual void PileUpToolBase::resetFilter |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ toProcess()
virtual bool PileUpToolBase::toProcess |
( |
int |
bunchXing | ) |
const |
|
inlineoverridevirtualinherited |
◆ writeDigitContainer()
template<class DigitCont , class DigitColl >
Helper function to move the collected digits into the final DigitContainer.
The function needs the maximal size of the container in advance which is provided by calling the module_hash_max() function of the corresponding MuonIdHelper.
◆ ATLAS_THREAD_SAFE [1/2]
std::array<std::atomic<unsigned>, 8> m_allHits MuonR4::MM_DigitizationTool::ATLAS_THREAD_SAFE {} |
|
mutableprivate |
◆ ATLAS_THREAD_SAFE [2/2]
std::array<std::atomic<unsigned>, 8> m_acceptedHits MuonR4::MM_DigitizationTool::ATLAS_THREAD_SAFE {} |
|
mutableprivate |
◆ m_ARTdeadtime
Gaudi::Property<float> MuonR4::MM_DigitizationTool::m_ARTdeadtime {this, "ARTDeadTime", 200, "dead-time for ART, default value 200 ns = 8 BCs"} |
|
private |
◆ m_avalancheGain
Gaudi::Property<float> MuonR4::MM_DigitizationTool::m_avalancheGain {this, "AvalancheGain", 6.0e3, "avalanche Gain for rach gas mixture"} |
|
private |
◆ m_calibrationTool
◆ m_checkMMSimHits
Gaudi::Property<bool> MuonR4::MM_DigitizationTool::m_checkMMSimHits {this, "CheckSimHits", true, "Control on the hit validity"} |
|
private |
◆ m_condThrshldsKey
◆ m_crossTalk1
Gaudi::Property<float> MuonR4::MM_DigitizationTool::m_crossTalk1 {this, "crossTalk1", 0.3, "Strip Cross Talk with Nearest Neighbor"} |
|
private |
◆ m_crossTalk2
Gaudi::Property<float> MuonR4::MM_DigitizationTool::m_crossTalk2 {this, "crossTalk2", 0.09, "Strip Cross Talk with 2nd Nearest Neighbor"} |
|
private |
◆ m_deadTime
Gaudi::Property<double> MuonR4::MM_DigitizationTool::m_deadTime {this, "deadTime", 300. * Gaudi::Units::ns} |
|
private |
◆ m_detMgr
◆ m_DiffMagSecondMuonHit
Gaudi::Property<double> MuonR4::MM_DigitizationTool::m_DiffMagSecondMuonHit {this, "DiffMagSecondMuonHit", 0.1} |
|
private |
◆ m_digitizeMuonOnly
Gaudi::Property<bool> MuonR4::MM_DigitizationTool::m_digitizeMuonOnly {this, "ProcessTrueMuonsOnly", true, "If set to true hit with pdgId != 13 are skipped"} |
|
private |
◆ m_doSmearing
Gaudi::Property<bool> MuonR4::MM_DigitizationTool::m_doSmearing |
|
private |
◆ m_driftGapWidth
Gaudi::Property<float> MuonR4::MM_DigitizationTool::m_driftGapWidth {this, "DriftGapWidth", 5.04, "Drift Gap Width of 5.04 mm"} |
|
private |
◆ m_effiDataKey
◆ m_ElectronicsResponseSimulation
◆ m_electronicsThreshold
Gaudi::Property<float> MuonR4::MM_DigitizationTool::m_electronicsThreshold |
|
private |
◆ m_energyThreshold
Gaudi::Property<double> MuonR4::MM_DigitizationTool::m_energyThreshold {this, "EnergyThreshold", 50, "Minimal energy to process an electron sim hit"} |
|
private |
◆ m_fieldCondObjInputKey
◆ m_filterPassed
bool PileUpToolBase::m_filterPassed {true} |
|
protectedinherited |
◆ m_firstXing
Gaudi::Property<int> PileUpToolBase::m_firstXing |
|
protectedinherited |
Initial value:{this, "FirstXing", -999,
"First bunch-crossing in which det is live"}
Definition at line 54 of file PileUpToolBase.h.
◆ m_geoCtxKey
Initial value:{this, "AlignmentKey", "ActsAlignment",
"Geometry context"}
Definition at line 123 of file MuonDigitizationTool.h.
◆ m_idHelperSvc
Initial value:{this, "MuonIdHelperSvc",
"Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
Definition at line 113 of file MuonDigitizationTool.h.
◆ m_includePileUpTruth
Gaudi::Property<bool> MuonR4::MuonDigitizationTool::m_includePileUpTruth {this, "IncludePileUpTruth", true, "Include pile-up truth info"} |
|
privateinherited |
◆ m_inputObjectName
std::string MuonR4::MuonDigitizationTool::m_inputObjectName {""} |
|
privateinherited |
◆ m_lastXing
Gaudi::Property<int> PileUpToolBase::m_lastXing |
|
protectedinherited |
Initial value:{this, "LastXing", 999,
"Last bunch-crossing in which det is live"}
Definition at line 56 of file PileUpToolBase.h.
◆ m_maskMultiplet
Gaudi::Property<int> MuonR4::MM_DigitizationTool::m_maskMultiplet {this, "MaskMultiplet", 0, "0: all, 1: first, 2: second, 3: both"} |
|
private |
◆ m_mergeSvc
◆ m_needsMcEventCollHelper
Gaudi::Property<bool> MuonR4::MM_DigitizationTool::m_needsMcEventCollHelper {this, "UseMcEventCollectionHelper", false} |
|
private |
◆ m_noiseParams
◆ m_onlyUseContainerName
Gaudi::Property<bool> MuonR4::MuonDigitizationTool::m_onlyUseContainerName |
|
privateinherited |
Initial value:{this, "OnlyUseContainerName", false,
"Don't use the ReadHandleKey directly. Just extract the container name from it."}
Definition at line 134 of file MuonDigitizationTool.h.
◆ m_qThreshold
Gaudi::Property<float> MuonR4::MM_DigitizationTool::m_qThreshold {this, "qThreshold", 0.001, "Charge Threshold"} |
|
private |
◆ m_rndmSvc
◆ m_sdoKey
◆ m_simHitKey
◆ m_simHits
◆ m_smearingTool
◆ m_streamName
Gaudi::Property<std::string> MuonR4::MuonDigitizationTool::m_streamName {this, "StreamName", ""} |
|
privateinherited |
◆ m_stripdeadtime
Gaudi::Property<float> MuonR4::MM_DigitizationTool::m_stripdeadtime {this, "StripDeadTime", 200, "dead-time for strip, default value 200 ns = 8 BCs"} |
|
private |
◆ m_StripsResponseSimulation
◆ m_thresholdScaleFactor
Gaudi::Property<float> MuonR4::MM_DigitizationTool::m_thresholdScaleFactor |
|
private |
◆ m_timedHits
TimedHits MuonR4::MuonDigitizationTool::m_timedHits {} |
|
privateinherited |
◆ m_timeWindowLowerOffset
Gaudi::Property<double> MuonR4::MM_DigitizationTool::m_timeWindowLowerOffset |
|
private |
◆ m_timeWindowUpperOffset
Gaudi::Property<double> MuonR4::MM_DigitizationTool::m_timeWindowUpperOffset |
|
private |
◆ m_uncertCalibKey
◆ m_useCondThresholds
Gaudi::Property<bool> MuonR4::MM_DigitizationTool::m_useCondThresholds |
|
private |
◆ m_useThresholdScaling
Gaudi::Property<bool> MuonR4::MM_DigitizationTool::m_useThresholdScaling |
|
private |
◆ m_useTimeWindow
Gaudi::Property<bool> MuonR4::MM_DigitizationTool::m_useTimeWindow {this, "UseTimeWindow", true} |
|
private |
◆ m_vetoPileUpTruthLinks
Gaudi::Property<int> PileUpToolBase::m_vetoPileUpTruthLinks |
|
protectedinherited |
Initial value:{this, "VetoPileUpTruthLinks", true,
"Ignore links to suppressed pile-up truth"}
Definition at line 58 of file PileUpToolBase.h.
◆ m_vmmARTMode
Gaudi::Property<std::string> MuonR4::MM_DigitizationTool::m_vmmARTMode {this, "vmmARTMode", "threshold", "For ART (trigger) path. Can be peak or threshold"} |
|
private |
◆ m_vmmDeadtime
Gaudi::Property<float> MuonR4::MM_DigitizationTool::m_vmmDeadtime {this, "vmmDeadtime", 200, "Specifies how much before the lower time limit the VMM simulation should start evaluating the signal"} |
|
private |
◆ m_vmmNeighborLogic
Gaudi::Property<bool> MuonR4::MM_DigitizationTool::m_vmmNeighborLogic {this, "VMMNeighborLogic", false} |
|
private |
◆ m_vmmReadoutMode
Gaudi::Property<std::string> MuonR4::MM_DigitizationTool::m_vmmReadoutMode {this, "vmmReadoutMode", "peak", "For readout (DAQ) path. Can be peak or threshold"} |
|
private |
◆ m_vmmUpperGrazeWindow
Gaudi::Property<float> MuonR4::MM_DigitizationTool::m_vmmUpperGrazeWindow {this, "vmmUpperGrazeWindow", 150, "Specifies how much above the upper time window boundary the VMM sim evaluates the signal."} |
|
private |
◆ m_writeKey
◆ m_writeOutputFile
Gaudi::Property<bool> MuonR4::MM_DigitizationTool::m_writeOutputFile {this, "SaveInternalHistos", false} |
|
private |
The documentation for this class was generated from the following files:
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
double stripLength(const IdentifierHash &measHash) const
Returns the strip length.
void setIdentifier(const Identifier &id)
Sets the global ATLAS identifier.
virtual double stripLength(int stripNumb) const
Returns length of the strip.
Eigen::Matrix< double, 2, 1 > Vector2D
#define ATH_MSG_VERBOSE(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool empty() const
Test if the key is blank.
bool ignoreTruthLink(const T &p, bool vetoPileUp)
Helper function for SDO creation in PileUpTools.
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
a link optimized in size for a GenParticle in a McEventCollection
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Eigen::Affine3d Transform3D
int readoutSide(const IdentifierHash &measHash) const
Returns the readout side.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
int firstStripNumber() const
Returns the number of the first strip.
Include the GeoPrimitives which need to be put first.
const StripDesign & design(bool phiView=false) const
Returns the underlying strip design.
const StripLayer & stripLayer(const Identifier &measId) const
A wrapper class for event-slot-local random engines.
double charge(const T &p)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
#define THROW_EXCEPTION(MESSAGE)
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
IdentifierHash measurementHash(const Identifier &measId) const override final
Constructs the identifier hash from the full measurement Identifier.
def time(flags, cells_name, *args, **kw)
IdentifierHash layerHash(const Identifier &measId) const override final
#define ATH_MSG_WARNING(x)
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
const Amg::Transform3D & localToGlobalTrans(const ActsGeometryContext &ctx) const
Returns the local to global transformation into the ATLAS coordinate system.
void getField(const double *ATH_RESTRICT xyz, double *ATH_RESTRICT bxyz, double *ATH_RESTRICT deriv=nullptr)
get B field value at given position xyz[3] is in mm, bxyz[3] is in kT if deriv[9] is given,...
float peakTime
power of responce function
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
a struct encapsulating the identifier of a pile-up event