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 40 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.cxx.

41 : AthReentrantAlgorithm(name, svc){
42
43}

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

62{
63 return 0;
64}

◆ 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 299 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.cxx.

299 {
300
301 float delPhi = CxxUtils::wrapToPi((p_roi).phi-(q_roi).phi);
302 float delEta = (p_roi).eta-(q_roi).eta;
303
304 return(std::sqrt(delPhi*delPhi+delEta*delEta));
305}
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 70 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.cxx.

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

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

88{
89 // If we didn't find any symlinks to add, just return the collection
90 // from the base class. Otherwise, return the extended collection.
91 if (!m_extendedExtraObjects.empty()) {
93 }
95}
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 48 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.cxx.

48 {
49
50 ATH_MSG_INFO("Parameters for MuonCluster:" << name());
51 ATH_MSG_INFO("DeltaR : " << m_DeltaR);
52 ATH_MSG_INFO("MuonCluLabel : " << m_featureLabel);
53
54 ATH_MSG_DEBUG("Retrieve service StoreGateSvc");
55 ATH_MSG_DEBUG("Timers are initializated here");
56
57 ATH_CHECK( m_roiCollectionKey.initialize() );
58 ATH_CHECK( m_outputCompositesKey.initialize() );
59 ATH_CHECK( m_outputRoiDescriptorKey.initialize() );
60
61 ATH_CHECK( m_muRoiClusEtaKey.initialize() );
62 ATH_CHECK( m_muRoiClusPhiKey.initialize() );
63 ATH_CHECK( m_muRoiClusNRoiKey.initialize() );
64
65 if (!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
66
67 return StatusCode::SUCCESS;
68}
#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.

75{
76 return BaseAlg::sysExecute (ctx);
77}

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

105 {
107
108 if (sc.isFailure()) {
109 return sc;
110 }
111
112 ServiceHandle<ICondSvc> cs("CondSvc",name());
113 for (auto h : outputHandles()) {
114 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
115 // do this inside the loop so we don't create the CondSvc until needed
116 if ( cs.retrieve().isFailure() ) {
117 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
118 return StatusCode::SUCCESS;
119 }
120 if (cs->regHandle(this,*h).isFailure()) {
122 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
123 << " with CondSvc");
124 }
125 }
126 }
127 return sc;
128}
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 91 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

91{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 92 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

92{"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 79 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

79{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 56 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

56 { this,
57 "MuonRoiClusterEta",
58 "HLT_MuRoICluster_Composites.ClusterEta",
59 "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 66 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

66 { this,
67 "MuonRoiClusterNRoIs",
68 "HLT_MuRoICluster_Composites.nRoIs",
69 "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 61 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

61 { this,
62 "MuonRoiClusterPhi",
63 "HLT_MuRoICluster_Composites.ClusterPhi",
64 "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 46 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

46 { this,
47 "TrigRoIs_CompositeContainer", // property name
48 "HLT_MuRoICluster_Composites", // default value of StoreGatekey
49 "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 51 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

51 { this,
52 "TrigRoiDescriptorDataVector",
53 "HLT_MuRoICluster_Descriptors",
54 "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 41 of file Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h.

41 { this,
42 "RoIs", // property name
43 "HLT_muVtxCluster_RoIs", // default value of StoreGatekey
44 "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: