ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Muon::CscClusterOnTrackCreator Class Reference

Interface for the reconstruction to calibration and alignment corrections. It should be used by reconstruction and pattern recognition to create Muon::MuonClusterOnTrack objects (s). More...

#include <CscClusterOnTrackCreator.h>

Inheritance diagram for Muon::CscClusterOnTrackCreator:
Collaboration diagram for Muon::CscClusterOnTrackCreator:

Public Member Functions

 CscClusterOnTrackCreator (const std::string &, const std::string &, const IInterface *)
 
virtual ~CscClusterOnTrackCreator ()
 
virtual StatusCode initialize () override
 
virtual MuonClusterOnTrackcreateRIO_OnTrack (const Trk::PrepRawData &RIO, const Amg::Vector3D &GP) const override
 Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and a predicted Trk::TrackParameter. More...
 
virtual MuonClusterOnTrackcreateRIO_OnTrack (const Trk::PrepRawData &RIO, const Amg::Vector3D &GP, const Amg::Vector3D &GD) const override
 Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and a prediction of the global position and direction. More...
 
virtual MuonClusterOnTrackcorrect (const Trk::PrepRawData &RIO, const Trk::TrackParameters &TP, const EventContext &) const override
 Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and the predicted Trk::TrackParameter at the measurement surface. More...
 
virtual MuonClusterOnTrackcorrect (const Trk::PrepRawData &RIO, const Amg::Vector3D &GP, const Amg::Vector3D &GD) const override
 
virtual const ToolHandle< ICscStripFitter > & GetICscStripFitter () const override
 These functions are provided from the interface. More...
 
virtual const ToolHandle< ICscClusterFitter > & GetICscClusterFitter () const override
 
virtual const ToolHandle< ICscClusterUtilTool > & GetICscClusterUtilTool () const override
 
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 const InterfaceID & interfaceID ()
 

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

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
 
ToolHandle< ICscStripFitterm_stripFitter {this, "CscStripFitter", "CalibCscStripFitter/CalibCscStripFitter"}
 
ToolHandle< ICscClusterFitterm_clusterFitter {this, "CscClusterFitter", "QratCscClusterFitter/QratCscClusterFitter"}
 
ToolHandle< ICscClusterUtilToolm_clusterUtilTool {this, "CscClusterUtilTool", "CscClusterUtilTool/CscClusterUtilTool"}
 
SG::ReadCondHandleKey< RIO_OnTrackErrorScalingm_cscErrorScalingKey
 
Gaudi::Property< double > m_errorScaler {this, "ErrorScaler" , 1.}
 
Gaudi::Property< double > m_errorScalerBeta {this, "ErrorScalerBeta", 0.}
 
Gaudi::Property< double > m_minimumError {this, "MinimumError" , 0.05}
 
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

Interface for the reconstruction to calibration and alignment corrections. It should be used by reconstruction and pattern recognition to create Muon::MuonClusterOnTrack objects (s).

It offers several interfaces:

JobOptions Flags:

Definition at line 51 of file CscClusterOnTrackCreator.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

◆ CscClusterOnTrackCreator()

Muon::CscClusterOnTrackCreator::CscClusterOnTrackCreator ( const std::string &  ty,
const std::string &  na,
const IInterface *  pa 
)

Definition at line 27 of file CscClusterOnTrackCreator.cxx.

27  :
28  AthAlgTool(ty, na, pa) {
29  // algtool interface - necessary!
30  declareInterface<IMuonClusterOnTrackCreator>(this);
31  declareInterface<IRIO_OnTrackCreator>(this);
32  }

◆ ~CscClusterOnTrackCreator()

Muon::CscClusterOnTrackCreator::~CscClusterOnTrackCreator ( )
virtualdefault

Member Function Documentation

◆ correct() [1/2]

MuonClusterOnTrack * Muon::CscClusterOnTrackCreator::correct ( const Trk::PrepRawData RIO,
const Amg::Vector3D GP,
const Amg::Vector3D GD 
) const
overridevirtual

Implements Muon::IMuonClusterOnTrackCreator.

Definition at line 251 of file CscClusterOnTrackCreator.cxx.

