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

#include <QratCscClusterFitter.h>

Inheritance diagram for QratCscClusterFitter:
Collaboration diagram for QratCscClusterFitter:

Public Types

typedef std::vector< Muon::CscStripPrepData * > StripList
 
typedef ICscStripFitter::Result StripFit
 
typedef std::vector< StripFitStripFitList
 
typedef std::vector< double > ChargeList
 
typedef std::vector< std::string > DataNames
 
typedef std::map< std::string, double > DataMap
 
typedef std::vector< ResultResults
 

Public Member Functions

 QratCscClusterFitter (const std::string &, const std::string &, const IInterface *)
 
 ~QratCscClusterFitter ()=default
 
StatusCode initialize ()
 
const DataNamesdataNames () const
 
Results fit (const StripFitList &sfits) const
 
Results fit (const StripFitList &sfits, double dposdz) const
 
double getCorrectedError (const Muon::CscPrepData *pclu, double slope) const
 
virtual Results fit (const StripFitList &sfits) const=0
 
virtual Results fit (const StripFitList &sfits, double dposdz) const=0
 
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

std::vector< unsigned int > m_max_width
 
std::string m_posopt_eta
 
std::string m_posopt_phi
 
std::string m_erropt_eta
 
std::string m_erropt_phi
 
double m_error_eta
 
double m_error_phi
 
double m_precisionErrorScaler
 
double m_qrat_maxdiff
 
double m_qrat_maxsig
 
double m_error_tantheta
 
double m_xtan_css_eta_offset
 
double m_xtan_css_eta_slope
 
double m_xtan_csl_eta_offset
 
double m_xtan_csl_eta_slope
 
double m_qratmin_css_eta
 
double m_qratmin_csl_eta
 
std::vector< double > m_qratcor_css_eta
 
std::vector< double > m_qratcor_csl_eta
 
double m_atanh_a_css_eta
 
double m_atanh_b_css_eta
 
double m_atanh_c_css_eta
 
double m_atanh_x0_css_eta
 
double m_atanh_a_csl_eta
 
double m_atanh_b_csl_eta
 
double m_atanh_c_csl_eta
 
double m_atanh_x0_csl_eta
 
double m_dposmin
 
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_DetectorManagerKey
 retrieve MuonDetectorManager from the conditions store More...
 
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
 
ToolHandle< ICscAlignmentToolm_alignmentTool
 
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

Definition at line 26 of file QratCscClusterFitter.h.

Member Typedef Documentation

◆ ChargeList

typedef std::vector<double> ICscClusterFitter::ChargeList
inherited

Definition at line 43 of file ICscClusterFitter.h.

◆ DataMap

typedef std::map<std::string, double> ICscClusterFitter::DataMap
inherited

Definition at line 47 of file ICscClusterFitter.h.

◆ DataNames

typedef std::vector<std::string> ICscClusterFitter::DataNames
inherited

Definition at line 46 of file ICscClusterFitter.h.

◆ Results

typedef std::vector<Result> ICscClusterFitter::Results
inherited

Definition at line 101 of file ICscClusterFitter.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

◆ StripFit

Definition at line 39 of file ICscClusterFitter.h.

◆ StripFitList

typedef std::vector<StripFit> ICscClusterFitter::StripFitList
inherited

Definition at line 40 of file ICscClusterFitter.h.

◆ StripList

typedef std::vector<Muon::CscStripPrepData*> ICscClusterFitter::StripList
inherited

Definition at line 36 of file ICscClusterFitter.h.

Constructor & Destructor Documentation

◆ QratCscClusterFitter()

QratCscClusterFitter::QratCscClusterFitter ( const std::string &  type,
const std::string &  aname,
const IInterface *  parent 
)

Definition at line 209 of file QratCscClusterFitter.cxx.

209  :
211  declareInterface<ICscClusterFitter>(this);
212  m_max_width.push_back(5); // CSS eta
213  m_max_width.push_back(5); // CSL eta
214  m_max_width.push_back(3); // CSS phi
215  m_max_width.push_back(2); // CSL phi
216  declareProperty("max_width", m_max_width); // Maximum width (strips) for unspoiled clusters
217  declareProperty("position_option_eta", m_posopt_eta = "ATANH");
218  declareProperty("position_option_phi", m_posopt_phi = "NONE");
219  declareProperty("error_option_eta", m_erropt_eta = "CHARGE");
220  declareProperty("error_option_phi", m_erropt_phi = "NONE");
221  declareProperty("error_eta", m_error_eta = 0.050); // in mm this is for fixed error
222  declareProperty("error_phi", m_error_phi = 0.140); // in mm this is for fixed error
223 
224  declareProperty("precisionErrorScaler", m_precisionErrorScaler = 1.0); // in mm this is for fixed error
225 
226  declareProperty("qrat_maxdiff", m_qrat_maxdiff = 0.15); // in strips
227  declareProperty("qrat_maxsig", m_qrat_maxsig = 6.0); // in strips
228  declareProperty("error_tantheta", m_error_tantheta = 0.57); // in mm
229  declareProperty("xtan_css_eta_offset", m_xtan_css_eta_offset = 0.0015); // in mm
230  declareProperty("xtan_css_eta_slope", m_xtan_css_eta_slope = 0.000137); // in mm
231  declareProperty("xtan_csl_eta_offset", m_xtan_csl_eta_offset = -0.0045); // in mm
232  declareProperty("xtan_csl_eta_slope", m_xtan_csl_eta_slope = 0.000131); // in mm
233  declareProperty("qratmin_css_eta", m_qratmin_css_eta = 0.0940459);
234  declareProperty("qratmin_csl_eta", m_qratmin_csl_eta = 0.108975);
235  declareProperty("qratcor_css_eta", m_qratcor_css_eta); // in strips
236  declareProperty("qratcor_csl_eta", m_qratcor_csl_eta); // in strips
237 
238  declareProperty("atanh_a_css_eta", m_atanh_a_css_eta = 1.5);
239  declareProperty("atanh_b_css_eta", m_atanh_b_css_eta = 1.411);
240  declareProperty("atanh_c_css_eta", m_atanh_c_css_eta = 2.329);
241  declareProperty("atanh_x0_css_eta", m_atanh_x0_css_eta = 0.6601);
242  declareProperty("atanh_a_csl_eta", m_atanh_a_csl_eta = 1.516);
243  declareProperty("atanh_b_csl_eta", m_atanh_b_csl_eta = 1.427);
244  declareProperty("atanh_c_csl_eta", m_atanh_c_csl_eta = 2.35);
245  declareProperty("atanh_x0_csl_eta", m_atanh_x0_csl_eta = 0.6615);
246 
247  declareProperty("dposmin", m_dposmin = 0.082);
248 }

