ATLAS Offline Software
Loading...
Searching...
No Matches
MMTriggerTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MMTRIGGERTOOL_H
6#define MMTRIGGERTOOL_H
7
8//basic includes
10#include "GaudiKernel/ConcurrencyFlags.h"
12#include "Gaudi/Property.h"
13#include "GaudiKernel/ITHistSvc.h"
15
16//local includes
18#include "MMLoadVariables.h"
19#include "MMT_Diamond.h"
20
25
26
27// namespace for the NSW LVL1 related classes
28namespace NSWL1 {
29
30 class MMTriggerTool : public extends<AthAlgTool, IMMTriggerTool> {
31
32 public:
33
34 MMTriggerTool(const std::string& type, const std::string& name, const IInterface* parent);
35 virtual ~MMTriggerTool() override = default;
36
37 virtual StatusCode initialize() override;
38 StatusCode attachBranches(MuonVal::MuonTesterTree &tree) override;
39 StatusCode runTrigger(const EventContext& ctx, Muon::NSW_TrigRawDataContainer* rdo, const bool do_MMDiamonds) const override;
40
41 private:
42 SG::ReadHandleKey<McEventCollection> m_keyMcEventCollection{this,"McEventCollection","TruthEvent","Location of TruthEvent"};
43 SG::ReadHandleKey<TrackRecordCollection> m_keyMuonEntryLayer{this,"MuonEntryLayer","MuonEntryLayer","Location of MuonEntryLayer"};
44 SG::ReadHandleKey<MmDigitContainer> m_keyMmDigitContainer{this,"MmDigitContainer","MM_DIGITS","Location of MmDigitContainer"};
45 SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_detectorManagerKey {this, "DetectorManagerKey", "MuonDetectorManager", "Key of MuonDetectorManager condition data"};
46 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
47
48 Gaudi::Property<bool> m_isMC {this, "IsMC", true, "This is MC"};
49 Gaudi::Property<bool> m_doTruth {this, "DoTruth", false, "Process truth information. Disabled by default"};
50
51 // Parameters for Diamond Road algorithms
52 Gaudi::Property<int> m_diamRoadSize {this, "DiamondRoadSize", 8, "Number of strips to create a road"};
53 Gaudi::Property<bool> m_uv {this, "DiamondUV", true, "Include Stereo planes for tracking"};
54 Gaudi::Property<int> m_diamXthreshold {this, "DiamondEtaThreshold", 3, "Number of Eta planes for coincidences"};
55 Gaudi::Property<int> m_diamUVthreshold {this, "DiamondStereoThreshold", 3, "Number of Stereo planes for coincidences"};
56 Gaudi::Property<int> m_diamOverlapEtaUp {this, "DiamondEtaUpOverlap", 4, "Number of Eta strips for upper road overlap"};
57 Gaudi::Property<int> m_diamOverlapEtaDown {this, "DiamondEtaDownOverlap", 0, "Number of Eta strips for lower road overlap"};
58 Gaudi::Property<int> m_diamOverlapStereoUp {this, "DiamondStereoUpOverlap", 4, "Number of Stereo strips for upper road overlap"};
59 Gaudi::Property<int> m_diamOverlapStereoDown{this, "DiamondStereoDownOverlap", 0, "Number of Stereo strips for lower road overlap"};
60
61 // Parameters for RDO encoding
62 Gaudi::Property<std::string> m_mmDigitContainer{this, "MM_DigitContainerName", "MM_DIGITS", "Name of the MM digit container"};
63 Gaudi::Property<bool> m_doNtuple {this, "DoNtuple", false, "Input the MMStrip branches into the analysis ntuple"};
64 Gaudi::Property<float> m_phiMin {this, "PhiMin", -16.*M_PI/180.0, "Minimum Phi"};
65 Gaudi::Property<float> m_phiMax {this, "PhiMax", 16.*M_PI/180.0, "Maximum Phi"};
66 Gaudi::Property<int> m_phiBits {this, "PhiBits", 6, "Number of Phi bits"};
67 Gaudi::Property<float> m_rMin {this, "RMin", 900.0, "Minimum R [mm]"};
68 Gaudi::Property<float> m_rMax {this, "RMax", 5000.0, "Maximum R [mm]"};
69 Gaudi::Property<int> m_rBits {this, "RBits", 8, "Number of R bits"};
70 Gaudi::Property<float> m_dThetaMin {this, "DThetaMin", -0.015, "Minimum dTheta [rad]"};
71 Gaudi::Property<float> m_dThetaMax {this, "DThetaMax", 0.015, "Maximum dTheta [rad]"};
72 Gaudi::Property<int> m_dThetaBits {this, "DThetaBits", 5, "Number of dTheta bits"};
73
74 std::unique_ptr<MMT_Diamond> m_diamond;
75
76 std::shared_ptr<MuonVal::VectorBranch<unsigned int> > m_trigger_diamond_ntrig ATLAS_THREAD_SAFE {};
77 std::shared_ptr<MuonVal::VectorBranch<int> > m_trigger_diamond_bc ATLAS_THREAD_SAFE {};
78 std::shared_ptr<MuonVal::VectorBranch<char> > m_trigger_diamond_sector ATLAS_THREAD_SAFE {};
79 std::shared_ptr<MuonVal::VectorBranch<int> > m_trigger_diamond_sectorPhi ATLAS_THREAD_SAFE {};
80 std::shared_ptr<MuonVal::VectorBranch<unsigned int> > m_trigger_diamond_totalCount ATLAS_THREAD_SAFE {};
81 std::shared_ptr<MuonVal::VectorBranch<unsigned int> > m_trigger_diamond_realCount ATLAS_THREAD_SAFE {};
82 std::shared_ptr<MuonVal::VectorBranch<int> > m_trigger_diamond_iX ATLAS_THREAD_SAFE {};
83 std::shared_ptr<MuonVal::VectorBranch<int> > m_trigger_diamond_iU ATLAS_THREAD_SAFE {};
84 std::shared_ptr<MuonVal::VectorBranch<int> > m_trigger_diamond_iV ATLAS_THREAD_SAFE {};
85 std::shared_ptr<MuonVal::VectorBranch<unsigned int> > m_trigger_diamond_XbkgCount ATLAS_THREAD_SAFE {};
86 std::shared_ptr<MuonVal::VectorBranch<unsigned int> > m_trigger_diamond_UVbkgCount ATLAS_THREAD_SAFE {};
87 std::shared_ptr<MuonVal::VectorBranch<unsigned int> > m_trigger_diamond_XmuonCount ATLAS_THREAD_SAFE {};
88 std::shared_ptr<MuonVal::VectorBranch<unsigned int> > m_trigger_diamond_UVmuonCount ATLAS_THREAD_SAFE {};
89 std::shared_ptr<MuonVal::VectorBranch<int> > m_trigger_diamond_age ATLAS_THREAD_SAFE {};
90 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_diamond_mx ATLAS_THREAD_SAFE {};
91 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_diamond_my ATLAS_THREAD_SAFE {};
92 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_diamond_Uavg ATLAS_THREAD_SAFE {};
93 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_diamond_Vavg ATLAS_THREAD_SAFE {};
94 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_diamond_mxl ATLAS_THREAD_SAFE {};
95 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_diamond_theta ATLAS_THREAD_SAFE {};
96 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_diamond_eta ATLAS_THREAD_SAFE {};
97 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_diamond_dtheta ATLAS_THREAD_SAFE {};
98 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_diamond_phi ATLAS_THREAD_SAFE {};
99 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_diamond_phiShf ATLAS_THREAD_SAFE {};
100 std::shared_ptr<MuonVal::VectorBranch<uint8_t> > m_trigger_diamond_TP_phi_id ATLAS_THREAD_SAFE {};
101 std::shared_ptr<MuonVal::VectorBranch<uint8_t> > m_trigger_diamond_TP_R_id ATLAS_THREAD_SAFE {};
102 std::shared_ptr<MuonVal::VectorBranch<uint8_t> > m_trigger_diamond_TP_dTheta_id ATLAS_THREAD_SAFE {};
103 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_RZslopes ATLAS_THREAD_SAFE {};
104 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_trueEtaRange ATLAS_THREAD_SAFE {};
105 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_truePtRange ATLAS_THREAD_SAFE {};
106 std::shared_ptr<MuonVal::VectorBranch<int> > m_trigger_VMM ATLAS_THREAD_SAFE {};
107 std::shared_ptr<MuonVal::VectorBranch<int> > m_trigger_plane ATLAS_THREAD_SAFE {};
108 std::shared_ptr<MuonVal::VectorBranch<int> > m_trigger_station ATLAS_THREAD_SAFE {};
109 std::shared_ptr<MuonVal::VectorBranch<int> > m_trigger_strip ATLAS_THREAD_SAFE {};
110 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_slope ATLAS_THREAD_SAFE {};
111 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_trueThe ATLAS_THREAD_SAFE {};
112 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_truePhi ATLAS_THREAD_SAFE {};
113 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_trueDth ATLAS_THREAD_SAFE {};
114 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_trueEtaEnt ATLAS_THREAD_SAFE {};
115 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_trueTheEnt ATLAS_THREAD_SAFE {};
116 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_truePhiEnt ATLAS_THREAD_SAFE {};
117 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_trueEtaPos ATLAS_THREAD_SAFE {};
118 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_trueThePos ATLAS_THREAD_SAFE {};
119 std::shared_ptr<MuonVal::VectorBranch<double> > m_trigger_truePhiPos ATLAS_THREAD_SAFE {};
120 }; // end of MMTriggerTool class
121} // namespace NSWL1
122#endif
#define M_PI
Define macros for attributes used to control the static checker.
MMTriggerTool(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< int > m_diamOverlapStereoDown
Gaudi::Property< float > m_rMax
Gaudi::Property< int > m_diamXthreshold
MMTriggerTool(const std::string &type, const std::string &name, const IInterface *parent)
Gaudi::Property< float > m_phiMax
Gaudi::Property< float > m_dThetaMax
Gaudi::Property< float > m_phiMin
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Property< int > m_diamUVthreshold
Gaudi::Property< int > m_rBits
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detectorManagerKey
virtual StatusCode initialize() override
virtual ~MMTriggerTool() override=default
Gaudi::Property< int > m_phiBits
std::shared_ptr< MuonVal::VectorBranch< unsigned int > > m_trigger_diamond_ntrig ATLAS_THREAD_SAFE
StatusCode attachBranches(MuonVal::MuonTesterTree &tree) override
std::unique_ptr< MMT_Diamond > m_diamond
Gaudi::Property< int > m_diamOverlapEtaUp
Gaudi::Property< bool > m_doNtuple
Gaudi::Property< int > m_dThetaBits
Gaudi::Property< float > m_rMin
Gaudi::Property< std::string > m_mmDigitContainer
Gaudi::Property< int > m_diamOverlapStereoUp
SG::ReadHandleKey< MmDigitContainer > m_keyMmDigitContainer
StatusCode runTrigger(const EventContext &ctx, Muon::NSW_TrigRawDataContainer *rdo, const bool do_MMDiamonds) const override
Gaudi::Property< float > m_dThetaMin
SG::ReadHandleKey< McEventCollection > m_keyMcEventCollection
Gaudi::Property< bool > m_uv
Gaudi::Property< bool > m_doTruth
SG::ReadHandleKey< TrackRecordCollection > m_keyMuonEntryLayer
Gaudi::Property< bool > m_isMC
Gaudi::Property< int > m_diamRoadSize
Gaudi::Property< int > m_diamOverlapEtaDown
Property holding a SG store/key/clid from which a ReadHandle is made.
PadEmulatorCoincidences.
TChain * tree