251  {
252  return createRIO_OnTrack(RIO, GP, GD);
253  }

◆ correct() [2/2]

MuonClusterOnTrack * Muon::CscClusterOnTrackCreator::correct ( const Trk::PrepRawData RIO,
const Trk::TrackParameters TP,
const EventContext &   
) const
overridevirtual

Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and the predicted Trk::TrackParameter at the measurement surface.

Parameters
RIOTrk::PrepRawData object to be calibrated
TPPredicted Trk::TrackParameter at the measurement surface
Returns
a pointer to a new Muon::MuonClusterOnTrack object, zero if calibration failed. The ownership of the new Muon::MuonClusterOnTrack is passed to the client calling the tool

Implements Muon::IMuonClusterOnTrackCreator.

Definition at line 246 of file CscClusterOnTrackCreator.cxx.

246  {
247  return createRIO_OnTrack(RIO, TP.position(), TP.momentum().unit());
248  }

◆ createRIO_OnTrack() [1/2]

MuonClusterOnTrack * Muon::CscClusterOnTrackCreator::createRIO_OnTrack ( const Trk::PrepRawData RIO,
const Amg::Vector3D GP 
) const
overridevirtual

Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and a predicted Trk::TrackParameter.

Parameters
RIOTrk::PrepRawData object to be calibrated
GPPredicted intersect position of the muon with the measurement plane
Returns
a pointer to a new Muon::MuonClusterOnTrack object, zero if calibration failed. The ownership of the new Muon::MuonClusterOnTrack is passed to the client calling the tool

Implements Muon::IMuonClusterOnTrackCreator.

Definition at line 56 of file CscClusterOnTrackCreator.cxx.

56  {
57  MuonClusterOnTrack* MClT = nullptr;
58 
59  // check whether PrepRawData has detector element, if not there print warning
61  if (!EL) {
62  ATH_MSG_WARNING("RIO does not have associated detectorElement!, cannot produce ROT");
63  return nullptr;
64  }
65 
66  // MuClusterOnTrack production
67  //
68  // in RIO_OnTrack the local param and cov should have the same dimension
69  Trk::LocalParameters locpar(RIO.localPosition());
70  if (RIO.localCovariance().cols() > 1) {
71  ATH_MSG_VERBOSE("Making 2-dim local parameters");
72  } else {
73  Trk::DefinedParameter radiusPar(RIO.localPosition().x(), Trk::locX);
74  locpar = Trk::LocalParameters(radiusPar);
75  ATH_MSG_VERBOSE("Making 1-dim local parameters");
76  }
77 
78  Amg::Vector2D lp;
79  double positionAlongStrip = 0;
80 
81  if (!EL->surface(RIO.identify()).globalToLocal(GP, GP, lp)) {
82  Amg::Vector3D lpos = RIO.detectorElement()->surface(RIO.identify()).transform().inverse() * GP;
83  ATH_MSG_WARNING("Extrapolated GlobalPosition not on detector surface! Distance " << lpos.z());
84  lp[Trk::locX] = lpos.x();
85  lp[Trk::locY] = lpos.y();
86  }
87  positionAlongStrip = lp[Trk::locY];
88 
89  // Error matrix production - expect more intelligent code here.
90  //
91  Amg::MatrixX loce = RIO.localCovariance();
92 
93  if (m_idHelperSvc->isCsc(RIO.identify()) && !m_cscErrorScalingKey.key().empty()) {
95  loce = Trk::ErrorScalingCast<MuonEtaPhiRIO_OnTrackErrorScaling>(
96  *error_scaling)
97  ->getScaledCovariance(std::move(loce), Trk::distPhi);
98  ATH_MSG_VERBOSE("CSC: new cov(0,0) is " << loce(0, 0));
99  }
100 
101  if (m_idHelperSvc->isCsc(RIO.identify())) {
102  // cast to CscPrepData
103  const CscPrepData* MClus = dynamic_cast<const CscPrepData*>(&RIO);
104  if (!MClus) {
105  ATH_MSG_WARNING("RIO not of type CscPrepData, cannot create ROT");
106  return nullptr;
107  }
108 
109  // current not changing CscClusterStatus but passing status of RIO
110  MClT = new CscClusterOnTrack(MClus, std::move(locpar), std::move(loce),
111  positionAlongStrip, MClus->status(), MClus->timeStatus(), MClus->time());
112  }
113 
114  return MClT;
115  }

