|  | ATLAS Offline Software
    | 
 
 
 
#include <MdtDataPreparator.h>
|  | 
| virtual StatusCode | initialize () override | 
|  | 
| StatusCode | prepareData (const EventContext &ctx, const TrigRoiDescriptor *p_roids, const TrigL2MuonSA::RpcFitResult &rpcFitResult, TrigL2MuonSA::MuonRoad &muonRoad, TrigL2MuonSA::MdtRegion &mdtRegion, TrigL2MuonSA::MdtHits &mdtHits) const | 
|  | 
| StatusCode | prepareData (const EventContext &ctx, const TrigRoiDescriptor *p_roids, const TrigL2MuonSA::TgcFitResult &tgcFitResult, TrigL2MuonSA::MuonRoad &muonRoad, TrigL2MuonSA::MdtRegion &mdtRegion, TrigL2MuonSA::MdtHits &mdtHits) const | 
|  | 
| void | setRpcGeometry (bool use_rpc) | 
|  | 
| void | setRoIBasedDataAccess (bool use_RoIBasedDataAccess) | 
|  | 
|  | AthAlgTool (const std::string &type, const std::string &name, const IInterface *parent) | 
|  | Constructor with parameters:  More... 
 | 
|  | 
| ServiceHandle< StoreGateSvc > & | evtStore () | 
|  | The standard StoreGateSvc(event store) Returns (kind of) a pointer to theStoreGateSvc.  More...
 | 
|  | 
| const ServiceHandle< StoreGateSvc > & | evtStore () const | 
|  | The standard StoreGateSvc(event store) Returns (kind of) a pointer to theStoreGateSvc.  More...
 | 
|  | 
| const ServiceHandle< StoreGateSvc > & | detStore () const | 
|  | The standard StoreGateSvc/DetectorStoreReturns (kind of) a pointer to theStoreGateSvc.  More...
 | 
|  | 
| virtual StatusCode | sysInitialize () override | 
|  | Perform system initialization for an algorithm.  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, V, H > &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 | 
|  | 
|  | 
| StatusCode | getMdtHits (const EventContext &ctx, const TrigRoiDescriptor *p_roids, TrigL2MuonSA::MuonRoad &muonRoad, TrigL2MuonSA::MdtHits &mdtHits) const | 
|  | 
| StatusCode | collectMdtHitsFromPrepData (const EventContext &ctx, const std::vector< IdentifierHash > &v_idHash, TrigL2MuonSA::MdtHits &mdtHits, const TrigL2MuonSA::MuonRoad &muonRoad) const | 
|  | 
| void | initDeadChannels (const MuonGM::MdtReadoutElement *mydetEl) | 
|  | 
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) | 
|  | specialization for handling Gaudi::Property<SG::VarHandleKey>  More... 
 | 
|  | 
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) | 
|  | specialization for handling Gaudi::Property<SG::VarHandleKeyArray>  More... 
 | 
|  | 
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) | 
|  | specialization for handling Gaudi::Property<SG::VarHandleBase>  More... 
 | 
|  | 
| Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) | 
|  | specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>  More... 
 | 
|  | 
Definition at line 37 of file MdtDataPreparator.h.
 
