ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
InDet::SCT_ClusterOnTrackTool Class Referencefinal

creates SCT_ClusterOnTrack objects allowing to calibrate cluster position and error using a given track hypothesis. More...

#include <SCT_ClusterOnTrackTool.h>

Inheritance diagram for InDet::SCT_ClusterOnTrackTool:
Collaboration diagram for InDet::SCT_ClusterOnTrackTool:

Public Member Functions

 SCT_ClusterOnTrackTool (const std::string &, const std::string &, const IInterface *)
 AlgTool constructor. More...
 
virtual ~SCT_ClusterOnTrackTool ()=default
 
virtual StatusCode initialize () override
 AlgTool initialisation. More...
 
virtual StatusCode finalize () override
 AlgTool termination. More...
 
virtual InDet::SCT_ClusterOnTrackcorrect (const Trk::PrepRawData &, const Trk::TrackParameters &, const EventContext &ctx=Gaudi::Hive::currentContext()) const override
 produces an SCT_ClusterOnTrack using the measured SCT_Cluster and the track prediction. 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 > &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
 

Static Public Member Functions

static double getCorrection (double phi, int nstrip)
 Returns a correction to be applied to the SCT cluster local x position in simulated events to remove a position bias introduced by the SCT digitisation. More...
 
static double getError (double phi, int nstrip)
 Returns the resolution on the reconstructed position (local x) of SCT clusters in simulated events. More...
 
static const InterfaceID & interfaceID ()
 The AlgTool InterfaceID. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadCondHandleKey< RIO_OnTrackErrorScalingm_sctErrorScalingKey {this,"SCTErrorScalingKey", "/Indet/TrkErrorScalingSCT", "Key for SCT error scaling conditions data."}
 toolhandle for central error scaling More...
 
ToolHandle< ISiLorentzAngleToolm_lorentzAngleTool {this, "LorentzAngleTool", "SiLorentzAngleTool", "Tool to retrieve Lorentz angle"}
 
BooleanProperty m_option_make2dimBarrelClusters
 job options More...
 
IntegerProperty m_option_errorStrategy
 
IntegerProperty m_option_correctionStrategy
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

creates SCT_ClusterOnTrack objects allowing to calibrate cluster position and error using a given track hypothesis.

See doxygen of Trk::RIO_OnTrackCreator for details. Different strategies to calibrate the cluster error can be chosen by job Option. Also the handle to the general hit-error scaling is implemented.

Definition at line 39 of file SCT_ClusterOnTrackTool.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

◆ SCT_ClusterOnTrackTool()

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

AlgTool constructor.

Definition at line 30 of file SCT_ClusterOnTrackTool.cxx.

31  :
32  AthAlgTool(t, n, p) {
33  declareInterface<IRIO_OnTrackCreator>(this);
34 }

◆ ~SCT_ClusterOnTrackTool()

virtual InDet::SCT_ClusterOnTrackTool::~SCT_ClusterOnTrackTool ( )
virtualdefault

Member Function Documentation

◆ correct()

InDet::SCT_ClusterOnTrack * InDet::SCT_ClusterOnTrackTool::correct ( const Trk::PrepRawData rio,
const Trk::TrackParameters trackPar,
const EventContext &  ctx = Gaudi::Hive::currentContext() 
) const
overridevirtual

produces an SCT_ClusterOnTrack using the measured SCT_Cluster and the track prediction.

This method is a factory, so the client has to take care of management/deletion of the SCT_ClusterOnTrack.

Implements Trk::IRIO_OnTrackCreator.

Definition at line 93 of file SCT_ClusterOnTrackTool.cxx.