◆ ~QratCscClusterFitter()

QratCscClusterFitter::~QratCscClusterFitter ( )
default

Member Function Documentation

◆ dataNames()

const DataNames & QratCscClusterFitter::dataNames ( ) const
virtual

Reimplemented from ICscClusterFitter.

Definition at line 301 of file QratCscClusterFitter.cxx.

301  {
302  auto init = [&]() {
303  DataNames dnames;
304  bool dofixed = false;
305  bool docharge = false;
306  if (m_posopt_phi == "POLYNOMIAL" || m_posopt_phi == "TABLE" || m_posopt_phi == "ATANH") {
307  if (m_erropt_phi == "FIXED") dofixed = true;
308  if (m_erropt_phi == "CHARGE") docharge = true;
309  }
310  if (m_posopt_eta == "POLYNOMIAL" || m_posopt_eta == "TABLE" || m_posopt_eta == "ATANH") {
311  if (m_erropt_eta == "FIXED") dofixed = true;
312  if (m_erropt_eta == "CHARGE") docharge = true;
313  }
314  if (dofixed || docharge) {
315  dnames.emplace_back("scor1");
316  dnames.emplace_back("scor2");
317  dnames.emplace_back("scor");
318  }
319  if (docharge) {
320  dnames.emplace_back("dscor1");
321  dnames.emplace_back("dscor2");
322  dnames.emplace_back("dscor");
323  dnames.emplace_back("scordiff");
324  dnames.emplace_back("dscordiff");
325  }
326  return dnames;
327  };
328  static const DataNames dnames = init();
329  return dnames;
330 }

◆ 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

◆ fit() [1/4]

Results QratCscClusterFitter::fit ( const StripFitList sfits) const
virtual

Implements ICscClusterFitter.

Definition at line 735 of file QratCscClusterFitter.cxx.

735  {
736  Results results = fit(sfits, 0.0);
737  Results new_results;
738  for (unsigned int iresult = 0; iresult < results.size(); ++iresult) {
739  Result res = results[iresult];
740  if (res.fitStatus) {
741  new_results.push_back(res);
742  continue;
743  }
744  // Fetch the chamber type.
745  const CscStripPrepData* pstrip = sfits[0].strip;
746  Identifier idStrip0 = pstrip->identify();
747  int station = m_idHelperSvc->cscIdHelper().stationName(idStrip0) - 49; // 1=CSS, 2=CSL
748  // Calculate the angle of incidence.
749  double tantht = 0.0;
750  double pos = res.position;
751  if (station == 1) {
753  } else {
755  }
756  // Correct the error using this angle.
757  double dpostht = m_error_tantheta * std::abs(tantht);
758  double dpos = res.dposition;
759 
760  res.dposition = sqrt(dpos * dpos + dpostht * dpostht);
761 
762  // Return the updated result.
763  new_results.push_back(res);
764  }
765 
766  return new_results;
767 }

◆ fit() [2/4]

virtual Results ICscClusterFitter::fit

◆ fit() [3/4]

Results QratCscClusterFitter::fit ( const StripFitList sfits,
double  dposdz 
) const
virtual

Implements ICscClusterFitter.

Definition at line 334 of file QratCscClusterFitter.cxx.

