ATLAS Offline Software
Loading...
Searching...
No Matches
MM_DigitizationTool Class Reference

#include <MM_DigitizationTool.h>

Inheritance diagram for MM_DigitizationTool:

Public Member Functions

 MM_DigitizationTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode initialize () override final
 Initialize.
StatusCode prepareEvent (const EventContext &ctx, const unsigned int) override final
 When being run from PileUpToolsAlgs, this method is called at the start of the subevts loop.
StatusCode processBunchXing (int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) override final
 When being run from PileUpToolsAlgs, this method is called for each active bunch-crossing to process current SubEvents bunchXing is in ns.
StatusCode mergeEvent (const EventContext &ctx) override final
 When being run from PileUpToolsAlgs, this method is called at the end of the subevts loop.
virtual StatusCode processAllSubEvents (const EventContext &ctx) override
 When being run from MM_Digitizer, this method is called during the event loop.
StatusCode digitize (const EventContext &ctx)
 Just calls processAllSubEvents - leaving for back-compatibility (IMuonDigitizationTool)

Private Types

using NoiseCalibConstants = NswCalibDbTimeChargeData::CalibConstants

Private Member Functions

CLHEP::HepRandomEngine * getRandomEngine (const std::string &streamName, const EventContext &ctx) const
StatusCode getNextEvent (const EventContext &ctx)
 Record MmDigitContainer and MuonSimDataCollection.
StatusCode doDigitization (const EventContext &ctx)
bool checkMMSimHit (const MMSimHit &) const
MM_ElectronicsToolInput combinedStripResponseAllHits (const std::vector< MM_ElectronicsToolInput > &v_stripDigitOutput)

Private Attributes

ServiceHandle< IAthRNGSvcm_rndmSvc {this, "RndmSvc", "AthRNGSvc", "Random Number Service used in Muon digitization"}
Gaudi::Property< std::string > m_rndmEngineName {this, "RndmEngine", "MuonDigitization", "Random engine name"}
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
ToolHandle< Muon::INSWCalibSmearingToolm_smearingTool {this, "SmearingTool", "Muon::NSWCalibSmearingTool/MMCalibSmearingTool"}
ToolHandle< Muon::INSWCalibToolm_calibrationTool {this, "CalibrationTool", "Muon::NSWCalibTool/NSWCalibTool"}
SG::ReadCondHandleKey< AtlasFieldCacheCondObjm_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj"}
SG::ReadCondHandleKey< NswCalibDbThresholdDatam_condThrshldsKey
Gaudi::Property< bool > m_onlyUseContainerName
SG::ReadHandleKey< MMSimHitCollectionm_hitsContainerKey {this, "InputObjectName", "MM_Hits", "name of the input objects"}
std::string m_inputObjectName {""}
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 produce a PRD"}
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"}
SG::WriteHandleKey< MmDigitContainerm_outputDigitCollectionKey
SG::WriteHandleKey< MuonSimDataCollectionm_outputSDO_CollectionKey
ServiceHandle< PileUpMergeSvcm_mergeSvc {this, "PileUpMergeSvc", "PileUpMergeSvc", "Merge service used in digitization"}
Gaudi::Property< bool > m_useCondThresholds
Gaudi::Property< bool > m_useThresholdScaling
Gaudi::Property< float > m_thresholdScaleFactor
Gaudi::Property< float > m_vmmDeadtime
Gaudi::Property< float > m_vmmUpperGrazeWindow
const MicromegasHitIdHelperm_muonHelper {nullptr}
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_DetectorManagerKey
std::list< std::unique_ptr< MMSimHitCollection > > m_MMHitCollList {}
std::unique_ptr< TimedHitCollection< MMSimHit > > m_timedHitCollection_MM {}
std::unique_ptr< MM_StripsResponseSimulationm_StripsResponseSimulation {}
std::unique_ptr< MM_ElectronicsResponseSimulationm_ElectronicsResponseSimulation {}
std::map< int, NoiseCalibConstantsm_noiseParams {}
 Define a map to cache the noise parameters individually Key: stationName * std::abs(stationEta)

structors and AlgTool implementation

virtual bool toProcess (int bunchXing) const override
 the method this base class helps implementing
virtual bool filterPassed () const override
 dummy implementation of passing filter
virtual void resetFilter () override
 dummy implementation of filter reset
Gaudi::Property< int > m_firstXing
Gaudi::Property< int > m_lastXing
Gaudi::Property< int > m_vetoPileUpTruthLinks
bool m_filterPassed {true}

Detailed Description

@section MM_DigitizerDetails Class methods and properties

Authors: Nektarios Chr. Benekos necta.nosp@m.rios.nosp@m..bene.nosp@m.kos@.nosp@m.cern..nosp@m.ch Konstantinos Karakostas Konst.nosp@m.anti.nosp@m.nos.K.nosp@m.arak.nosp@m.ostas.nosp@m.@cer.nosp@m.n.ch //////////////////////////////////////////////////////////////////////////////

    In the initialize() method, the PileUpMerge and StoreGate services are initialized, and a pointer to an instance of the class
    MuonDetectorManager is retrieved from the detector store and used to obtain a MmIdHelper.
    The MMDigitContainer is initialized and the simulation identifier helper retrieved, together with the pointer to the digitization

tool. Random numbers are obtained in the code from a dedicated stream via AtRndmSvc, which is also initialized in the initialize() method. In the execute() method, the digits and the SDOs (Simulation Data Object, container for simulation data to be preserved after the digitization procedue, and persistified together with the RDOs) containers are created and recorded on StoreGate; the MMSimHit collection are merged using the TimedHitCollection sorted container (done in handleMicroMegasSimhit(TimedHitPtr<MMSimHit>& hit)) method); into a loop over the TimedHitCollection for the given DetectorElement, the handleMicroMegasSimhit() method converts the SimID into the Offline ID to be associated to the Digit and pass to the digitization tool the drift radius and the distance to the chamber RO side (for the propagation delay computation). The digitization tool returns a drift time, charge and strip position which are used together with the Offline ID, to create the digit object (in doDigitization() method). The finalize() method returns a SUCCESS StatusCode if the digitization procedure ends succesfully.

 In the initialize() method...
 In the execute() method...

Definition at line 76 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

Member Typedef Documentation

◆ NoiseCalibConstants

Constructor & Destructor Documentation

◆ MM_DigitizationTool()

MM_DigitizationTool::MM_DigitizationTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 65 of file MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx.

65 :
66 PileUpToolBase(type, name, parent) {}
PileUpToolBase(const std::string &type, const std::string &name, const IInterface *parent)

Member Function Documentation

◆ checkMMSimHit()

bool MM_DigitizationTool::checkMMSimHit ( const MMSimHit & ) const
private

Definition at line 895 of file MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx.

895{ return true; }

◆ combinedStripResponseAllHits()

MM_ElectronicsToolInput MM_DigitizationTool::combinedStripResponseAllHits ( const std::vector< MM_ElectronicsToolInput > & v_stripDigitOutput)
private

Definition at line 818 of file MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx.