94  {
95 
97  return nullptr;
98  }
99  const InDet::SCT_Cluster * SC = static_cast<const InDet::SCT_Cluster *> (&rio);
100  const InDet::SiWidth width = SC->width();
101  const Amg::Vector2D &colRow = width.colRow();
102 
103  // Get pointer to detector element
104  //
105  const InDetDD::SiDetectorElement *EL = SC->detectorElement();
106  if (!EL) {
107  return nullptr;
108  }
109  IdentifierHash iH = EL->identifyHash();
110 
111  // Get local position of track
112  //
113  Amg::Vector2D loct = trackPar.localPosition();
114 
115  // Find phi angle of track relative to Lorentz drift direction, if needed
116  //
117  double dphi(0.);
118  double sinAlpha = EL->sinStereoLocal(SC->localPosition());
119  double cosAlpha = std::sqrt(1 - sinAlpha * sinAlpha);
121  double pNormal = trackPar.momentum().dot(EL->normal());
122  double pPhi = trackPar.momentum().dot(Amg::AngleAxis3D(asin(-sinAlpha), Amg::Vector3D::UnitZ()) * EL->phiAxis());
123  dphi = std::atan(pPhi / pNormal) - std::atan(m_lorentzAngleTool->getTanLorentzAngle(iH, ctx));
124  }
125  Amg::Vector3D localstripdir(-sinAlpha, cosAlpha, 0.);
126  Amg::Vector3D globalstripdir = trackPar.associatedSurface().transform().linear() * localstripdir;
127  double distance = (trackPar.position() - SC->globalPosition()).mag();
128  const auto *boundsraw = &trackPar.associatedSurface().bounds();
129 
130  const Trk::TrapezoidBounds *tbounds = boundsraw->type() == Trk::SurfaceBounds::Trapezoid ? static_cast<const Trk::TrapezoidBounds *>(boundsraw) : nullptr;
131  const Trk::RectangleBounds *rbounds = boundsraw->type() == Trk::SurfaceBounds::Rectangle ? static_cast<const Trk::RectangleBounds *>(boundsraw) : nullptr;
132 
133  if (!tbounds && !rbounds) {
134  return nullptr;
135  }
136 
137  double boundsy = rbounds ? rbounds->halflengthY() : tbounds->halflengthY();
138  if (distance * cosAlpha > boundsy) {
139  distance = boundsy / cosAlpha - 1;
140  }
141  // SCT_ClusterOnTrack production
142  //
143  Trk::LocalParameters locpar;
144  if (loct.y() < 0) {
145  distance = -distance;
146  }
147  Amg::Vector3D glob(SC->globalPosition() + distance * globalstripdir);
148  Amg::MatrixX oldcov = SC->localCovariance();
149  // Local position and error matrix production
150  //
151  // let's start to re-compute cluster error if errorStrategy >=0
152  // These were derived by the studies reported on 25th September 2006
153  // https://indico.cern.ch/event/430391/contributions/1066157/attachments/929942/1317007/SCTSoft_25Sept06_clusters.pdf
154  // and on 4th February 2008
155  // https://indico.cern.ch/event/22934/contributions/485813/attachments/379647/528096/ClusterErrors_04Feb08.pdf
156  if (m_option_errorStrategy > -1) {
157  Amg::MatrixX mat(2, 2);
158  mat.setZero();
159  switch (m_option_errorStrategy) {
160  case 0:
161  mat(0, 0) = std::pow(width.phiR(), 2) /12.;
162  mat(1, 1) = std::pow(width.z(), 2) /12.;
163  break;
164 
165  case 1:
166  if (colRow.x() == 1) {
167  mat(0, 0) = std::pow(1.05 * width.phiR(), 2) /12.;
168  } else if (colRow.x() == 2) {
169  mat(0, 0) = std::pow(0.27 * width.phiR(), 2) /12.;
170  } else {
171  mat(0, 0) = std::pow(width.phiR(), 2) /12.;
172  }
173  mat(1, 1) = std::pow(width.z() / colRow.y(), 2) /12.;
174  break;
175 
176  case 2:
177  mat(0, 0) = std::pow(getError(dphi, int(colRow.x())) * (EL->phiPitch() / 0.080), 2);
178  mat(1, 1) = std::pow(width.z() / colRow.y(), 2) /12.;
179  break;
180 
181  default:
182  // don't do anything....
183  break;
184  }
185  // rotation for endcap SCT
186  if (EL->design().shape() == InDetDD::Trapezoid) {
187  double sn = EL->sinStereoLocal(SC->localPosition());
188  double sn2 = sn * sn;
189  double cs2 = 1. - sn2;
190  double w = EL->phiPitch(SC->localPosition()) / EL->phiPitch();
191  double v0 = mat(0, 0) * w * w;
192  double v1 = mat(1, 1);
193  mat(0, 0) = (cs2 * v0 + sn2 * v1);
194  mat(1, 0) = (sn * std::sqrt(cs2) * (v0 - v1));
195  mat(0, 1) = mat(1, 0);
196  mat(1, 1) = (sn2 * v0 + cs2 * v1);
197  }
198  oldcov = std::move(mat);
199  }
200 
201  Amg::MatrixX cov(oldcov);
202  if (EL->design().shape() != InDetDD::Trapezoid) { // barrel
203  Trk::DefinedParameter lpos1dim(SC->localPosition().x(), Trk::locX);
205  Trk::LocalParameters(SC->localPosition()) :// PRDformation does 2-dim
206  Trk::LocalParameters(lpos1dim);
208  cov = Amg::MatrixX(1, 1);
209  cov(0, 0) = oldcov(0, 0);
210  }
211 
212  if (!m_sctErrorScalingKey.key().empty()) {
213  //SG::ReadCondHandle<SCTRIO_OnTrackErrorScaling> error_scaling( m_sctErrorScalingKey );
215  cov = Trk::ErrorScalingCast<SCTRIO_OnTrackErrorScaling>(*error_scaling)
216  ->getScaledCovariance(std::move(cov), false, 0.0);
217  }
218  }else { // endcap
219  locpar = Trk::LocalParameters(SC->localPosition());
220  if (!m_sctErrorScalingKey.key().empty()) {
222  cov = Trk::ErrorScalingCast<SCTRIO_OnTrackErrorScaling>(*error_scaling)
223  ->getScaledCovariance(std::move(cov), true,
224  EL->sinStereoLocal(SC->localPosition()));
225  }
226  double Sn = EL->sinStereoLocal(SC->localPosition());
227  double Sn2 = Sn * Sn;
228  double Cs2 = (1. - Sn) * (1. + Sn);
229  double SC = Sn * std::sqrt(Cs2);
230  double W = EL->phiPitch(loct) / EL->phiPitch();
231  double dV0 = (Cs2 * cov(0, 0) + Sn2 * cov(1, 1) +
232  2. * SC * cov(1, 0)) * (W * W - 1.);
233  cov(0, 0) += (Cs2 * dV0);
234  cov(1, 0) += (SC * dV0);
235  cov(0, 1) = cov(1, 0);
236  cov(1, 1) += (Sn2 * dV0);
237  }
238 
239  // Apply correction for cluster position bias
240  //
241  if (m_option_correctionStrategy == 0) {
242  double correction = getCorrection(dphi, int(colRow.x())) * EL->hitDepthDirection();
243  locpar[Trk::locX] += correction;
244  }
245  bool isbroad = m_option_errorStrategy == 0;
246  return new InDet::SCT_ClusterOnTrack(SC, std::move(locpar), std::move(cov), iH, glob, isbroad);
247 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation 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.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation 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.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ 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.

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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 InDet::SCT_ClusterOnTrackTool::finalize ( )
overridevirtual