◆ createRIO_OnTrack() [2/2]

MuonClusterOnTrack * Muon::CscClusterOnTrackCreator::createRIO_OnTrack ( const Trk::PrepRawData RIO,
const Amg::Vector3D GP,
const Amg::Vector3D GD 
) const
overridevirtual

Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and a prediction of the global position and direction.

It is only implemented for the CSCs, for RPC and TGC Trk::PrepRawData the result is the same as for the routine without the direction.

Parameters
RIOTrk::PrepRawData object to be calibrated
GPPredicted intersect position of the muon with the measurement plane
GDPredicted direction at the intersect position of the muon with the measurement plane
Returns
a pointer to a new Muon::MuonClusterOnTrack object, zero if calibration failed. The ownership of the new Muon::MuonClusterOnTrack is passed to the client calling the tool

Implements Muon::IMuonClusterOnTrackCreator.

Definition at line 119 of file CscClusterOnTrackCreator.cxx.

121  {
122  if (!m_idHelperSvc->isCsc(RIO.identify())) {
123  ATH_MSG_WARNING("CscClusterOnTrackCreator::createRIO_OnTrack is called by the other muon tech");
124  return nullptr;
125  }
126 
127  MuonClusterOnTrack* MClT = nullptr;
128  // check whether PrepRawData has detector element, if not there print warning
130  if (!EL) {
131  ATH_MSG_WARNING("RIO does not have associated detectorElement!, cannot produce ROT");
132  return MClT;
133  }
134  // cast to CscPrepData : Moved to the front to avoid any memory allocation before return;
135  const CscPrepData* MClus = dynamic_cast<const CscPrepData*>(&RIO);
136  if (!MClus) {
137  ATH_MSG_WARNING("RIO not of type CscPrepData, cannot create ROT");
138  return MClT;
139  }
140 
141  // MuClusterOnTrack production
142  //
143  // in RIO_OnTrack the local param and cov should have the same dimension
145  if (RIO.localCovariance().cols() > 1 ||
146  (m_idHelperSvc->isTgc(RIO.identify()) && m_idHelperSvc->tgcIdHelper().isStrip(RIO.identify()))) {
147  ATH_MSG_VERBOSE("Making 2-dim local parameters");
148  } else {
149  Trk::DefinedParameter radiusPar(RIO.localPosition().x(), Trk::locX);
150  locpar = Trk::LocalParameters(radiusPar);
151  ATH_MSG_VERBOSE("Making 1-dim local parameters");
152  }
153 
155  double positionAlongStrip = 0;
156 
157  if (!EL->surface(RIO.identify()).globalToLocal(GP, GP, lp)) {
158  Amg::Vector3D lpos = RIO.detectorElement()->surface(RIO.identify()).transform().inverse() * GP;
159  ATH_MSG_WARNING("Extrapolated GlobalPosition not on detector surface! Distance " << lpos.z());
160  lp[Trk::locX] = lpos.x();
161  lp[Trk::locY] = lpos.y();
162  }
163  positionAlongStrip = lp[Trk::locY];
164 
165  // Error matrix production - expect more intelligent code here.
166  //
167  Amg::MatrixX loce = RIO.localCovariance();
168 
169  if (m_idHelperSvc->isCsc(RIO.identify()) && !m_cscErrorScalingKey.key().empty()) {
171  loce = Trk::ErrorScalingCast<MuonEtaPhiRIO_OnTrackErrorScaling>(
172  *error_scaling)
173  ->getScaledCovariance(std::move(loce), Trk::distPhi);
174  ATH_MSG_VERBOSE("CSC: new cov(0,0) is " << loce(0, 0));
175  }
176 
177  // postion Error is re-estimate only for precision fit cluster (eta)
178  if (MClus->status() != Muon::CscStatusUnspoiled && MClus->status() != Muon::CscStatusSplitUnspoiled) {
179  // current not changing CscClusterStatus but passing status of RIO
180  MClT = new CscClusterOnTrack(MClus, std::move(locpar), std::move(loce), positionAlongStrip, MClus->status(), MClus->timeStatus(), MClus->time());
181 
182  } else {
183  const MuonGM::CscReadoutElement* ele = MClus->detectorElement();
184  Transform3D globalToLocal = ele->transform(MClus->identify()).inverse();
185  Vector3D d(globalToLocal * GD);
186  double tantheta = d.x() / d.z();
187 
188  std::vector<ICscClusterFitter::Result> results, results0;
189  results = m_clusterUtilTool->getRefitCluster(MClus, tantheta);
190  results0 = m_clusterUtilTool->getRefitCluster(MClus, 0);
191 
192  if (results.empty() || results0.empty()) {
193  ATH_MSG_VERBOSE("No fit result");
194  return new CscClusterOnTrack(MClus, std::move(locpar), std::move(loce),
195  positionAlongStrip, MClus->status(), MClus->timeStatus(), MClus->time());
196  }
198  res = results[0];
199  res0 = results0[0]; // result at normal angle to make error blown correctly in case of cosmic
200  int fitresult = res.fitStatus;
201  if (fitresult) {
202  ATH_MSG_VERBOSE(" Precision fit failed which was succeeded: return="
203  << "cluStatus: " << res.clusterStatus << "fitStatus: " << res.fitStatus);
204  return new CscClusterOnTrack(MClus, std::move(locpar), std::move(loce),
205  positionAlongStrip, MClus->status(), MClus->timeStatus(), MClus->time());
206  } else {
207  ATH_MSG_VERBOSE(" Precision fit succeeded");
208  }
209 
210  ATH_MSG_VERBOSE(" Angle from Segment: "
211  << " :: tanangle : " << tantheta);
212 
213  // in case that we need to scale errors for cosmic/data we want to scale only for normal part
214  // v0 only scaling up intrinsic term...
215  // double errorCorrected = sqrt(res.dposition*res.dposition - res0.dposition*res0.dposition
216  // + m_errorScaler*m_errorScaler*res0.dposition*res0.dposition);
217  // v1 scaling up total uncertainty and add up misalignment term....like sqrt( sigma_nominal^2 * alpha^2 + beta^2)
218  double nominal_error = res.dposition;
219  double errorCorrected =
220  std::sqrt(nominal_error * nominal_error * m_errorScaler * m_errorScaler + m_errorScalerBeta * m_errorScalerBeta);
221  if (errorCorrected < m_minimumError) errorCorrected = m_minimumError;
222 
223  Amg::MatrixX newloce(Amg::MatrixX(1, 1));
224  newloce.setIdentity();
225  newloce *= errorCorrected * errorCorrected;
226  if (!m_cscErrorScalingKey.key().empty()) {
228  newloce =
229  Trk::ErrorScalingCast<MuonEtaPhiRIO_OnTrackErrorScaling>(
230  *error_scaling)
231  ->getScaledCovariance(std::move(newloce), Trk::distPhi);
232  }
233 
234  ATH_MSG_VERBOSE("All: new err matrix is " << newloce);
235  ATH_MSG_VERBOSE(" dpos changed ====> " << Amg::error(newloce, Trk::loc1));
236 
237  MClT = new CscClusterOnTrack(MClus, std::move(locpar), std::move(newloce),
238  positionAlongStrip, MClus->status(), MClus->timeStatus(), MClus->time());
239  ATH_MSG_VERBOSE("global postion of MClT :::: " << MClT->globalPosition());
240  }
241 
242  return MClT;
243  }