818 {
819 // set up pointer to conditions object
820 const EventContext& ctx = Gaudi::Hive::currentContext();
821
822 const NswCalibDbThresholdData* thresholdData {nullptr};
824 SG::ReadCondHandle<NswCalibDbThresholdData> readThresholds{m_condThrshldsKey, ctx};
825 if (!readThresholds.isValid()) { ATH_MSG_ERROR("Cannot find conditions data container for VMM thresholds!"); }
826 thresholdData = readThresholds.cptr();
827 }
828
829 SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonGeoMgrHandle{m_DetectorManagerKey, ctx};
830 if (!muonGeoMgrHandle.isValid()) { ATH_MSG_FATAL("Failed to retrieve the detector manager from the conditiosn store"); }
831 const MuonGM::MuonDetectorManager* muonGeoMgr = *muonGeoMgrHandle;
832
833 std::vector<int> v_stripStripResponseAllHits;
834 std::vector<std::vector<float>> v_timeStripResponseAllHits;
835 std::vector<std::vector<float>> v_qStripResponseAllHits;
836 std::vector<float> v_stripThresholdResponseAllHits;
837
838 Identifier digitID = v_stripDigitOutput.at(0).digitID();
839 float max_kineticEnergy = 0.0;
840
841 // Loop over strip digit output elements
842 for (auto& i_stripDigitOutput : v_stripDigitOutput) {
843 //--- Just to get Digit id with the largest kinetic energy, but the Digit id is no longer meaningful
844 if (i_stripDigitOutput.kineticEnergy() > max_kineticEnergy) {
845 digitID = i_stripDigitOutput.digitID();
846 max_kineticEnergy = i_stripDigitOutput.kineticEnergy();
847 }
848 //---
849 for (size_t i = 0; i < i_stripDigitOutput.NumberOfStripsPos().size(); ++i) {
850 int strip_id = i_stripDigitOutput.NumberOfStripsPos().at(i);
851 bool found = false;
852
853 for (size_t ii = 0; ii < v_stripStripResponseAllHits.size(); ++ii) {
854 if (v_stripStripResponseAllHits.at(ii) == strip_id) {
855 for (size_t iii = 0; iii < i_stripDigitOutput.chipTime().at(i).size(); ++iii) {
856 v_timeStripResponseAllHits.at(ii).push_back(i_stripDigitOutput.chipTime().at(i).at(iii));
857 v_qStripResponseAllHits.at(ii).push_back(i_stripDigitOutput.chipCharge().at(i).at(iii));
858 }
859 found = true;
860 }
861 }
862 if (!found) { // strip id not in vector, add new entry
863 v_stripStripResponseAllHits.push_back(strip_id);
864 v_timeStripResponseAllHits.push_back(i_stripDigitOutput.chipTime().at(i));
865 v_qStripResponseAllHits.push_back(i_stripDigitOutput.chipCharge().at(i));
867 const Identifier id = m_idHelperSvc->mmIdHelper().channelID(digitID, m_idHelperSvc->mmIdHelper().multilayer(digitID),
868 m_idHelperSvc->mmIdHelper().gasGap(digitID), strip_id);
869 float threshold = 0;
870 if (!thresholdData->getThreshold(id, threshold))
871 ATH_MSG_ERROR("Cannot find retrieve VMM threshold from conditions data base!");
872 v_stripThresholdResponseAllHits.push_back(threshold);
873 } else if (m_useThresholdScaling) {
874 Identifier id = m_idHelperSvc->mmIdHelper().channelID(digitID, m_idHelperSvc->mmIdHelper().multilayer(digitID),
875 m_idHelperSvc->mmIdHelper().gasGap(digitID), strip_id);
876 const MuonGM::MMReadoutElement* detectorReadoutElement = muonGeoMgr->getMMReadoutElement(id);
877 float stripLength = detectorReadoutElement->stripLength(id);
878 const int noise_id = m_idHelperSvc->stationName(digitID) * std::abs(m_idHelperSvc->stationEta(digitID));
879 const NoiseCalibConstants& noise = m_noiseParams.at(noise_id);
880 float threshold = (noise.slope * stripLength + noise.intercept) * m_thresholdScaleFactor;
881 v_stripThresholdResponseAllHits.push_back(threshold);
882 } else {
883 v_stripThresholdResponseAllHits.push_back(m_electronicsThreshold);
884 }
885 }
886 }
887 }
888
889 MM_ElectronicsToolInput stripDigitOutputAllHits(v_stripStripResponseAllHits, v_qStripResponseAllHits, v_timeStripResponseAllHits,
890 v_stripThresholdResponseAllHits, digitID, max_kineticEnergy);
891
892 return stripDigitOutputAllHits;
893}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
SG::ReadCondHandleKey< NswCalibDbThresholdData > m_condThrshldsKey
std::map< int, NoiseCalibConstants > m_noiseParams
Define a map to cache the noise parameters individually Key: stationName * std::abs(stationEta)
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
double stripLength(const Identifier &id) const
strip length Wrappers to MuonChannelDesign::channelLength() taking into account the passivated width
const MMReadoutElement * getMMReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
bool getThreshold(const Identifier &, float &) const
const_pointer_type cptr()

◆ digitize()

StatusCode MM_DigitizationTool::digitize ( const EventContext & ctx)

Just calls processAllSubEvents - leaving for back-compatibility (IMuonDigitizationTool)

Definition at line 396 of file MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx.

396{ return this->processAllSubEvents(ctx); }
virtual StatusCode processAllSubEvents(const EventContext &ctx) override
When being run from MM_Digitizer, this method is called during the event loop.

◆ doDigitization()

StatusCode MM_DigitizationTool::doDigitization ( const EventContext & ctx)
private

check if the hit has to be dropped, based on efficiency

move the initial track point to the readout plane

use the smearing tool to update time and charge

Definition at line 413 of file MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx.