334  {
335  ATH_MSG_VERBOSE("QRAT fit with tool " << name());
336 
338 
339  // Check input has at least three strips.
340  unsigned int nstrip = sfits.size();
341  if (nstrip < 3) {
342  ATH_MSG_VERBOSE(" Input has fewer than three strips.");
343  if (nstrip == 2) {
344  Muon::CscTimeStatus tstatus = (sfits[0].charge > sfits[1].charge) ? sfits[0].timeStatus : sfits[1].timeStatus;
345  results.emplace_back(1, Muon::CscStatusNarrow, tstatus);
346  } else if (nstrip == 1) {
347  Muon::CscTimeStatus tstatus = sfits[0].timeStatus;
348  results.emplace_back(1, Muon::CscStatusNarrow, tstatus);
349  }
350  return results;
351  }
352 
353  // Fetch the number of strips and check the input arrays.
354  for (unsigned int istrip = 0; istrip < nstrip; ++istrip) {
355  if (sfits[istrip].strip == nullptr) {
356  ATH_MSG_WARNING("Strip pointer is null.");
357  results.emplace_back(2);
358  return results;
359  }
360  }
361 
362  // Use the first strip to extract the layer parameters.
363  const CscStripPrepData* pstrip = sfits[0].strip;
364  Identifier idStrip0 = pstrip->identify();
365 
366  // retrieve MuonDetectorManager from the conditions store
368  const MuonGM::MuonDetectorManager* MuonDetMgr = DetectorManagerHandle.cptr();
369  if (MuonDetMgr == nullptr) {
370  ATH_MSG_ERROR("Null pointer to the MuonDetectorManager conditions object");
371  return results;
372  }
373  const CscReadoutElement* pro = MuonDetMgr->getCscReadoutElement(idStrip0);
374 
375  bool measphi = m_idHelperSvc->cscIdHelper().CscIdHelper::measuresPhi(idStrip0);
376  double pitch = pro->cathodeReadoutPitch(0, measphi);
377  unsigned int maxstrip = pro->maxNumberOfStrips(measphi);
378  unsigned int strip0 = m_idHelperSvc->cscIdHelper().strip(idStrip0) - 1;
379  int station = m_idHelperSvc->cscIdHelper().stationName(idStrip0) - 49; // 1=CSS, 2=CSL
380 
381  CscPlane plane = findPlane(station, measphi);
382  if (plane == UNKNOWN_PLANE) {
383  ATH_MSG_WARNING("Invalid CSC plane: station=" << station << "; measphi=" << measphi);
384  results.emplace_back(3);
385  return results;
386  }
387 
388  // Display input strips.
389  ATH_MSG_VERBOSE("QRAT fittter input has " << nstrip << " strips");
390  for (unsigned int istrip = 0; istrip < nstrip; ++istrip) {
391  Identifier id = sfits[istrip].strip->identify();
392  ATH_MSG_VERBOSE(" " << station << " : " << measphi << " " << m_idHelperSvc->cscIdHelper().wireLayer(id) << " " << istrip << " "
393  << m_idHelperSvc->cscIdHelper().strip(id) << " " << sfits[istrip].charge);
394  }
395 
396  // Find the peak strip and check the shape.
397  unsigned int istrip_peak = 0; // strip number within cluster
398  // Loop over strips excluding the edges.
399  for (unsigned int istrip = 1; istrip < nstrip - 1; ++istrip) {
400  StripFit sfit = sfits[istrip];
401  float qthis = sfit.charge;
402  float qlast = sfits[istrip - 1].charge;
403  float qnext = sfits[istrip + 1].charge;
404  // Peak if the adjacent strips have less charge.
405  bool ispeak = qthis > qlast && qthis > qnext;
406  // Special case: next strip has the same charge.
407  // Require the previous strip has less charge and the next following
408  // strip be absent or have less charge.
409  if (!ispeak) {
410  if (qthis == qnext) { ispeak = (qthis > qlast) && (istrip + 2 == nstrip || sfits[istrip + 2].charge < qthis); }
411  }
412  // Special case: first and second strips have the same charge.
413  // Require the third strip has less charge.
414  if (!ispeak) {
415  if (istrip == 1) {
416  if (qthis == qlast) {
417  ispeak = qthis > qnext; // bug found 10/13/07
418  }
419  }
420  }
421  // Record if peak.
422  if (ispeak) {
423  if (istrip_peak) { // Error if multiple peaks are found.
424  results.emplace_back(6, Muon::CscStatusMultiPeak); // Time status should be defined in SimpleClusterFit...
425  return results;
426  }
427  istrip_peak = istrip;
428  }
429  }
430  ATH_MSG_VERBOSE(" Peak is at " << istrip_peak << "th strip in cluster");
431 
432  // Check we are not on the edge.
433  if (strip0 <= 0 || strip0 + nstrip > maxstrip) {
434  results.emplace_back(4, Muon::CscStatusEdge, sfits[istrip_peak].timeStatus);
435  return results;
436  }
437 
438  // MS: remove this check since width is amplitude dependent.
439  // use saturation check instead
440  /**************************************
441  if ( nstrip > m_max_width[plane] ) {
442  // if ( nstrip_threshold > m_max_width[plane] ) {
443  results.push_back(Result(5, Muon::CscStatusWide, sfits[istrip_peak].timeStatus));
444  return results;
445  }
446  ***************************************/
447 
448  // Cluster is spoiled if peak is not at the center.
449  bool is_even = 2 * (nstrip / 2) == nstrip;
450  bool atcenter = istrip_peak == nstrip / 2 || (is_even && istrip_peak + 1 == nstrip / 2);
451  if (!atcenter) {
452  results.emplace_back(7, Muon::CscStatusSkewed, sfits[istrip_peak].timeStatus);
453  return results;
454  }
455 
456  if (sfits[istrip_peak].stripStatus == Muon::CscStrStatSaturated || sfits[istrip_peak - 1].stripStatus == Muon::CscStrStatSaturated ||
457  sfits[istrip_peak + 1].stripStatus == Muon::CscStrStatSaturated) {
458  results.emplace_back(15, Muon::CscStatusSaturated, sfits[istrip_peak].timeStatus);
459  return results;
460  }
461 
462  // left/peak/right strip should have good time information....
463  if (sfits[istrip_peak].stripStatus != Muon::CscStrStatSuccess
464  // || sfits[istrip_peak-1].stripStatus != Muon::CscStrStatSuccess
465  // || sfits[istrip_peak+1].stripStatus != Muon::CscStrStatSuccess ) {
466  ) {
467  results.emplace_back(14, Muon::CscStatusStripFitFailed, sfits[istrip_peak].timeStatus);
468  return results;
469  } else if (sfits[istrip_peak - 1].stripStatus == Muon::CscStrStatHot || sfits[istrip_peak - 1].stripStatus == Muon::CscStrStatDead ||
470  sfits[istrip_peak + 1].stripStatus == Muon::CscStrStatHot || sfits[istrip_peak + 1].stripStatus == Muon::CscStrStatDead) {
471  results.emplace_back(14, Muon::CscStatusStripFitFailed, sfits[istrip_peak].timeStatus);
472  return results;
473  }
474 
476  // Set initial strip position.
477  double savg = istrip_peak;
478 
479  // Calculate QRAT correction to strip position.
480  std::string posopt = m_posopt_eta;
481  std::string erropt = m_erropt_eta;
482  double dpos = 0.0;
483  if (measphi) {
484  posopt = m_posopt_phi;
485  erropt = m_erropt_phi;
486  }
487  double q1 = sfits[istrip_peak - 1].charge;
488  double q0 = sfits[istrip_peak].charge;
489  double q2 = sfits[istrip_peak + 1].charge;
490  double qrat1 = q1 / q0;
491  double qrat2 = q2 / q0;
492  double dq1 = sfits[istrip_peak - 1].dcharge;
493  double dq0 = sfits[istrip_peak].dcharge;
494  double dq2 = sfits[istrip_peak + 1].dcharge;
495 
496  ATH_MSG_VERBOSE(" QRAT charge ratios: " << qrat1 << " " << qrat2);
497  double scor1 = 0.; // left side correction.
498  double dscordqrat1 = 0.;
499  double scor2 = 0; // right side correction.
500  double dscordqrat2 = 0.;
501  int stat1 = 0;
502  int stat2 = 0;
503  if (posopt == "POLYNOMIAL") {
504  stat1 = qrat_correction(plane, qrat1, scor1, dscordqrat1);
505  stat2 = qrat_correction(plane, qrat2, scor2, dscordqrat2);
506  } else if (posopt == "TABLE") {
507  double qrmin = 0.0;
508  const std::vector<double>* pcor = nullptr;
509  if (plane == CSS_ETA) {
510  qrmin = m_qratmin_css_eta;
511  pcor = &m_qratcor_css_eta;
512  } else if (plane == CSL_ETA) {
513  qrmin = m_qratmin_csl_eta;
514  pcor = &m_qratcor_csl_eta;
515  } else {
516  ATH_MSG_WARNING(" Invalid QRAT plane: " << splane(plane));
517  results.emplace_back(8);
518  return results;
519  }
520  if (pcor) {
521  stat1 = qrat_interpolation(qrmin, *pcor, qrat1, scor1, dscordqrat1);
522  stat2 = qrat_interpolation(qrmin, *pcor, qrat2, scor2, dscordqrat2);
523  } else {
524  stat1 = 99;
525  }
526  } else if (posopt == "ATANH") { // MS: atanh parametrization
527  double a, b, c, x0; // parameters
528  if (plane == CSS_ETA) {
533  } else if (plane == CSL_ETA) {
538  } else {
539  ATH_MSG_WARNING(" Invalid QRAT plane: " << splane(plane));
540  results.emplace_back(8);
541  return results;
542  }
543  stat1 = qrat_atanh(a, b, c, x0, qrat1, scor1, dscordqrat1);
544  stat2 = qrat_atanh(a, b, c, x0, qrat2, scor2, dscordqrat2);
545 
546  } else {
547  ATH_MSG_WARNING(" Invalid position option: " << posopt);
548  results.emplace_back(9);
549  return results;
550  }
551  if (stat1 || stat2) {
552  ATH_MSG_VERBOSE(" QRAT correction failed: SPOILED");
553  results.emplace_back(10);
554  return results;
555  }
556  ATH_MSG_VERBOSE(" QRAT strip corrs: " << scor1 << " " << scor2);
557  ATH_MSG_VERBOSE(" QRAT derivatives: " << dscordqrat1 << " " << dscordqrat2);
558 
559  // Compare left and right.
560  // Flip sign of the left side correction.
561  scor1 = -scor1;
562  dscordqrat1 = -dscordqrat1;
563  double scor = 0.0;
564  DataMap dmap;
565  // Calculation weighting corrections by their derivatives, i.e. assuming the
566  // two charge ratios have the same error.
567  if (erropt == "FIXED") {
568  double w1 = 1 / (dscordqrat1 * dscordqrat1);
569  double w2 = 1 / (dscordqrat2 * dscordqrat2);
570  scor = (w1 * scor1 + w2 * scor2) / (w1 + w2);
571  double scor_diff = std::abs(scor2 - scor1);
572  ATH_MSG_VERBOSE(" Combined corr: " << scor);
573  dpos = measphi ? m_error_phi : m_error_eta;
574  // Fill data map.
575  dmap["scor1"] = scor1;
576  dmap["scor2"] = scor2;
577  dmap["scor"] = scor;
578  // Exit if measurements are inconsistent.
579  if (scor_diff > m_qrat_maxdiff) {
580  ATH_MSG_VERBOSE(" SPOILED (scor_diff=" << scor_diff << ")");
581  results.emplace_back(11, Muon::CscStatusQratInconsistent);
582  return results;
583  }
584  // Calculation using the (independent) errors in the three charges.
585  } else if (erropt == "CHARGE") {
586  // Calculate intermediate variables.
587  double x1 = dscordqrat1 * qrat1;
588  double x2 = dscordqrat2 * qrat2;
589  double dqq0 = dq0 / q0;
590  double dqq1 = dq1 / q1;
591  double dqq2 = dq2 / q2;
592  double rnum = (-x1 * x1 * dqq1 * dqq1 + x2 * x2 * dqq2 * dqq2 + (x2 * x2 - x1 * x1) * dqq0 * dqq0);
593  double rden = (x1 * x1 * dqq1 * dqq1 + x2 * x2 * dqq2 * dqq2 + (x2 - x1) * (x2 - x1) * dqq0 * dqq0);
594  double rfac = rnum / rden;
595  // Calculate the significance of the difference between the measurements.
596  double dscor_diff = sqrt(rden);
597  double scor_diff = scor2 - scor1;
598  double scor_sig = std::abs(scor_diff) / dscor_diff;
599  // Calculate the weighted average of the corrections.
600  double w1 = 0.5 * (1.0 + rfac);
601  double w2 = 0.5 * (1.0 - rfac);
602  scor = w1 * scor1 + w2 * scor2;
603  // Calculate the error in this average.
604  double ddscor1 = w1 * x1 * dqq1;
605  double ddscor2 = w2 * x2 * dqq2;
606  double ddscor0 = (w1 * x1 + w2 * x2) * dqq0;
607  double dscor = sqrt(ddscor1 * ddscor1 + ddscor2 * ddscor2 + ddscor0 * ddscor0);
608  dpos = pitch * dscor;
609  // add minimum error (in mm) in quadrature:
610  dpos = sqrt(dpos * dpos + m_dposmin * m_dposmin);
611  // Fill data map.
612  double dscor1 = std::abs(x1) * sqrt(dqq1 * dqq1 + dqq0 * dqq0);
613  double dscor2 = std::abs(x2) * sqrt(dqq2 * dqq2 + dqq0 * dqq0);
614  dmap["scor1"] = scor1;
615  dmap["dscor1"] = dscor1;
616  dmap["scor2"] = scor2;
617  dmap["dscor2"] = dscor2;
618  dmap["scordiff"] = scor_diff;
619  dmap["dscordiff"] = dscor_diff;
620  dmap["scor"] = scor;
621  dmap["dscor"] = dscor;
622  // Debugging.
623  ATH_MSG_VERBOSE("QRAT CHARGE calculation");
624  ATH_MSG_VERBOSE(" q1, q0, q2: " << q1 << " " << q0 << " " << q2);
625  ATH_MSG_VERBOSE(" dq1, dq0, dq2: " << dq1 << " " << dq0 << " " << dq2);
626  ATH_MSG_VERBOSE(" dscordqrat1, x1: " << dscordqrat1 << " " << x1);
627  ATH_MSG_VERBOSE(" dscordqrat2, x2: " << dscordqrat2 << " " << x2);
628  ATH_MSG_VERBOSE(" scor1 = " << scor1 << " +/- " << dscor1);
629  ATH_MSG_VERBOSE(" scor2 = " << scor2 << " +/- " << dscor2);
630  ATH_MSG_VERBOSE(" scor = " << scor << " +/- " << dscor);
631  ATH_MSG_VERBOSE(" scordiff = " << scor_diff << " +/- " << dscor_diff);
632  ATH_MSG_VERBOSE(" scor_sig = " << scor_sig);
633 
634  // Exit if measurements are inconsistent.
635  if (scor_sig > m_qrat_maxsig) {
636  ATH_MSG_VERBOSE(" SPOILED (scor_sig=" << scor_sig << ")");
637  results.emplace_back(12, Muon::CscStatusQratInconsistent, sfits[istrip_peak].timeStatus);
638  return results;
639  }
640  } else {
641  ATH_MSG_WARNING(" Invalid error option: " << erropt);
642  results.emplace_back(13, Muon::CscStatusUndefined, sfits[istrip_peak].timeStatus);
643  return results;
644  }
645 
646  // Correct strip position.
647  savg += scor + strip0;
648  ATH_MSG_VERBOSE(" QRAT corr " << splane(plane) << " nstrip=" << nstrip << " savg=" << savg << " qrat1=" << qrat1
649  << " qrat2=" << qrat2 << " scor1=" << scor1 << " scor2=" << scor2);
650 
651  // Error due to incident angle.
652  double dpostht = m_error_tantheta * std::abs(tantheta);
653 
654  // Scale error on dpos
655  dpos = dpos * m_precisionErrorScaler;
656 
657  // Set return values.
659  res.strip = istrip_peak;
660  res.position = pitch * (savg + 0.5 - 0.5 * maxstrip);
661 
662  // internal alignment ...
663  Identifier id = sfits[res.strip].strip->identify();
664  double offset = m_alignmentTool->getAlignmentOffset(id);
665  res.position -= offset;
666 
667  res.dposition = sqrt(dpos * dpos + dpostht * dpostht);
668 
669  res.fstrip = 0;
670  res.lstrip = nstrip - 1;
671  res.time = sfits[istrip_peak].time;
672  res.time_beforeT0Corr = sfits[istrip_peak].time_beforeT0Corr;
673  res.time_beforeBPCorr = sfits[istrip_peak].time_beforeBPCorr;
674  res.timeStatus = sfits[istrip_peak].timeStatus;
675 
676  res.qleft = q1;
677  res.qpeak = q0;
678  res.qright = q2;
679 
680  // res.diff = dmap["scordiff"];
681  // res.sig = dmap["scordiff"]/dmap["dscordiff"];
682 
683  // cluster charge should be qsum over three strip... 3/21/2011
684  res.charge = res.qleft + res.qpeak + res.qright;
685  res.charge_beforeBPCorr =
686  sfits[istrip_peak].charge_beforeBPCorr + sfits[istrip_peak - 1].charge_beforeBPCorr + sfits[istrip_peak + 1].charge_beforeBPCorr;
687 
688  res.dataMap = dmap;
689 
690  ATH_MSG_VERBOSE(" Position :: pos=" << res.position << " dpos:dtht=" << dpos << ":" << dpostht << " ==>" << res.dposition
691  << " at tanth=" << tantheta);
692 
693  results.push_back(res);
694  return results;
695 }