AlgTool termination.

Definition at line 82 of file SCT_ClusterOnTrackTool.cxx.

82  {
84 
85  return sc;
86 }

◆ getCorrection()

double InDet::SCT_ClusterOnTrackTool::getCorrection ( double  phi,
int  nstrip 
)
static

Returns a correction to be applied to the SCT cluster local x position in simulated events to remove a position bias introduced by the SCT digitisation.

Parameters
[in]phiangle of track relative to Lorentz drift direction, in transverse plane
[in]nstripSCT cluster size (number of strips)

Definition at line 250 of file SCT_ClusterOnTrackTool.cxx.

250  {
251  constexpr float corr1[30] = {
252  0.3, 0.8, 1.1, 1.5, 1.9, 1.9, 2.1, 2.4, 2.3, 2.6,
253  2.6, 2.7, 2.8, 2.7, 2.5, 2.6, 2.8, 2.6, 2.6, 2.7,
254  2.2, 1.8, 1.8, 1.6, 1.5, 0.0, 0.0, 0.0, 0.0, 0.0
255  };
256  constexpr float corr2[30] = {
257  0.0, 0.0, 0.0, 1.0, 1.5, 1.7, 1.7, 2.3, 2.1, 2.5,
258  2.5, 2.7, 2.7, 2.9, 3.0, 3.0, 3.0, 3.0, 3.4, 3.4,
259  3.0, 3.2, 2.6, 2.6, 3.0, 2.7, 2.5, 2.4, 1.7, 1.3
260  };
261 
262  // Phi bins have 1 degree width, and cover 0-30 degrees
263  int phiBin = static_cast<int>(std::abs(phi) / deg);
264 
265  float correction(0.);
266 
267  if (phiBin < 30) {
268  if (nstrip == 1) {
269  correction = corr1[phiBin];
270  }
271  if (nstrip == 2) {
272  correction = corr2[phiBin];
273  }
274  }
275 
276  if (phi > 0.) {
277  correction *= -1.;
278  }
279 
280  return correction * micrometer;
281 }

