|
ATLAS Offline Software
|
#include <MdtDataPreparator.h>
|
| MdtDataPreparator (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual StatusCode | initialize () override |
|
StatusCode | prepareData (const TrigRoiDescriptor *p_roids, const TrigL2MuonSA::RpcFitResult &rpcFitResult, TrigL2MuonSA::MuonRoad &muonRoad, TrigL2MuonSA::MdtRegion &mdtRegion, TrigL2MuonSA::MdtHits &mdtHits_normal) const |
|
StatusCode | prepareData (const TrigRoiDescriptor *p_roids, const TrigL2MuonSA::TgcFitResult &tgcFitResult, TrigL2MuonSA::MuonRoad &muonRoad, TrigL2MuonSA::MdtRegion &mdtRegion, TrigL2MuonSA::MdtHits &mdtHits_normal) const |
|
void | setRpcGeometry (bool use_rpc) |
|
void | setRoIBasedDataAccess (bool use_RoIBasedDataAccess) |
|
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 > &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 |
|
Definition at line 40 of file MdtDataPreparator.h.
◆ StoreGateSvc_t
◆ MdtDataPreparator()
TrigL2MuonSA::MdtDataPreparator::MdtDataPreparator |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ collectMdtHitsFromPrepData()
Endcap
Barrel
Definition at line 160 of file MdtDataPreparator.cxx.
167 if (v_idHash.empty()) {
169 return StatusCode::SUCCESS;
174 mdtPrds = mdtPrepContainerHandle.cptr();
175 if (!mdtPrepContainerHandle.isValid()) {
177 return StatusCode::FAILURE;
182 std::vector<const Muon::MdtPrepDataCollection*> mdtCols;
188 if( MDTcoll ==
nullptr ) {
189 ATH_MSG_DEBUG(
"MDT prep data collection not found in Hash ID" << (
int)
id);
193 if( MDTcoll->size() == 0 ) {
194 ATH_MSG_DEBUG(
"MDT prep data collection is empty in Hash ID" << (
int)
id);
198 mdtCols.push_back(MDTcoll);
201 <<
m_idHelperSvc->mdtIdHelper().show_to_string(MDTcoll->identify())
202 <<
" with size " << MDTcoll->size()
203 <<
"in Hash ID" << (
int)
id);
208 mdtHits.reserve( mdtHits.size() + mdtCol->size() );
212 if (!mdtReadout)
continue;
225 int adc = mdt->adc();
226 int drift = mdt->tdc();
236 char st = chamberType[1];
239 if (chamberType[0]==
'E') {
255 double R = -99999.,
Z = -99999.;
259 if(
std::find( (myIt->second).begin(), (myIt->second).end(),
id) != (myIt->second).
end() ) {
269 if(muonStation->
endcap()==0){
270 cXmid = (trans.translation()).
z();
271 double halfRadialThicknessOfMultilayer = muonStation->
RsizeMdtStation()/2.;
272 cYmid = ((trans.translation()).
perp()+halfRadialThicknessOfMultilayer);
275 cXmid = (trans.translation()).
perp();
277 cYmid = (trans.translation()).
z();
278 if(cYmid>0) cYmid += halfZThicknessOfMultilayer;
279 else cYmid -= halfZThicknessOfMultilayer;
281 cPhip = (trans.translation()).
phi();
286 dphi = std::abs(cPhip - cphi);
288 if(std::abs(cphi) >
M_PI/2.) {
289 double phi1 = (cPhip>0.)? cPhip-
M_PI : cPhip+
M_PI;
290 double phi2 = (cphi >0.)? cphi -
M_PI : cphi +
M_PI;
291 dphi = std::abs(phi1) + std::abs(phi2);
294 dphi = std::abs(cPhip) + std::abs(cphi);
298 if(muonStation->
endcap()==1)
302 double Rmin =(trans*OrigOfMdtInAmdbFrame).
perp();
307 if(cPhip<0. && (std::abs(
M_PI+cPhip) < 0.05) ) cPhip =
M_PI;
309 ATH_MSG_DEBUG(
" ...MDT hit Z/R/chamber/MultiLater/TubeLayer/Tube/Layer/adc/tdc = "
310 << Z <<
"/" << R <<
"/" <<
chamber <<
"/" << MultiLayer <<
"/" <<
TubeLayer <<
"/"
311 << Tube <<
"/" <<
Layer <<
"/" <<
adc <<
"/" << drift);
315 if(
Layer!=0 && Tube !=0) {
320 tmp.StationEta = StationEta;
321 tmp.StationPhi = StationPhi;
322 tmp.Multilayer = MultiLayer;
332 for(
unsigned int i=0;
i<4;
i++) {
tmp.cType[
i] = chamberType[
i]; }
335 tmp.DriftTime = drift;
337 tmp.LeadingCoarseTime = (drift>>5) & 0xfff;
338 tmp.LeadingFineTime = drift & 0x1f;
340 tmp.readEle = mdtReadout;
343 mdtHits.push_back(std::move(
tmp));
348 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 120 of file MdtDataPreparator.cxx.
128 std::vector<uint32_t> v_robIds;
129 std::vector<IdentifierHash> mdtHashList;
136 m_regionSelector->lookup( Gaudi::Hive::currentContext() )->HashIDList(*iroi, mdtHashList);
139 m_regionSelector->lookup( Gaudi::Hive::currentContext() )->ROBIDList(*iroi, v_robIds);
146 m_regionSelector->lookup( Gaudi::Hive::currentContext() )->HashIDList(fullscan_roi, mdtHashList);
149 m_regionSelector->lookup( Gaudi::Hive::currentContext() )->ROBIDList(fullscan_roi, v_robIds);
154 return StatusCode::SUCCESS;
◆ initDeadChannels()
Definition at line 354 of file MdtDataPreparator.cxx.
355 PVConstLink cv = mydetEl->getMaterialGeom();
356 int nGrandchildren = cv->getNChildVols();
357 if(nGrandchildren <= 0)
return;
359 std::vector<int> tubes;
360 geoGetIds ([&] (
int id) { tubes.push_back (
id); }, &*cv);
369 std::vector<Identifier> deadTubes;
374 int want_id =
layer*maxNTubesPerLayer +
tube;
375 if (
it != tubes.end() && *
it == want_id) {
379 it = std::lower_bound (tubes.begin(), tubes.end(), want_id);
380 if (
it != tubes.end() && *
it == want_id) {
385 deadTubes.push_back( deadTubeId );
387 <<
"), phi(" << phi <<
"), eta(" << eta <<
"), name(" <<
name
388 <<
"), multilayerId(" << ml <<
") and identifier " << deadTubeId <<
" .");
393 std::sort(deadTubes.begin(), deadTubes.end());
◆ initialize()
StatusCode TrigL2MuonSA::MdtDataPreparator::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 43 of file MdtDataPreparator.cxx.
61 ATH_MSG_INFO(
"Processing configuration for layouts with BMG chambers.");
63 for(
int phi=6;
phi<8;
phi++) {
64 for(
int eta=1;
eta<4;
eta++) {
67 for(
int roe=1; roe<=( muonDetMgr->
getMuonStation(
"BMG",
side*eta, phi) )->nMuonReadoutElements(); roe++) {
79 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 |
|
private |
◆ m_BMGpresent
bool TrigL2MuonSA::MdtDataPreparator::m_BMGpresent |
|
private |
◆ m_DeadChannels
◆ m_detStore
◆ m_evtStore
◆ m_hash_id
◆ m_idHelperSvc
◆ m_mdtPrepContainerKey
Initial value:{
this, "MDTPrepDataContainer","MDT_DriftCircles", "Name of the MDTContainer to read in"}
Definition at line 98 of file MdtDataPreparator.h.
◆ m_mdtRegionDefiner
ToolHandle<MdtRegionDefiner> TrigL2MuonSA::MdtDataPreparator::m_mdtRegionDefiner |
|
private |
Initial value:{
this, "MdtRegionDefiner", "TrigL2MuonSA::MdtRegionDefiner"}
Definition at line 94 of file MdtDataPreparator.h.
◆ m_muDetMgrKey
◆ m_regionSelector
ToolHandle<IRegSelTool> TrigL2MuonSA::MdtDataPreparator::m_regionSelector |
|
private |
◆ m_use_RoIBasedDataAccess
bool TrigL2MuonSA::MdtDataPreparator::m_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
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
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.
std::string find(const std::string &s)
return a remapped string
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
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
@ BEE
BEE measurement point.
@ EndcapExtra
Extra station in the endcap spectrometer.
@ BME
BME measurement point.
ToolHandle< MdtRegionDefiner > m_mdtRegionDefiner
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
HedgehogBoard::TubeLayer TubeLayer
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
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
ToolHandle< IRegSelTool > m_regionSelector
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Describes the API of the Region of Ineterest geometry.
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)
StatusCode collectMdtHitsFromPrepData(const std::vector< IdentifierHash > &v_idHash, TrigL2MuonSA::MdtHits &mdtHits, const TrigL2MuonSA::MuonRoad &muonRoad, const MuonGM::MuonDetectorManager *muDetMgr) const
Template to hold collections of MuonPrepRawData objects.
bool m_use_RoIBasedDataAccess
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.
std::map< Identifier, std::vector< Identifier > > m_DeadChannels
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muDetMgrKey
StatusCode initialize(bool used=true)
Class to represent measurements from the Monitored Drift Tubes.
Eigen::Matrix< double, 3, 1 > Vector3D
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
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
StatusCode getMdtHits(const TrigRoiDescriptor *p_roids, TrigL2MuonSA::MuonRoad &muonRoad, TrigL2MuonSA::MdtHits &mdtHits_normal) const
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.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
@ 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.
double ZsizeMdtStation() const
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
@ BarrelMiddle
Middle station in the barrel spectrometer.
@ EndcapOuter
Outer station in the endcap spectrometer.
int getStationPhi() const
int getStationEta() const