Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <MuonCluster.h>
|
| MuonCluster (const std::string &name, ISvcLocator *svc) |
| Constructor. More...
|
|
| ~MuonCluster () |
|
virtual StatusCode | initialize () override |
| hltInitialize() More...
|
|
virtual StatusCode | execute (const EventContext &ctx) const override |
| hltExecute(), main code of the algorithm More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
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 . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
◆ StoreGateSvc_t
◆ MuonCluster()
MuonCluster::MuonCluster |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svc |
|
) |
| |
◆ ~MuonCluster()
MuonCluster::~MuonCluster |
( |
| ) |
|
◆ cardinality()
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ DeltaR()
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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.
70 std::vector<double> RoiEta_mon;
71 std::vector<double> RoiPhi_mon;
72 std::vector<double> RoiZed_mon;
97 CluEta, CluPhi, CluNum,
98 nL1RoIs, nRoIinClusters, nClusters,
99 dPhi_cluSeed, dR_cluSeed, dEta_cluSeed,
105 trigCompColl.record(std::make_unique<xAOD::TrigCompositeContainer>(),std::make_unique<xAOD::TrigCompositeAuxContainer>())
119 lvl1_muclu_roi muonClu[20] = {{0,0,0}};
120 lvl1_muclu_roi muonClu0[20] = {{0,0,0}};
123 auto roiCollection = roiCollectionHdl.get();
125 if (roiCollection->size() < 2){
126 ATH_MSG_WARNING(
"Input TrigRoiDescriptorCollection isn't the correct size! Potential L1 menu inconsistency. Got " << roiCollection->size() <<
" RoIs");
127 return StatusCode::SUCCESS;
130 nL1RoIs = roiCollection->size();
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;
151 ATH_MSG_DEBUG(
"Accumulated " << n_cl <<
" ROI Directions: ");
153 for (
int unsigned i=0;
i<RoiEta_mon.size();
i++) {
154 ATH_MSG_DEBUG(
" [" << RoiEta_mon.at(
i) <<
"," << RoiPhi_mon.at(
i) <<
"]");
162 for(
int i_cl=0; i_cl<n_cl; ++i_cl) {
163 ATH_MSG_DEBUG(
"Initial RoI Coordinates: eta = " << muonClu0[i_cl].
eta <<
", phi = " << muonClu0[i_cl].
phi);
164 bool improvement =
true;
169 double cosPhi_avg=0.0;
170 double sinPhi_avg=0.0;
172 for (
int j_cl=0; j_cl<n_cl; ++j_cl) {
175 ATH_MSG_DEBUG(
" Adding Following RoI: eta = " << muonClu0[j_cl].
eta <<
", phi = " << muonClu0[j_cl].
phi);
178 muonClu[i_cl].eta = muonClu[i_cl].eta + (muonClu0[j_cl].eta-muonClu[i_cl].eta)/n_in_clu;
182 eta_avg += muonClu0[j_cl].eta;
183 cosPhi_avg +=
cos(muonClu0[j_cl].
phi);
184 sinPhi_avg +=
sin(muonClu0[j_cl].
phi);
194 muonClu[i_cl].eta = eta_avg/n_in_clu;
195 muonClu[i_cl].phi = atan2(sinPhi_avg,cosPhi_avg);
201 for (
int j_cl=0; j_cl<n_cl; ++j_cl) {
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;
212 }
else improvement =
false;
224 for(
int i_cl=0; i_cl<n_cl; ++i_cl) {
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;
232 ATH_MSG_DEBUG(
" -- ncl_max loop: i_cl = " << i_cl <<
" with ncl_max = " << ncl_max);
235 nRoIinClusters = nRoisInClu;
241 return StatusCode::FAILURE;
245 dEta_cluSeed = muonClu0[sel_cl].eta-muonClu[sel_cl].eta;
246 dR_cluSeed =
DeltaR(muonClu0[sel_cl],muonClu[sel_cl]);
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);
251 ATH_MSG_DEBUG(
"Create an output Collection seeded by the input");
255 trigCompColl->push_back(compClu);
257 ATH_MSG_ERROR(
"Write of MuonRoICluster TrigCompositeContainer object into trigCompColl failed!");
259 return StatusCode::FAILURE;
264 muRoiClusEta(*compClu) =
static_cast<float>(CluEta);
265 muRoiClusPhi(*compClu) =
static_cast<float>(CluPhi);
266 muRoiClusNRoi(*compClu) =
static_cast<int>(CluNum);
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) )
274 double phiHalfWidth = 0.35;
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);
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));
288 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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()
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.
◆ filterPassed()
◆ initialize()
StatusCode MuonCluster::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
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() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ setFilterPassed()
◆ sysExecute()
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.
◆ sysInitialize()
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 InputMakerBase, and HypoBase.
Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.
110 if (
sc.isFailure()) {
118 if ( cs.retrieve().isFailure() ) {
120 return StatusCode::SUCCESS;
122 if (cs->regHandle(
this,*
h).isFailure()) {
123 sc = StatusCode::FAILURE;
124 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_DeltaR
Gaudi::Property<float> MuonCluster::m_DeltaR {this, "DeltaR", 0.4, "radius of the muon cluster"} |
|
protected |
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
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
◆ m_monTool
◆ m_muRoiClusEtaKey
◆ m_muRoiClusNRoiKey
◆ m_muRoiClusPhiKey
◆ m_outputCompositesKey
◆ m_outputRoiDescriptorKey
◆ m_roiCollectionKey
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Gaudi::Property< std::string > m_featureLabel
Group
Properties of a chain group.
Scalar phi() const
phi method
TrigComposite_v1 TrigComposite
Declare the latest version of the class.
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_muRoiClusNRoiKey
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
T wrapToPi(T phi)
Wrap angle in radians to [-pi, pi].
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)
std::vector< ALFA_RawDataCollection_p1 > t1
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
virtual void setOwner(IDataHandleHolder *o)=0
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Handle class for adding a decoration to an object.
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
void setName(const std::string &name)
Set a human-readable name for the object.
float DeltaR(lvl1_muclu_roi, lvl1_muclu_roi) const
calculcate the deltaR between two Rois
ToolHandle< GenericMonitoringTool > m_monTool
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
AthROOTErrorHandlerSvc * svc
SG::WriteHandle< CONT > createAndStoreNoAux(const SG::WriteHandleKey< CONT > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Creates and right away records the Container CONT with the key.
Class used to describe composite objects in the HLT.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SG::WriteHandleKey< xAOD::TrigCompositeContainer > m_outputCompositesKey
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roiCollectionKey
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_muRoiClusPhiKey
value_type push_back(value_type pElem)
Add an element to the end of the collection.
std::vector< ALFA_RawDataContainer_p1 > t2
SG::WriteHandleKey< TrigRoiDescriptorCollection > m_outputRoiDescriptorKey
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual StatusCode sysInitialize() override
Override sysInitialize.
Athena::TPCnvVers::Current TrigRoiDescriptor
Declare a monitored scalar variable.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
SG::WriteDecorHandleKey< xAOD::TrigCompositeContainer > m_muRoiClusEtaKey
Gaudi::Property< float > m_DeltaR
A property which specifies the radius of the cluster.