◆ getError()

double InDet::SCT_ClusterOnTrackTool::getError ( double  phi,
int  nstrip 
)
static

Returns the resolution on the reconstructed position (local x) of SCT clusters in simulated events.

Parameters
[in]phiangle of track relative to Lorentz drift direction, in transverse plane
[in]nstripSCT cluster size (number of strips)

The parameterisation of the resolution contained in getError() was derived from SCT barrel clusters (80 micron pitch). It can be applied also to endcap clusters, after rescaling to the appropriate pitch.

Definition at line 284 of file SCT_ClusterOnTrackTool.cxx.

284  {
285  constexpr float sigma1[60] = {
286  22.1, 21.8, 21.4, 21.0, 20.5, 20.0, 19.6, 19.1, 18.5, 18.0,
287  17.4, 17.0, 16.4, 15.8, 15.4, 14.9, 14.4, 14.1, 13.3, 13.1,
288  12.9, 12.4, 12.6, 12.2, 12.3, 12.6, 13.4, 14.2, 15.6, 19.3,
289  22.8, 29.5, 33.2, 41.8, 44.3, 48.4, 49.9, 54.0, 53.0, 56.3,
290  57.5, 56.3, 64.5, 65.7, 66.1, 69.4, 74.8, 78.3, 78.8, 79.8,
291  73.5, 73.8, 75.8, 84.3, 87.0, 99.9, 86.3, 0.0, 0.0, 0.0
292  };
293  constexpr float sigma2[60] = {
294  22.2, 20.3, 18.8, 16.0, 14.6, 13.8, 12.9, 12.9, 12.7, 12.3,
295  12.7, 12.6, 13.0, 13.3, 14.0, 14.6, 15.3, 15.9, 16.6, 17.6,
296  18.4, 19.3, 19.9, 20.5, 21.0, 21.2, 21.5, 21.4, 21.3, 21.3,
297  20.9, 20.8, 20.6, 20.7, 20.3, 20.7, 21.7, 24.4, 26.5, 29.5,
298  34.6, 41.6, 48.5, 52.3, 54.5, 58.4, 61.8, 66.7, 69.9, 72.1,
299  78.9, 79.2, 81.8, 80.9, 87.5, 99.2, 0.0, 0.0, 0.0, 0.0
300  };
301  constexpr float sigma3[60] = {
302  70.1, 73.6, 71.7, 66.9, 68.3, 66.8, 66.2, 64.8, 66.6, 63.3,
303  63.3, 60.4, 59.0, 57.1, 56.4, 54.4, 54.2, 54.4, 50.3, 48.9,
304  48.1, 41.9, 38.0, 31.8, 28.3, 23.1, 23.0, 20.3, 18.5, 17.6,
305  17.7, 16.8, 18.3, 19.3, 19.0, 20.0, 20.9, 21.6, 22.0, 22.2,
306  22.7, 22.4, 24.3, 24.8, 24.6, 27.0, 29.8, 37.0, 47.7, 49.3,
307  58.2, 60.2, 66.8, 70.8, 77.3, 80.6, 0.0, 0.0, 0.0, 0.0
308  };
309  constexpr float sigma4[60] = {
310  103.2, 100.4, 100.7, 101.2, 107.4, 100.6, 100.9, 100.4, 96.3, 98.2,
311  96.7, 94.5, 96.9, 91.7, 90.5, 89.5, 86.3, 90.6, 82.4, 89.3,
312  87.3, 77.6, 75.7, 77.2, 77.3, 84.1, 80.1, 66.9, 73.7, 72.3,
313  58.1, 65.6, 64.2, 54.7, 47.2, 44.4, 34.6, 36.4, 29.1, 25.8,
314  18.8, 21.6, 18.6, 20.3, 22.7, 23.3, 24.1, 22.4, 24.7, 24.7,
315  27.3, 30.4, 37.0, 46.4, 59.4, 62.6, 65.3, 0.0, 0.0, 0.0
316  };
317  constexpr float sigma5[60] = {
318  150.9, 139.7, 133.9, 139.8, 141.4, 134.9, 138.4, 129.3, 137.9, 128.7,
319  132.4, 130.1, 124.2, 115.8, 131.4, 115.2, 128.7, 112.8, 130.7, 129.0,
320  115.8, 101.3, 115.9, 116.1, 121.7, 109.9, 110.0, 97.2, 96.4, 107.3,
321  98.2, 80.0, 73.2, 87.0, 97.0, 88.5, 72.2, 73.9, 80.8, 75.7,
322  69.5, 67.1, 54.1, 58.9, 47.3, 50.6, 29.5, 26.6, 25.8, 20.9,
323  20.6, 21.9, 22.1, 21.1, 27.9, 41.6, 0.0, 0.0, 0.0, 0.0
324  };
325 
326  // Phi bins have 1 degree width, and cover 0-60 degrees
327  int phiBin = static_cast<int>(std::abs(phi) / deg);
328 
329  float sigma(0.);
330 
331  if (phiBin < 60) {
332  if (nstrip == 1) {
333  sigma = sigma1[phiBin];
334  }
335  if (nstrip == 2) {
336  sigma = sigma2[phiBin];
337  }
338  if (nstrip == 3) {
339  sigma = sigma3[phiBin];
340  }
341  if (nstrip == 4) {
342  sigma = sigma4[phiBin];
343  }
344  if (nstrip == 5) {
345  sigma = sigma5[phiBin];
346  }
347  }
348  if (sigma < 0.1) {
349  sigma = std::max(100., float(nstrip) * 80. / std::sqrt(12));
350  }
351 
352  return sigma * micrometer;
353 }