◆ fit() [4/4]

virtual Results ICscClusterFitter::fit

◆ getCorrectedError()

double QratCscClusterFitter::getCorrectedError ( const Muon::CscPrepData pclu,
double  slope 
) const
virtual

Implements ICscClusterFitter.

Definition at line 702 of file QratCscClusterFitter.cxx.

702  {
703  // Cluster position.
704  Trk::ParamDefs icor = Trk::loc1;
705  Trk::ParamDefs ierr = Trk::loc1;
706  double pos = pclu->localPosition()[icor];
707  double dpos = Amg::error(pclu->localCovariance(), ierr);
708 
709  Identifier idStrip0 = pclu->identify();
710  int station = m_idHelperSvc->cscIdHelper().stationName(idStrip0) - 49; // 1=CSS, 2=CSL
711  // Calculate the angle of incidence.
712  double tantht = 0.0;
713  if (station == 1) {
715  } else {
717  }
718  // Correct the error using this angle.
719  double old_dpostht = m_error_tantheta * std::abs(tantht);
720 
721  double new_dpostht = m_error_tantheta * std::abs(slope);
722 
723  double newError = sqrt(dpos * dpos - old_dpostht * old_dpostht + new_dpostht * new_dpostht);
724 
725  ATH_MSG_VERBOSE(" Position :: pos=" << pos << " dpos:newdpos=" << dpos << " : " << newError << " " << old_dpostht << " "
726  << new_dpostht);
727 
728  if (slope < -990) { newError = sqrt(dpos * dpos + old_dpostht * old_dpostht); }
729 
730  return newError;
731 }