413 {
414 CLHEP::HepRandomEngine* rndmEngine = getRandomEngine(m_rndmEngineName, ctx);
415
416 SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonGeoMgrHandle{m_DetectorManagerKey, ctx};
417 if (!muonGeoMgrHandle.isValid()) {
418 ATH_MSG_FATAL("Failed to retrieve the detector manager from the conditiosn store");
419 return StatusCode::FAILURE;
420 }
421 const MuonGM::MuonDetectorManager* muonGeoMgr = *muonGeoMgrHandle;
422
423 // create and record the Digit container in StoreGate
424 SG::WriteHandle<MmDigitContainer> digitContainer(m_outputDigitCollectionKey, ctx);
425 ATH_CHECK(digitContainer.record(std::make_unique<MmDigitContainer>(m_idHelperSvc->mmIdHelper().detectorElement_hash_max())));
426 ATH_MSG_DEBUG("MmDigitContainer recorded in StoreGate.");
427
428 // Create and record the SDO container in StoreGate
429 SG::WriteHandle<MuonSimDataCollection> sdoContainer(m_outputSDO_CollectionKey, ctx);
430 ATH_CHECK(sdoContainer.record(std::make_unique<MuonSimDataCollection>()));
431 ATH_MSG_DEBUG("MmSDOCollection recorded in StoreGate.");
432
433
434 if (m_maskMultiplet == 3) { return StatusCode::SUCCESS; }
435
436 // Perform null check on m_thpcCSC
438 ATH_MSG_ERROR("m_timedHitCollection_MM is null");
439 return StatusCode::FAILURE;
440 }
441
442
443 // iterate over hits and fill id-keyed drift time map
445
446 std::vector<std::unique_ptr<MmDigitCollection> > collections;
447
448 // nextDetectorElement-->sets an iterator range with the hits of current detector element , returns a bool when done
449 const MmIdHelper& idHelper{m_idHelperSvc->mmIdHelper()};
450 while (m_timedHitCollection_MM->nextDetectorElement(i, e)) {
451 Identifier layerID;
452 std::vector<MM_ElectronicsToolInput> v_stripDigitOutput;
453
454 // Loop over the hits:
455 while (i != e) {
457 //
458 // Hit Information And Preparation
459 //
460 TimedHitPtr<MMSimHit> phit = *i++;
461 const double eventTime = phit.eventTime();
462 const MMSimHit& hit(*phit);
463
464 const double hitKineticEnergy = hit.kineticEnergy();
465 if (hitKineticEnergy <= 0) continue;
466
467 const Amg::Vector3D& globalHitPosition = hit.globalPosition();
468
469 const double globalHitTime = hit.globalTime();
470 const double tofCorrection = globalHitPosition.mag() / CLHEP::c_light;
471 const double bunchTime = globalHitTime - tofCorrection + eventTime;
472
473 const int hitID = hit.MMId();
474 // the G4 time or TOF from IP
475 // double G4Time(hit.globalTime());
476 // see what are the members of MMSimHit
477
478 // convert sim id helper to offline id
479 MM_SimIdToOfflineId simToOffline(&idHelper);
480
481 // get the hit Identifier and info
482 int simId = hit.MMId();
483 layerID = simToOffline.convert(simId);
484
486 if (m_doSmearing) {
487 bool acceptHit = true;
488 ATH_CHECK(m_smearingTool->isAccepted(layerID, acceptHit,rndmEngine));
489 if (!acceptHit) {
490 ATH_MSG_DEBUG("Dropping the hit - smearing tool");
491 continue;
492 }
493 }
494 const HepMcParticleLink particleLink = HepMcParticleLink::getRedirectedLink(phit->particleLink(), phit.eventId(), ctx); // This link should now correctly resolve to the TruthEvent McEventCollection in the main StoreGateSvc.
495 // Read the information about the Micro Megas hit
496 ATH_MSG_DEBUG("> hitID " << hitID << " Hit bunch time " << bunchTime << " tot " << globalHitTime << " tof/G4 time "
497 << hit.globalTime() << " globalHitPosition " << globalHitPosition << "hit: r "
498 << globalHitPosition.perp() << " z " << globalHitPosition.z() << " mclink " << particleLink
499 << m_idHelperSvc->toStringGasGap(layerID));
500
501 // For collection of inputs to throw back in SG
502
503 // remove hits in masked multiplet
504 if (m_maskMultiplet == idHelper.multilayer(layerID)) continue;
505
506 //
507 // Hit Information And Preparation
508 //
510
512 //
513 // Sanity Checks
514 //
515 if (!m_idHelperSvc->isMM(layerID)) {
516 ATH_MSG_WARNING("layerID does not represent a valid MM layer: "<< m_idHelperSvc->toString(layerID));
517 continue;
518 }
519
520 // get readout element
521 const MuonGM::MMReadoutElement* detectorReadoutElement = muonGeoMgr->getMMReadoutElement(layerID);
522 if (!detectorReadoutElement) {
523 ATH_MSG_WARNING("Failed to retrieve detector element for: " << m_idHelperSvc->toString(layerID));
524 continue;
525 }
526 const std::array<int, 4>& readoutSide=detectorReadoutElement->getReadoutSide();
527
528 //
529 // Sanity Checks
530 //
532
533 const std::string stName = m_idHelperSvc->stationNameString(layerID);
534
535
537 //
538 // Angles, Geometry, and Coordinates. Oh my!
539 //
540
541 // Surface
542 const Trk::PlaneSurface& surf = detectorReadoutElement->surface(layerID);
543
544 // Calculate The Inclination Angle
545 // Angle
546 const Amg::Vector3D globalHitDirection = hit.globalDirection();
547 Trk::LocalDirection localHitDirection;
548 surf.globalToLocalDirection(globalHitDirection, localHitDirection);
549
550 // This is not an incident angle yet. It's atan(z/x),
551 // ... so it's the complement of the angle w.r.t. a vector normal to the detector surface
552 float inAngleCompliment_XZ = localHitDirection.angleXZ() / CLHEP::degree;
553 float inAngleCompliment_YZ = localHitDirection.angleYZ() / CLHEP::degree;
554
555 // This is basically to handle the atan ambiguity
556 if (inAngleCompliment_XZ < 0.0) inAngleCompliment_XZ += 180;
557 if (inAngleCompliment_YZ < 0.0) inAngleCompliment_YZ += 180;
558
559 // This gets the actual incidence angle from its complement.
560 float inAngle_XZ = 90. - inAngleCompliment_XZ;
561 float inAngle_YZ = 90. - inAngleCompliment_YZ;
562
563 ATH_MSG_DEBUG("At eta: " << m_idHelperSvc->toString(layerID)
564 << " Readout Side: " << (readoutSide).at(m_muonHelper->GetLayer(simId) - 1)
565 << " Layer: " << m_muonHelper->GetLayer(simId) << "\n\t\t\t inAngle_XZ (degrees): " << inAngle_XZ
566 << " inAngle_YZ (degrees): " << inAngle_YZ);
567
568 // compute the hit position on the readout plane (same as in MuonFastDigitization)
569 Amg::Vector3D stripLayerPosition = surf.transform().inverse() * globalHitPosition;
570 Amg::Vector2D positionOnSurfaceUnprojected{stripLayerPosition.x(), stripLayerPosition.y()};
571
572 Amg::Vector3D localDirection = surf.transform().inverse().linear() * globalHitDirection;
573 Amg::Vector3D localDirectionTime{Amg::Vector3D::Zero()};
574
575 // drift direction in backwards-chamber should be opposite to the incident direction.
576 if ((readoutSide).at(idHelper.gasGap(layerID) - 1) == 1) {
577 localDirectionTime = localDirection;
578 inAngle_XZ = (-inAngle_XZ);
579 } else
580 localDirectionTime = surf.transform().inverse().linear() * globalHitDirection;
581
583 int gasGap = idHelper.gasGap(layerID);
584 double shift = 0.5 * detectorReadoutElement->getDesign(layerID)->thickness;
585 double scale = 0.0;
586 if (gasGap == 1 || gasGap == 3) {
587 scale = -(stripLayerPosition.z() + shift) / localDirection.z();
588 } else if (gasGap == 2 || gasGap == 4) {
589 scale = -(stripLayerPosition.z() - shift) / localDirection.z();
590 }
591
592 const Amg::Vector3D hitOnSurface = stripLayerPosition + scale * localDirection;
593 Amg::Vector2D positionOnSurface{hitOnSurface.x(), hitOnSurface.y()};
594
595 // Account For Time Offset
596 double shiftTimeOffset = (globalHitTime - tofCorrection) * m_StripsResponseSimulation->getDriftVelocity();
597 Amg::Vector3D hitAfterTimeShift(hitOnSurface.x(), hitOnSurface.y(), shiftTimeOffset);
598 Amg::Vector3D hitAfterTimeShiftOnSurface = hitAfterTimeShift - (shiftTimeOffset / localDirectionTime.z()) * localDirectionTime;
599
600 if (std::abs(hitAfterTimeShiftOnSurface.z()) > 0.1)
601 ATH_MSG_WARNING("Bad propagation to surface after time shift " << hitAfterTimeShiftOnSurface);
602
603 // moving the hit position to the center of the gap for the SDO position
604 double scaleSDO = -stripLayerPosition.z() / localDirection.z();
605 Amg::Vector3D hitAtCenterOfGasGap = stripLayerPosition + scaleSDO * localDirection;
606 Amg::Vector3D hitAtCenterOfGasGapGlobal = surf.transform() * hitAtCenterOfGasGap;
607 ATH_MSG_DEBUG("strip layer position z" << stripLayerPosition.z() << "hitAtCenterOfGasGap "
608 << Amg::toString(hitAtCenterOfGasGap)<< " gas gap " << gasGap);
609
610 // Don't consider electron hits below m_energyThreshold
611 if (hit.kineticEnergy() < m_energyThreshold && std::abs(hit.particleEncoding()) == 11) {
612 continue;
613 }
614
615 // Perform Bound Check (making the call from the detector element to consider edge passivation)
616 if (!detectorReadoutElement->insideActiveBounds(layerID, positionOnSurface)) {
617 ATH_MSG_DEBUG("m_exitcode = 1 : shiftTimeOffset = " << shiftTimeOffset << " "<<Amg::toString(hitOnSurface));
618 continue;
619 }
620
621 int stripNumber = detectorReadoutElement->stripNumber(positionOnSurface, layerID);
622 Amg::Vector2D tmp(stripLayerPosition.x(), stripLayerPosition.y());
623
624 if (stripNumber == -1) {
625 ATH_MSG_WARNING("!!! Failed to obtain strip number "
626 << m_idHelperSvc->mmIdHelper().print_to_string(layerID) << "\n\t\t with pos " << positionOnSurface << " z "
627 << stripLayerPosition.z() << " eKin: " << hit.kineticEnergy() << " eDep: " << hit.depositEnergy()
628 << " unprojectedStrip: " << detectorReadoutElement->stripNumber(positionOnSurfaceUnprojected, layerID));
629 continue;
630 }
631
632 // Re-definition Of ID
633 Identifier parentID = idHelper.parentID(layerID);
634 Identifier digitID = idHelper.channelID(parentID,
635 idHelper.multilayer(layerID),
636 idHelper.gasGap(layerID), stripNumber);
637
638 // contain (name, eta, phi, multiPlet)
639 const IdentifierHash moduleHash = m_idHelperSvc->moduleHash(layerID);
640
641 ATH_MSG_DEBUG(" looking up collection using moduleHash "
642 << static_cast<int>(moduleHash) << " " << m_idHelperSvc->toString(layerID)
643 << " digitID: " << m_idHelperSvc->toString(digitID));
644
645 const MuonGM::MuonChannelDesign* mmChannelDesign = detectorReadoutElement->getDesign(digitID);
646 double distToChannel = mmChannelDesign->distanceToChannel(positionOnSurface, stripNumber);
647
648 // check whether retrieved distance is greater than strip width
649 // first retrieve the strip number from position by geometrical check
650 int geoStripNumber = mmChannelDesign->channelNumber(positionOnSurface);
651 if (geoStripNumber == -1) ATH_MSG_WARNING("Failed to retrieve strip number");
652 // retrieve channel position of closest active strip
653 Amg::Vector2D chPos{Amg::Vector2D::Zero()};
654 if (!mmChannelDesign->center(geoStripNumber, chPos)) {
655 ATH_MSG_DEBUG("Failed to retrieve channel position for closest strip number "
656 << geoStripNumber
657 << ". Can happen if hit was found in non-active strip. Will not digitize it, since in data, "
658 << "we would probably not find a cluster formed well enough to survive reconstruction.");
659 continue;
660 }
661
662 MagField::AtlasFieldCache fieldCache;
663 SG::ReadCondHandle<AtlasFieldCacheCondObj> readHandle{m_fieldCondObjInputKey, ctx};
664 const AtlasFieldCacheCondObj* fieldCondObj{*readHandle};
665 if (!fieldCondObj) {
666 ATH_MSG_ERROR("doDigitization: Failed to retrieve AtlasFieldCacheCondObj with key " << m_fieldCondObjInputKey.key());
667 return StatusCode::FAILURE;
668 }
669 fieldCondObj->getInitializedCache(fieldCache);
670
671 // Obtain Magnetic Field At Detector Surface
672 Amg::Vector3D hitOnSurfaceGlobal = surf.transform() * hitOnSurface;
673 Amg::Vector3D magneticField{Amg::Vector3D::Zero()};
674 fieldCache.getField(hitOnSurfaceGlobal.data(), magneticField.data());
675
676 // B-field in local cordinate, X ~ #strip, increasing to outer R, Z ~ global Z but positive to IP
677 Amg::Vector3D localMagneticField = surf.transform().linear().inverse() * magneticField;
678 if ((readoutSide).at(m_muonHelper->GetLayer(simId) - 1) == -1)
679 localMagneticField[Amg::y] = -localMagneticField[Amg::y];
680
681 //
682 // Angles, Geometry, and Coordinates. Oh my!
683 //
685
687 //
688 // Strip Response Simulation For This Hit
689 //
690 const MM_DigitToolInput stripDigitInput(
691 stripNumber, distToChannel, inAngle_XZ, inAngle_YZ, localMagneticField,
692 detectorReadoutElement->numberOfMissingBottomStrips(layerID) + 1,
693 detectorReadoutElement->numberOfStrips(layerID) - detectorReadoutElement->numberOfMissingTopStrips(layerID),
694 idHelper.gasGap(layerID), eventTime + globalHitTime);
695
696 // fill the SDO collection in StoreGate
697 // create here deposit for MuonSimData, link and tof
698 //
699 // Since we have output based on channel, instead of hit, the SDO and digit ID are No longer meaningless. 2016/06/27 T.Saito
700 //
701 // digitize input for strip response
702
703 MuonSimData::Deposit deposit(particleLink, MuonMCData(hitOnSurface.x(), hitOnSurface.y()));
704
705 // Record the SDO collection in StoreGate
706 std::vector<MuonSimData::Deposit> deposits{deposit};
707 MuonSimData simData(std::move(deposits), 0);
708 simData.setPosition(hitAtCenterOfGasGapGlobal);
709 simData.setTime(globalHitTime);
710 sdoContainer->insert(std::make_pair(digitID, simData));
711 ATH_MSG_DEBUG(" added MM SDO " << sdoContainer->size());
712
713 float gainFraction = 1.0;
714 if (m_doSmearing) {
715 // build identifier including the strip since layerId does not contain teh strip number
716 Identifier id = idHelper.channelID(layerID,
717 idHelper.multilayer(layerID),
718 idHelper.gasGap(layerID), stripNumber);
719 ATH_CHECK(m_smearingTool->getGainFraction(id, gainFraction));
720 }
721 double stripPitch = detectorReadoutElement->getDesign(layerID)->channelWidth();
722
723 MM_StripToolOutput tmpStripOutput = m_StripsResponseSimulation->GetResponseFrom(stripDigitInput, gainFraction, stripPitch, rndmEngine);
724 MM_ElectronicsToolInput stripDigitOutput(tmpStripOutput.NumberOfStripsPos(), tmpStripOutput.chipCharge(),
725 tmpStripOutput.chipTime(), digitID, hit.kineticEnergy());
726
727 v_stripDigitOutput.push_back(stripDigitOutput);
728
729 } // Hit Loop
730
731 // Now at Detector Element Level (VMM)
732
733 if (v_stripDigitOutput.empty()) {
734 ATH_MSG_DEBUG("MM_DigitizationTool::doDigitization() -- there is no strip response on this VMM.");
735 continue;
736 }
737
739 //
740 // VMM Simulation
741 //
742
743 // Combine all strips (for this VMM) into a single VMM-level object
744 //
745 MM_ElectronicsToolInput stripDigitOutputAllHits = combinedStripResponseAllHits(v_stripDigitOutput);
746 if (!m_idHelperSvc->isMM(stripDigitOutputAllHits.digitID())) {
747 ATH_MSG_WARNING("Identifier from stripdigitOutputAllHits "
748 << m_idHelperSvc->toString(stripDigitOutputAllHits.digitID())
749 << " is not a MM Identifier, skipping");
750 continue;
751 }
752
753 // Create Electronics Output with peak finding setting
754 //
755
756 MM_DigitToolOutput electronicsOutputForReadout {m_vmmReadoutMode == "peak"
757 ? m_ElectronicsResponseSimulation->getPeakResponseFrom(stripDigitOutputAllHits)
758 : m_ElectronicsResponseSimulation->getThresholdResponseFrom(stripDigitOutputAllHits)};
759 if (!electronicsOutputForReadout.isValid()) {
760 ATH_MSG_DEBUG("MM_DigitizationTool::doDigitization() -- "<<
761 " there is no electronics response (peak finding mode) even though there is a strip response.");
762 }
763
764
765 for (unsigned int firedCh = 0; firedCh < electronicsOutputForReadout.stripPos().size(); ++firedCh) {
766
767 const int channel = electronicsOutputForReadout.stripPos()[firedCh];
768 float time = electronicsOutputForReadout.stripTime()[firedCh];
769 float charge = electronicsOutputForReadout.stripCharge()[firedCh];
770 bool isValid{false};
771 const Identifier digitID = idHelper.channelID(stripDigitOutputAllHits.digitID(),
772 idHelper.multilayer(stripDigitOutputAllHits.digitID()),
773 idHelper.gasGap(stripDigitOutputAllHits.digitID()),
774 channel, isValid);
775 if (!isValid) {
776 ATH_MSG_DEBUG("Ghost strip fired... Ghost busters... ");
777 continue;
778 }
779 bool acceptStrip = true;
780 if (m_doSmearing) {
782 ATH_CHECK(m_smearingTool->smearTimeAndCharge(digitID, time, charge, acceptStrip, rndmEngine));
783
784 }
785 if (!acceptStrip) {
786 ATH_MSG_DEBUG("Exaggeated with smearing "<<m_idHelperSvc->toString(digitID));
787 continue;
788 }
789 std::unique_ptr<MmDigit> newDigit = std::make_unique<MmDigit>(digitID, time, charge);
790
791 const IdentifierHash moduleHash = m_idHelperSvc->moduleHash(digitID);
792 if (moduleHash >= collections.size()) {
793 collections.resize(moduleHash+1);
794 }
795 MmDigitCollection* coll = collections[moduleHash].get();
796 if (!coll) {
797 collections[moduleHash] = std::make_unique<MmDigitCollection>(m_idHelperSvc->chamberId(digitID), moduleHash);
798 coll = collections[moduleHash].get();
799 }
800 coll->push_back(std::move(newDigit));
801 }
802 v_stripDigitOutput.clear();
803 }
804
805 for (size_t coll_hash = 0; coll_hash < collections.size(); ++coll_hash) {
806 if (collections[coll_hash]) {
807 ATH_CHECK( digitContainer->addCollection (collections[coll_hash].release(), coll_hash) );
808 }
809 }
810
811 ATH_MSG_DEBUG("MM_Digitization Done!");
812
814
815 return StatusCode::SUCCESS;
816}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
double charge(const T &p)
Definition AtlasPID.h:997
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 getInitializedCache(MagField::AtlasFieldCache &cache) const
get B field cache for evaluation as a function of 2-d or 3-d position.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const std::vector< float > & stripCharge() const
const std::vector< float > & stripTime() const
const std::vector< int > & stripPos() const
MM_ElectronicsToolInput combinedStripResponseAllHits(const std::vector< MM_ElectronicsToolInput > &v_stripDigitOutput)
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, const EventContext &ctx) const
SG::WriteHandleKey< MuonSimDataCollection > m_outputSDO_CollectionKey
std::unique_ptr< TimedHitCollection< MMSimHit > > m_timedHitCollection_MM
std::unique_ptr< MM_ElectronicsResponseSimulation > m_ElectronicsResponseSimulation
std::unique_ptr< MM_StripsResponseSimulation > m_StripsResponseSimulation
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
const Identifier & digitID() const
const std::vector< std::vector< float > > & chipCharge() const
const std::vector< int > & NumberOfStripsPos() const
const std::vector< std::vector< float > > & chipTime() const
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,...
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
int gasGap(const Identifier &id) const override
get the hashes
Identifier parentID(const Identifier &id) const
int multilayer(const Identifier &id) const
int numberOfMissingTopStrips(const Identifier &layerId) const
Number of missing bottom and top strips (not read out)
const std::array< int, 4 > & getReadoutSide() const
virtual int numberOfStrips(const Identifier &layerId) const override final
number of strips per layer
bool insideActiveBounds(const Identifier &id, const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const
boundary check Wrapper Trk::PlaneSurface::insideBounds() taking into account the passivated width
int numberOfMissingBottomStrips(const Identifier &layerId) const
virtual int stripNumber(const Amg::Vector2D &pos, const Identifier &id) const override final
strip number corresponding to local position.
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
std::pair< HepMcParticleLink, MuonMCData > Deposit
Definition MuonSimData.h:66
TimedVector::const_iterator const_iterator
unsigned short eventId() const
the index of the component event in PileUpEventInfo.
Definition TimedHitPtr.h:47
float eventTime() const
t0 offset of the bunch xing containing the hit in ns.
Definition TimedHitPtr.h:55
double angleXZ() const
access method for angle of local XZ projection
double angleYZ() const
access method for angle of local YZ projection
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
constexpr bool simData
Definition constants.h:36
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
time(flags, cells_name, *args, **kw)
const std::string & stName(StIndex index)
convert StIndex into a string
bool center(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the center on the strip.
double channelWidth() const
calculate local channel width
double distanceToChannel(const Amg::Vector2D &pos, int nChannel) const
distance to channel - residual
int channelNumber(const Amg::Vector2D &pos) const
calculate local channel number, range 1=nstrips like identifiers. Returns -1 if out of range

◆ filterPassed()

virtual bool PileUpToolBase::filterPassed ( ) const
inlineoverridevirtualinherited

dummy implementation of passing filter

Definition at line 49 of file PileUpToolBase.h.

49{ return m_filterPassed; }

◆ getNextEvent()

StatusCode MM_DigitizationTool::getNextEvent ( const EventContext & ctx)
private

Record MmDigitContainer and MuonSimDataCollection.

Definition at line 326 of file MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx.

326 {
327 // Get next event and extract collection of hit collections:
328 // This is applicable to non-PileUp Event...
329
330 ATH_MSG_DEBUG("MM_DigitizationTool::getNextEvent()");
331
332 // get the container(s)
334
335 // In case of single hits container just load the collection using read handles
337 SG::ReadHandle<MMSimHitCollection> hitCollection(m_hitsContainerKey, ctx);
338 if (!hitCollection.isValid()) {
339 ATH_MSG_ERROR("Could not get MMSimHitCollection container " << hitCollection.name() << " from store " << hitCollection.store());
340 return StatusCode::FAILURE;
341 }
342
343 // create a new hits collection
344 m_timedHitCollection_MM = std::make_unique<TimedHitCollection<MMSimHit>>(1);
345 m_timedHitCollection_MM->insert(0, hitCollection.cptr());
346 ATH_MSG_DEBUG("MMSimHitCollection found with " << hitCollection->size() << " hits");
347 return StatusCode::SUCCESS;
348 }
349
350 // this is a list<info<time_t, DataLink<MMSimHitCollection> > >
351 TimedHitCollList hitCollList;
352
353 ATH_CHECK(m_mergeSvc->retrieveSubEvtsData(m_inputObjectName, hitCollList));
354 if (hitCollList.empty()) {
355 ATH_MSG_ERROR("TimedHitCollList has size 0");
356 return StatusCode::FAILURE;
357 } else {
358 ATH_MSG_DEBUG(hitCollList.size() << " MicroMegas SimHitCollections with key " << m_inputObjectName << " found");
359 }
360
361 // create a new hits collection - Define Hit Collection
362 if (m_timedHitCollection_MM == nullptr) {
363 m_timedHitCollection_MM = std::make_unique<TimedHitCollection<MMSimHit>>();
364 } else {
365 ATH_MSG_ERROR("m_timedHitCollection_MM is not null");
366 return StatusCode::FAILURE;
367 }
368
369 // now merge all collections into one
370 TimedHitCollList::iterator iColl(hitCollList.begin());
371 TimedHitCollList::iterator endColl(hitCollList.end());
372
373 // loop on the hit collections
374 while (iColl != endColl) {
375 const MMSimHitCollection* tmpColl(iColl->second);
376 m_timedHitCollection_MM->insert(iColl->first, tmpColl);
377 ATH_MSG_DEBUG("MMSimHitCollection found with " << tmpColl->size() << " hits");
378 ++iColl;
379 }
380 return StatusCode::SUCCESS;
381}
AtlasHitsVector< MMSimHit > MMSimHitCollection
std::list< value_t > type
type of the collection of timed data object

◆ getRandomEngine()

CLHEP::HepRandomEngine * MM_DigitizationTool::getRandomEngine ( const std::string & streamName,
const EventContext & ctx ) const
private

Definition at line 897 of file MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx.

897 {
898 ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, streamName);
899 rngWrapper->setSeed(streamName, ctx);
900 return rngWrapper->getEngine(ctx);
901}
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition RNGWrapper.h:169
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition RNGWrapper.h:134

