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

#include <MuonCluster.h>

Inheritance diagram for MuonCluster:
Collaboration diagram for MuonCluster:

Classes

struct  lvl1_muclu_roi

Public Member Functions

 MuonCluster (const std::string &name, ISvcLocator *svc)
 Constructor.
 ~MuonCluster ()
virtual StatusCode initialize () override
 hltInitialize()
virtual StatusCode execute (const EventContext &ctx) const override
 hltExecute(), main code of the algorithm
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Public Attributes

SG::ReadHandleKey< TrigRoiDescriptorCollectionm_roiCollectionKey
SG::WriteHandleKey< xAOD::TrigCompositeContainerm_outputCompositesKey
SG::WriteHandleKey< TrigRoiDescriptorCollectionm_outputRoiDescriptorKey
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainerm_muRoiClusEtaKey
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainerm_muRoiClusPhiKey
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainerm_muRoiClusNRoiKey

Protected Member Functions

float DeltaR (lvl1_muclu_roi, lvl1_muclu_roi) const
 calculcate the deltaR between two Rois
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

Gaudi::Property< float > m_DeltaR {this, "DeltaR", 0.4, "radius of the muon cluster"}
 A property which specifies the radius of the cluster.
Gaudi::Property< std::string > m_featureLabel {"MuonCluLabel", "MuonClusterInput", "label for the MuonCluster feature in the HLT Navigation, for the xAOD::TrigCompositeContainer"}

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< GenericMonitoringToolm_monTool {this,"MonTool","","Monitoring Tool"}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ MuonCluster()

MuonCluster::MuonCluster ( const std::string & name,
ISvcLocator * svc )

Constructor.

Definition at line 36 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.cxx.

37 : AthReentrantAlgorithm(name, svc){
38
39}

◆ ~MuonCluster()

MuonCluster::~MuonCluster ( )

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ DeltaR()

float MuonCluster::DeltaR ( lvl1_muclu_roi p_roi,
lvl1_muclu_roi q_roi ) const
protected

calculcate the deltaR between two Rois

Definition at line 291 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.cxx.

291 {
292
293 float delPhi = CxxUtils::wrapToPi((p_roi).phi-(q_roi).phi);
294 float delEta = (p_roi).eta-(q_roi).eta;
295
296 return(sqrt(delPhi*delPhi+delEta*delEta));
297}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
Definition phihelper.h:24

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode MuonCluster::execute ( const EventContext & ctx) const
overridevirtual

hltExecute(), main code of the algorithm

Definition at line 66 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.cxx.