◆ initialize()

StatusCode InDet::SCT_ClusterOnTrackTool::initialize ( )
overridevirtual

AlgTool initialisation.

Definition at line 41 of file SCT_ClusterOnTrackTool.cxx.

41  {
43 
44  msg(MSG::INFO) << "A strategy to ";
45  switch (m_option_errorStrategy) {
46  case -1: msg(MSG::INFO) << "keep the PRD errors";
47  break;
48 
49  case 0: msg(MSG::INFO) << "apply simple pitch errors";
50  break;
51 
52  case 1: msg(MSG::INFO) << "assign tuned SCT errors";
53  break;
54 
55  case 2: msg(MSG::INFO) << "assign tuned, angle-dependent SCT errors";
56  break;
57 
58  default: msg(MSG::INFO) << " -- NO, UNKNOWN. Pls check jobOptions!";
59  break;
60  }
61  msg(MSG::INFO) << " will be applied during SCT_ClusterOnTrack making" << endmsg;
62  if (m_option_correctionStrategy == 0) {
63  msg(MSG::INFO) << "SCT cluster positions will be corrected" << endmsg;
64  }
65 
66  // get the error scaling tool
67  if (!m_sctErrorScalingKey.key().empty()) {
69  ATH_MSG_DEBUG("Detected need for scaling sct errors.");
70  }
71 
72  ATH_CHECK(m_lorentzAngleTool.retrieve());
73 
74  return sc;
75 }

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