◆ initialize()

StatusCode MM_DigitizationTool::initialize ( )
finaloverridevirtual

Initialize.

Small wedges first eta station

Small wedges second eta station

Large wedges first eta station

Large wedges first eta station

Reimplemented from PileUpToolBase.

Definition at line 71 of file MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx.

71 {
72 ATH_MSG_DEBUG("MM_DigitizationTool:: in initialize()");
73
74 ATH_CHECK(m_rndmSvc.retrieve());
75
76 // Initialize transient detector store and MuonGeoModel OR MuonDetDescrManager
77 ATH_CHECK(m_DetectorManagerKey.initialize());
78 ATH_CHECK(m_idHelperSvc.retrieve());
79
80 if (m_hitsContainerKey.key().empty()) {
81 ATH_MSG_FATAL("Property InputObjectName not set !");
82 return StatusCode::FAILURE;
83 }
84
86 ATH_MSG_DEBUG("Input objects in container: '" << m_inputObjectName << "'");
87
88 // Pile-up merge service
89 if (m_onlyUseContainerName) { ATH_CHECK(m_mergeSvc.retrieve()); }
90
91 // Initialize ReadHandleKey
92 ATH_CHECK(m_hitsContainerKey.initialize());
93
94 // Initialize the output WriteHandleKeys
97 ATH_MSG_DEBUG("Output Digits: '" << m_outputDigitCollectionKey.key() << "'");
98
100 ATH_CHECK(m_fieldCondObjInputKey.initialize());
101 ATH_CHECK(m_calibrationTool.retrieve());
102
103 // simulation identifier helper
105
106 // get gas properties from calibration tool
107 const NSWCalib::MicroMegaGas prop = m_calibrationTool->mmGasProperties();
108 const float peakTime = m_calibrationTool->mmPeakTime();
109
110 MM_StripsResponseSimulation::ConfigModule strip_cfg{};
111 strip_cfg.NSWCalib::MicroMegaGas::operator=(prop);
113 strip_cfg.qThreshold = m_qThreshold;
114 strip_cfg.driftGapWidth = m_driftGapWidth;
115 strip_cfg.crossTalk1 = m_crossTalk1;
116 strip_cfg.crossTalk2 = m_crossTalk2;
117 strip_cfg.avalancheGain = m_avalancheGain;
118 m_StripsResponseSimulation = std::make_unique<MM_StripsResponseSimulation>(std::move(strip_cfg));
119
120
121 m_timeWindowLowerOffset += peakTime; // account for peak time in time window
122 m_timeWindowUpperOffset += peakTime; // account for peak time in time window
123
124 MM_ElectronicsResponseSimulation::ConfigModule elec_sim_cfg{};
125 elec_sim_cfg.peakTime = peakTime;
128 elec_sim_cfg.vmmDeadtime = m_vmmDeadtime;
130 elec_sim_cfg.stripDeadTime = m_stripdeadtime;
131 elec_sim_cfg.artDeadTime = m_ARTdeadtime;
133 // ElectronicsResponseSimulation Creation
134 m_ElectronicsResponseSimulation = std::make_unique<MM_ElectronicsResponseSimulation>(std::move(elec_sim_cfg));
135
136 // Configuring various VMM modes of signal readout
137 //
138 std::string vmmReadoutMode = m_vmmReadoutMode;
139 // convert vmmReadoutMode to lower case
140 std::for_each(vmmReadoutMode.begin(), vmmReadoutMode.end(), [](char& c) { c = ::tolower(c); });
141 if (vmmReadoutMode.find("peak") != std::string::npos)
142 m_vmmReadoutMode = "peak";
143 else if (vmmReadoutMode.find("threshold") != std::string::npos)
144 m_vmmReadoutMode = "threshold";
145 else {
146 ATH_MSG_ERROR("MM_DigitizationTool can't interperet vmmReadoutMode option! (Should be 'peak' or 'threshold'.) Contains: "
148 return StatusCode::FAILURE;
149 }
150 std::string vmmARTMode = m_vmmARTMode;
151 // convert vmmARTMode to lower case
152 std::for_each(vmmARTMode.begin(), vmmARTMode.end(), [](char& c) { c = ::tolower(c); });
153 if (vmmARTMode.find("peak") != std::string::npos)
154 m_vmmARTMode = "peak";
155 else if (vmmARTMode.find("threshold") != std::string::npos)
156 m_vmmARTMode = "threshold";
157 else
159 "MM_DigitizationTool can't interperet vmmARTMode option! (Should be 'peak' or 'threshold'.) Contains: " << m_vmmARTMode);
160
161 if (m_doSmearing) ATH_MSG_INFO("Running in smeared mode!");
162
163 // get shortest and longest strip length for threshold scaling
164 Identifier tmpId{0}; // temporary identifier to work with ReadoutElement
165 const MuonGM::MuonDetectorManager* muonGeoMgr{nullptr};
166 ATH_CHECK(detStore()->retrieve(muonGeoMgr));
167 int stripNumberShortestStrip{-1}, stripNumberLongestStrip{-1};
168 Identifier tmpIdShortestStrip{0},tmpIdLongestStrip{0};
169 float shortestStripLength{FLT_MAX}, longestStripLength{0};
170
171 //============================
172 //SMALL SECTORS - ETA 1 CHAMBERS
173 // identifier for first gas gap in a small MM sector, layer is eta layer
174 tmpId = m_idHelperSvc->mmIdHelper().channelID("MMS", 1, 1, 1, 1, 1);
175 const MuonGM::MMReadoutElement* detectorReadoutElement = muonGeoMgr->getMMReadoutElement(tmpId);
176 stripNumberShortestStrip = (detectorReadoutElement->getDesign(tmpId))->nMissedBottomEta + 1;
177 tmpIdShortestStrip = m_idHelperSvc->mmIdHelper().channelID("MMS", 1, 1, 1, 1, stripNumberShortestStrip); // identifier for the shortest strip
178 shortestStripLength = detectorReadoutElement->stripLength(tmpIdShortestStrip);
179
180 stripNumberLongestStrip = (detectorReadoutElement->getDesign(tmpId))->totalStrips - (detectorReadoutElement->getDesign(tmpId))->nMissedTopEta;
181 tmpIdLongestStrip = m_idHelperSvc->mmIdHelper().channelID("MMS", 1, 1, 1, 1, stripNumberLongestStrip); // identifier for the longest strip
182 longestStripLength = detectorReadoutElement->stripLength(tmpIdLongestStrip);
183
184 // now get the slope and intercept for the threshold scaling
185 // function is m_noiseSlope * stripLength + m_noiseIntercept
187 NoiseCalibConstants& noise_smallEta1 = m_noiseParams[m_idHelperSvc->stationName(tmpId)];
188 noise_smallEta1.slope = (maxNoiseSmall_eta1 - minNoiseSmall_eta1) / (longestStripLength - shortestStripLength);
189 noise_smallEta1.intercept = minNoiseSmall_eta1 - noise_smallEta1.slope* shortestStripLength;
190 //============================
191
192 //============================
193 //SMALL SECTORS - ETA 2 CHAMBERS
194 // identifier for first gas gap in a small MM sector, layer is eta layer
195 tmpId = m_idHelperSvc->mmIdHelper().channelID("MMS", 2, 1, 1, 1, 1);
196 detectorReadoutElement = muonGeoMgr->getMMReadoutElement(tmpId);
197 stripNumberShortestStrip = (detectorReadoutElement->getDesign(tmpId))->nMissedBottomEta + 1;
198 tmpIdShortestStrip = m_idHelperSvc->mmIdHelper().channelID("MMS", 2, 1, 1, 1, stripNumberShortestStrip); // identifier for the shortest strip
199 shortestStripLength = detectorReadoutElement->stripLength(tmpIdShortestStrip);
200
201 stripNumberLongestStrip = (detectorReadoutElement->getDesign(tmpId))->totalStrips - (detectorReadoutElement->getDesign(tmpId))->nMissedTopEta;
202 tmpIdLongestStrip = m_idHelperSvc->mmIdHelper().channelID("MMS", 2, 1, 1, 1, stripNumberLongestStrip); // identifier for the longest strip
203 longestStripLength = detectorReadoutElement->stripLength(tmpIdLongestStrip);
204
205 // now get the slope and intercept for the threshold scaling
206 // function is m_noiseSlope * stripLength + m_noiseIntercept
208 NoiseCalibConstants& noise_smallEta2 = m_noiseParams[m_idHelperSvc->stationName(tmpId)*2];
209 noise_smallEta2.slope = (maxNoiseSmall_eta2 - minNoiseSmall_eta2) / (longestStripLength - shortestStripLength);
210 noise_smallEta2.intercept = minNoiseSmall_eta2 - noise_smallEta2.slope * shortestStripLength;
211 //============================
212
213 //============================
214 //LARGE SECTORS - ETA 1 CHAMBERS
215 // identifier for first gas gap in a small MM sector, layer is eta layer
216 tmpId = m_idHelperSvc->mmIdHelper().channelID("MML", 1, 1, 1, 1, 1);
217 detectorReadoutElement = muonGeoMgr->getMMReadoutElement(tmpId);
218 stripNumberShortestStrip = (detectorReadoutElement->getDesign(tmpId))->nMissedBottomEta + 1;
219 tmpIdShortestStrip = m_idHelperSvc->mmIdHelper().channelID("MML", 1, 1, 1, 1, stripNumberShortestStrip); // identifier for the shortest strip
220 shortestStripLength = detectorReadoutElement->stripLength(tmpIdShortestStrip);
221
222 stripNumberLongestStrip = (detectorReadoutElement->getDesign(tmpId))->totalStrips - (detectorReadoutElement->getDesign(tmpId))->nMissedTopEta;
223 tmpIdLongestStrip = m_idHelperSvc->mmIdHelper().channelID("MML", 1, 1, 1, 1, stripNumberLongestStrip); // identifier for the longest strip
224 longestStripLength = detectorReadoutElement->stripLength(tmpIdLongestStrip);
225
226 // now get the slope and intercept for the threshold scaling
227 // function is m_noiseSlope * stripLength + m_noiseIntercept
229 NoiseCalibConstants& noise_largeEta1 = m_noiseParams[m_idHelperSvc->stationName(tmpId)];
230 noise_largeEta1.slope = (maxNoiseLarge_eta1 - minNoiseLarge_eta1) / (longestStripLength - shortestStripLength);
231 noise_largeEta1.intercept = minNoiseLarge_eta1 - noise_largeEta1.slope * shortestStripLength;
232 //============================
233
234 //============================
235 //LARGE SECTORS - ETA 2 CHAMBERS
236 // identifier for first gas gap in a small MM sector, layer is eta layer
237 tmpId = m_idHelperSvc->mmIdHelper().channelID("MML", 2, 1, 1, 1, 1);
238 detectorReadoutElement = muonGeoMgr->getMMReadoutElement(tmpId);
239 stripNumberShortestStrip = (detectorReadoutElement->getDesign(tmpId))->nMissedBottomEta + 1;
240 tmpIdShortestStrip = m_idHelperSvc->mmIdHelper().channelID("MML", 2, 1, 1, 1, stripNumberShortestStrip); // identifier for the shortest strip
241 shortestStripLength = detectorReadoutElement->stripLength(tmpIdShortestStrip);
242
243 stripNumberLongestStrip = (detectorReadoutElement->getDesign(tmpId))->totalStrips - (detectorReadoutElement->getDesign(tmpId))->nMissedTopEta;
244 tmpIdLongestStrip = m_idHelperSvc->mmIdHelper().channelID("MML", 2, 1, 1, 1, stripNumberLongestStrip); // identifier for the longest strip
245 longestStripLength = detectorReadoutElement->stripLength(tmpIdLongestStrip);
246
247 // now get the slope and intercept for the threshold scaling
248 // function is m_noiseSlope * stripLength + m_noiseIntercept
250 NoiseCalibConstants& noise_largeEta2 = m_noiseParams[m_idHelperSvc->stationName(tmpId)*2];
251 noise_largeEta2.slope = (maxNoiseLarge_eta2 - minNoiseLarge_eta2) / (longestStripLength - shortestStripLength);
252 noise_largeEta2.intercept = minNoiseLarge_eta2 - noise_largeEta2.slope * shortestStripLength;
253 //============================
254
255 ATH_MSG_DEBUG("Configuration MM_DigitizationTool ");
256 ATH_MSG_INFO("RndmSvc " << m_rndmSvc);
257 ATH_MSG_INFO("RndmEngine " << m_rndmEngineName);
258 ATH_MSG_DEBUG("InputObjectName " << m_inputObjectName);
259 ATH_MSG_DEBUG("OutputObjectName " << m_outputDigitCollectionKey.key());
260 ATH_MSG_DEBUG("OutputSDOName " << m_outputSDO_CollectionKey.key());
261 ATH_MSG_DEBUG("UseTimeWindow " << m_useTimeWindow);
262 ATH_MSG_DEBUG("CheckSimHits " << m_checkMMSimHits);
263 ATH_MSG_DEBUG("Threshold " << m_qThreshold);
264 ATH_MSG_DEBUG("TransverseDiffusSigma " << m_StripsResponseSimulation->getTransversDiffusionSigma());
265 ATH_MSG_DEBUG("LogitundinalDiffusSigma" << m_StripsResponseSimulation->getLongitudinalDiffusionSigma());
266 ATH_MSG_DEBUG("Interaction density mean: " << m_StripsResponseSimulation->getInteractionDensityMean());
267 ATH_MSG_DEBUG("Interaction density sigma: " << m_StripsResponseSimulation->getInteractionDensitySigma());
268 ATH_MSG_DEBUG("DriftVelocity stripResponse: " << m_StripsResponseSimulation->getDriftVelocity());
269 ATH_MSG_DEBUG("crossTalk1 " << m_crossTalk1);
270 ATH_MSG_DEBUG("crossTalk2 " << m_crossTalk2);
271 ATH_MSG_DEBUG("EnergyThreshold " << m_energyThreshold);
272
273 return StatusCode::SUCCESS;
274}
#define ATH_MSG_INFO(x)
static const MicromegasHitIdHelper * GetHelper()
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
float crossTalk2
// crosstalk of second neighbor strips, it's 6%
float qThreshold
qThreshold=2e, we accept a good strip if the charge is >=2e
float crossTalk1
crosstalk of neighbor strips, it's 15%