◆ initialize()

StatusCode QratCscClusterFitter::initialize ( )

Definition at line 252 of file QratCscClusterFitter.cxx.

252  {
253  ATH_MSG_VERBOSE("Initalizing " << name());
254 
255  // retrieve MuonDetectorManager from the conditions store
257 
258  ATH_CHECK(m_idHelperSvc.retrieve());
259 
260  if (m_alignmentTool.retrieve().isFailure()) {
261  ATH_MSG_WARNING(name() << ": unable to retrieve cluster fitter " << m_alignmentTool);
262  } else {
263  ATH_MSG_DEBUG(name() << ": retrieved " << m_alignmentTool);
264  }
265 
266  ATH_MSG_DEBUG("Properties for " << name() << ":");
267  ATH_MSG_DEBUG(" Eta position option: " << m_posopt_eta);
268  ATH_MSG_DEBUG(" Phi position option: " << m_posopt_phi);
269  ATH_MSG_DEBUG(" Eta error option: " << m_erropt_eta);
270  ATH_MSG_DEBUG(" Phi error option: " << m_erropt_phi);
271  ATH_MSG_DEBUG(" Eta assigned error: " << m_error_eta);
272  ATH_MSG_DEBUG(" Phi assigned error: " << m_error_phi);
273  ATH_MSG_DEBUG(" Max strip pos diff: " << m_qrat_maxdiff);
274  ATH_MSG_DEBUG(" Max strip pos sig: " << m_qrat_maxsig);
275  ATH_MSG_DEBUG(" Non-normal error coeff: " << m_error_tantheta);
276  ATH_MSG_DEBUG(" CSS eta pos-slope offset: " << m_xtan_css_eta_offset);
277  ATH_MSG_DEBUG(" CSS eta pos-slope slope: " << m_xtan_css_eta_slope);
278  ATH_MSG_DEBUG(" CSL eta pos-slope offset: " << m_xtan_csl_eta_offset);
279  ATH_MSG_DEBUG(" CSL eta pos-slope slope: " << m_xtan_csl_eta_slope);
280  ATH_MSG_DEBUG(" CSS eta table offset: " << m_qratmin_css_eta);
281  ATH_MSG_DEBUG(" CSL eta table offset: " << m_qratmin_csl_eta);
282  ATH_MSG_DEBUG(" CSS eta table size: " << m_qratcor_css_eta.size());
283  ATH_MSG_DEBUG(" CSL eta table size: " << m_qratcor_csl_eta.size());
284 
285  ATH_MSG_DEBUG("atanh_a_css_eta: " << m_atanh_a_css_eta);
286  ATH_MSG_DEBUG("atanh_b_css_eta: " << m_atanh_b_css_eta);
287  ATH_MSG_DEBUG("atanh_c_css_eta: " << m_atanh_c_css_eta);
288  ATH_MSG_DEBUG("atanh_x0_css_eta: " << m_atanh_x0_css_eta);
289  ATH_MSG_DEBUG("atanh_a_csl_eta: " << m_atanh_a_csl_eta);
290  ATH_MSG_DEBUG("atanh_b_csl_eta: " << m_atanh_b_csl_eta);
291  ATH_MSG_DEBUG("atanh_c_csl_eta: " << m_atanh_c_csl_eta);
292  ATH_MSG_DEBUG("atanh_x0_csl_eta: " << m_atanh_x0_csl_eta);
293 
294  ATH_MSG_DEBUG("Minimum pos error: " << m_dposmin);
295 
296  return StatusCode::SUCCESS;
297 }

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