◆ 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

◆ GetICscClusterFitter()

const ToolHandle< ICscClusterFitter > & Muon::CscClusterOnTrackCreator::GetICscClusterFitter ( ) const
overridevirtual

Implements Muon::ICscClusterOnTrackCreator.

Definition at line 257 of file CscClusterOnTrackCreator.cxx.

257 { return m_clusterFitter; }

◆ GetICscClusterUtilTool()

const ToolHandle< ICscClusterUtilTool > & Muon::CscClusterOnTrackCreator::GetICscClusterUtilTool ( ) const
overridevirtual

Implements Muon::ICscClusterOnTrackCreator.

Definition at line 258 of file CscClusterOnTrackCreator.cxx.

258 { return m_clusterUtilTool; }

◆ GetICscStripFitter()

const ToolHandle< ICscStripFitter > & Muon::CscClusterOnTrackCreator::GetICscStripFitter ( ) const
overridevirtual

These functions are provided from the interface.

Implements Muon::ICscClusterOnTrackCreator.

Definition at line 256 of file CscClusterOnTrackCreator.cxx.

256 { return m_stripFitter; }

◆ initialize()

StatusCode Muon::CscClusterOnTrackCreator::initialize ( )
overridevirtual

Definition at line 37 of file CscClusterOnTrackCreator.cxx.

