 |
ATLAS Offline Software
|
#include <MdtDataPreparator.h>
|
virtual StatusCode | initialize () override |
|
StatusCode | prepareData (const TrigRoiDescriptor *p_roids, const TrigL2MuonSA::RpcFitResult &rpcFitResult, TrigL2MuonSA::MuonRoad &muonRoad, TrigL2MuonSA::MdtRegion &mdtRegion, TrigL2MuonSA::MdtHits &mdtHits) const |
|
StatusCode | prepareData (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 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 | 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 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 144 of file MdtDataPreparator.cxx.
151 if (v_idHash.empty()) {
153 return StatusCode::SUCCESS;
161 auto mdtCol = mdtPrds->indexFindPtr(
id);
163 if( mdtCol ==
nullptr ) {
164 ATH_MSG_DEBUG(
"MDT prep data collection not found in Hash ID" << (
int)
id);
167 if( mdtCol->size() == 0 ) {
168 ATH_MSG_DEBUG(
"MDT prep data collection is empty in Hash ID" << (
int)
id);
174 <<
" with size " << mdtCol->size()
175 <<
"in Hash ID" << (
int)
id);
177 mdtHits.reserve( mdtHits.size() + mdtCol->size() );
196 if(
tmp.TubeLayer > TubeLayers)
tmp.TubeLayer -= TubeLayers;
199 int Layer = (
tmp.Multilayer-1)*TubeLayers +
tmp.TubeLayer;
202 if(
Layer==0 or
tmp.Tube ==0)
continue;
204 int drift = mdt->tdc();
205 tmp.DriftTime = drift;
206 tmp.LeadingCoarseTime = (drift>>5) & 0xfff;
207 tmp.LeadingFineTime = drift & 0x1f;
208 tmp.Adc = mdt->adc();
215 std::copy_n(chamberType.begin(), std::min<size_t>(4, chamberType.size()),
tmp.cType.begin());
216 tmp.readEle = mdtReadout;
219 char st = chamberType[1];
220 if (chamberType[0]==
'E') {
237 double &cXmid{
tmp.cXmid}, &cYmid{
tmp.cYmid}, &cPhip{
tmp.cPhip};
239 if(!muonStation->
endcap()){
240 cXmid = (trans.translation()).
z();
243 cXmid = (trans.translation()).
perp();
244 cYmid = (trans.translation()).
z();
248 cPhip = (trans.translation()).
phi();
251 R = -99999.;
Z = -99999.;
258 dphi = std::abs(cPhip - cphi);
260 if(std::abs(cphi) >
M_PI/2.) {
261 double phi1 = (cPhip>0.)? cPhip-
M_PI : cPhip+
M_PI;
262 double phi2 = (cphi >0.)? cphi -
M_PI : cphi +
M_PI;
263 dphi = std::abs(phi1) + std::abs(phi2);
266 dphi = std::abs(cPhip) + std::abs(cphi);
276 if(cPhip<0. && (std::abs(
M_PI+cPhip) < 0.05) ) cPhip =
M_PI;
278 ATH_MSG_DEBUG(
" ...MDT hit Z/R/chamber/MultiLater/TubeLayer/Tube/Layer/adc/tdc = "
279 << Z <<
"/" << R <<
"/" <<
chamber <<
"/" <<
tmp.Multilayer <<
"/" <<
tmp.TubeLayer <<
"/"
280 <<
tmp.Tube <<
"/" <<
Layer <<
"/" <<
tmp.Adc <<
"/" << drift);
282 mdtHits.push_back(std::move(
tmp));
287 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 111 of file MdtDataPreparator.cxx.
116 std::vector<IdentifierHash> mdtHashList;
117 const EventContext& ctx = Gaudi::Hive::currentContext();
138 return StatusCode::SUCCESS;
◆ initDeadChannels()
Definition at line 293 of file MdtDataPreparator.cxx.
294 PVConstLink cv = mydetEl->getMaterialGeom();
295 int nGrandchildren = cv->getNChildVols();
296 if(nGrandchildren <= 0)
return;
298 std::vector<int> tubes;
299 geoGetIds ([&] (
int id) { tubes.push_back (
id); }, cv);
312 int want_id =
layer*maxNTubesPerLayer +
tube;
313 if (
it != tubes.end() && *
it == want_id) {
317 it = std::lower_bound (tubes.begin(), tubes.end(), want_id);
318 if (
it != tubes.end() && *
it == want_id) {
325 <<
"), phi(" << phi <<
"), eta(" << eta <<
"), name(" <<
name
326 <<
"), multilayerId(" << ml <<
") and identifier " << deadTubeId <<
" .");
◆ initialize()
StatusCode TrigL2MuonSA::MdtDataPreparator::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 32 of file MdtDataPreparator.cxx.
50 if(
m_idHelperSvc->mdtIdHelper().stationNameIndex(
"BMG") != -1){
52 ATH_MSG_INFO(
"Processing configuration for layouts with BMG chambers.");
54 for(
int phi=6;
phi<8;
phi++) {
55 for(
int eta=1;
eta<4;
eta++) {
58 for(
int roe=1; roe<=( muonDetMgr->
getMuonStation(
"BMG",
side*eta, phi) )->nMuonReadoutElements(); roe++) {
68 return StatusCode::SUCCESS;
◆ 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 87 of file MdtDataPreparator.h.
◆ m_mdtRegionDefiner
ToolHandle<MdtRegionDefiner> TrigL2MuonSA::MdtDataPreparator::m_mdtRegionDefiner |
|
private |
Initial value:{
this, "MdtRegionDefiner", "TrigL2MuonSA::MdtRegionDefiner"}
Definition at line 83 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:
StatusCode getMdtHits(const TrigRoiDescriptor *p_roids, TrigL2MuonSA::MuonRoad &muonRoad, TrigL2MuonSA::MdtHits &mdtHits) const
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
int getNLayers() const
Returns the number of tube layers inside the multilayer.
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
@ 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
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