ATLAS Offline Software
Loading...
Searching...
No Matches
InDetAlignHitQualSelTool Class Reference

The InDetAlignHitQualSelTool is to select good quality hits for alignment to build residuals with possible cuts on outlier hits, hits which are too large clusters, hits with large incidence angles, etc. More...

#include <InDetAlignHitQualSelTool.h>

Inheritance diagram for InDetAlignHitQualSelTool:
Collaboration diagram for InDetAlignHitQualSelTool:

Public Member Functions

 InDetAlignHitQualSelTool (const std::string &, const std::string &, const IInterface *)
virtual ~InDetAlignHitQualSelTool ()
virtual StatusCode initialize ()
virtual StatusCode finalize ()
const Trk::RIO_OnTrackgetGoodHit (const Trk::TrackStateOnSurface *tsos) const
 main method: from a TrackStateOnSurface select a good hit cutting on outlier hits, hits with too many pixels/strips, hits with large incidence angles
bool isGoodSiHit (const Trk::TrackStateOnSurface *tsos) const
bool getGoodHole (const Trk::TrackStateOnSurface *tsos) const
 from a TrackStateOnSurface select a good hole in track cutting on large incidence angles only
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()
 for ToolHandle functionality

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool isGangedPixel (const Trk::PrepRawData *prd) const
 check, whether cluster contains a ganged pixel
bool isGoodClusterSize (const std::vector< Identifier > &idVec) const
 check, whether cluster size within limits of m_maxClusterSize
bool isEdgeChannel (const std::vector< Identifier > &idVec) const
 check, whether the strip/pixel is an edge channel
double incidAngle (const Trk::TrackParameters *trkPar, const InDetDD::SiDetectorElement *detEle) const
 calculate track incidence angle in local x-z frame
bool isGoodAngle (const Trk::TrackParameters *trkPar, const InDetDD::SiDetectorElement *detEle) const
 check whether track incidence angle within limits of m_maxIncidAngle
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

bool m_rejectOutliers
 reject hits labeled as outliers by the track fitter
int m_maxClusterSize
bool m_rejectEdgeChannels
 reject clusters containing edge channels
bool m_rejectGangedPixels
 reject clusters containing ganged pixels
float m_maxIncidAngle
 maximum incidence angle of a track (to which the hit belongs) on the Si-module.
bool m_acceptIBLHits
bool m_acceptPixelHits
bool m_acceptSCTHits
const InDetDD::PixelDetectorManagerm_PIXManager
 to get pixel phi and eta identifiers
const PixelIDm_pixelid
 Pixel id helper.
const SCT_IDm_sctID
 Pixel id helper.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

The InDetAlignHitQualSelTool is to select good quality hits for alignment to build residuals with possible cuts on outlier hits, hits which are too large clusters, hits with large incidence angles, etc.

The InDetAlignHitQualSelTool is to select good quality hits to build residuals for alignment.

Author
Oleg Brandt http://consult.cern.ch/xwho

The following cuts are possible: outlier hits, hits which have too large clusters, hits with large incidence angles, ganged pixels, edge channels.

Author
Oleg Brandt http://consult.cern.ch/xwho

Definition at line 34 of file InDetAlignHitQualSelTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ InDetAlignHitQualSelTool()

InDetAlignHitQualSelTool::InDetAlignHitQualSelTool ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 21 of file InDetAlignHitQualSelTool.cxx.