◆ mergeEvent()

StatusCode MM_DigitizationTool::mergeEvent ( const EventContext & ctx)
finaloverride

When being run from PileUpToolsAlgs, this method is called at the end of the subevts loop.

Not (necessarily) able to access SubEvents

Definition at line 383 of file MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx.

383 {
384 ATH_MSG_VERBOSE("MM_DigitizationTool::in mergeEvent()");
385
387
388 // reset the pointer
390
391 // clear cloned list
392 m_MMHitCollList.clear();
393 return StatusCode::SUCCESS;
394}
#define ATH_MSG_VERBOSE(x)
std::list< std::unique_ptr< MMSimHitCollection > > m_MMHitCollList

◆ prepareEvent()

StatusCode MM_DigitizationTool::prepareEvent ( const EventContext & ctx,
const unsigned int nInputEvents )
finaloverride

When being run from PileUpToolsAlgs, this method is called at the start of the subevts loop.

Not able to access SubEvents

Definition at line 279 of file MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx.

279 {
280 ATH_MSG_DEBUG("MM_DigitizationTool::prepareEvent() called for " << nInputEvents << " input events");
281
282 m_MMHitCollList.clear();
283
285 m_timedHitCollection_MM = std::make_unique<TimedHitCollection<MMSimHit>>();
286 } else {
287 ATH_MSG_ERROR("m_timedHitCollection_MM is not null");
288 return StatusCode::FAILURE;
289 }
290
291 return StatusCode::SUCCESS;
292}