67{
68 ATH_MSG_DEBUG("MuonCluster::execute()");
69
70 std::vector<double> RoiEta_mon;
71 std::vector<double> RoiPhi_mon;
72 std::vector<double> RoiZed_mon;
73
74 auto CluEta = Monitored::Scalar<double>("CluEta", -99.);
75 auto CluPhi = Monitored::Scalar<double>("CluPhi", -99.);
76 auto CluNum = Monitored::Scalar<int>("NumRoi", 0);
77
78 auto nL1RoIs = Monitored::Scalar<int>("nL1RoIs",-99);
79 auto nRoIinClusters = Monitored::Scalar<int>("nRoIinClusters",-99);
80 auto nClusters = Monitored::Scalar<int>("nClusters",-99);
81
82 auto dPhi_cluSeed = Monitored::Scalar<float>("dPhiCluSeed", -99.);
83 auto dEta_cluSeed = Monitored::Scalar<float>("dEtaCluSeed", -99.);
84 auto dR_cluSeed = Monitored::Scalar<float>("dRCluSeed", -99.);
85
86 auto dPhi_RoivecSeed = Monitored::Scalar<double>("dPhiRoiVecSeed", -99.);
87 auto dEta_RoivecSeed = Monitored::Scalar<double>("dEtaRoiVecSeed", -99.);
88 auto dR_RoivecSeed = Monitored::Scalar<double>("dRRoiVecSeed", -99.);
89
90 auto mon_roiEta = Monitored::Collection("RoiEta", RoiEta_mon);
91 auto mon_roiPhi = Monitored::Collection("RoiPhi", RoiPhi_mon);
92
93 auto t1 = Monitored::Timer("TIME_TrigAlg");
94 auto t2 = Monitored::Timer("TIME_TrigAlg_Clustering");
95
96 auto mon = Monitored::Group(m_monTool, mon_roiEta, mon_roiPhi,
97 CluEta, CluPhi, CluNum,
98 nL1RoIs, nRoIinClusters, nClusters,
99 dPhi_cluSeed, dR_cluSeed, dEta_cluSeed,
100 t1, t2);
101
102 //Setup the composite container we will put the MuonRoICluster in
103 auto trigCompColl = SG::makeHandle(m_outputCompositesKey, ctx);
104 ATH_CHECK(
105 trigCompColl.record(std::make_unique<xAOD::TrigCompositeContainer>(),std::make_unique<xAOD::TrigCompositeAuxContainer>())
106 );
107
108 //Setup Decorator Handlers
109 SG::WriteDecorHandle<xAOD::TrigCompositeContainer, float> muRoiClusEta(m_muRoiClusEtaKey, ctx);
110 SG::WriteDecorHandle<xAOD::TrigCompositeContainer, float> muRoiClusPhi(m_muRoiClusPhiKey, ctx);
111 SG::WriteDecorHandle<xAOD::TrigCompositeContainer, int> muRoiClusNRoi(m_muRoiClusNRoiKey, ctx);
112
113 //Setup the RoI Descriptor container we will put the MuonRoIDescriptors in
114 SG::WriteHandle<TrigRoiDescriptorCollection> trigDescColl = TrigCompositeUtils::createAndStoreNoAux(m_outputRoiDescriptorKey, ctx);
115
116 //check to make sure we have all the input trigger elements!
117
118 int n_cl=0;
119 lvl1_muclu_roi muonClu[20] = {{0,0,0}};
120 lvl1_muclu_roi muonClu0[20] = {{0,0,0}};
121
122 auto roiCollectionHdl = SG::makeHandle(m_roiCollectionKey, ctx);
123 auto roiCollection = roiCollectionHdl.get();
124
125 if (roiCollection->size() < 2){ //should be the L1 Muon RoI container
126 ATH_MSG_WARNING("Input TrigRoiDescriptorCollection isn't the correct size! Potential L1 menu inconsistency. Got " << roiCollection->size() << " RoIs");
127 return StatusCode::SUCCESS;
128 }
129
130 nL1RoIs = roiCollection->size();
131 nRoIinClusters = 0;
132 for (const TrigRoiDescriptor *roi : *roiCollection)
133 {
134 if(n_cl>= kMAX_ROI) {
135 ATH_MSG_WARNING("Too many L1 Muon RoIs: bailing out");
136 break;
137 }
138
139 RoiEta_mon.push_back(roi->eta());
140 RoiPhi_mon.push_back(roi->phi());
141 lvl1_muclu_roi my_lvl1_clu_roi;
142 my_lvl1_clu_roi.eta = roi->eta();
143 my_lvl1_clu_roi.phi = roi->phi();
144 my_lvl1_clu_roi.nroi = 0;
145 muonClu[n_cl] = my_lvl1_clu_roi;
146 muonClu0[n_cl] = my_lvl1_clu_roi;
147 ++n_cl;
148 }
149
150 if (msgLvl(MSG::DEBUG)) {
151 ATH_MSG_DEBUG("Accumulated " << n_cl << " ROI Directions: ");
152 ATH_MSG_DEBUG(" [eta, phi]");
153 for (int unsigned i=0;i<RoiEta_mon.size();i++) {
154 ATH_MSG_DEBUG(" [" << RoiEta_mon.at(i) << "," << RoiPhi_mon.at(i) << "]");
155 }
156 }
157
158 // start the clustering
159
160 t2.start();
161 int n_itr = 0;
162 for(int i_cl=0; i_cl<n_cl; ++i_cl) { // loop on cluster
163 ATH_MSG_DEBUG("Initial RoI Coordinates: eta = " << muonClu0[i_cl].eta << ", phi = " << muonClu0[i_cl].phi);
164 bool improvement = true;
165 n_itr = 0;
166 while(improvement){
167 ++n_itr;
168 double eta_avg=0.0;
169 double cosPhi_avg=0.0;
170 double sinPhi_avg=0.0;
171 int n_in_clu = 0;
172 for (int j_cl=0; j_cl<n_cl; ++j_cl) { // loop on cluster
173 float deltaR = DeltaR(muonClu0[j_cl],muonClu[i_cl]);
174 if(deltaR<m_DeltaR){
175 ATH_MSG_DEBUG(" Adding Following RoI: eta = " << muonClu0[j_cl].eta << ", phi = " << muonClu0[j_cl].phi);
176 ++n_in_clu;
177 if(n_itr==1){
178 muonClu[i_cl].eta = muonClu[i_cl].eta + (muonClu0[j_cl].eta-muonClu[i_cl].eta)/n_in_clu;
179 muonClu[i_cl].phi = CxxUtils::wrapToPi(muonClu[i_cl].phi + CxxUtils::wrapToPi(muonClu0[j_cl].phi-muonClu[i_cl].phi)/n_in_clu);
180 } else{
181 //to recalculate the average with all RoIs within a dR = 0.4 cone of the seed position
182 eta_avg += muonClu0[j_cl].eta;
183 cosPhi_avg += cos(muonClu0[j_cl].phi);
184 sinPhi_avg += sin(muonClu0[j_cl].phi);
185 }
186 } // End of if on deltaR<m_DeltaR
187
188 } // End of for loop over j_cl
189
190 if(n_itr > 1){
191 //set cluster position as average position of RoIs
192 //This, coupled with the improvement=true/false below, makes an assumption that
193 //improvement = false means same # RoIs in cluster, but never less (code had this before, too)
194 muonClu[i_cl].eta = eta_avg/n_in_clu;
195 muonClu[i_cl].phi = atan2(sinPhi_avg,cosPhi_avg);
196 }
197
198 //find the number of ROIs in the new cluster
199 //if the number is the same as before,
200 Int_t n_in_clu2=0;
201 for (int j_cl=0; j_cl<n_cl; ++j_cl) { // loop on cluster
202 float deltaR = DeltaR(muonClu0[j_cl],muonClu[i_cl]);
203 if(deltaR<m_DeltaR){
204 ++n_in_clu2;
205 }
206 }
207
208 ATH_MSG_DEBUG("Finding the number of Muon RoIs in the new Cluster.... " << n_in_clu2);
209 if(n_in_clu2>muonClu[i_cl].nroi){
210 muonClu[i_cl].nroi=n_in_clu2;
211 improvement = true;
212 } else improvement = false;
213 }//end while
214 }
215 t2.stop(); // Stop Clustering Timer
216
217 ATH_MSG_DEBUG("Total Improvement Iterations = " << n_itr);
218
219
220 // find the cluster with max number of rois
221 int ncl_max = 0;
222 int sel_cl = -1;
223 int nRoisInClu = 0;
224 for(int i_cl=0; i_cl<n_cl; ++i_cl) { // loop on cluster
225 nRoisInClu += muonClu[i_cl].nroi;
226 if(muonClu[i_cl].nroi>ncl_max){
227 CluEta = muonClu[i_cl].eta;
228 CluPhi = muonClu[i_cl].phi;
229 CluNum = muonClu[i_cl].nroi;
230 ncl_max = muonClu[i_cl].nroi;
231 sel_cl = i_cl;
232 ATH_MSG_DEBUG(" -- ncl_max loop: i_cl = " << i_cl << " with ncl_max = " << ncl_max);
233 }
234 }
235 nRoIinClusters = nRoisInClu;
236 nClusters = n_cl;
237
238 // Should never happen (we checked above that roiCollection->size() >=2),
239 // but otherwise we get warnings from cppcheck.
240 if (sel_cl < 0) {
241 return StatusCode::FAILURE;
242 }
243
244 dPhi_cluSeed = CxxUtils::wrapToPi(muonClu0[sel_cl].phi)-CxxUtils::wrapToPi(muonClu[sel_cl].phi);
245 dEta_cluSeed = muonClu0[sel_cl].eta-muonClu[sel_cl].eta;
246 dR_cluSeed = DeltaR(muonClu0[sel_cl],muonClu[sel_cl]);
247
248 ATH_MSG_DEBUG("RoI Cluster Coordinates: eta = " << CluEta << ", phi = " << CluPhi << ", nRoI = " << CluNum);
249 ATH_MSG_DEBUG("Found the Cluster with the maximum number of RoIs.... " << ncl_max);
250 // finished now debugging
251 ATH_MSG_DEBUG("Create an output Collection seeded by the input");
252
254 try{
255 trigCompColl->push_back(compClu); //add muon RoI clusters to the composite container
256 }catch(const std::exception& e){
257 ATH_MSG_ERROR("Write of MuonRoICluster TrigCompositeContainer object into trigCompColl failed!");
258 ATH_MSG_ERROR("Error Message: " << e.what());
259 return StatusCode::FAILURE;
260 }
261
262
263 compClu->setName("Cluster");
264 muRoiClusEta(*compClu) = static_cast<float>(CluEta);
265 muRoiClusPhi(*compClu) = static_cast<float>(CluPhi);
266 muRoiClusNRoi(*compClu) = static_cast<int>(CluNum);
267
268
269 //create a TrigRoiDescriptor to send to ID tracking, to seed track-finding
270 //only need to do this if the MuonCluster will pass the hypo!
271 if( (static_cast<int>(CluNum) >= 3 && std::abs(static_cast<double>(CluEta)) < 1.0) || \
272 (static_cast<int>(CluNum) >= 4 && std::abs(static_cast<double>(CluEta)) >= 1.0 && std::abs(static_cast<double>(CluEta)) <= 2.5) )
273 {
274 double phiHalfWidth = 0.35;
275 double phiMinus = CxxUtils::wrapToPi(static_cast<double>(CluPhi)-phiHalfWidth);
276 double phiPlus = CxxUtils::wrapToPi(static_cast<double>(CluPhi)+phiHalfWidth);
277 TrigRoiDescriptor* roiClus = new TrigRoiDescriptor(static_cast<double>(CluEta), static_cast<double>(CluEta)-0.4, static_cast<double>(CluEta)+0.4,static_cast<double>(CluPhi), phiMinus, phiPlus);
278 trigDescColl->push_back(roiClus);
279 }
280
281 //----------------------------------------------------------------
282 // REGTEST
283 //----------------------------------------------------------------
284 ATH_MSG_DEBUG(" REGTEST \t Cluster with : " << static_cast<int>(CluNum) << " LVL1-Roi");
285 ATH_MSG_DEBUG(" REGTEST \t Cluster Eta " << static_cast<double>(CluEta) << " Cluster Phi " << static_cast<double>(CluPhi));
286 //----------------------------------------------------------------
287
288 return StatusCode::SUCCESS;
289}
Scalar deltaR(const MatrixBase< Derived > &vec) const
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
Athena::TPCnvVers::Current TrigRoiDescriptor
bool msgLvl(const MSG::Level lvl) const
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_muRoiClusEtaKey
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_outputCompositesKey
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_muRoiClusNRoiKey
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
float DeltaR(lvl1_muclu_roi, lvl1_muclu_roi) const
calculcate the deltaR between two Rois
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_muRoiClusPhiKey
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_outputRoiDescriptorKey
Gaudi::Property< float > m_DeltaR
A property which specifies the radius of the cluster.
void setName(const std::string &name)
Set a human-readable name for the object.
std::vector< ALFA_RawDataContainer_p1 > t2
std::vector< ALFA_RawDataCollection_p1 > t1
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
SG::WriteHandle< CONT > createAndStoreNoAux(const SG::WriteHandleKey< CONT > &key, const EventContext &ctx)
Creates and right away records the Container CONT with the key.
TrigComposite_v1 TrigComposite
Declare the latest version of the class.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode MuonCluster::initialize ( )
overridevirtual