25 : AthAlgTool(t,n,p)
26 , m_rejectOutliers( true )
27 , m_maxClusterSize( 5 )
28 , m_rejectEdgeChannels( true )
29 , m_rejectGangedPixels( false )
30 , m_maxIncidAngle( 0.8 )
31 , m_acceptIBLHits( true )
32 , m_acceptPixelHits( true )
33 , m_acceptSCTHits( true )
34 , m_PIXManager{}
35 , m_pixelid{}
36 , m_sctID{}
37{
38 declareInterface<IInDetAlignHitQualSelTool>(this) ;
39 declareProperty( "RejectOutliers", m_rejectOutliers ) ;
40 declareProperty( "MaxClusterSize", m_maxClusterSize ) ;
41 declareProperty( "RejectEdgeChannels", m_rejectEdgeChannels ) ;
42 declareProperty( "RejectGangedPixels", m_rejectGangedPixels ) ;
43 declareProperty( "MaxIncidAngle", m_maxIncidAngle ) ;
44 declareProperty( "AcceptIBLHits", m_acceptIBLHits ) ;
45 declareProperty( "AcceptPixelHits", m_acceptPixelHits ) ;
46 declareProperty( "AcceptSCTHits", m_acceptSCTHits ) ;
47}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool m_rejectEdgeChannels
reject clusters containing edge channels
bool m_rejectGangedPixels
reject clusters containing ganged pixels
const PixelID * m_pixelid
Pixel id helper.
float m_maxIncidAngle
maximum incidence angle of a track (to which the hit belongs) on the Si-module.
const InDetDD::PixelDetectorManager * m_PIXManager
to get pixel phi and eta identifiers
const SCT_ID * m_sctID
Pixel id helper.
bool m_rejectOutliers
reject hits labeled as outliers by the track fitter

◆ ~InDetAlignHitQualSelTool()

InDetAlignHitQualSelTool::~InDetAlignHitQualSelTool ( )
virtual

Definition at line 50 of file InDetAlignHitQualSelTool.cxx.

50{}

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

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

◆ finalize()

StatusCode InDetAlignHitQualSelTool::finalize ( )
virtual

Definition at line 66 of file InDetAlignHitQualSelTool.cxx.

66 {
67 ATH_MSG_DEBUG( "finalize() successful in " << name() ) ;
68 return AlgTool::finalize() ;
69}
#define ATH_MSG_DEBUG(x)

◆ getGoodHit()

const Trk::RIO_OnTrack * InDetAlignHitQualSelTool::getGoodHit ( const Trk::TrackStateOnSurface * tsos) const
virtual

main method: from a TrackStateOnSurface select a good hit cutting on outlier hits, hits with too many pixels/strips, hits with large incidence angles

Implements IInDetAlignHitQualSelTool.

Definition at line 71 of file InDetAlignHitQualSelTool.cxx.

71 {
72 ATH_MSG_DEBUG( "** getGoodHit ** Dealing with a new tsos ** START ** " ) ;
73
74 if( tsos == nullptr ) {
75 ATH_MSG_ERROR( "0 pointer passed for TSOS!" ) ;
76 return nullptr ;
77 }
79 ATH_MSG_DEBUG( "not a hit, cast to MeasurementBase will fail, so reject" ) ;
80 return nullptr ;
81 }
83 ATH_MSG_DEBUG( "outlier, reject" ) ;
84 return nullptr ;
85 }
86 const Trk::MeasurementBase* measBase = tsos->measurementOnTrack() ;
87 if( measBase == nullptr) {
88 ATH_MSG_DEBUG( "tsos->measurementOnTrack() returned 0 pointer" ) ;
89 return nullptr ;
90 }
91
92 const Trk::RIO_OnTrack* hit = dynamic_cast <const Trk::RIO_OnTrack*>( measBase ) ;
93 if( hit == nullptr ) {
94 ATH_MSG_DEBUG( "dynamic_cast <const Trk::RIO_OnTrack*>( measBase ) returned 0 pointer" ) ;
95 return nullptr ;
96 }
97
98 const Trk::PrepRawData* prd = hit->prepRawData() ;
99 if( prd == nullptr ) {
100 ATH_MSG_WARNING( "hit->prepRawData() method failed" ) ;
101 return nullptr ;
102 }
103
104
105 if( m_rejectGangedPixels && isGangedPixel( prd ) ) return nullptr ;
106 const vector<Identifier> &idVec = prd->rdoList() ;
107
108 // cut on the cluster size
109 if( m_maxClusterSize > 0 && !isGoodClusterSize( idVec ) ) return nullptr ;
110
111 // cut on edge channels
112 if( m_rejectEdgeChannels && isEdgeChannel( idVec ) ) return nullptr ;
113 // cut on the track incidence angle alpha
114 const Trk::TrackParameters* trkPar = tsos->trackParameters() ;
115 if( trkPar == nullptr ) {
116 ATH_MSG_WARNING( "tsos->trackParameters() returned 0 pointer" ) ;
117 return nullptr ;
118 }
119 const InDetDD::SiDetectorElement *detEle
120 = dynamic_cast<const InDetDD::SiDetectorElement*>( hit->detectorElement() ) ;
121 if( detEle == nullptr ) {
122 ATH_MSG_WARNING( "hit cast to SiDetectorElement returned 0 pointer" ) ;
123 return nullptr ;
124 }
125 if( !isGoodAngle( trkPar, detEle ) ) return nullptr ;
126 return hit ;
127}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
bool isGangedPixel(const Trk::PrepRawData *prd) const
check, whether cluster contains a ganged pixel
bool isGoodAngle(const Trk::TrackParameters *trkPar, const InDetDD::SiDetectorElement *detEle) const
check whether track incidence angle within limits of m_maxIncidAngle
bool isGoodClusterSize(const std::vector< Identifier > &idVec) const
check, whether cluster size within limits of m_maxClusterSize
bool isEdgeChannel(const std::vector< Identifier > &idVec) const
check, whether the strip/pixel is an edge channel
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
virtual const TrkDetElementBase * detectorElement() const =0
returns the detector element, assoicated with the PRD of this class
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
ParametersBase< TrackParametersDim, Charged > TrackParameters