◆ processAllSubEvents()

StatusCode MM_DigitizationTool::processAllSubEvents ( const EventContext & ctx)
overridevirtual

When being run from MM_Digitizer, this method is called during the event loop.

alternative interface which uses the PileUpMergeSvc to obtain all the required SubEvents.

Reimplemented from PileUpToolBase.

Definition at line 398 of file MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx.

398 {
399 ATH_MSG_DEBUG("MM_DigitizationTool::processAllSubEvents()");
400
401 // merging of the hit collection in getNextEvent method
402
404
406
407 // reset the pointer
409 return StatusCode::SUCCESS;
410}
StatusCode getNextEvent(const EventContext &ctx)
Record MmDigitContainer and MuonSimDataCollection.

◆ processBunchXing()

StatusCode MM_DigitizationTool::processBunchXing ( int bunchXing,
SubEventIterator bSubEvents,
SubEventIterator eSubEvents )
finaloverridevirtual

When being run from PileUpToolsAlgs, this method is called for each active bunch-crossing to process current SubEvents bunchXing is in ns.

Reimplemented from PileUpToolBase.

Definition at line 294 of file MuonDigitization/MM_Digitization/src/MM_DigitizationTool.cxx.

294 {
295 ATH_MSG_DEBUG("MM_DigitizationTool::in processBunchXing()" << bunchXing);
296
298 TimedHitCollList hitCollList;
299
300 if (!(m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing, bSubEvents, eSubEvents).isSuccess()) &&
301 hitCollList.empty()) {
302 ATH_MSG_ERROR("Could not fill TimedHitCollList");
303 return StatusCode::FAILURE;
304 } else {
305 ATH_MSG_VERBOSE(hitCollList.size() << " MMSimHitCollection with key " << m_inputObjectName << " found");
306 }
307
308 TimedHitCollList::iterator iColl(hitCollList.begin());
309 TimedHitCollList::iterator endColl(hitCollList.end());
310
311 // Iterating over the list of collections
312 for (; iColl != endColl; ++iColl) {
313 auto hitCollPtr = std::make_unique<MMSimHitCollection>(*iColl->second);
314 PileUpTimeEventIndex timeIndex(iColl->first);
315
316 ATH_MSG_DEBUG("MMSimHitCollection found with " << hitCollPtr->size() << " hits");
317 ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time() << " index: " << timeIndex.index() << " type: " << timeIndex.type());
318
319 m_timedHitCollection_MM->insert(timeIndex, hitCollPtr.get());
320 m_MMHitCollList.push_back(std::move(hitCollPtr));
321 }
322 return StatusCode::SUCCESS;
323}