◆ StoreGateSvc_t
◆ AthAlgTool()
◆ collectMdtHitsFromPrepData()
Endcap
Barrel
Definition at line 146 of file MdtDataPreparator.cxx.
  153   if (v_idHash.empty()) {
 
  155     return StatusCode::SUCCESS;
 
  163     auto mdtCol = mdtPrds->indexFindPtr(
id);
 
  165     if( mdtCol == 
nullptr ) {
 
  166         ATH_MSG_DEBUG(
"MDT prep data collection not found in Hash ID" << (
int)
id);
 
  169     if( mdtCol->size() == 0 ) {
 
  170         ATH_MSG_DEBUG(
"MDT prep data collection is empty in Hash ID" << (
int)
id);
 
  176           << 
" with size " << mdtCol->size()
 
  177           << 
"in Hash ID" << (
int)
id);
 
  179     mdtHits.reserve( mdtHits.size() + mdtCol->size() );
 
  198         if(
tmp.TubeLayer > TubeLayers) 
tmp.TubeLayer -= TubeLayers;
 
  201         int Layer = (
tmp.Multilayer-1)*TubeLayers + 
tmp.TubeLayer;
 
  204         if(
Layer==0 or 
tmp.Tube ==0) 
continue;
 
  206         int drift = mdt->tdc();
 
  207         tmp.DriftTime = drift;
 
  208         tmp.LeadingCoarseTime  = (drift>>5) & 0xfff;
 
  209         tmp.LeadingFineTime    = drift & 0x1f;
 
  210         tmp.Adc = mdt->adc();
 
  217         std::copy_n(chamberType.begin(), std::min<size_t>(4, chamberType.size()), 
tmp.cType.begin());
 
  218         tmp.readEle = mdtReadout;
 
  221         char st = chamberType[1];
 
  222         if (chamberType[0]==
'E') {
 
  239         double &cXmid{
tmp.cXmid}, &cYmid{
tmp.cYmid}, &cPhip{
tmp.cPhip};
 
  241         if(!muonStation->
endcap()){
 
  242             cXmid = (trans.translation()).
z();
 
  245             cXmid = (trans.translation()).
perp();
 
  246             cYmid = (trans.translation()).
z();
 
  250         cPhip = (trans.translation()).
phi();
 
  253         R = -99999.; 
Z = -99999.;
 
  260             dphi = std::abs(cPhip - cphi);
 
  262             if(std::abs(cphi) > 
M_PI/2.) {
 
  263                 double phi1 = (cPhip>0.)? cPhip-
M_PI : cPhip+
M_PI;
 
  264                 double phi2 = (cphi >0.)? cphi -
M_PI : cphi +
M_PI;
 
  265                 dphi = std::abs(phi1) + std::abs(phi2);
 
  268                 dphi = std::abs(cPhip) + std::abs(cphi);
 
  278         if(cPhip<0. && (std::abs(
M_PI+cPhip) < 0.05) ) cPhip = 
M_PI;
 
  280         ATH_MSG_DEBUG(
" ...MDT hit Z/R/chamber/MultiLater/TubeLayer/Tube/Layer/adc/tdc = " 
  281             << Z << 
"/" << R << 
"/" << 
chamber << 
"/" << 
tmp.Multilayer << 
"/" << 
tmp.TubeLayer << 
"/" 
  282             << 
tmp.Tube << 
"/" << 
Layer << 
"/" << 
tmp.Adc << 
"/" << drift);
 
  284         mdtHits.push_back(std::move(
tmp));
 
  289   return StatusCode::SUCCESS;
 
 
 
 
◆ 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);
 
  253     return PBASE::declareProperty(
name,hndl,
doc);
 
 
 
 
◆ 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.
  229     return PBASE::declareProperty(
name,hndl,
doc);
 
 
 
 
◆ 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.
  338     return PBASE::declareProperty(
name, property, 
doc);
 
 
 
 
◆ 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]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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 
 
 
◆ getMdtHits()
Definition at line 113 of file MdtDataPreparator.cxx.
  119   std::vector<IdentifierHash> mdtHashList;
 
  140   return StatusCode::SUCCESS;
 
 
 
 
◆ initDeadChannels()
Definition at line 295 of file MdtDataPreparator.cxx.
  296   PVConstLink cv = mydetEl->getMaterialGeom(); 
 
  297   int nGrandchildren = cv->getNChildVols();
 
  298   if(nGrandchildren <= 0) 
return;
 
  300   std::vector<int> tubes;
 
  301   geoGetIds ([&] (
int id) { tubes.push_back (
id); }, cv);
 
  314       int want_id = 
layer*maxNTubesPerLayer + 
tube;
 
  315       if (
it != tubes.end() && *
it == want_id) {
 
  319         it = std::lower_bound (tubes.begin(), tubes.end(), want_id);
 
  320         if (
it != tubes.end() && *
it == want_id) {
 
  327                           << 
"), phi(" << 
phi << 
"), eta(" << 
eta << 
"), name(" << 
name 
  328                           << 
"), multilayerId(" << ml << 
") and identifier " << deadTubeId <<
" .");
 
 
 
 
◆ initialize()
  
  | 
        
          | StatusCode TrigL2MuonSA::MdtDataPreparator::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. 
 
 
◆ interfaceID()
  
  | 
        
          | static const InterfaceID& TrigL2MuonSA::MdtDataPreparator::interfaceID | ( |  | ) |  |  | static | 
 
 
◆ 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. 
 
 
◆ prepareData() [1/2]
◆ prepareData() [2/2]
◆ renounce()
◆ renounceArray()
◆ setRoIBasedDataAccess()
  
  | 
        
          | void TrigL2MuonSA::MdtDataPreparator::setRoIBasedDataAccess | ( | bool | use_RoIBasedDataAccess | ) |  |  | inline | 
 
 
◆ setRpcGeometry()
  
  | 
        
          | void TrigL2MuonSA::MdtDataPreparator::setRpcGeometry | ( | bool | use_rpc | ) |  |  | inline | 
 
 
◆ sysInitialize()
◆ 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_BMGid
  
  | 
        
          | int TrigL2MuonSA::MdtDataPreparator::m_BMGid {0} |  | private | 
 
 
◆ m_DeadChannels
  
  | 
        
          | std::unordered_set<Identifier> TrigL2MuonSA::MdtDataPreparator::m_DeadChannels {} |  | private | 
 
 
◆ m_detStore
◆ m_evtStore
◆ m_idHelperSvc
◆ m_isPhase2
  
  | 
        
          | Gaudi::Property<bool> TrigL2MuonSA::MdtDataPreparator::m_isPhase2 {this, "isPhase2", false, "if the phase 2 geometry is setup"} |  | private | 
 
 
◆ m_mdtPrepContainerKey
Initial value:{
    this, "MDTPrepDataContainer","MDT_DriftCircles", "Name of the MDTContainer to read in"}
Definition at line 90 of file MdtDataPreparator.h.
 
 
◆ m_mdtRegionDefiner
  
  | 
        
          | ToolHandle<MdtRegionDefiner> TrigL2MuonSA::MdtDataPreparator::m_mdtRegionDefiner |  | private | 
 
Initial value:{
      this, "MdtRegionDefiner", "TrigL2MuonSA::MdtRegionDefiner"}
Definition at line 86 of file MdtDataPreparator.h.
 
 
◆ m_regionSelector
  
  | 
        
          | ToolHandle<IRegSelTool> TrigL2MuonSA::MdtDataPreparator::m_regionSelector {this, "RegSel_MDT", "RegSelTool/RegSelTool_MDT"} |  | private | 
 
 
◆ m_use_RoIBasedDataAccess
  
  | 
        
          | Gaudi::Property<bool> TrigL2MuonSA::MdtDataPreparator::m_use_RoIBasedDataAccess {this, "use_RoIBasedDataAccess", false} |  | private | 
 
 
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
 
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
int getNLayers() const
Returns the number of tube layers inside the multilayer.
Scalar phi() const
phi method
double getStationS() const
Seems to be exclusively used by the MDTs --> Move it to MdtReadoutElement.
virtual const Amg::Vector3D & center(const Identifier &) const override final
Return the center of the surface associated with this identifier In the case of silicon it returns th...
Scalar perp() const
perp method - perpenticular length
Scalar eta() const
pseudorapidity method
@ BEE
BEE measurement point.
@ EndcapExtra
Extra station in the endcap spectrometer.
@ BME
BME measurement point.
ToolHandle< MdtRegionDefiner > m_mdtRegionDefiner
Gaudi::Property< bool > m_isPhase2
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
@ BarrelInner
Inner station in the barrel spectrometer.
std::vector< SG::VarHandleKeyArray * > m_vhka
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
#define ATH_MSG_VERBOSE(x)
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_mdtPrepContainerKey
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
StatusCode getMdtHits(const EventContext &ctx, const TrigRoiDescriptor *p_roids, TrigL2MuonSA::MuonRoad &muonRoad, TrigL2MuonSA::MdtHits &mdtHits) const
ToolHandle< IRegSelTool > m_regionSelector
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Gaudi::Property< bool > m_use_RoIBasedDataAccess
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const MuonStation * parentMuonStation() const
Eigen::Affine3d Transform3D
const Amg::Transform3D & getNominalAmdbLRSToGlobal() const
int getMultilayer() const
Returns the multilayer represented by the readout element.
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
std::unordered_set< Identifier > m_DeadChannels
virtual void renounce()=0
void initDeadChannels(const MuonGM::MdtReadoutElement *mydetEl)
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
double phi[N_STATION][N_SECTOR]
@ EndcapMiddle
Middle station in the endcap spectrometer.
StatusCode collectMdtHitsFromPrepData(const EventContext &ctx, const std::vector< IdentifierHash > &v_idHash, TrigL2MuonSA::MdtHits &mdtHits, const TrigL2MuonSA::MuonRoad &muonRoad) const
Class to represent measurements from the Monitored Drift Tubes.
const MuonStation * getMuonStation(const std::string &stName, int eta, int phi) const
void geoGetIds(FUNCTION f, const GeoGraphNode *node, int depthLimit=1)
Template helper for running the visitor.
double RsizeMdtStation() const
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
@ EndcapInner
Inner station in the endcap spectrometer.
@ BarrelOuter
Outer station in the barrel spectrometer.
std::string getStationType() const
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
const Amg::Vector3D & getBlineFixedPointInAmdbLRS() const
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
@ BarrelMiddle
Middle station in the barrel spectrometer.
@ EndcapOuter
Outer station in the endcap spectrometer.
int getStationPhi() const
int getStationEta() const