37  {
38  ATH_CHECK(m_idHelperSvc.retrieve());
39  if (!m_idHelperSvc->hasCSC()) {
40  ATH_MSG_ERROR("The given detector layout does not contain any CSC chamber, "<<
41  "there must be something wrong in the configuration,"
42  <<" since the CscClusterOnTrackCreator cannot be needed.");
43  return StatusCode::FAILURE;
44  }
45 
46  // get error scaling tool
47  //
49  ATH_CHECK(m_stripFitter.retrieve());
50  ATH_CHECK(m_clusterFitter.retrieve());
51  ATH_CHECK(m_clusterUtilTool.retrieve());
52  return StatusCode::SUCCESS;
53  }

◆ 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 & Muon::ICscClusterOnTrackCreator::interfaceID ( )
inlinestaticinherited

Definition at line 37 of file ICscClusterOnTrackCreator.h.

37 { return IID_ICscClusterOnTrackCreator; }

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

ToolHandle<ICscClusterFitter> Muon::CscClusterOnTrackCreator::m_clusterFitter {this, "CscClusterFitter", "QratCscClusterFitter/QratCscClusterFitter"}
private

Definition at line 94 of file CscClusterOnTrackCreator.h.

◆ m_clusterUtilTool

ToolHandle<ICscClusterUtilTool> Muon::CscClusterOnTrackCreator::m_clusterUtilTool {this, "CscClusterUtilTool", "CscClusterUtilTool/CscClusterUtilTool"}
private

Definition at line 95 of file CscClusterOnTrackCreator.h.

◆ m_cscErrorScalingKey

SG::ReadCondHandleKey<RIO_OnTrackErrorScaling> Muon::CscClusterOnTrackCreator::m_cscErrorScalingKey
private
Initial value:
{
this, "CSCErrorScalingKey", "" ,
"Key for CSC error scaling conditions data. No error scaling if empty."}

Definition at line 97 of file CscClusterOnTrackCreator.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_errorScaler

Gaudi::Property<double> Muon::CscClusterOnTrackCreator::m_errorScaler {this, "ErrorScaler" , 1.}
private

Definition at line 102 of file CscClusterOnTrackCreator.h.

◆ m_errorScalerBeta

Gaudi::Property<double> Muon::CscClusterOnTrackCreator::m_errorScalerBeta {this, "ErrorScalerBeta", 0.}
private

Definition at line 103 of file CscClusterOnTrackCreator.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_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::CscClusterOnTrackCreator::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 91 of file CscClusterOnTrackCreator.h.

◆ m_minimumError

Gaudi::Property<double> Muon::CscClusterOnTrackCreator::m_minimumError {this, "MinimumError" , 0.05}
private

Definition at line 104 of file CscClusterOnTrackCreator.h.

◆ m_stripFitter

ToolHandle<ICscStripFitter> Muon::CscClusterOnTrackCreator::m_stripFitter {this, "CscStripFitter", "CalibCscStripFitter/CalibCscStripFitter"}
private