◆ getGoodHole()

bool InDetAlignHitQualSelTool::getGoodHole ( const Trk::TrackStateOnSurface * tsos) const
virtual

from a TrackStateOnSurface select a good hole in track cutting on large incidence angles only

Implements IInDetAlignHitQualSelTool.

Definition at line 233 of file InDetAlignHitQualSelTool.cxx.

233 {
234 if( tsos == nullptr ) {
235 ATH_MSG_ERROR( "0 pointer passed for TSOS!" ) ;
236 return false ;
237 }
239 ATH_MSG_DEBUG( "This is not a hole, reject" ) ;
240 return false ;
241 }
242 // for holes only cut on the track incidence angle alpha
243 const Trk::TrackParameters* trkPar = tsos->trackParameters() ;
244 if( trkPar == nullptr ) {
245 ATH_MSG_WARNING( "tsos->trackParameters() returned 0 pointer" ) ;
246 return false ;
247 }
248 const InDetDD::SiDetectorElement *detEle = dynamic_cast<const InDetDD::SiDetectorElement*>(
249 tsos->trackParameters()->associatedSurface().associatedDetectorElement() ) ;
250 if( detEle == nullptr ) {
251 ATH_MSG_WARNING( "hole cast to SiDetectorElement returned 0 pointer" ) ;
252 return false ;
253 }
254 if( !isGoodAngle( trkPar, detEle ) ) return false ;
255 return true;
256}
@ Hole
A hole on the track - this is defined in the following way.

◆ incidAngle()

double InDetAlignHitQualSelTool::incidAngle ( const Trk::TrackParameters * trkPar,
const InDetDD::SiDetectorElement * detEle ) const
private

calculate track incidence angle in local x-z frame

< local x axis in global frame

< local z axis in global frame

< scalar product

Definition at line 323 of file InDetAlignHitQualSelTool.cxx.

325 {
326 Amg::Vector3D trkDir = trkPar->momentum() ;
327 const Amg::Vector3D& detElePhi = detEle->phiAxis() ;
328 const Amg::Vector3D& detEleNormal = detEle->normal() ;
329 double trkDotPhi = trkDir.dot( detElePhi ) ;
330 double trkDotNormal = trkDir.dot( detEleNormal ) ;
331 double trkIncidAngle = atan( trkDotPhi/trkDotNormal ) ;
332 ATH_MSG_DEBUG( "trkIncidAngle = " << trkIncidAngle ) ;
333 return trkIncidAngle ;
334}
virtual const Amg::Vector3D & normal() const override final
Get reconstruction local normal axes in global frame.
const Amg::Vector3D & momentum() const
Access method for the momentum.
Eigen::Matrix< double, 3, 1 > Vector3D

◆ initialize()

StatusCode InDetAlignHitQualSelTool::initialize ( )
virtual

Definition at line 53 of file InDetAlignHitQualSelTool.cxx.