Must declare this, with name of interface

Definition at line 89 of file ICscClusterFitter.h.

89  {
90  static const InterfaceID IID_ICscClusterFitter("ICscClusterFitter", 1, 0);
91  return IID_ICscClusterFitter;
92  }

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

ToolHandle<ICscAlignmentTool> QratCscClusterFitter::m_alignmentTool
private
Initial value:
{
this,
"CscAlignmentTool",
"CscAlignmentTool/CscAlignmentTool",
}

Definition at line 88 of file QratCscClusterFitter.h.

◆ m_atanh_a_csl_eta

double QratCscClusterFitter::m_atanh_a_csl_eta
private

Definition at line 67 of file QratCscClusterFitter.h.

◆ m_atanh_a_css_eta

double QratCscClusterFitter::m_atanh_a_css_eta
private

Definition at line 63 of file QratCscClusterFitter.h.

◆ m_atanh_b_csl_eta

double QratCscClusterFitter::m_atanh_b_csl_eta
private

Definition at line 68 of file QratCscClusterFitter.h.

◆ m_atanh_b_css_eta

double QratCscClusterFitter::m_atanh_b_css_eta
private

Definition at line 64 of file QratCscClusterFitter.h.

◆ m_atanh_c_csl_eta

double QratCscClusterFitter::m_atanh_c_csl_eta
private

Definition at line 69 of file QratCscClusterFitter.h.

◆ m_atanh_c_css_eta

double QratCscClusterFitter::m_atanh_c_css_eta
private

Definition at line 65 of file QratCscClusterFitter.h.

◆ m_atanh_x0_csl_eta

double QratCscClusterFitter::m_atanh_x0_csl_eta
private

Definition at line 70 of file QratCscClusterFitter.h.

◆ m_atanh_x0_css_eta

double QratCscClusterFitter::m_atanh_x0_css_eta
private

Definition at line 66 of file QratCscClusterFitter.h.

◆ m_DetectorManagerKey

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> QratCscClusterFitter::m_DetectorManagerKey
private
Initial value:
{
this,
"DetectorManagerKey",
"MuonDetectorManager",
"Key of input MuonDetectorManager condition data",
}

retrieve MuonDetectorManager from the conditions store

Definition at line 75 of file QratCscClusterFitter.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_dposmin

double QratCscClusterFitter::m_dposmin
private

Definition at line 72 of file QratCscClusterFitter.h.

◆ m_erropt_eta

std::string QratCscClusterFitter::m_erropt_eta
private

Definition at line 46 of file QratCscClusterFitter.h.

◆ m_erropt_phi

std::string QratCscClusterFitter::m_erropt_phi
private

Definition at line 47 of file QratCscClusterFitter.h.

◆ m_error_eta

double QratCscClusterFitter::m_error_eta
private

Definition at line 48 of file QratCscClusterFitter.h.

◆ m_error_phi

double QratCscClusterFitter::m_error_phi
private

Definition at line 49 of file QratCscClusterFitter.h.

◆ m_error_tantheta

double QratCscClusterFitter::m_error_tantheta
private

Definition at line 53 of file QratCscClusterFitter.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> QratCscClusterFitter::m_idHelperSvc
private
Initial value:
{
this,
"MuonIdHelperSvc",
"Muon::MuonIdHelperSvc/MuonIdHelperSvc",
}