Definition at line 93 of file CscClusterOnTrackCreator.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
MuonGM::MuonClusterReadoutElement::transform
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
Definition: MuonClusterReadoutElement.h:124
verify_menu_config.results
results
Definition: verify_menu_config.py:67
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Trk::locX
@ locX
Definition: ParamDefs.h:37
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
Muon::CscClusterOnTrackCreator::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: CscClusterOnTrackCreator.h:91
Muon::CscClusterOnTrackCreator::m_clusterFitter
ToolHandle< ICscClusterFitter > m_clusterFitter
Definition: CscClusterOnTrackCreator.h:94
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
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
hist_file_dump.d
d
Definition: hist_file_dump.py:137
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
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
ParticleTest.tp
tp
Definition: ParticleTest.py:25
Trk::TrkDetElementBase
Definition: TrkDetElementBase.h:52
MuonGM::CscReadoutElement
Definition: CscReadoutElement.h:56
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
Muon::CscClusterOnTrackCreator::correct
virtual MuonClusterOnTrack * correct(const Trk::PrepRawData &RIO, const Trk::TrackParameters &TP, const EventContext &) const override
Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and the predicted Trk::TrackParameter at ...
Definition: CscClusterOnTrackCreator.cxx:246
Trk::DefinedParameter
std::pair< double, ParamDefs > DefinedParameter
Definition: DefinedParameter.h:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Trk::PrepRawDataType::CscPrepData
@ CscPrepData
Muon::CscClusterOnTrackCreator::m_clusterUtilTool
ToolHandle< ICscClusterUtilTool > m_clusterUtilTool
Definition: CscClusterOnTrackCreator.h:95
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
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
ICscClusterFitter::Result
Definition: ICscClusterFitter.h:52
Muon::CscClusterOnTrackCreator::m_minimumError
Gaudi::Property< double > m_minimumError
Definition: CscClusterOnTrackCreator.h:104
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
Trk::TrkDetElementBase::surface
virtual const Surface & surface() const =0
Return surface associated with this detector element.
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
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
Muon::CscClusterOnTrackCreator::m_cscErrorScalingKey
SG::ReadCondHandleKey< RIO_OnTrackErrorScaling > m_cscErrorScalingKey
Definition: CscClusterOnTrackCreator.h:97
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
Trk::distPhi
@ distPhi
Definition: ParamDefs.h:50
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::PrepRawData
Definition: PrepRawData.h:62
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
fitman.fitresult
fitresult
Definition: fitman.py:590
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Muon::CscStatusUnspoiled
@ CscStatusUnspoiled
Clean cluster with precision fit.
Definition: CscClusterStatus.h:26
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Amg::error
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Definition: EventPrimitivesHelpers.h:40
Muon::CscClusterOnTrackCreator::m_errorScalerBeta
Gaudi::Property< double > m_errorScalerBeta
Definition: CscClusterOnTrackCreator.h:103
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::ParametersBase::momentum
const Amg::Vector3D & momentum() const
Access method for the momentum.
a
TList * a
Definition: liststreamerinfos.cxx:10
Muon::CscStatusSplitUnspoiled
@ CscStatusSplitUnspoiled
Clean cluster with precision fit after split cluster.
Definition: CscClusterStatus.h:59
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
GlobalPosition
TVector3 GlobalPosition
Definition: display_track.h:14
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Muon::CscClusterOnTrackCreator::m_errorScaler
Gaudi::Property< double > m_errorScaler
Definition: CscClusterOnTrackCreator.h:102
Muon::CscClusterOnTrackCreator::m_stripFitter
ToolHandle< ICscStripFitter > m_stripFitter
Definition: CscClusterOnTrackCreator.h:93
Trk::loc1
@ loc1
Definition: ParamDefs.h:34
Muon::CscClusterOnTrackCreator::createRIO_OnTrack
virtual MuonClusterOnTrack * createRIO_OnTrack(const Trk::PrepRawData &RIO, const Amg::Vector3D &GP) const override
Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and a predicted Trk::TrackParameter.
Definition: CscClusterOnTrackCreator.cxx:56
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
NSWL1::globalToLocal
Polygon globalToLocal(const Polygon &pol, float z, const Trk::PlaneSurface &surf)
Definition: GeoUtils.cxx:103
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
GlobalDirection
TVector3 GlobalDirection
Definition: display_track.h:15
fitman.k
k
Definition: fitman.py:528
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
Trk::PrepRawData::detectorElement
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...