◆ resetFilter()

virtual void PileUpToolBase::resetFilter ( )
inlineoverridevirtualinherited

dummy implementation of filter reset

Reimplemented in MergeTruthJetsTool.

Definition at line 51 of file PileUpToolBase.h.

51{ m_filterPassed=true; }

◆ toProcess()

virtual bool PileUpToolBase::toProcess ( int bunchXing) const
inlineoverridevirtualinherited

the method this base class helps implementing

Reimplemented in MergeHijingParsTool, and MergeTrackRecordCollTool.

Definition at line 32 of file PileUpToolBase.h.

32 {
33 //closed interval [m_firstXing,m_lastXing]
34 return !((m_firstXing > bunchXing) || (bunchXing > m_lastXing));
35 }
Gaudi::Property< int > m_firstXing
Gaudi::Property< int > m_lastXing

Member Data Documentation

◆ m_ARTdeadtime

Gaudi::Property<float> MM_DigitizationTool::m_ARTdeadtime {this, "ARTDeadTime", 200, "dead-time for ART, default value 200 ns = 8 BCs"}
private

Definition at line 166 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

166{this, "ARTDeadTime", 200, "dead-time for ART, default value 200 ns = 8 BCs"};

◆ m_avalancheGain

Gaudi::Property<float> MM_DigitizationTool::m_avalancheGain {this, "AvalancheGain", 6.0e3, "avalanche Gain for rach gas mixture"}
private

Definition at line 160 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

160{this, "AvalancheGain", 6.0e3, "avalanche Gain for rach gas mixture"};

◆ m_calibrationTool

ToolHandle<Muon::INSWCalibTool> MM_DigitizationTool::m_calibrationTool {this, "CalibrationTool", "Muon::NSWCalibTool/NSWCalibTool"}
private

Definition at line 118 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

118{this, "CalibrationTool", "Muon::NSWCalibTool/NSWCalibTool"};

◆ m_checkMMSimHits

Gaudi::Property<bool> MM_DigitizationTool::m_checkMMSimHits {this, "CheckSimHits", true, "Control on the hit validity"}
private

Definition at line 144 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

144{this, "CheckSimHits", true, "Control on the hit validity"};

◆ m_condThrshldsKey

SG::ReadCondHandleKey<NswCalibDbThresholdData> MM_DigitizationTool::m_condThrshldsKey
private
Initial value:
{
this, "CondThrshldsKey", "NswCalibDbThresholdData",
"Key of NswCalibDbThresholdData object containing calibration data (VMM thresholds)"}

Definition at line 121 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

121 {
122 this, "CondThrshldsKey", "NswCalibDbThresholdData",
123 "Key of NswCalibDbThresholdData object containing calibration data (VMM thresholds)"};

◆ m_crossTalk1

Gaudi::Property<float> MM_DigitizationTool::m_crossTalk1 {this, "crossTalk1", 0.3, "Strip Cross Talk with Nearest Neighbor"}
private

Definition at line 157 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

157{this, "crossTalk1", 0.3, "Strip Cross Talk with Nearest Neighbor"};

◆ m_crossTalk2

Gaudi::Property<float> MM_DigitizationTool::m_crossTalk2 {this, "crossTalk2", 0.09, "Strip Cross Talk with 2nd Nearest Neighbor"}
private

Definition at line 158 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

158{this, "crossTalk2", 0.09, "Strip Cross Talk with 2nd Nearest Neighbor"};

◆ m_DetectorManagerKey

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> MM_DigitizationTool::m_DetectorManagerKey
private
Initial value:
{this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}

Definition at line 190 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

190 {this, "DetectorManagerKey", "MuonDetectorManager",
191 "Key of input MuonDetectorManager condition data"};

◆ m_DiffMagSecondMuonHit

Gaudi::Property<double> MM_DigitizationTool::m_DiffMagSecondMuonHit {this, "DiffMagSecondMuonHit", 0.1}
private

Definition at line 138 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

138{this, "DiffMagSecondMuonHit", 0.1};

◆ m_doSmearing

Gaudi::Property<bool> MM_DigitizationTool::m_doSmearing
private
Initial value:
{this, "doSmearing", true,
"set the usage or not of the smearing tool for realistic detector performance"}

Definition at line 147 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

147 {this, "doSmearing", true,
148 "set the usage or not of the smearing tool for realistic detector performance"};

◆ m_driftGapWidth

Gaudi::Property<float> MM_DigitizationTool::m_driftGapWidth {this, "DriftGapWidth", 5.04, "Drift Gap Width of 5.04 mm"}
private

Definition at line 156 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

156{this, "DriftGapWidth", 5.04, "Drift Gap Width of 5.04 mm"};

◆ m_ElectronicsResponseSimulation

std::unique_ptr<MM_ElectronicsResponseSimulation> MM_DigitizationTool::m_ElectronicsResponseSimulation {}
private

◆ m_electronicsThreshold

Gaudi::Property<float> MM_DigitizationTool::m_electronicsThreshold
private
Initial value:
{this, "electronicsThreshold", 15000,
"threshold Voltage for histoBNL, 2*(Intrinsic noise ~3k e)"}

Definition at line 163 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

163 {this, "electronicsThreshold", 15000,
164 "threshold Voltage for histoBNL, 2*(Intrinsic noise ~3k e)"};

◆ m_energyThreshold

Gaudi::Property<double> MM_DigitizationTool::m_energyThreshold {this, "EnergyThreshold", 50, "Minimal energy to produce a PRD"}
private

Definition at line 133 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

133{this, "EnergyThreshold", 50, "Minimal energy to produce a PRD"};

◆ m_fieldCondObjInputKey

SG::ReadCondHandleKey<AtlasFieldCacheCondObj> MM_DigitizationTool::m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj"}
private

Definition at line 120 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

120{this, "AtlasFieldCacheCondObj", "fieldCondObj"};

◆ m_filterPassed

bool PileUpToolBase::m_filterPassed {true}
protectedinherited

Definition at line 60 of file PileUpToolBase.h.

60{true};

◆ 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.

54 {this, "FirstXing", -999,
55 "First bunch-crossing in which det is live"};

◆ m_hitsContainerKey

SG::ReadHandleKey<MMSimHitCollection> MM_DigitizationTool::m_hitsContainerKey {this, "InputObjectName", "MM_Hits", "name of the input objects"}
private

Definition at line 127 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

127{this, "InputObjectName", "MM_Hits", "name of the input objects"};

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> MM_DigitizationTool::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 116 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