Definition at line 82 of file QratCscClusterFitter.h.

◆ m_max_width

std::vector<unsigned int> QratCscClusterFitter::m_max_width
private

Definition at line 43 of file QratCscClusterFitter.h.

◆ m_posopt_eta

std::string QratCscClusterFitter::m_posopt_eta
private

Definition at line 44 of file QratCscClusterFitter.h.

◆ m_posopt_phi

std::string QratCscClusterFitter::m_posopt_phi
private

Definition at line 45 of file QratCscClusterFitter.h.

◆ m_precisionErrorScaler

double QratCscClusterFitter::m_precisionErrorScaler
private

Definition at line 50 of file QratCscClusterFitter.h.

◆ m_qrat_maxdiff

double QratCscClusterFitter::m_qrat_maxdiff
private

Definition at line 51 of file QratCscClusterFitter.h.

◆ m_qrat_maxsig

double QratCscClusterFitter::m_qrat_maxsig
private

Definition at line 52 of file QratCscClusterFitter.h.

◆ m_qratcor_csl_eta

std::vector<double> QratCscClusterFitter::m_qratcor_csl_eta
private

Definition at line 61 of file QratCscClusterFitter.h.

◆ m_qratcor_css_eta

std::vector<double> QratCscClusterFitter::m_qratcor_css_eta
private

Definition at line 60 of file QratCscClusterFitter.h.

◆ m_qratmin_csl_eta

double QratCscClusterFitter::m_qratmin_csl_eta
private

Definition at line 59 of file QratCscClusterFitter.h.

◆ m_qratmin_css_eta

double QratCscClusterFitter::m_qratmin_css_eta
private

Definition at line 58 of file QratCscClusterFitter.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.

◆ m_xtan_csl_eta_offset

double QratCscClusterFitter::m_xtan_csl_eta_offset
private

Definition at line 56 of file QratCscClusterFitter.h.

◆ m_xtan_csl_eta_slope

double QratCscClusterFitter::m_xtan_csl_eta_slope
private

Definition at line 57 of file QratCscClusterFitter.h.

◆ m_xtan_css_eta_offset

double QratCscClusterFitter::m_xtan_css_eta_offset
private

Definition at line 54 of file QratCscClusterFitter.h.

◆ m_xtan_css_eta_slope

double QratCscClusterFitter::m_xtan_css_eta_slope
private

Definition at line 55 of file QratCscClusterFitter.h.