static const InterfaceID& Trk::IRIO_OnTrackCreator::interfaceID ( )
inlinestaticinherited

The AlgTool InterfaceID.

Definition at line 42 of file IRIO_OnTrackCreator.h.

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ 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_lorentzAngleTool

ToolHandle<ISiLorentzAngleTool> InDet::SCT_ClusterOnTrackTool::m_lorentzAngleTool {this, "LorentzAngleTool", "SiLorentzAngleTool", "Tool to retrieve Lorentz angle"}
private

Definition at line 99 of file SCT_ClusterOnTrackTool.h.

◆ m_option_correctionStrategy

IntegerProperty InDet::SCT_ClusterOnTrackTool::m_option_correctionStrategy
private
Initial value:
{this, "CorrectionStrategy", -1,
"if CorrectionStrategy >= 0, apply a correction to the cluster position"}

Definition at line 109 of file SCT_ClusterOnTrackTool.h.

◆ m_option_errorStrategy

IntegerProperty InDet::SCT_ClusterOnTrackTool::m_option_errorStrategy
private
Initial value:
{this, "ErrorStrategy", -1,
"if ErrorStrategy < 0, keep previous errors else recompute"}

Definition at line 106 of file SCT_ClusterOnTrackTool.h.

◆ m_option_make2dimBarrelClusters

BooleanProperty InDet::SCT_ClusterOnTrackTool::m_option_make2dimBarrelClusters
private
Initial value:
{this, "MakeTwoDimBarrelClusters", false,
"flag if strip length should be part of the measurement"}

job options

Definition at line 103 of file SCT_ClusterOnTrackTool.h.

◆ m_sctErrorScalingKey

SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> InDet::SCT_ClusterOnTrackTool::m_sctErrorScalingKey {this,"SCTErrorScalingKey", "/Indet/TrkErrorScalingSCT", "Key for SCT error scaling conditions data."}
private

toolhandle for central error scaling

