ATLAS Offline Software
MuonSegmentToCalibSegment.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCALIB_MUONSEGMENTTOCALIBSEGMENT_H
6 #define MUONCALIB_MUONSEGMENTTOCALIBSEGMENT_H
7 
9 #include "GaudiKernel/ServiceHandle.h"
10 #include "GaudiKernel/ToolHandle.h"
11 #include "MdtCalibSvc/MdtCalibrationTool.h"
20 
21 namespace Muon {
22  class MuonPatternCombination;
23 }
24 
25 namespace MuonCalib {
26 
34  public:
36  MuonSegmentToCalibSegment(const std::string& name, ISvcLocator* pSvcLocator);
37  virtual ~MuonSegmentToCalibSegment() = default;
38 
41 
44 
45  private:
46  template <class container_type>
47  StatusCode retrieveContainer(const EventContext& ctx, const SG::ReadHandleKey<container_type>& key,
48  const container_type*& container_ptr) const;
49 
50  StatusCode convertPatterns(const EventContext& ctx);
51 
53  StatusCode savePatterns(const EventContext& ctx, std::unique_ptr<MuonCalibPatternCollection> newPatterns) const;
54 
57  Identifier getChId(const Muon::MuonSegment& seg) const;
59 
60  unsigned int getQuality(const Muon::MuonSegment& seg) const;
61 
63  Gaudi::Property<bool> m_readSegments{this, "ReadSegments", false};
64  Gaudi::Property<bool> m_useCscSegments{this, "UseCscSegments", false};
65 
66  SG::ReadHandleKey<MuonSegmentCombinationCollection> m_CombSegKey{this, "CombiSegmentKey", "MooreSegmentCombinations"};
67 
68  SG::ReadHandleKey<MuonSegmentCombinationCollection> m_CscSegKey{this, "CscSegmentKey", "Csc4dSegmentCombinations"};
69 
70  SG::ReadHandleKeyArray<Trk::SegmentCollection> m_TrkSegKey{this, "SegmentLocations", {"MooreSegments", "ConvertedMBoySegments"}};
71 
72  Gaudi::Property<std::vector<int>> m_segment_authors{this, "SegmentAuthors", {3, 4}};
73  Gaudi::Property<bool> m_newImpactParameter{this, "NewImpactParameter", false};
74 
77  SG::WriteHandleKey<MuonCalibPatternCollection> m_patternKey{this, "PatternKey", "PatternsForCalibration"};
78 
80  SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_DetectorManagerKey{this, "DetectorManagerKey", "MuonDetectorManager",
81  "Key of input MuonDetectorManager condition data"};
82 
83  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
84 
86  ToolHandle<MdtCalibrationTool> m_calibrationTool{this, "CalibrationTool", "MdtCalibrationTool"};
87 
89  ToolHandle<Muon::IMuonPatternSegmentAssociationTool> m_assocTool{
90  this, "PatternSegmentAssociationTool", "Muon::MuonPatternSegmentAssociationTool/MuonPatternSegmentAssociationTool"};
91  ToolHandle<IIdToFixedIdTool> m_idToFixedIdTool{this, "IdToFixedIdTool", "MuonCalib::IdToFixedIdTool/MuonCalib_IdToFixedIdTool"};
92 
97  Gaudi::Property<int> m_updateForT0Shift{this, "UpdateForT0Shift", -1};
98  Gaudi::Property<bool> m_doTof{this, "DoTOF", true};
99  Gaudi::Property<bool> m_cosmics_tof{this, "DoCosmicsTof", false};
101  Gaudi::Property<int> m_maxStoredSegs{this, "MaxPossibleSegments", 1000};
102  };
103 
104 } // namespace MuonCalib
105 
106 #endif
MuonCalib::MuonSegmentToCalibSegment::m_calibrationTool
ToolHandle< MdtCalibrationTool > m_calibrationTool
pointer to MdtCalibSvc
Definition: MuonSegmentToCalibSegment.h:86
MuonCalib::MuonSegmentToCalibSegment::MuonSegmentToCalibSegment
MuonSegmentToCalibSegment(const std::string &name, ISvcLocator *pSvcLocator)
Algorithm constructor.
Definition: MuonSegmentToCalibSegment.cxx:29
MuonCalib::MuonSegmentToCalibSegment::m_newImpactParameter
Gaudi::Property< bool > m_newImpactParameter
Definition: MuonSegmentToCalibSegment.h:73
MuonCalib::MuonSegmentToCalibSegment::m_doTof
Gaudi::Property< bool > m_doTof
Definition: MuonSegmentToCalibSegment.h:98
MuonCalib::MuonSegmentToCalibSegment::m_idToFixedIdTool
ToolHandle< IIdToFixedIdTool > m_idToFixedIdTool
Definition: MuonSegmentToCalibSegment.h:91
MuonCalib::MuonSegmentToCalibSegment::m_segment_authors
Gaudi::Property< std::vector< int > > m_segment_authors
Definition: MuonSegmentToCalibSegment.h:72
MuonCalib::MuonCalibSegment
Definition: MuonCalibSegment.h:39
MuonCalib::MuonSegmentToCalibSegment::~MuonSegmentToCalibSegment
virtual ~MuonSegmentToCalibSegment()=default
MuonCalibPatternCollection.h
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
MuonCalib::MuonSegmentToCalibSegment::m_patternKey
SG::WriteHandleKey< MuonCalibPatternCollection > m_patternKey
pattern location
Definition: MuonSegmentToCalibSegment.h:77
IMuonPatternSegmentAssociationTool.h
AthAlgorithm.h
MuonCalib::MuonSegmentToCalibSegment::execute
StatusCode execute()
Algorithm execute, called once per event.
Definition: MuonSegmentToCalibSegment.cxx:63
MuonCalib::MuonSegmentToCalibSegment::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonSegmentToCalibSegment.h:83
MuonCalib::MuonSegmentToCalibSegment::getQuality
unsigned int getQuality(const Muon::MuonSegment &seg) const
Definition: MuonSegmentToCalibSegment.cxx:849
MuonCalib::MuonSegmentToCalibSegment::getChId
Identifier getChId(const Muon::MuonSegment &seg) const
Definition: MuonSegmentToCalibSegment.cxx:250
SG::WriteHandleKey< MuonCalibPatternCollection >
MuonCalib::MuonSegmentToCalibSegment::retrieveContainer
StatusCode retrieveContainer(const EventContext &ctx, const SG::ReadHandleKey< container_type > &key, const container_type *&container_ptr) const
Definition: MuonSegmentToCalibSegment.cxx:871
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MuonSegmentCombinationCollection.h
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::MuonSegmentToCalibSegment::getGlobalToStation
Amg::Transform3D getGlobalToStation(const Identifier &id, const MuonGM::MuonDetectorManager *MuonDetMgr) const
Definition: MuonSegmentToCalibSegment.cxx:271
AthAlgorithm
Definition: AthAlgorithm.h:47
MuonCalib::MuonSegmentToCalibSegment::savePatterns
StatusCode savePatterns(const EventContext &ctx, std::unique_ptr< MuonCalibPatternCollection > newPatterns) const
save global patterns to storegate
Definition: MuonSegmentToCalibSegment.cxx:69
dso-stats.pat
pat
Definition: dso-stats.py:39
MuonCalib::MuonSegmentToCalibSegment::m_cosmics_tof
Gaudi::Property< bool > m_cosmics_tof
Definition: MuonSegmentToCalibSegment.h:99
MuonCalib::MuonSegmentToCalibSegment::m_maxStoredSegs
Gaudi::Property< int > m_maxStoredSegs
maximum number of segments each algorithm can store in ntuple
Definition: MuonSegmentToCalibSegment.h:101
MuonCalib::MuonSegmentToCalibSegment::m_CscSegKey
SG::ReadHandleKey< MuonSegmentCombinationCollection > m_CscSegKey
Definition: MuonSegmentToCalibSegment.h:68
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MuonCalib::MuonSegmentToCalibSegment::m_updateForT0Shift
Gaudi::Property< int > m_updateForT0Shift
-1: Take infirmation from error-strategy 0: fitted t0 is not applied to drift times 1: fitted t0 is a...
Definition: MuonSegmentToCalibSegment.h:97
MuonDetectorManager.h
MuonCalib::MuonSegmentToCalibSegment
Definition: MuonSegmentToCalibSegment.h:33
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager >
MuonCalib::MuonSegmentToCalibSegment::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
MuonDetectorManager from the conditions store.
Definition: MuonSegmentToCalibSegment.h:80
MuonCalib::MuonSegmentToCalibSegment::m_useCscSegments
Gaudi::Property< bool > m_useCscSegments
Definition: MuonSegmentToCalibSegment.h:64
MuonCalib::MuonCalibPattern
Definition: MuonCalibPattern.h:42
MuonCalib::MuonSegmentToCalibSegment::initialize
StatusCode initialize()
Algorithm initialize.
Definition: MuonSegmentToCalibSegment.cxx:33
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:49
MuonCalib::MuonSegmentToCalibSegment::m_readSegments
Gaudi::Property< bool > m_readSegments
segment location
Definition: MuonSegmentToCalibSegment.h:63
MuonSegment.h
MuonCalib::MuonSegmentToCalibSegment::createMuonCalibPattern
MuonCalibPattern * createMuonCalibPattern(const Muon::MuonPatternCombination *pat) const
Definition: MuonSegmentToCalibSegment.cxx:789
MuonCalib::MuonSegmentToCalibSegment::m_TrkSegKey
SG::ReadHandleKeyArray< Trk::SegmentCollection > m_TrkSegKey
Definition: MuonSegmentToCalibSegment.h:70
Muon::MuonSegment
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
Muon::MuonPatternCombination
The MuonPatternCombination class provides the means to store the output of the initial global pattern...
Definition: MuonPatternCombination.h:29
MuonCalib::MuonSegmentToCalibSegment::m_CombSegKey
SG::ReadHandleKey< MuonSegmentCombinationCollection > m_CombSegKey
Definition: MuonSegmentToCalibSegment.h:66
MuonCalib::MuonSegmentToCalibSegment::convertPatterns
StatusCode convertPatterns(const EventContext &ctx)
Definition: MuonSegmentToCalibSegment.cxx:77
IMuonIdHelperSvc.h
SegmentCollection.h
MuonCalib::MuonSegmentToCalibSegment::createMuonCalibSegment
MuonCalibSegment * createMuonCalibSegment(const Muon::MuonSegment &seg, const MuonGM::MuonDetectorManager *MuonDetMgr) const
Definition: MuonSegmentToCalibSegment.cxx:305
IIdToFixedIdTool.h
ServiceHandle< Muon::IMuonIdHelperSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
MuonCalib::MuonSegmentToCalibSegment::m_assocTool
ToolHandle< Muon::IMuonPatternSegmentAssociationTool > m_assocTool
IdentifierTool initialization.
Definition: MuonSegmentToCalibSegment.h:89