The documentation for this class was generated from the following files:
CSS_ETA
@ CSS_ETA
Definition: QratCscClusterFitter.cxx:29
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
QratCscClusterFitter::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: QratCscClusterFitter.h:82
verify_menu_config.results
results
Definition: verify_menu_config.py:67
QratCscClusterFitter::m_qratcor_css_eta
std::vector< double > m_qratcor_css_eta
Definition: QratCscClusterFitter.h:60
SiliconTech::strip
@ strip
CSL_ETA
@ CSL_ETA
Definition: QratCscClusterFitter.cxx:29
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Muon::CscStrStatSaturated
@ CscStrStatSaturated
Definition: CscStripStatus.h:33
QratCscClusterFitter::m_xtan_css_eta_offset
double m_xtan_css_eta_offset
Definition: QratCscClusterFitter.h:54
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
QratCscClusterFitter::m_qratmin_css_eta
double m_qratmin_css_eta
Definition: QratCscClusterFitter.h:58
Trk::ParamDefs
ParamDefs
Definition: ParamDefs.h:32
QratCscClusterFitter::m_dposmin
double m_dposmin
Definition: QratCscClusterFitter.h:72
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
QratCscClusterFitter::m_posopt_phi
std::string m_posopt_phi
Definition: QratCscClusterFitter.h:45
ICscStripFitter::Result::charge
double charge
Definition: ICscStripFitter.h:31
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
QratCscClusterFitter::m_atanh_c_css_eta
double m_atanh_c_css_eta
Definition: QratCscClusterFitter.h:65
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
DataNames
ICscClusterFitter::DataNames DataNames
Definition: CscSplitClusterFitter.cxx:20
QratCscClusterFitter::m_error_phi
double m_error_phi
Definition: QratCscClusterFitter.h:49
qrat_interpolation
int qrat_interpolation(double qrmin, const std::vector< double > &corvals, double qrat, double &cor, double &dcordqrat)
Definition: QratCscClusterFitter.cxx:127
MuonGM::CscReadoutElement
Definition: CscReadoutElement.h:56
QratCscClusterFitter::m_qrat_maxsig
double m_qrat_maxsig
Definition: QratCscClusterFitter.h:52
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
QratCscClusterFitter::m_xtan_csl_eta_offset
double m_xtan_csl_eta_offset
Definition: QratCscClusterFitter.h:56
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
QratCscClusterFitter::m_xtan_css_eta_slope
double m_xtan_css_eta_slope
Definition: QratCscClusterFitter.h:55
QratCscClusterFitter::m_atanh_c_csl_eta
double m_atanh_c_csl_eta
Definition: QratCscClusterFitter.h:69
QratCscClusterFitter::m_alignmentTool
ToolHandle< ICscAlignmentTool > m_alignmentTool
Definition: QratCscClusterFitter.h:88
QratCscClusterFitter::m_atanh_a_csl_eta
double m_atanh_a_csl_eta
Definition: QratCscClusterFitter.h:67
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
python.Dumpers.aname
string aname
Definition: Dumpers.py:5546
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
QratCscClusterFitter::m_atanh_b_css_eta
double m_atanh_b_css_eta
Definition: QratCscClusterFitter.h:64
Muon::CscStripPrepData
Class representing the raw data of one CSC strip (for clusters look at Muon::CscPrepData).
Definition: CscStripPrepData.h:40
QratCscClusterFitter::m_precisionErrorScaler
double m_precisionErrorScaler
Definition: QratCscClusterFitter.h:50
Muon::CscStrStatHot
@ CscStrStatHot
Definition: CscStripStatus.h:29
Muon::CscStrStatDead
@ CscStrStatDead
Definition: CscStripStatus.h:31
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Muon::CscStatusSaturated
@ CscStatusSaturated
Definition: CscClusterStatus.h:56
MuonGM::CscReadoutElement::maxNumberOfStrips
int maxNumberOfStrips(int measuresPhi) const
Definition: CscReadoutElement.cxx:162
AthCommonDataStore
Definition: AthCommonDataStore.h:52
CaloSwCorrections.rfac
def rfac(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:182
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Muon::CscStatusStripFitFailed
@ CscStatusStripFitFailed
Definition: CscClusterStatus.h:53
MuonGM::MuonDetectorManager::getCscReadoutElement
const CscReadoutElement * getCscReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:225
qrat_correction
int qrat_correction(CscPlane plane, double qrat, double &cor, double &dcordqrat)
Definition: QratCscClusterFitter.cxx:61
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
Muon::CscStatusQratInconsistent
@ CscStatusQratInconsistent
Positions from Qrat_left and Qrat_right is not consistent.
Definition: CscClusterStatus.h:49
QratCscClusterFitter::m_error_eta
double m_error_eta
Definition: QratCscClusterFitter.h:48
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Muon::CscStrStatSuccess
@ CscStrStatSuccess
Definition: CscStripStatus.h:25
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Muon::CscStatusSkewed
@ CscStatusSkewed
Skewed, e.g.
Definition: CscClusterStatus.h:46
QratCscClusterFitter::m_erropt_eta
std::string m_erropt_eta
Definition: QratCscClusterFitter.h:46
MuonR4::SegmentFit::ParamDefs::x0
@ x0
Muon::CscStatusUndefined
@ CscStatusUndefined
Undefined, should not happen, most likely indicates a problem.
Definition: CscClusterStatus.h:94
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
ICscClusterFitter::DataMap
std::map< std::string, double > DataMap
Definition: ICscClusterFitter.h:47
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::identify
Identifier identify() const
return the identifier
Muon::CscStatusNarrow
@ CscStatusNarrow
Too narrow.
Definition: CscClusterStatus.h:40
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Muon::CscStatusUnspoiled
@ CscStatusUnspoiled
Clean cluster with precision fit.
Definition: CscClusterStatus.h:26
Result
Definition: fbtTestBasics.cxx:49
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
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
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
QratCscClusterFitter::m_max_width
std::vector< unsigned int > m_max_width
Definition: QratCscClusterFitter.h:43
charge
double charge(const T &p)
Definition: AtlasPID.h:756
qrat_atanh
int qrat_atanh(const double a, const double b, double c, const double x0, double qrat, double &cor, double &dcordqrat)
Calculate QRAT correction from inverse hyperbolic tangent based on a fit to the plot of pos x vs char...
Definition: QratCscClusterFitter.cxx:193
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Results
std::vector< Result > Results
Definition: CscSplitClusterFitter.cxx:22
Muon::CscStatusMultiPeak
@ CscStatusMultiPeak
More than one peak in cluster.
Definition: CscClusterStatus.h:37
python.PyKernel.init
def init(v_theApp, v_rootStream=None)
Definition: PyKernel.py:45
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
QratCscClusterFitter::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
retrieve MuonDetectorManager from the conditions store
Definition: QratCscClusterFitter.h:75
QratCscClusterFitter::m_atanh_b_csl_eta
double m_atanh_b_csl_eta
Definition: QratCscClusterFitter.h:68
a
TList * a
Definition: liststreamerinfos.cxx:10
h
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
QratCscClusterFitter::m_error_tantheta
double m_error_tantheta
Definition: QratCscClusterFitter.h:53
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
QratCscClusterFitter::fit
Results fit(const StripFitList &sfits) const
Definition: QratCscClusterFitter.cxx:735
QratCscClusterFitter::m_erropt_phi
std::string m_erropt_phi
Definition: QratCscClusterFitter.h:47
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
QratCscClusterFitter::m_xtan_csl_eta_slope
double m_xtan_csl_eta_slope
Definition: QratCscClusterFitter.h:57
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
UNKNOWN_PLANE
@ UNKNOWN_PLANE
Definition: QratCscClusterFitter.cxx:29
QratCscClusterFitter::m_atanh_x0_css_eta
double m_atanh_x0_css_eta
Definition: QratCscClusterFitter.h:66
Trk::loc1
@ loc1
Definition: ParamDefs.h:34
CscPlane
CscPlane
Definition: ParabolaCscClusterFitter.h:26
QratCscClusterFitter::m_qrat_maxdiff
double m_qrat_maxdiff
Definition: QratCscClusterFitter.h:51
python.compressB64.c
def c
Definition: compressB64.py:93
ICscClusterFitter::StripFit
ICscStripFitter::Result StripFit
Definition: ICscClusterFitter.h:39
QratCscClusterFitter::m_atanh_x0_csl_eta
double m_atanh_x0_csl_eta
Definition: QratCscClusterFitter.h:70
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
QratCscClusterFitter::m_posopt_eta
std::string m_posopt_eta
Definition: QratCscClusterFitter.h:44
Muon::CscStatusEdge
@ CscStatusEdge
Cluster reaches the edge of plane.
Definition: CscClusterStatus.h:34
QratCscClusterFitter::m_qratmin_csl_eta
double m_qratmin_csl_eta
Definition: QratCscClusterFitter.h:59
QratCscClusterFitter::m_atanh_a_css_eta
double m_atanh_a_css_eta
Definition: QratCscClusterFitter.h:63
fitman.k
k
Definition: fitman.py:528
QratCscClusterFitter::m_qratcor_csl_eta
std::vector< double > m_qratcor_csl_eta
Definition: QratCscClusterFitter.h:61
Muon::CscTimeStatus
CscTimeStatus
Enum to represent the cluster time measurement status - see the specific enum values for more details...
Definition: CscTimeStatus.h:24
Identifier
Definition: IdentifierFieldParser.cxx:14
MuonGM::CscReadoutElement::cathodeReadoutPitch
double cathodeReadoutPitch(int chLayer, int measuresPhi) const
Definition: CscReadoutElement.cxx:147