Definition at line 96 of file SCT_ClusterOnTrackTool.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:
Trk::LocalParameters
Definition: LocalParameters.h:98
Trk::RectangleBounds
Definition: RectangleBounds.h:38
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Trk::locX
@ locX
Definition: ParamDefs.h:37
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
JetTiledMap::W
@ W
Definition: TiledEtaPhiMap.h:44
Trk::ParametersBase::associatedSurface
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
Trk::SurfaceBounds::Rectangle
@ Rectangle
Definition: SurfaceBounds.h:65
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
InDet::SCT_ClusterOnTrackTool::m_option_correctionStrategy
IntegerProperty m_option_correctionStrategy
Definition: SCT_ClusterOnTrackTool.h:110
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
InDet::SCT_ClusterOnTrackTool::getCorrection
static double getCorrection(double phi, int nstrip)
Returns a correction to be applied to the SCT cluster local x position in simulated events to remove ...
Definition: SCT_ClusterOnTrackTool.cxx:250
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
initialize
void initialize()
Definition: run_EoverP.cxx:894
Trk::TrapezoidBounds::halflengthY
double halflengthY() const
This method returns the halflength in Y (second coordinate of local surface frame)
plotBeamSpotVxVal.cov
cov
Definition: plotBeamSpotVxVal.py:201
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
deg
#define deg
Definition: SbPolyhedron.cxx:17
Trk::PrepRawData::type
virtual bool type(PrepRawDataType type) const =0
Interface method checking the type.
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Trk::DefinedParameter
std::pair< double, ParamDefs > DefinedParameter
Definition: DefinedParameter.h:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
tools.zlumi_mc_cf.correction
def correction(mu, runmode, campaign, run=None)
Definition: zlumi_mc_cf.py:4
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
InDet::SCT_ClusterOnTrackTool::m_sctErrorScalingKey
SG::ReadCondHandleKey< RIO_OnTrackErrorScaling > m_sctErrorScalingKey
toolhandle for central error scaling
Definition: SCT_ClusterOnTrackTool.h:97
parseMapping.v0
def v0
Definition: parseMapping.py:149
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
EL
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Definition: AlgorithmWorkerData.h:24
TRT_PAI_gasdata::SC
const float SC[NC]
Cross sections for Carbon.
Definition: TRT_PAI_gasdata.h:255
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
python.SystemOfUnits.micrometer
int micrometer
Definition: SystemOfUnits.py:71
InDet::SCT_Cluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h:34
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::ParametersCommon::localPosition
Amg::Vector2D localPosition() const
Access method for the local coordinates, local parameter definitions differ for each surface type.
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::Surface::bounds
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
xAOD::phiBin
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setPhiMap phiBin
Definition: L2StandAloneMuon_v2.cxx:144
Trk::RectangleBounds::halflengthY
double halflengthY() const
for consitant naming
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Trk::SurfaceBounds::Trapezoid
@ Trapezoid
Definition: SurfaceBounds.h:67
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::RectangleBounds::type
virtual BoundsType type() const override final
Return the type of the bounds for persistency.
Definition: RectangleBounds.h:77
Trk::TrapezoidBounds
Definition: TrapezoidBounds.h:43
InDet::SCT_ClusterOnTrackTool::m_lorentzAngleTool
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
Definition: SCT_ClusterOnTrackTool.h:100
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
InDet::SCT_ClusterOnTrackTool::getError
static double getError(double phi, int nstrip)
Returns the resolution on the reconstructed position (local x) of SCT clusters in simulated events.
Definition: SCT_ClusterOnTrackTool.cxx:284
a
TList * a
Definition: liststreamerinfos.cxx:10
h
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
Trk::PrepRawDataType::SCT_Cluster
@ SCT_Cluster
InDet::SCT_ClusterOnTrackTool::m_option_errorStrategy
IntegerProperty m_option_errorStrategy
Definition: SCT_ClusterOnTrackTool.h:107
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
InDet::SiWidth
Definition: SiWidth.h:25
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Trk::TrapezoidBounds::type
virtual BoundsType type() const override
Return the type of the bounds for persistency.
Definition: TrapezoidBounds.h:84
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:200
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
mag
Scalar mag() const
mag method
Definition: AmgMatrixBasePlugin.h:26
InDetDD::Trapezoid
@ Trapezoid
Definition: DetectorDesign.h:42
fitman.k
k
Definition: fitman.py:528
InDet::SCT_ClusterOnTrackTool::m_option_make2dimBarrelClusters
BooleanProperty m_option_make2dimBarrelClusters
job options
Definition: SCT_ClusterOnTrackTool.h:104
InDet::SCT_ClusterOnTrack
Definition: SCT_ClusterOnTrack.h:44