53 {
54 StatusCode sc = AlgTool::initialize() ;
55 if( sc.isFailure() ) return sc ;
56 // get DetectorStore service
58 ATH_CHECK(detStore()->retrieve(m_sctID, "SCT_ID"));
59 ATH_CHECK(detStore()->retrieve(m_pixelid, "PixelID"));
60 // get pixel manager
61 ATH_CHECK(detStore()->retrieve( m_PIXManager, "Pixel" )) ;
62 return StatusCode::SUCCESS ;
63}
#define ATH_CHECK
Evaluate an expression and check for errors.
static Double_t sc
const ServiceHandle< StoreGateSvc > & detStore() const
::StatusCode StatusCode
StatusCode definition for legacy code.
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

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 & IInDetAlignHitQualSelTool::interfaceID ( )
inlinestaticinherited

for ToolHandle functionality

Definition at line 42 of file IInDetAlignHitQualSelTool.h.

42 {
44}
static const InterfaceID IID_INDETALIGN_IInDetAlignHitQualSelTool("IInDetAlignHitQualSelTool", 1, 0)
Must declare this, with name of interface.

◆ isEdgeChannel()

bool InDetAlignHitQualSelTool::isEdgeChannel ( const std::vector< Identifier > & idVec) const
private

check, whether the strip/pixel is an edge channel

Definition at line 284 of file InDetAlignHitQualSelTool.cxx.

284 {
285 for( unsigned int i=0, i_max=idVec.size() ; i!=i_max ; ++i ) {
286 if( m_sctID->is_sct(idVec[i]) ) {
287 int stripId = m_sctID->strip(idVec[i]) ;
288 if( stripId == 0 || stripId == 767 ) {
289 ATH_MSG_DEBUG( " SCT strip " << i << " with id " << stripId << " is an edge channel " ) ;
290 return true ;
291 }
292 if( stripId < 0 || stripId > 767 ) {
293 ATH_MSG_FATAL( " WRONG DETECTOR INFORMATION " ) ;
294 }
295 }
296 if( m_PIXManager->identifierBelongs(idVec[i]) ) {
297 int pixelIdPhi = m_pixelid->phi_index(idVec[i]) ;
298 int pixelIdEta = m_pixelid->eta_index(idVec[i]) ;
299 if( pixelIdPhi == 0 || pixelIdPhi == 327 || pixelIdEta == 0 || pixelIdEta == 143 ) {
300 ATH_MSG_DEBUG( " pixel hit " << i << " with idPhi " << pixelIdPhi << " and idEta " << pixelIdEta << " is an edge channel " ) ;
301 return true ;
302 }
303 if( pixelIdPhi < 0 || pixelIdPhi > 327 || pixelIdEta < 0 || pixelIdEta > 143 ) {
304 ATH_MSG_FATAL( " WRONG DETECTOR INFORMATION " ) ;
305 }
306 }
307 }
308 return false ;
309}
#define ATH_MSG_FATAL(x)

◆ isGangedPixel()

bool InDetAlignHitQualSelTool::isGangedPixel ( const Trk::PrepRawData * prd) const
private

check, whether cluster contains a ganged pixel

< cut only if m_maxClusterSize set

Definition at line 259 of file InDetAlignHitQualSelTool.cxx.

259 {
260 const InDet::SiCluster* cluster = dynamic_cast<const InDet::SiCluster*>( prd ) ;
261 if( cluster == nullptr ) {
262 ATH_MSG_WARNING( "dynamic_cast<const InDet::SiCluster*>( prd ) failed!" ) ;
263 return false ;
264 }
265 if( cluster->gangedPixel() ) {
266 ATH_MSG_DEBUG( "cluster contains a ganged pixel, reject" ) ;
267 return true ;
268 }
269 return false ;
270}
bool gangedPixel() const
return the flag of this cluster containing a gangedPixel

◆ isGoodAngle()

bool InDetAlignHitQualSelTool::isGoodAngle ( const Trk::TrackParameters * trkPar,
const InDetDD::SiDetectorElement * detEle ) const
private

check whether track incidence angle within limits of m_maxIncidAngle

