 |
ATLAS Offline Software
|
#include <MuonSegmentAmbiCleaner.h>
|
| | MuonSegmentAmbiCleaner (const std::string &, const std::string &, const IInterface *) |
| |
| virtual | ~MuonSegmentAmbiCleaner ()=default |
| |
| virtual StatusCode | initialize () |
| |
| virtual const Muon::MuonSegment * | resolve (const Muon::MuonSegment *segment) const |
| | For one segment solve ambiguous RPC and TGC hits: different eta but same phi using the MDT extrapolated segment Makes and output a new segment dropping the ambiguous hits. 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 |
| |
|
| 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 17 of file MuonSegmentAmbiCleaner.h.
◆ StoreGateSvc_t
◆ MuonSegmentAmbiCleaner()
| MuonSegmentAmbiCleaner::MuonSegmentAmbiCleaner |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~MuonSegmentAmbiCleaner()
| virtual MuonSegmentAmbiCleaner::~MuonSegmentAmbiCleaner |
( |
| ) |
|
|
virtualdefault |
◆ 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
◆ initialize()
| StatusCode MuonSegmentAmbiCleaner::initialize |
( |
| ) |
|
|
virtual |
◆ 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()
| const InterfaceID & Muon::IMuonSegmentCleaner::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ 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()
◆ resolve()
For one segment solve ambiguous RPC and TGC hits: different eta but same phi using the MDT extrapolated segment Makes and output a new segment dropping the ambiguous hits.
Implements Muon::IMuonSegmentCleaner.
Definition at line 49 of file MuonSegmentAmbiCleaner.cxx.
63 std::vector<const Trk::MeasurementBase*>::const_iterator mit = meas.begin();
64 std::vector<const Trk::MeasurementBase*>::const_iterator mit_end = meas.end();
74 std::vector<const Trk::RIO_OnTrack*> rots;
75 std::vector<const Trk::CompetingRIOsOnTrack*> crots;
76 rots.reserve(2*meas.size());
77 crots.reserve(2*meas.size());
79 for( ; mit!=mit_end;++mit ){
86 crots.push_back(
nullptr);
98 crots.push_back(crio);
104 unsigned int nMeas = rots.size();
105 unsigned int nphi = 0;
108 std::vector <const Trk::RIO_OnTrack*> rots_phi(nMeas);
109 std::vector <const Trk::CompetingRIOsOnTrack*> crots_phi(nMeas);
110 std::vector <const Trk::MeasurementBase*> meas_phi(nMeas);
111 std::vector <double> dis_phi(nMeas);
112 std::vector <int> chambercode_phi(nMeas);
113 std::vector <int> stripcode_phi(nMeas);
114 std::vector <int> ok_phi(nMeas);
115 std::vector <int> det_phi(nMeas);
116 std::vector <Identifier> id_phi(nMeas);
118 if (
m_debug) std::cout <<
" MuonSegmentAmbiCleanerTool nMeas " << nMeas <<
" competing rios: " << crots.size() << std::endl;
120 for (
unsigned int i=0;
i<rots.size();
i++){
126 meas_keep.push_back(rot->
clone());
131 meas_keep.push_back(rot->
clone());
137 meas_keep.push_back(rot->
clone());
142 meas_keep.push_back(rot->
clone());
153 rots_phi[nphi] = rot;
154 crots_phi[nphi] = crots[
i];
155 chambercode_phi[nphi] = 0;
156 stripcode_phi[nphi] = 0;
159 dis_phi[nphi] = 10000000;
164 chambercode_phi[nphi] =
code;
165 stripcode_phi[nphi] =
m_idHelperSvc->rpcIdHelper().strip(
id);
178 double disRPC = lSegmentPos.z() - lHitPos.z() + lSegmentDir.z()*(lHitPos.y()-lSegmentPos.y())/lSegmentDir.y();
180 std::cout <<
" ghit pos x " << gHitPos.x() <<
" y " << gHitPos.y() <<
" z " << gHitPos.z() << std::endl;
181 std::cout <<
" dis RPC " << disRPC << std::endl;
183 dis_phi[nphi] = disRPC;
188 chambercode_phi[nphi] =
code;
189 stripcode_phi[nphi] =
m_idHelperSvc->tgcIdHelper().channel(
id);
202 double disTGC = lSegmentPos.y() - lHitPos.y() + lSegmentDir.y()*(lHitPos.z()-lSegmentPos.z())/lSegmentDir.z();
204 std::cout <<
" ghit pos x " << gHitPos.x() <<
" y " << gHitPos.y() <<
" z " << gHitPos.z() << std::endl;
205 std::cout <<
" dis TGC " << disTGC << std::endl;
207 dis_phi[nphi] = disTGC;
211 if (
m_debug) std::cout <<
" Distance to segment " << dis_phi[nphi] << std::endl;
212 if (ok_phi[nphi] == 1 ) nphi++;
216 bool changeSegment =
false;
220 for(
unsigned int i = 0;
i < nphi-1 ; ++
i ) {
221 if (ok_phi[
i] == 0)
continue;
222 for(
unsigned int j =
i+1 ; j < nphi ; ++j ) {
223 if (ok_phi[j] == 0)
continue;
225 if ( stripcode_phi[
i] == stripcode_phi[j] && chambercode_phi[
i] == chambercode_phi[j] ) ambi =
true;
229 if (det_phi[
i] == 1 && det_phi[j] == 1 &&
m_debug) {
233 if (det_phi[
i] == 2 && det_phi[j] == 2 &&
m_debug) {
238 if (
m_debug) {
ATH_MSG_DEBUG(
" Ambiguous " <<
" Distance1 " << dis_phi[
i] <<
" Distance1 " << dis_phi[j]); }
239 if (dis_phi[
i]!= 0.&& dis_phi[j]!=0) {
240 if ( fabs(dis_phi[
i]) < fabs(dis_phi[j]) ) {
249 ATH_MSG_DEBUG(
" index " <<
i <<
" strip " << stripcode_phi [
i] <<
" chambercode " << chambercode_phi[
i] <<
" selected " << ok_phi[
i] <<
" segment distance " << dis_phi[
i]);
250 ATH_MSG_DEBUG(
" index " << j <<
" strip " << stripcode_phi [j] <<
" chambercode " << chambercode_phi[j] <<
" selected " << ok_phi[j] <<
" segment distance " << dis_phi[j]);
258 for(
unsigned int i = 0;
i < nphi ;
i++ ) {
261 for(
unsigned int j = 0; j < nphi ; j++ ) {
262 if (crots_phi[j] == crots_phi[
i] && j!=
i)
264 crots_phi[j]=
nullptr;
267 crots_phi[
i]=
nullptr;
274 std::set <const Trk::CompetingRIOsOnTrack*> selected_crots;
276 for (
unsigned int i=0;
i<nphi;++
i){
277 if (ok_phi[
i] == 1) {
280 if (det_phi[
i] == 1) nphirpcn++;
281 if (det_phi[
i] == 2) nphitgcn++;
282 meas_keep.push_back(rots_phi[
i]->
clone());
284 else if (selected_crots.count(crots_phi[
i]) == 0)
286 meas_keep.push_back(crots_phi[
i]->
clone());
287 selected_crots.insert(crots_phi[
i]);
288 if (det_phi[
i] == 1) nphirpcn++;
289 if (det_phi[
i] == 2) nphitgcn++;
291 }
if (ok_phi[
i] == 0 && (det_phi[
i] == 1||det_phi[
i] == 2)) {
292 changeSegment =
true;
298 std::cout <<
" Summary MuonSegmentAmbiCleaner (not accurate with competing rios!)" << std::endl;
299 std::cout <<
" Input Segment with " << netamdt <<
" MDT hits " << netacsc <<
" eta CSC hits " << netatgc <<
" eta TGC Hits " << netarpc <<
" eta RPC hits " << std::endl;
300 std::cout <<
" and " << nphicsc <<
" phi CSC hits " << nphitgc <<
" phi TGC Hits " << nphirpc <<
" phi RPC hits " << std::endl;
301 std::cout <<
" Output after Ambiguity removal " << nphitgcn <<
" phi TGC Hits " << nphirpcn <<
" phi RPC hits " << std::endl;
314 Amg::Vector2D locSegmentPos(lSegmentPos.x(),lSegmentPos.y());
320 std::move(meas_keep),
◆ 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_debug
| bool MuonSegmentAmbiCleaner::m_debug |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_idHelperSvc
◆ m_summary
| bool MuonSegmentAmbiCleaner::m_summary |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
virtual RIO_OnTrack * clone() const override=0
Pseudo-constructor, needed to avoid excessive RTTI.
Eigen::Matrix< double, 2, 1 > Vector2D
virtual const Amg::Vector3D & globalPosition() const override
Returns the global position.
Class to represent calibrated clusters formed from TGC strips.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual FitQuality * clone() const
Virtual constructor.
Class to represent calibrated clusters formed from RPC strips.
#define ATH_MSG_VERBOSE(x)
MuonSegment_v1 MuonSegment
Reference the current persistent version:
virtual void setOwner(IDataHandleHolder *o)=0
virtual const TgcPrepData * prepRawData() const
Returns the TgcPrepData - is a TRT_DriftCircle in this scope.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
virtual unsigned int numberOfContainedROTs() const =0
Number of RIO_OnTracks to be contained by this CompetingRIOsOnTrack.
Class to represent RPC measurements.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const Trk::LocalDirection & localDirection() const
local direction
Eigen::Affine3d Transform3D
const std::vector< const Trk::MeasurementBase * > & containedMeasurements() const
returns the vector of Trk::MeasurementBase objects
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
represents the three-dimensional global direction with respect to a planar surface frame.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual const RpcPrepData * prepRawData() const override final
Returns the RpcPrepData - is a TRT_DriftCircle in this scope.
Identifier identify() const
return the identifier
Eigen::Matrix< double, 3, 1 > Vector3D
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
FitQualityOnSurface fitQuality(const MultiComponentState &, const MeasurementBase &)
Method for determining the chi2 of the multi-component state and the number of degrees of freedom.
#define ATH_MSG_WARNING(x)
Identifier identify() const
return the identifier -extends MeasurementBase
Class to represent TGC measurements.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual const Amg::Vector3D & globalPosition() const override final
Returns the global position.
virtual const Amg::Vector3D & globalPosition() const override final
global position
bool m_summary
flag to print out a summary of what comes in and what comes out
const FitQuality * fitQuality() const
return the FitQuality object, returns NULL if no FitQuality is defined
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Polygon globalToLocal(const Polygon &pol, float z, const Trk::PlaneSurface &surf)
virtual const Trk::PlaneSurface & associatedSurface() const override final
returns the surface for the local to global transformation
bool m_debug
flag to print out debugging information
const Amg::Vector3D & globalDirection() const
global direction