116{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_inputObjectName

std::string MM_DigitizationTool::m_inputObjectName {""}
private

◆ 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.

56 {this, "LastXing", 999,
57 "Last bunch-crossing in which det is live"};

◆ m_maskMultiplet

Gaudi::Property<int> MM_DigitizationTool::m_maskMultiplet {this, "MaskMultiplet", 0, "0: all, 1: first, 2: second, 3: both"}
private

Definition at line 140 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

140{this, "MaskMultiplet", 0, "0: all, 1: first, 2: second, 3: both"};

◆ m_mergeSvc

ServiceHandle<PileUpMergeSvc> MM_DigitizationTool::m_mergeSvc {this, "PileUpMergeSvc", "PileUpMergeSvc", "Merge service used in digitization"}
private

Definition at line 173 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

173{this, "PileUpMergeSvc", "PileUpMergeSvc", "Merge service used in digitization"};

◆ m_MMHitCollList

std::list<std::unique_ptr<MMSimHitCollection> > MM_DigitizationTool::m_MMHitCollList {}
private

◆ m_muonHelper

const MicromegasHitIdHelper* MM_DigitizationTool::m_muonHelper {nullptr}
private

Definition at line 189 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

189{nullptr}; // not owned

◆ m_needsMcEventCollHelper

Gaudi::Property<bool> MM_DigitizationTool::m_needsMcEventCollHelper {this, "UseMcEventCollectionHelper", false}
private

Definition at line 143 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

143{this, "UseMcEventCollectionHelper", false};

◆ m_noiseParams

std::map<int, NoiseCalibConstants> MM_DigitizationTool::m_noiseParams {}
private

Define a map to cache the noise parameters individually Key: stationName * std::abs(stationEta)

Definition at line 201 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

201{};

◆ m_onlyUseContainerName

Gaudi::Property<bool> MM_DigitizationTool::m_onlyUseContainerName
private
Initial value:
{this, "OnlyUseContainerName", true,
"Don't use the ReadHandleKey directly. Just extract the container name from it."}

Definition at line 125 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

125 {this, "OnlyUseContainerName", true,
126 "Don't use the ReadHandleKey directly. Just extract the container name from it."};

◆ m_outputDigitCollectionKey

SG::WriteHandleKey<MmDigitContainer> MM_DigitizationTool::m_outputDigitCollectionKey
private
Initial value:
{
this, "OutputObjectName", "MM_DIGITS", "WriteHandleKey for Output MmigitContainer"}

Definition at line 168 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

168 {
169 this, "OutputObjectName", "MM_DIGITS", "WriteHandleKey for Output MmigitContainer"}; // name of the output digits

◆ m_outputSDO_CollectionKey

SG::WriteHandleKey<MuonSimDataCollection> MM_DigitizationTool::m_outputSDO_CollectionKey
private
Initial value:
{
this, "OutputSDOName", "MM_SDO", "WriteHandleKey for Output MuonSimDataCollection"}

Definition at line 170 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

170 {
171 this, "OutputSDOName", "MM_SDO", "WriteHandleKey for Output MuonSimDataCollection"}; // name of the output SDOs

◆ m_qThreshold

Gaudi::Property<float> MM_DigitizationTool::m_qThreshold {this, "qThreshold", 0.001, "Charge Threshold"}
private

Definition at line 155 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

155{this, "qThreshold", 0.001, "Charge Threshold"};

◆ m_rndmEngineName

Gaudi::Property<std::string> MM_DigitizationTool::m_rndmEngineName {this, "RndmEngine", "MuonDigitization", "Random engine name"}
private

Definition at line 114 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

114{this, "RndmEngine", "MuonDigitization", "Random engine name"};

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> MM_DigitizationTool::m_rndmSvc {this, "RndmSvc", "AthRNGSvc", "Random Number Service used in Muon digitization"}
private

Definition at line 113 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

113{this, "RndmSvc", "AthRNGSvc", "Random Number Service used in Muon digitization"};

◆ m_smearingTool

ToolHandle<Muon::INSWCalibSmearingTool> MM_DigitizationTool::m_smearingTool {this, "SmearingTool", "Muon::NSWCalibSmearingTool/MMCalibSmearingTool"}
private

Definition at line 117 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

117{this, "SmearingTool", "Muon::NSWCalibSmearingTool/MMCalibSmearingTool"};

◆ m_stripdeadtime

Gaudi::Property<float> MM_DigitizationTool::m_stripdeadtime {this, "StripDeadTime", 200, "dead-time for strip, default value 200 ns = 8 BCs"}
private

Definition at line 165 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

165{this, "StripDeadTime", 200, "dead-time for strip, default value 200 ns = 8 BCs"};

◆ m_StripsResponseSimulation

std::unique_ptr<MM_StripsResponseSimulation> MM_DigitizationTool::m_StripsResponseSimulation {}
private

◆ m_thresholdScaleFactor

Gaudi::Property<float> MM_DigitizationTool::m_thresholdScaleFactor
private
Initial value:
{this, "thresholdScaleFactor", 7.0,
"Use x times the strip length dependent noise as MM threshold"}

Definition at line 179 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

179 {this, "thresholdScaleFactor", 7.0,
180 "Use x times the strip length dependent noise as MM threshold"};

◆ m_timedHitCollection_MM

std::unique_ptr<TimedHitCollection<MMSimHit> > MM_DigitizationTool::m_timedHitCollection_MM {}
private

Definition at line 194 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

194{}; // the pileup hits

◆ m_timeWindowLowerOffset

Gaudi::Property<double> MM_DigitizationTool::m_timeWindowLowerOffset
private
Initial value:
{this, "WindowLowerOffset", -12.5,
"lower boundary of the time window in which digits are accepted"}

Definition at line 134 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

134 {this, "WindowLowerOffset", -12.5,
135 "lower boundary of the time window in which digits are accepted"};

◆ m_timeWindowUpperOffset

Gaudi::Property<double> MM_DigitizationTool::m_timeWindowUpperOffset
private
Initial value:
{this, "WindowUpperOffset", 187.5,
"upper boundary of the time window in which digits are accepted"}

Definition at line 136 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

136 {this, "WindowUpperOffset", 187.5,
137 "upper boundary of the time window in which digits are accepted"};

◆ m_useCondThresholds

Gaudi::Property<bool> MM_DigitizationTool::m_useCondThresholds
private
Initial value:
{this, "useCondThresholds", false,
"Use conditions data to get thresholds, overrules useThresholdScaling"}

Definition at line 175 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

175 {this, "useCondThresholds", false,
176 "Use conditions data to get thresholds, overrules useThresholdScaling"};

◆ m_useThresholdScaling

Gaudi::Property<bool> MM_DigitizationTool::m_useThresholdScaling
private
Initial value:
{this, "useThresholdScaling", true,
"Use a strip length dependent threshold in MM digitiation"}

Definition at line 177 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

177 {this, "useThresholdScaling", true,
178 "Use a strip length dependent threshold in MM digitiation"};

◆ m_useTimeWindow

Gaudi::Property<bool> MM_DigitizationTool::m_useTimeWindow {this, "UseTimeWindow", true}
private

Definition at line 145 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

145{this, "UseTimeWindow", true};

◆ 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.

58 {this, "VetoPileUpTruthLinks", true,
59 "Ignore links to suppressed pile-up truth"};

◆ m_vmmARTMode

Gaudi::Property<std::string> MM_DigitizationTool::m_vmmARTMode {this, "vmmARTMode", "threshold", "For ART (trigger) path. Can be peak or threshold"}
private

Definition at line 131 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

131{this, "vmmARTMode", "threshold", "For ART (trigger) path. Can be peak or threshold"};

◆ m_vmmDeadtime

Gaudi::Property<float> MM_DigitizationTool::m_vmmDeadtime
private
Initial value:
{
this, "vmmDeadtime", 200, "Specifies how much before the lower time limit the VMM simulation should start evaluating the signal"}

Definition at line 181 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

181 {
182 this, "vmmDeadtime", 200, "Specifies how much before the lower time limit the VMM simulation should start evaluating the signal"};

◆ m_vmmNeighborLogic

Gaudi::Property<bool> MM_DigitizationTool::m_vmmNeighborLogic {this, "VMMNeighborLogic", false}
private

Definition at line 146 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

146{this, "VMMNeighborLogic", false};

◆ m_vmmReadoutMode

Gaudi::Property<std::string> MM_DigitizationTool::m_vmmReadoutMode {this, "vmmReadoutMode", "peak", "For readout (DAQ) path. Can be peak or threshold"}
private

Definition at line 130 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

130{this, "vmmReadoutMode", "peak", "For readout (DAQ) path. Can be peak or threshold"};

◆ m_vmmUpperGrazeWindow

Gaudi::Property<float> MM_DigitizationTool::m_vmmUpperGrazeWindow
private
Initial value:
{
this, "vmmUpperGrazeWindow", 150, "Specifies how much above the upper time window boundary the VMM sim evaluates the signal."}

Definition at line 185 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

185 {
186 this, "vmmUpperGrazeWindow", 150, "Specifies how much above the upper time window boundary the VMM sim evaluates the signal."};

◆ m_writeOutputFile

Gaudi::Property<bool> MM_DigitizationTool::m_writeOutputFile {this, "SaveInternalHistos", false}
private

Definition at line 142 of file MuonDigitization/MM_Digitization/MM_Digitization/MM_DigitizationTool.h.

142{this, "SaveInternalHistos", false};

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