Definition at line 311 of file InDetAlignHitQualSelTool.cxx.

313 {
314 const double trkIncidAngle = incidAngle( trkPar, detEle ) ;
315 if( std::abs(trkIncidAngle) > m_maxIncidAngle ) {
316 ATH_MSG_DEBUG( "trkIncidAngle = |" << trkIncidAngle << "| > " << m_maxIncidAngle << ", reject" ) ;
317 return false ;
318 }
319 return true;
320}
double incidAngle(const Trk::TrackParameters *trkPar, const InDetDD::SiDetectorElement *detEle) const
calculate track incidence angle in local x-z frame

◆ isGoodClusterSize()

bool InDetAlignHitQualSelTool::isGoodClusterSize ( const std::vector< Identifier > & idVec) const
private

check, whether cluster size within limits of m_maxClusterSize

< cut only if m_maxClusterSize set

Definition at line 273 of file InDetAlignHitQualSelTool.cxx.

273 {
274 int clusterSize = idVec.size() ;
275 ATH_MSG_DEBUG( "clusterSize = " << clusterSize ) ;
276 if( clusterSize > m_maxClusterSize ) {
277 ATH_MSG_DEBUG( "clusterSize = " << clusterSize << " > " << m_maxClusterSize << ", reject" ) ;
278 return false ;
279 }
280 return true ;
281}

◆ isGoodSiHit()

bool InDetAlignHitQualSelTool::isGoodSiHit ( const Trk::TrackStateOnSurface * tsos) const
virtual

Implements IInDetAlignHitQualSelTool.

Definition at line 129 of file InDetAlignHitQualSelTool.cxx.

129 {
130 bool isSiliconHit = false;
131 bool isPixelHit = false;
132 bool isIBLHit = false;
133
134 if( tsos == nullptr ) {
135 ATH_MSG_ERROR( "0 pointer passed for TSOS!" ) ;
136 return false ;
137 }
139 ATH_MSG_DEBUG( "not a hit, cast to MeasurementBase will fail --> keep it anyway" ) ;
140 return false ;
141 }
142
144 ATH_MSG_DEBUG( "outlier --> keep it" ) ;
145 return false ;
146 }
147 const Trk::MeasurementBase* measBase = tsos->measurementOnTrack() ;
148 if( measBase == nullptr) {
149 ATH_MSG_DEBUG( "tsos->measurementOnTrack() returned 0 pointer" ) ;
150 return false ;
151 }
152
153 const Trk::RIO_OnTrack* hit = dynamic_cast <const Trk::RIO_OnTrack*>( measBase ) ;
154 if( hit == nullptr ) {
155 ATH_MSG_DEBUG( "dynamic_cast <const Trk::RIO_OnTrack*>( measBase ) returned 0 pointer" ) ;
156 return false ;
157 }
158
159 const Trk::PrepRawData* prd = hit->prepRawData() ;
160 if( prd == nullptr ) {
161 ATH_MSG_WARNING( "hit->prepRawData() method failed" ) ;
162 return false ;
163 }
164
165
166 const Identifier & hitId = hit->identify();
167 if (m_sctID->is_sct(hitId)) {
168 ATH_MSG_DEBUG( " this is a SCT hit - SCT - SCT - ");
169 isSiliconHit = true;
170 }
171 if (m_pixelid->is_pixel(hitId)) {
172 ATH_MSG_DEBUG( " this is a PIX hit - PIX - PIX - ");
173 isSiliconHit = true;
174 isPixelHit = true; // assume that is pixel hit
175 // but check if it is IBL
176 if (m_pixelid->layer_disk(hitId) == 0 && m_pixelid->barrel_ec(hitId) == 0 ) {isIBLHit = true; isPixelHit = false;}
177 }
178
179 if (!isSiliconHit) {
180 ATH_MSG_DEBUG( "This is not a silicon hit. Keep it as good" ) ;
181 return true;
182 }
183
184 // accept IBL hits ?
185 if (!m_acceptIBLHits && isIBLHit) {
186 ATH_MSG_INFO( "this is an IBL hit --> user wants to drop it" ) ;
187 return false;
188 }
189
190 // accept pixel hits ?
191 if (!m_acceptPixelHits && isPixelHit) {
192 ATH_MSG_INFO( "this is a pixel hit --> user wants to drop it" ) ;
193 return false;
194 }
195
196 // accept SCT hits ?
197 if (!m_acceptSCTHits) {
198 if (isSiliconHit && m_sctID->is_sct(hitId)) {
199 ATH_MSG_INFO( "this is a SCT hit --> user wants to drop it" ) ;
200 return false;
201 }
202 }
203
204 if( m_rejectGangedPixels && isGangedPixel( prd ) ) return false ;
205 const vector<Identifier> &idVec = prd->rdoList() ;
206
207 // cut on the cluster size
208 if( m_maxClusterSize > 0 && !isGoodClusterSize( idVec ) ) return false ;
209
210 // cut on edge channels
211 if( m_rejectEdgeChannels && isEdgeChannel( idVec ) ) return false ;
212
213 // cut on the track incidence angle alpha
214 const Trk::TrackParameters* trkPar = tsos->trackParameters() ;
215 if( trkPar == nullptr ) {
216 ATH_MSG_WARNING( "tsos->trackParameters() returned 0 pointer" ) ;
217 return false ;
218 }
219 // incidence angle
220 const InDetDD::SiDetectorElement *detEle
221 = dynamic_cast<const InDetDD::SiDetectorElement*>( hit->detectorElement() ) ;
222 if( detEle == nullptr ) {
223 ATH_MSG_WARNING( "hit cast to SiDetectorElement returned 0 pointer" ) ;
224 return false ;
225 }
226 if( !isGoodAngle( trkPar, detEle ) ) return false ;
227
228 return true ;
229}
#define ATH_MSG_INFO(x)
Identifier identify() const
return the identifier -extends MeasurementBase

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

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()

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 > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_acceptIBLHits