hltInitialize()

Definition at line 44 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.cxx.

44 {
45
46 ATH_MSG_INFO("Parameters for MuonCluster:" << name());
47 ATH_MSG_INFO("DeltaR : " << m_DeltaR);
48 ATH_MSG_INFO("MuonCluLabel : " << m_featureLabel);
49
50 ATH_MSG_DEBUG("Retrieve service StoreGateSvc");
51 ATH_MSG_DEBUG("Timers are initializated here");
52
53 ATH_CHECK( m_roiCollectionKey.initialize() );
54 ATH_CHECK( m_outputCompositesKey.initialize() );
55 ATH_CHECK( m_outputRoiDescriptorKey.initialize() );
56
57 ATH_CHECK( m_muRoiClusEtaKey.initialize() );
58 ATH_CHECK( m_muRoiClusPhiKey.initialize() );
59 ATH_CHECK( m_muRoiClusNRoiKey.initialize() );
60
61 if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
62
63 return StatusCode::SUCCESS;
64}
#define ATH_MSG_INFO(x)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_DeltaR

Gaudi::Property<float> MuonCluster::m_DeltaR {this, "DeltaR", 0.4, "radius of the muon cluster"}
protected

A property which specifies the radius of the cluster.

Definition at line 103 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

103{this, "DeltaR", 0.4, "radius of the muon cluster"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_featureLabel

Gaudi::Property<std::string> MuonCluster::m_featureLabel {"MuonCluLabel", "MuonClusterInput", "label for the MuonCluster feature in the HLT Navigation, for the xAOD::TrigCompositeContainer"}
protected

Definition at line 104 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

104{"MuonCluLabel", "MuonClusterInput", "label for the MuonCluster feature in the HLT Navigation, for the xAOD::TrigCompositeContainer"};

◆ m_monTool

ToolHandle<GenericMonitoringTool> MuonCluster::m_monTool {this,"MonTool","","Monitoring Tool"}
private

Definition at line 91 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

91{this,"MonTool","","Monitoring Tool"};

◆ m_muRoiClusEtaKey

SG::WriteDecorHandleKey<xAOD::TrigCompositeContainer> MuonCluster::m_muRoiClusEtaKey
Initial value:
{ this,
"MuonRoiClusterEta",
"HLT_MuRoICluster_Composites.ClusterEta",
"Average Eta of the muon RoI Cluster"}

Definition at line 68 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

68 { this,
69 "MuonRoiClusterEta",
70 "HLT_MuRoICluster_Composites.ClusterEta",
71 "Average Eta of the muon RoI Cluster"};

◆ m_muRoiClusNRoiKey

SG::WriteDecorHandleKey<xAOD::TrigCompositeContainer> MuonCluster::m_muRoiClusNRoiKey
Initial value:
{ this,
"MuonRoiClusterNRoIs",
"HLT_MuRoICluster_Composites.nRoIs",
"Number of muon RoIs used to construct this muon RoI cluster"}

Definition at line 78 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

78 { this,
79 "MuonRoiClusterNRoIs",
80 "HLT_MuRoICluster_Composites.nRoIs",
81 "Number of muon RoIs used to construct this muon RoI cluster"};

◆ m_muRoiClusPhiKey

SG::WriteDecorHandleKey<xAOD::TrigCompositeContainer> MuonCluster::m_muRoiClusPhiKey
Initial value:
{ this,
"MuonRoiClusterPhi",
"HLT_MuRoICluster_Composites.ClusterPhi",
"Average Phi of the muonRoI Cluster"}

Definition at line 73 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

73 { this,
74 "MuonRoiClusterPhi",
75 "HLT_MuRoICluster_Composites.ClusterPhi",
76 "Average Phi of the muonRoI Cluster"};

◆ m_outputCompositesKey

SG::WriteHandleKey<xAOD::TrigCompositeContainer> MuonCluster::m_outputCompositesKey
Initial value:
{ this,
"TrigRoIs_CompositeContainer",
"HLT_MuRoICluster_Composites",
"output Composites container"}

Definition at line 58 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

58 { this,
59 "TrigRoIs_CompositeContainer", // property name
60 "HLT_MuRoICluster_Composites", // default value of StoreGatekey
61 "output Composites container"};

◆ m_outputRoiDescriptorKey

SG::WriteHandleKey<TrigRoiDescriptorCollection> MuonCluster::m_outputRoiDescriptorKey
Initial value:
{ this,
"TrigRoiDescriptorDataVector",
"HLT_MuRoICluster_Descriptors",
"output RoI Descriptor container with descriptor for cluster with maximum number of RoIs. For ID."}

Definition at line 63 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

63 { this,
64 "TrigRoiDescriptorDataVector",
65 "HLT_MuRoICluster_Descriptors",
66 "output RoI Descriptor container with descriptor for cluster with maximum number of RoIs. For ID."};

◆ m_roiCollectionKey

SG::ReadHandleKey<TrigRoiDescriptorCollection> MuonCluster::m_roiCollectionKey
Initial value:
{ this,
"RoIs",
"HLT_muVtxCluster_RoIs",
"input RoICollection"}

Definition at line 53 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

53 { this,
54 "RoIs", // property name
55 "HLT_muVtxCluster_RoIs", // default value of StoreGatekey
56 "input RoICollection"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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