bool InDetAlignHitQualSelTool::m_acceptIBLHits
private

Definition at line 85 of file InDetAlignHitQualSelTool.h.

◆ m_acceptPixelHits

bool InDetAlignHitQualSelTool::m_acceptPixelHits
private

Definition at line 89 of file InDetAlignHitQualSelTool.h.

◆ m_acceptSCTHits

bool InDetAlignHitQualSelTool::m_acceptSCTHits
private

Definition at line 93 of file InDetAlignHitQualSelTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_maxClusterSize

int InDetAlignHitQualSelTool::m_maxClusterSize
private

Definition at line 72 of file InDetAlignHitQualSelTool.h.

◆ m_maxIncidAngle

float InDetAlignHitQualSelTool::m_maxIncidAngle
private

maximum incidence angle of a track (to which the hit belongs) on the Si-module.

It is caculated in the local xz frame to ensure that the only the angle component perpendicular to the strips is considered. It is defined w/r/t the local z-axis.

Definition at line 81 of file InDetAlignHitQualSelTool.h.

◆ m_pixelid

const PixelID* InDetAlignHitQualSelTool::m_pixelid
private

Pixel id helper.

Definition at line 98 of file InDetAlignHitQualSelTool.h.

◆ m_PIXManager

const InDetDD::PixelDetectorManager* InDetAlignHitQualSelTool::m_PIXManager
private

to get pixel phi and eta identifiers

Definition at line 97 of file InDetAlignHitQualSelTool.h.

◆ m_rejectEdgeChannels

bool InDetAlignHitQualSelTool::m_rejectEdgeChannels
private

reject clusters containing edge channels

Definition at line 74 of file InDetAlignHitQualSelTool.h.

◆ m_rejectGangedPixels

bool InDetAlignHitQualSelTool::m_rejectGangedPixels
private

reject clusters containing ganged pixels

Definition at line 76 of file InDetAlignHitQualSelTool.h.

◆ m_rejectOutliers

bool InDetAlignHitQualSelTool::m_rejectOutliers
private

reject hits labeled as outliers by the track fitter

Definition at line 69 of file InDetAlignHitQualSelTool.h.

◆ m_sctID

const SCT_ID* InDetAlignHitQualSelTool::m_sctID
private

Pixel id helper.

Definition at line 99 of file InDetAlignHitQualSelTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: