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::MuonEDMPrinterTool Class Reference

Helper tool to print EDM objects to string in a fix format. More...

#include <MuonEDMPrinterTool.h>

Inheritance diagram for Muon::MuonEDMPrinterTool:
Collaboration diagram for Muon::MuonEDMPrinterTool:

Public Member Functions

 MuonEDMPrinterTool (const std::string &, const std::string &, const IInterface *)
 constructor More...
 
 ~MuonEDMPrinterTool ()=default
 destructor More...
 
StatusCode initialize ()
 AlgTool initilize. More...
 
std::string print (const Trk::Track &track) const
 print track parameters to string More...
 
std::string printStations (const Trk::Track &track) const
 print stations on track to string More...
 
std::string print (const Trk::MuonTrackSummary &summary) const
 print stations on track to string More...
 
std::string print (const MuonSegment &segment) const
 print segment parameters to string More...
 
std::string print (const std::vector< const MuonSegment * > &segs) const
 print vector of segments
More...
 
std::string print (std::vector< std::unique_ptr< MuonSegment > > &segs) const
 
std::string print (const Trk::MeasurementBase &measurement) const
 print Muon MeasurementBase to string More...
 
std::string print (const Trk::PrepRawData &prd) const
 print Muon PrepRawData to string More...
 
std::string print (const std::vector< const Trk::MeasurementBase * > &measurements) const
 print vector of measurement base to string More...
 
std::string print (const MuonSegmentCombinationCollection &combiCol) const
 print MuonSegmentCombinationCollection More...
 
std::string print (const MuonSegmentCombination &combi) const
 print MuonSegmentCombination More...
 
std::string print (const MuonPattern &pattern) const
 print MuonPattern More...
 
std::string print (const MuonPatternCollection &patCol) const
 print MuonPatternCollection More...
 
std::string print (const MuonPrdPatternCollection &patCol) const
 print MuonPatternCollection More...
 
std::string print (const MuonPatternCombination &pattern) const
 print MuonPatternCombination More...
 
std::string print (const MuonPatternCombinationCollection &combiCol) const
 print MuonPatternCombinationCollection More...
 
std::string print (const MuonPatternChamberIntersect &intersect) const
 print MuonPatternChamberIntersect More...
 
std::string print (const Trk::TrackStateOnSurface &tsos) const
 print the track state on surface to the string More...
 
std::string printMeasurements (const Trk::Track &track) const
 print measurements on track to string More...
 
std::string printData (const Trk::MeasurementBase &measurement) const
 print data part of Muon MeasurementBase to string More...
 
std::string printId (const Trk::MeasurementBase &measurement) const
 print identifier part of Muon MeasurementBase to string More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 access to tool interface More...
 
static std::string printPatRec (const Trk::Track &track)
 produce a string indicating who produced the track More...
 
static std::string print (const Trk::TrackParameters &pars)
 print Trk::TrackParameters More...
 
static std::string print (const Trk::ResidualPull &resPull)
 print ResidualPull object to string More...
 
static std::string print (const Trk::MaterialEffectsBase &mat)
 print the material effects object to the string More...
 
static std::string print (const Trk::AlignmentEffectsOnTrack &aeot)
 print the alignment effects on track object to the string More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc
 
ServiceHandle< IMuonEDMHelperSvcm_edmHelperSvc
 
ToolHandle< Trk::IResidualPullCalculatorm_pullCalculator
 
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_DetectorManagerKey
 
SG::ReadHandleKey< MdtPrepDataContainerm_mdtKey
 
SG::ReadHandleKey< RpcPrepDataContainerm_rpcKey
 
SG::ReadHandleKey< TgcPrepDataContainerm_tgcKey
 
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

Helper tool to print EDM objects to string in a fix format.

Definition at line 43 of file MuonEDMPrinterTool.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

◆ MuonEDMPrinterTool()

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

constructor

Definition at line 35 of file MuonEDMPrinterTool.cxx.

36  : AthAlgTool(ty, na, pa)
37 {
38  declareInterface<MuonEDMPrinterTool>(this);
39 }

◆ ~MuonEDMPrinterTool()

Muon::MuonEDMPrinterTool::~MuonEDMPrinterTool ( )
default

destructor

Member Function Documentation

◆ 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

◆ initialize()

StatusCode Muon::MuonEDMPrinterTool::initialize ( )

AlgTool initilize.

Definition at line 41 of file MuonEDMPrinterTool.cxx.

41  {
42  if (parent() != toolSvc()) {
43  ATH_MSG_FATAL("There's no need to make this tool private");
44  return StatusCode::FAILURE;
45  }
46  ATH_CHECK(m_idHelperSvc.retrieve());
47  ATH_CHECK(m_edmHelperSvc.retrieve());
48  ATH_CHECK(m_pullCalculator.retrieve());
49 
51  ATH_CHECK(m_mdtKey.initialize(!m_mdtKey.empty()));
52  ATH_CHECK(m_rpcKey.initialize(!m_rpcKey.empty()));
53  ATH_CHECK(m_tgcKey.initialize(!m_tgcKey.empty()));
54 
55 
56  return StatusCode::SUCCESS;
57 }

◆ 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& Muon::MuonEDMPrinterTool::interfaceID ( )
inlinestatic

access to tool interface

Definition at line 55 of file MuonEDMPrinterTool.h.

56  {
57  static const InterfaceID IID_MuonEDMPrinterTool("Muon::MuonEDMPrinterTool", 1, 0);
58  return IID_MuonEDMPrinterTool;
59  }

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

◆ print() [1/21]

std::string Muon::MuonEDMPrinterTool::print ( const MuonPattern pattern) const

print MuonPattern

Definition at line 585 of file MuonEDMPrinterTool.cxx.

586 {
587  std::ostringstream sout;
588 
589  unsigned int nhits = pattern.numberOfContainedPrds();
590  sout << "MuonPattern with " << nhits << " hits" << std::setprecision(5) << " theta "
591  << pattern.globalDirection().theta() << " phi " << pattern.globalDirection().phi() << std::setprecision(1)
592  << " r " << std::setw(5) << (int)pattern.globalPosition().perp() << " z " << std::setw(5)
593  << (int)pattern.globalPosition().z() << std::endl;
594  for (unsigned int i = 0; i < nhits; ++i) {
595  const Trk::PrepRawData* prd = pattern.prd(i);
596  if (!prd) {
597  sout << " ERROR found zero pointer on MuonPattern " << std::endl;
598  continue;
599  }
600  sout << " " << print(*prd);
601  if (i < nhits - 1) sout << std::endl;
602  }
603  return sout.str();
604 }

◆ print() [2/21]

std::string Muon::MuonEDMPrinterTool::print ( const MuonPatternChamberIntersect intersect) const

print MuonPatternChamberIntersect

&& !detEls.count(detEl)

&& !detEls.count(detEl2)

Definition at line 696 of file MuonEDMPrinterTool.cxx.

697 {
698  std::ostringstream sout;
699 
700  std::string chIdString("Unknown id");
701  double chTheta(-99.);
702  double chPhi(-99.);
703  // if the intersect is not empty use the Identifier of first hit as chamber ID
704  const Trk::PrepRawData* firstPrd = nullptr;
705  if (!intersect.prepRawDataVec().empty() && intersect.prepRawDataVec().front()) {
706  firstPrd = intersect.prepRawDataVec().front();
707  chIdString = m_idHelperSvc->toStringChamber(firstPrd->identify());
708  chTheta = firstPrd->detectorElement()->center().theta();
709  chPhi = firstPrd->detectorElement()->center().phi();
710  } else {
711  return chIdString;
712  }
713  Identifier chId = m_idHelperSvc->chamberId(firstPrd->identify());
714  int neta = 0;
715  int nphi = 0;
716  bool isMdt = false;
717 
718  unsigned int nchannelsEta = 0;
719  unsigned int nchannelsPhi = 0;
720  std::set<const Trk::TrkDetElementBase*> detEls;
721  std::vector<const Trk::PrepRawData*>::const_iterator hit = intersect.prepRawDataVec().begin();
722  std::vector<const Trk::PrepRawData*>::const_iterator hit_end = intersect.prepRawDataVec().end();
723  for (; hit != hit_end; ++hit) {
724  const Trk::PrepRawData* prd = *hit;
725  if (!prd) {
726  sout << " ERROR found zero pointer on MuonPatternChamberIntersect " << std::endl;
727  continue;
728  }
729  const Identifier& id = prd->identify();
730  if (m_idHelperSvc->measuresPhi(id))
731  ++nphi;
732  else
733  ++neta;
734  if (!isMdt && m_idHelperSvc->isMdt(id)) isMdt = true;
735 
736  if (!detEls.count(prd->detectorElement())) {
737  detEls.insert(prd->detectorElement());
738 
739  if (isMdt && detEls.empty()) {
740 
742  const MuonGM::MuonDetectorManager* MuonDetMgr{*DetectorManagerHandle};
743  if (MuonDetMgr == nullptr) {
744  ATH_MSG_DEBUG("Cannot retrieve DetectorManager ");
745  } else {
746 
747  Identifier idml1 = m_idHelperSvc->mdtIdHelper().channelID(id, 1, 1, 1);
748  Identifier idml2 = m_idHelperSvc->mdtIdHelper().channelID(id, 2, 1, 1);
749  const MuonGM::MdtReadoutElement* detEl1 = MuonDetMgr->getMdtReadoutElement(idml1);
750  const MuonGM::MdtReadoutElement* detEl2 = nullptr;
751  if (m_idHelperSvc->mdtIdHelper().numberOfMultilayers(id) == 2) {
752  detEl2 = MuonDetMgr->getMdtReadoutElement(idml2);
753  } else {
754  ATH_MSG_DEBUG("A single multilayer for this station " << m_idHelperSvc->toString(id));
755  }
756  if (detEl1 ) {
757  detEls.insert(detEl1);
758  nchannelsEta += detEl1->getNLayers() * detEl1->getNtubesperlayer();
759  } else {
760  ATH_MSG_DEBUG("Couldn't find first detector element ");
761  }
762  if (detEl2 ) {
763  detEls.insert(detEl2);
764  nchannelsEta += detEl2->getNLayers() * detEl2->getNtubesperlayer();
765  }
766  }
767  } else if (m_idHelperSvc->isTgc(id)) {
768  const MuonGM::TgcReadoutElement* detEl =
769  dynamic_cast<const MuonGM::TgcReadoutElement*>(prd->detectorElement());
770  if (detEl) {
771  for (int i = 1; i <= detEl->nGasGaps(); ++i) {
772  nchannelsEta += detEl->nWireGangs(i);
773  nchannelsPhi += detEl->nStrips(i);
774  }
775  }
776  } else if (m_idHelperSvc->isRpc(id)) {
777  const MuonGM::RpcReadoutElement* detEl =
778  dynamic_cast<const MuonGM::RpcReadoutElement*>(prd->detectorElement());
779  if (detEl) {
780  nchannelsPhi += detEl->nGasGapPerLay() * detEl->NphiStripPanels() * detEl->NphiStrips();
781  nchannelsEta += detEl->NetaStrips();
782  }
783  }
784  }
785  }
786 
787  unsigned int nchHitsEta = 0;
788  unsigned int nchHitsPhi = 0;
789 
790 
791  if (isMdt && !m_mdtKey.empty()) {
792  SG::ReadHandle mdtPrdContainer{m_mdtKey};
793  const MdtPrepDataCollection *coll = mdtPrdContainer->indexFindPtr(m_idHelperSvc->moduleHash(chId));
794  if (coll != nullptr) {
795  nchHitsEta = coll->size();
796  }
797  } else if (m_idHelperSvc->isRpc(chId) && !m_rpcKey.empty()) {
798  SG::ReadHandle rpcPrdContainer{m_rpcKey};
799  const RpcPrepDataCollection* coll = rpcPrdContainer->indexFindPtr(m_idHelperSvc->moduleHash(chId));
800  if (coll != nullptr) {
801  for (const RpcPrepData* prd : *coll) {
802  if (m_idHelperSvc->measuresPhi(prd->identify()))
803  ++nchHitsPhi;
804  else
805  ++nchHitsEta;
806  }
807  }
808  } else if (m_idHelperSvc->isTgc(chId) && !m_tgcKey.empty()) {
809  SG::ReadHandle tgcPrdContainer{m_tgcKey};
810  const TgcPrepDataCollection *coll = tgcPrdContainer->indexFindPtr(m_idHelperSvc->moduleHash(chId));
811  if (coll != nullptr) {
812  for (const TgcPrepData* prd : *coll) {
813  if (m_idHelperSvc->measuresPhi(prd->identify()))
814  ++nchHitsPhi;
815  else
816  ++nchHitsEta;
817  }
818  }
819  }
820 
821  sout.setf(std::ios::left);
822  sout << std::setw(33) << chIdString << " neta " << std::setw(3) << neta;
823  if (!isMdt)
824  sout << " nphi " << std::setw(3) << nphi;
825  else
826  sout << " ";
827 
828  double scaleEta = nchannelsEta != 0 ? 1. / nchannelsEta : 0.;
829  double scalePhi = nchannelsPhi != 0 ? 1. / nchannelsPhi : 0.;
830  sout << " occupancy eta " << std::fixed << std::setprecision(2) << std::setw(5) << scaleEta * nchHitsEta;
831  if (!isMdt)
832  sout << " phi " << std::fixed << std::setw(5) << scalePhi * nchHitsPhi;
833  else
834  sout << " ";
835 
836  sout << std::setprecision(2) << " pat theta " << std::setw(5) << intersect.intersectDirection().theta()
837  << " ch theta " << std::setw(5) << chTheta << " ch phi " << std::setw(6) << chPhi << std::setprecision(1)
838  << " r " << std::setw(5) << (int)intersect.intersectPosition().perp() << " z " << std::setw(5)
839  << (int)intersect.intersectPosition().z();
840 
841  return sout.str();
842 }

◆ print() [3/21]

std::string Muon::MuonEDMPrinterTool::print ( const MuonPatternCollection patCol) const

print MuonPatternCollection

Definition at line 607 of file MuonEDMPrinterTool.cxx.

608 {
609  std::ostringstream sout;
610 
611  sout << "MuonPatternCollection with " << patCol.size() << " patterns " << std::endl;
613  MuonPatternCollection::const_iterator it_end = patCol.end();
614  MuonPatternCollection::const_iterator it_last = it_end;
615  --it_last;
616  for (; it != it_end; ++it) {
617  if (!*it) {
618  sout << " WARNING, zero pointer detected in MuonPatternCollection!!! " << std::endl;
619  continue;
620  }
621  sout << " " << print(**it);
622  if (it != it_last) sout << std::endl;
623  }
624  return sout.str();
625 }

◆ print() [4/21]

std::string Muon::MuonEDMPrinterTool::print ( const MuonPatternCombination pattern) const

print MuonPatternCombination

Definition at line 670 of file MuonEDMPrinterTool.cxx.

671 {
672  std::ostringstream sout;
673 
674  unsigned int nchambers = combi.chamberData().size();
675  sout << "MuonPatternCombination with " << nchambers << " chambers ";
676  const Trk::TrackParameters* pars = combi.trackParameter();
677  if (pars) {
678  sout << " " << print(*pars);
679  } else {
680  sout << " -> combi has no parameters ";
681  }
682  if (!combi.chamberData().empty()) sout << std::endl;
683  std::vector<MuonPatternChamberIntersect>::const_iterator chit = combi.chamberData().begin();
684  std::vector<MuonPatternChamberIntersect>::const_iterator chit_end = combi.chamberData().end();
685  std::vector<MuonPatternChamberIntersect>::const_iterator chit_last = chit_end;
686  --chit_last;
687  for (; chit != chit_end; ++chit) {
688  const MuonPatternChamberIntersect& chamberIntersect = *chit;
689  sout << print(chamberIntersect);
690  if (chit != chit_last) sout << std::endl;
691  }
692  return sout.str();
693 }

◆ print() [5/21]

std::string Muon::MuonEDMPrinterTool::print ( const MuonPatternCombinationCollection combiCol) const

print MuonPatternCombinationCollection

Definition at line 649 of file MuonEDMPrinterTool.cxx.

650 {
651  std::ostringstream sout;
652 
653  sout << "MuonPatternCombinationCollection with combis " << combiCol.size() << std::endl;
657  --it_last;
658  for (; it != it_end; ++it) {
659  if (!*it) {
660  sout << " WARNING, zero pointer detected in MuonPatternCombinationCollection!!! " << std::endl;
661  continue;
662  }
663  sout << print(**it);
664  if (it != it_last) sout << std::endl;
665  }
666  return sout.str();
667 }

◆ print() [6/21]

std::string Muon::MuonEDMPrinterTool::print ( const MuonPrdPatternCollection patCol) const

print MuonPatternCollection

◆ print() [7/21]

std::string Muon::MuonEDMPrinterTool::print ( const MuonSegment segment) const

print segment parameters to string

Definition at line 315 of file MuonEDMPrinterTool.cxx.

316 {
317 
318  std::ostringstream sout;
319 
320  // get first none-trigger id
321  Identifier chid = m_edmHelperSvc->chamberId(segment);
322  int nphi = 0;
323  int ntrigEta = 0;
324  int neta = 0;
325 
326  const MuonGM::MdtReadoutElement* mdtDetEl = nullptr;
327  Identifier shortestTubeId;
328  double shortestTubeLen = 1e9;
329 
330  std::vector<const Trk::MeasurementBase*>::const_iterator hit = segment.containedMeasurements().begin();
331  std::vector<const Trk::MeasurementBase*>::const_iterator hit_end = segment.containedMeasurements().end();
332  for (; hit != hit_end; ++hit) {
333  Identifier id;
334  const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(*hit);
335  if (rot)
336  id = rot->identify();
337  else {
338  const CompetingMuonClustersOnTrack* crot = dynamic_cast<const CompetingMuonClustersOnTrack*>(*hit);
339  if (crot) id = crot->containedROTs().front()->identify();
340  }
341  if (!id.is_valid()) continue;
342  bool measuresPhi = m_idHelperSvc->measuresPhi(id);
343  bool isTrigger = m_idHelperSvc->isTrigger(id);
344  if (measuresPhi)
345  ++nphi;
346  else if (!isTrigger)
347  ++neta;
348 
349  if (!isTrigger) {
350  const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(rot);
351  if (mdt && mdt->prepRawData()) {
352  double tubelen = 0.5 * mdt->prepRawData()->detectorElement()->tubeLength(id);
353  if (tubelen < shortestTubeLen) {
354  shortestTubeId = id;
355  shortestTubeLen = tubelen;
356  mdtDetEl = mdt->prepRawData()->detectorElement();
357  }
358  }
359  } else {
360  if (!measuresPhi) ++ntrigEta;
361  }
362  }
363 
364  sout << m_idHelperSvc->toStringChamber(chid);
365 
366  const Trk::FitQuality* fq = segment.fitQuality();
367  if (fq) {
368  sout << std::setprecision(2) << " chi2 " << std::setw(7) << fq->chiSquared();
369  } else {
370  sout << " no fit Quality ";
371  }
372 
373  sout << " neta " << std::setw(2) << neta << " nphi " << std::setw(2) << nphi << " nTrigEta " << std::setw(2)
374  << ntrigEta;
375 
376  const MuonSegmentQuality* q = dynamic_cast<const MuonSegmentQuality*>(fq);
377  if (q) sout << std::setw(2) << " nholes " << q->numberOfHoles();
378 
379 
380  sout << " theta " << std::fixed << std::setprecision(5) << std::setw(7) << segment.globalDirection().theta()
381  << " phi " << std::fixed << std::setprecision(3) << std::setw(6) << segment.globalDirection().phi();
382 
383  if (segment.hasFittedT0())
384  sout << " T0 " << std::fixed << std::setprecision(2) << std::setw(5) << segment.time() << " err "
385  << std::setw(5) << segment.errorTime();
386 
387  if (mdtDetEl) {
388  double posAlongTube = std::abs((mdtDetEl->globalToLocalTransf(shortestTubeId)*segment.globalPosition()).z());
389  double distFromEdge = posAlongTube - shortestTubeLen;
390  if (distFromEdge < -100.)
391  sout << " inside chamber";
392  else if (distFromEdge < -1.)
393  sout << " close to edge";
394  else if (distFromEdge < 0.0001)
395  sout << " on edge";
396  else
397  sout << " outside chamber";
398  }
399  return sout.str();
400 }

◆ print() [8/21]

std::string Muon::MuonEDMPrinterTool::print ( const MuonSegmentCombination combi) const

print MuonSegmentCombination

Definition at line 559 of file MuonEDMPrinterTool.cxx.

560 {
561  std::ostringstream sout;
562 
563  unsigned int nstations = combi.numberOfStations();
564  sout << "SegmentCombination with stations " << nstations << std::endl;
565 
566  // loop over chambers in combi
567  for (unsigned int i = 0; i < nstations; ++i) {
568 
569  // loop over segments in station
570  MuonSegmentCombination::SegmentVec* stationSegs = combi.stationSegments(i);
571 
572  // check if not empty
573  if (!stationSegs || stationSegs->empty()) continue;
574 
575  // get chamber identifier, chamber index and station index
576  // Identifier chid = m_edmHelperSvc->chamberId( *stationSegs->front() );
577  sout << print(*stationSegs);
578  if (i != nstations - 1) sout << std::endl;
579  }
580 
581  return sout.str();
582 }

◆ print() [9/21]

std::string Muon::MuonEDMPrinterTool::print ( const MuonSegmentCombinationCollection combiCol) const

print MuonSegmentCombinationCollection

Definition at line 538 of file MuonEDMPrinterTool.cxx.

539 {
540  std::ostringstream sout;
541 
542  sout << "MuonSegmentCombinationCollection with combis " << combiCol.size() << std::endl;
546  --it_last;
547  for (; it != it_end; ++it) {
548  if (!*it) {
549  sout << " WARNING, zero pointer detected in MuonSegmentCombinationCollection!!! " << std::endl;
550  continue;
551  }
552  sout << print(**it);
553  if (it != it_last) sout << std::endl;
554  }
555  return sout.str();
556 }

◆ print() [10/21]

std::string Muon::MuonEDMPrinterTool::print ( const std::vector< const MuonSegment * > &  segs) const

print vector of segments

Definition at line 494 of file MuonEDMPrinterTool.cxx.

495 {
496 
497  std::ostringstream sout;
498 
499  std::vector<const MuonSegment*>::const_iterator it = segs.begin();
500  std::vector<const MuonSegment*>::const_iterator it_end = segs.end();
501  std::vector<const MuonSegment*>::const_iterator it_last = it_end;
502  --it_last;
503  for (; it != it_end; ++it) {
504  if (!*it) {
505  sout << " WARNING, zero pointer detected in MuonSegment vector!!! " << std::endl;
506  continue;
507  }
508  sout << print(**it);
509  if (it != it_last) sout << std::endl;
510  }
511 
512  return sout.str();
513 }

◆ print() [11/21]

std::string Muon::MuonEDMPrinterTool::print ( const std::vector< const Trk::MeasurementBase * > &  measurements) const

print vector of measurement base to string

Definition at line 455 of file MuonEDMPrinterTool.cxx.

456 {
457 
458  std::ostringstream sout;
459 
460  // first loop to get width of Id's for nice alignment
461  std::vector<std::string> idStrings;
462  std::vector<std::string> dataStrings;
463  unsigned int idWidth = 0;
464 
465  std::vector<const Trk::MeasurementBase*>::const_iterator hit = measurements.begin();
466  std::vector<const Trk::MeasurementBase*>::const_iterator hit_end = measurements.end();
467  // std::vector< const Trk::MeasurementBase* >::const_iterator hit_last = hit_end;
468  for (; hit != hit_end; ++hit) {
469  if (!*hit) {
470  sout << " WARNING, zero pointer detected in MeasurementBase vector!!! " << std::endl;
471  continue;
472  }
473  // Identifier part
474  std::string idStr = printId(**hit);
475  idStrings.push_back(idStr);
476  if (idStr.length() > idWidth) idWidth = idStr.length();
477  // Data part
478  std::string dataStr = printData(**hit);
479  dataStrings.push_back(dataStr);
480  }
481 
482 
483  // second loop to print out aligned strings
484  unsigned int n = idStrings.size();
485  for (unsigned int i = 0; i < n; ++i) {
486  sout << std::left << std::setw(idWidth) << idStrings[i] << std::right << " " << dataStrings[i];
487  if (i != n - 1) sout << std::endl;
488  }
489 
490  return sout.str();
491 }

◆ print() [12/21]

std::string Muon::MuonEDMPrinterTool::print ( const Trk::AlignmentEffectsOnTrack aeot)
static

print the alignment effects on track object to the string

Definition at line 995 of file MuonEDMPrinterTool.cxx.

995  {
996  std::stringstream aeot_string;
997  aeot_string<<"dTrans: "<<aeot.deltaTranslation()<<" +- "<<aeot.sigmaDeltaTranslation();
998  aeot_string<<" dAngle: "<<aeot.deltaAngle()<<" +- "<<aeot.sigmaDeltaAngle();
999  return aeot_string.str();
1000 }

◆ print() [13/21]

std::string Muon::MuonEDMPrinterTool::print ( const Trk::MaterialEffectsBase mat)
static

print the material effects object to the string

Definition at line 969 of file MuonEDMPrinterTool.cxx.

969  {
970  std::stringstream mat_string{};
971  const Trk::MaterialEffectsOnTrack* matOnTrk = dynamic_cast<const Trk::MaterialEffectsOnTrack*>(&mat);
972  if (matOnTrk) {
973  const Trk::ScatteringAngles* scatAng = matOnTrk->scatteringAngles();
974  if (scatAng) {
975  mat_string<<" dPhi: "<<scatAng->deltaPhi()<<" +- "<<scatAng->sigmaDeltaPhi()<< " / ";
976  mat_string<<" dTheta: "<<scatAng->deltaTheta()<<" +- "<<scatAng->sigmaDeltaTheta()<<" ";
977  }
978  const Trk::EnergyLoss* eloss = matOnTrk->energyLoss();
979  if (eloss) {
980  mat_string<<" deltaE: "<<eloss->deltaE();
981  if (std::abs(std::abs(eloss->sigmaMinusDeltaE()) - std::abs(eloss->sigmaPlusDeltaE())) > std::numeric_limits<float>::epsilon()) {
982  mat_string<<" +/- "<<eloss->sigmaPlusDeltaE()<<"/"<<eloss->sigmaMinusDeltaE();
983  } else {
984  mat_string<<" +- "<<eloss->sigmaDeltaE();
985  }
986  mat_string<<" Ion: "<<eloss->meanIoni()<<" +- "<<eloss->sigmaIoni();
987  mat_string<<" Rad: "<<eloss->meanRad()<<" +- "<<eloss->sigmaRad();
988  mat_string<<" Length "<<eloss->length();
989  }
990  mat_string<<" ";
991 
992  }
993  return mat_string.str();
994 }

◆ print() [14/21]

std::string Muon::MuonEDMPrinterTool::print ( const Trk::MeasurementBase measurement) const

print Muon MeasurementBase to string

Definition at line 448 of file MuonEDMPrinterTool.cxx.

449 {
450  return printId(measurement) + " " + printData(measurement);
451 }

◆ print() [15/21]

std::string Muon::MuonEDMPrinterTool::print ( const Trk::MuonTrackSummary summary) const

print stations on track to string

Definition at line 60 of file MuonEDMPrinterTool.cxx.

61 {
62 
63  std::ostringstream sout;
64  // create detailed track summary
65  typedef Trk::MuonTrackSummary::ChamberHitSummary ChamberHitSummary;
66 
67  sout << "Hits: eta " << summary.netaHits() << " phi " << summary.nphiHits() << " holes " << summary.nholes()
68  << " outliers " << summary.noutliers() << " pseudo " << summary.npseudoMeasurements() << " scatterers "
69  << summary.nscatterers() << " close Hits " << summary.ncloseHits() << std::endl;
70 
71 
72  const std::vector<ChamberHitSummary>& chamberHitSummary = summary.chamberHitSummary();
73  sout.setf(std::ios::left);
74  std::vector<ChamberHitSummary>::const_iterator chit = chamberHitSummary.begin();
75  std::vector<ChamberHitSummary>::const_iterator chit_end = chamberHitSummary.end();
76  std::vector<ChamberHitSummary>::const_iterator chit_last = chit_end - 1;
77  for (; chit != chit_end; ++chit) {
78  const Identifier& chId = chit->chamberId();
79  bool isMdt = m_idHelperSvc->isMdt(chId);
80 
81  sout << " " << std::setw(35) << m_idHelperSvc->toStringChamber(chId);
82 
83  const ChamberHitSummary::Projection& first = isMdt ? chit->mdtMl1() : chit->etaProjection();
84  const ChamberHitSummary::Projection& second = isMdt ? chit->mdtMl2() : chit->phiProjection();
85 
86 
87  std::string firstString = isMdt ? "ml1 " : "eta ";
88  std::string secondString = isMdt ? "ml2 " : "phi ";
89 
90  sout << " Hits: " << firstString << std::setw(3) << first.nhits << " " << secondString << std::setw(3)
91  << second.nhits;
92 
93  if (first.nholes || second.nholes) {
94  sout << " Holes: ";
95  if (first.nholes != 0) sout << firstString << std::setw(3) << first.nholes;
96  if (second.nholes != 0) {
97  if (first.nholes != 0) sout << " ";
98  sout << secondString << std::setw(3) << second.nholes;
99  }
100  }
101  if (first.noutliers || second.noutliers) {
102  sout << " Outliers: ";
103  if (first.noutliers != 0) sout << firstString << std::setw(3) << first.noutliers << " ";
104  if (second.noutliers != 0) {
105  if (first.noutliers != 0) sout << " ";
106  sout << secondString << std::setw(3) << second.noutliers;
107  }
108  }
109 
110  if (first.ndeltas || second.ndeltas) {
111  sout << " Deltas: ";
112  if (first.ndeltas != 0) sout << firstString << std::setw(3) << first.ndeltas << " ";
113  if (second.ndeltas != 0) {
114  if (first.ndeltas != 0) sout << " ";
115  sout << secondString << std::setw(3) << second.ndeltas;
116  }
117  }
118 
119  if (first.ncloseHits || second.ncloseHits) {
120  sout << " Close Hits: ";
121  if (first.ncloseHits != 0) sout << firstString << std::setw(3) << first.ncloseHits << " ";
122  if (second.ncloseHits != 0) {
123  if (first.ncloseHits != 0) sout << " ";
124  sout << secondString << std::setw(3) << second.ncloseHits;
125  }
126  }
127 
128  if (chit != chit_last) sout << std::endl;
129  }
130 
131  return sout.str();
132 }

◆ print() [16/21]

std::string Muon::MuonEDMPrinterTool::print ( const Trk::PrepRawData prd) const

print Muon PrepRawData to string

Definition at line 403 of file MuonEDMPrinterTool.cxx.

404 {
405 
406  std::ostringstream sout;
407 
408  Identifier id = prd.identify();
409  sout << m_idHelperSvc->toString(id) << " ";
410 
411  const Amg::Vector3D* pos = nullptr;
412  const MuonCluster* cl = dynamic_cast<const MuonCluster*>(&prd);
413  if (cl)
414  pos = &cl->globalPosition();
415  else {
416  const MdtPrepData* mdt = dynamic_cast<const MdtPrepData*>(&prd);
417  if (mdt)
418  pos = &mdt->detectorElement()->surface(id).center();
419  else {
420  const CscStripPrepData* strip = dynamic_cast<const CscStripPrepData*>(&prd);
421  if (strip) pos = &strip->globalPosition();
422  }
423  }
424  if (!pos)
425  sout << " unknown type of muon prepdata " << std::endl;
426  else {
427  double h_r = pos->perp();
428  double h_z = pos->z();
429  double h_phi = pos->phi();
430  double h_theta = pos->theta();
431  double error = std::sqrt(prd.localCovariance()(0, 0));
432 
433  // add time for RPC
434  double rpcTime = 0.0;
435  const RpcPrepData* rpc = dynamic_cast<const RpcPrepData*>(&prd);
436  if (rpc) rpcTime = rpc->time();
437 
438  sout << "r " << std::fixed << std::setprecision(0) << std::setw(5) << h_r << " z " << std::fixed
439  << std::setprecision(0) << std::setw(5) << h_z << " theta " << std::fixed << std::setprecision(3)
440  << std::setw(4) << h_theta << " phi " << std::fixed << std::setprecision(3) << std::setw(4) << h_phi
441  << " error " << std::fixed << std::setprecision(2) << std::setw(5) << error;
442  if (rpc) sout << " time " << std::fixed << std::setprecision(2) << std::setw(5) << rpcTime;
443  }
444  return sout.str();
445 }

◆ print() [17/21]

std::string Muon::MuonEDMPrinterTool::print ( const Trk::ResidualPull resPull)
static

print ResidualPull object to string

Definition at line 861 of file MuonEDMPrinterTool.cxx.

862 {
863  std::ostringstream sout;
864 
865  const std::vector<double>& residual = resPull.residual();
866  const std::vector<double>& pull = resPull.pull();
867  for (unsigned int i = 0; i < residual.size(); ++i) {
868  if (residual[i] != 999. && residual[i] != -999.)
869  sout << " residual " << std::setprecision(3) << std::setw(8) << residual[i] << " ";
870  }
871  sout << " pull ";
872  for (unsigned int i = 0; i < pull.size(); ++i) sout << std::setprecision(3) << std::setw(8) << pull[i] << " ";
873  return sout.str();
874 }

◆ print() [18/21]

std::string Muon::MuonEDMPrinterTool::print ( const Trk::Track track) const

print track parameters to string

Definition at line 279 of file MuonEDMPrinterTool.cxx.

280 {
281 
282  std::ostringstream sout;
283 
284  sout << printPatRec(track);
285 
286  const Trk::FitQuality* fq = track.fitQuality();
287  if (fq) {
288  sout << std::setprecision(4) << " : chi2 " << fq->chiSquared() << " ndof " << fq->numberDoF();
289  } else {
290  sout << " no fit Quality ";
291  }
292  const Trk::Perigee* pp = track.perigeeParameters();
293  if (pp) {
294  sout << " " << print(*pp);
295  } else {
296  sout << " no perigee ";
297  }
298  sout <<std::endl;
299  sout<<"----- Track states -------"<<std::endl;
300  unsigned int n{1};
301  for (const Trk::TrackStateOnSurface* tsos : *track.trackStateOnSurfaces()) {
302  if (tsos->measurementOnTrack()) sout<<" **** "<<std::setw(3)<<n<<" Measurement: "<<print(*tsos->measurementOnTrack())<<std::endl;
303  if (tsos->materialEffectsOnTrack()) sout<<" **** "<<std::setw(3)<<n<<" Material: "<<print(*tsos->materialEffectsOnTrack())<<std::endl;
304  if (tsos->alignmentEffectsOnTrack()) sout<<" **** "<<std::setw(3)<<n<<" AEOT: "<<print(*tsos->alignmentEffectsOnTrack())<<std::endl;
305  if (tsos->trackParameters()) sout<<" **** "<<std::setw(3)<<n<<" Parameters: "<<print(*tsos->trackParameters())<<std::endl;
306  ++n;
307  }
308  sout<<"-----------------------------"<<std::endl;
309 
310  return sout.str();
311 }

◆ print() [19/21]

std::string Muon::MuonEDMPrinterTool::print ( const Trk::TrackParameters pars)
static

print Trk::TrackParameters

Definition at line 845 of file MuonEDMPrinterTool.cxx.

846 {
847  std::ostringstream sout;
848  sout << "r " << std::fixed << std::setprecision(0) << std::setw(5)
849  << pars.position().perp()
850  << " z " << std::fixed << std::setprecision(0) << std::setw(6) << pars.position().z() << " theta "
851  << std::fixed << std::setprecision(5) << std::setw(7) << pars.momentum().theta()<< " eta "
852  << std::fixed << std::setprecision(5) << std::setw(7) << pars.momentum().eta() << " phi " << std::fixed
853  << std::setprecision(3) << std::setw(6) << pars.momentum().phi() << " q*p(GeV) " << std::scientific
854  << std::setprecision(3) << std::setw(10) << pars.momentum().mag() * pars.charge() * 1e-3 << " pT(GeV) "
855  << std::scientific << std::setprecision(3) << std::setw(9) << pars.momentum().perp() * 1e-3;
856 
857  return sout.str();
858 }

◆ print() [20/21]

std::string Muon::MuonEDMPrinterTool::print ( const Trk::TrackStateOnSurface tsos) const

print the track state on surface to the string

Definition at line 1002 of file MuonEDMPrinterTool.cxx.

1002  {
1003  std::stringstream tsos_str{};
1004  if (tsos.measurementOnTrack()) tsos_str<<"Measurement: "<<print(*tsos.measurementOnTrack())<<"\t";
1005  if (tsos.materialEffectsOnTrack()) tsos_str<<"Material "<<print(*tsos.materialEffectsOnTrack())<<"\t";
1006  if (tsos.trackParameters()) tsos_str<<"Parameters: "<<print(*tsos.trackParameters())<<"\t";
1007 
1008  return tsos_str.str();
1009 }

◆ print() [21/21]

std::string Muon::MuonEDMPrinterTool::print ( std::vector< std::unique_ptr< MuonSegment > > &  segs) const

Definition at line 516 of file MuonEDMPrinterTool.cxx.

517 {
518 
519  std::ostringstream sout;
520 
521  std::vector<std::unique_ptr<MuonSegment> >::iterator it = segs.begin();
522  std::vector<std::unique_ptr<MuonSegment> >::iterator it_end = segs.end();
523  std::vector<std::unique_ptr<MuonSegment> >::iterator it_last = it_end;
524  --it_last;
525  for (; it != it_end; ++it) {
526  if (!*it) {
527  sout << " WARNING, zero pointer detected in MuonSegment vector!!! " << std::endl;
528  continue;
529  }
530  sout << print(**it);
531  if (it != it_last) sout << std::endl;
532  }
533 
534  return sout.str();
535 }

◆ printData()

std::string Muon::MuonEDMPrinterTool::printData ( const Trk::MeasurementBase measurement) const

print data part of Muon MeasurementBase to string

Definition at line 878 of file MuonEDMPrinterTool.cxx.

879 {
880  std::ostringstream sout;
881 
882  // print position of hit
883  double h_r = measurement.globalPosition().perp();
884  double h_z = measurement.globalPosition().z();
885  double h_phi = measurement.globalPosition().phi();
886  double h_theta = measurement.globalPosition().theta();
887  double error = std::sqrt(measurement.localCovariance()(0, 0));
888  const Trk::LocalParameters& lpars = measurement.localParameters();
889  double local_pos = lpars.contains(Trk::locX) ? lpars[Trk::locX] : (lpars.contains(Trk::locY) ? lpars[Trk::locY] : 0.);
890  sout << "r " << std::fixed << std::setprecision(0) << std::setw(5) << h_r << " z " << std::fixed
891  << std::setprecision(0) << std::setw(5) << h_z << " phi " << std::fixed << std::setprecision(3) << std::setw(4)
892  << h_phi << " theta " << std::fixed << std::setprecision(3) << std::setw(4) << h_theta
893  << " lPos " << std::fixed << std::setprecision(2) << std::setw(5) << local_pos
894  << " error " << std::fixed << std::setprecision(2) << std::setw(5) << error;
895 
896 
897  // print measurement data
898  const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(&measurement);
899  if (rot) {
900  // add drift time for MDT
901  const MdtDriftCircleOnTrack* mdt = dynamic_cast<const MdtDriftCircleOnTrack*>(rot);
902  if (mdt) {
903  sout << " r_drift " << std::fixed << std::setprecision(2) << std::setw(5) << mdt->driftRadius();
904 
905  } else {
906  // add time for RPC
907  const RpcClusterOnTrack* rpc = dynamic_cast<const RpcClusterOnTrack*>(rot);
908  if (rpc) {
909  const RpcPrepData* rpcPRD = rpc->prepRawData();
910  if (rpcPRD) {
911  sout << " time " << std::fixed << std::setprecision(2) << std::setw(5) << rpcPRD->time();
912  }
913  }
914  }
915  } else { // !rot
916  // if we get here: not a ROT, maybe a CROT
917  const CompetingMuonClustersOnTrack* crot = dynamic_cast<const CompetingMuonClustersOnTrack*>(&measurement);
918  if (crot) {
919  unsigned int nlayers = 0;
920  unsigned int nhits = 0;
921  std::set<Identifier> layers;
922  std::vector<double> rpcTimes;
923  const std::vector<const MuonClusterOnTrack*>& rots = crot->containedROTs();
924  nhits = rots.size();
925  rpcTimes.reserve(nhits);
926  std::vector<const MuonClusterOnTrack*>::const_iterator itR = rots.begin(), itR_end = rots.end();
927  for (; itR != itR_end; ++itR) {
928  Identifier layerId = m_idHelperSvc->layerId((*itR)->identify());
929  layers.insert(layerId);
930  const RpcClusterOnTrack* rpc = dynamic_cast<const RpcClusterOnTrack*>(*itR);
931  const RpcPrepData* rpcPRD = rpc ? rpc->prepRawData() : nullptr;
932  if (rpcPRD) rpcTimes.push_back(rpcPRD->time());
933  }
934  nlayers = layers.size();
935  sout << " CompRot: hits " << nhits << " layers " << nlayers;
936  // add time for RPC
937  if (!rpcTimes.empty()) {
938  sout << (rpcTimes.size() == 1 ? " time" : " times") << std::fixed << std::setprecision(2);
939  std::vector<double>::iterator itD = rpcTimes.begin(), itD_end = rpcTimes.end();
940  for (; itD != itD_end; ++itD) sout << " " << std::setw(5) << *itD;
941  }
942  } // if crot
943  } // else !rot
944 
945  return sout.str();
946 } // printData( Trk::MeasurementBase )

◆ printId()

std::string Muon::MuonEDMPrinterTool::printId ( const Trk::MeasurementBase measurement) const

print identifier part of Muon MeasurementBase to string

Definition at line 950 of file MuonEDMPrinterTool.cxx.

951 {
952  std::string idStr;
953  Identifier id = m_edmHelperSvc->getIdentifier(measurement);
954  if (!id.is_valid()) {
955  const Trk::PseudoMeasurementOnTrack* pseudo = dynamic_cast<const Trk::PseudoMeasurementOnTrack*>(&measurement);
956  if (pseudo)
957  idStr = "pseudo measurement";
958  else
959  idStr = "no Identifier";
960  } else if (!m_idHelperSvc->isMuon(id)) {
961  idStr = "Id hit";
962  } else {
963  idStr = m_idHelperSvc->toString(id);
964  }
965 
966  return idStr;
967 }

◆ printMeasurements()

std::string Muon::MuonEDMPrinterTool::printMeasurements ( const Trk::Track track) const

print measurements on track to string

Definition at line 154 of file MuonEDMPrinterTool.cxx.

155 {
156  std::ostringstream sout;
157  const Trk::TrackStates* states = track.trackStateOnSurfaces();
158  if (!states) return "";
162  Trk::TrackStates::const_iterator it2_end = states->end();
163  // Build map of AEOTs and the measurements they affect
164  std::multimap<const Trk::MeasurementBase*, const Trk::AlignmentEffectsOnTrack*> measAndTheirAlignmentEffects;
165  const Trk::MeasurementBase* m = nullptr;
166  const Trk::AlignmentEffectsOnTrack* aeot = nullptr;
167  for (; it != it_end; ++it) {
168  aeot = (*it)->alignmentEffectsOnTrack();
169  if (aeot) {
170  // Now get the list of identifiers which this AEOT impacts.
171  const std::vector<Identifier>& identifiers = aeot->vectorOfAffectedTSOS();
172  it2 = states->begin();
173  it2_end = states->end();
174  for (; it2 != it2_end; ++it2) {
175  m = (*it2)->measurementOnTrack();
176  if (m) {
177  Identifier id = m_edmHelperSvc->getIdentifier(*m);
178  if ((id.is_valid() && (std::find(identifiers.begin(), identifiers.end(), id) != identifiers.end()))
179  || (aeot->effectsLastFromNowOn() && it2 > it))
180  {
181  // Either this measurement is explicitly listed, OR it is in a TSOS after an AEOT whose effects
182  // last from now on.
183  measAndTheirAlignmentEffects.insert(
184  std::pair<const Trk::MeasurementBase*, const Trk::AlignmentEffectsOnTrack*>(m, aeot));
185  }
186  }
187  }
188  }
189  }
190  // std::cout << " measAndTheirAlignmentEffects " << measAndTheirAlignmentEffects.size() << std::endl;
191 
192  // Reset
193  it = states->begin();
194  it_end = states->end();
195  // first loop to get width of Id's for nice alignment
196  std::vector<std::string> idStrings;
197  std::vector<std::string> dataStrings;
198  unsigned int idWidth = 0;
199  for (; it != it_end; ++it) {
200  m = (*it)->measurementOnTrack();
201  if (m) {
202  // Identifier part
203  std::string idStr = printId(*m);
204  idStrings.push_back(idStr);
205  if (idStr.length() > idWidth) idWidth = idStr.length();
206  // Data part
207  const Trk::TrackParameters* trackParameters = (*it)->trackParameters();
208  std::string dataStr = printData(*m);
209  if (trackParameters) {
211  measAndTheirAlignmentEffects.begin();
212  itMap = measAndTheirAlignmentEffects.find(m);
213  if (itMap != measAndTheirAlignmentEffects.end()) {
214  std::vector<const Trk::AlignmentEffectsOnTrack*> aeotos;
215  aeotos.push_back(itMap->second);
216  ++itMap;
217  if (itMap != measAndTheirAlignmentEffects.end() && itMap->first == m)
218  aeotos.push_back(itMap->second);
219  std::optional<Trk::ResidualPull> resPull{m_pullCalculator->residualPull(
220  m, trackParameters, Trk::ResidualPull::Unbiased, Trk::TrackState::unidentified, aeotos)};
221  if (resPull) dataStr += print(*resPull);
222  if (resPull) dataStr += " (AEOT)";
223  } else {
224  std::optional<Trk::ResidualPull> resPull{
225  m_pullCalculator->residualPull(m, trackParameters, Trk::ResidualPull::Unbiased)};
226  if (resPull) dataStr += print(*resPull);
227  }
228  }
229  if ((*it)->type(Trk::TrackStateOnSurface::Outlier)) {
230  dataStr += " (Outlier)";
231  } else if ((*it)->type(Trk::TrackStateOnSurface::Hole)) {
232  dataStr += " (Hole)";
233  }
234  dataStrings.push_back(dataStr);
235  }
236  aeot = (*it)->alignmentEffectsOnTrack();
237  if (aeot) {
238  std::string idStr = " AEOT ";
239  idStrings.push_back(idStr);
240  std::ostringstream souta;
241  souta << std::setprecision(3) << " deltaTranslation (mm) " << aeot->deltaTranslation() << " error "
242  << aeot->sigmaDeltaTranslation() << " deltaAngle (mrad) " << 1000 * aeot->deltaAngle() << " error "
243  << 1000 * aeot->sigmaDeltaAngle();
244  dataStrings.push_back(souta.str());
245  }
246  }
247 
248  // second loop to print out aligned strings
249  unsigned int n = idStrings.size();
250  for (unsigned int i = 0; i < n; ++i) {
251  sout << std::left << std::setw(idWidth) << idStrings[i] << std::right << " " << dataStrings[i];
252  if (i != n - 1) sout << std::endl;
253  }
254 
255  return sout.str();
256 }

◆ printPatRec()

std::string Muon::MuonEDMPrinterTool::printPatRec ( const Trk::Track track)
static

produce a string indicating who produced the track

Definition at line 260 of file MuonEDMPrinterTool.cxx.

261 {
262  if (track.info().patternRecoInfo(Trk::TrackInfo::STACO)) return "STACO";
263  if (track.info().patternRecoInfo(Trk::TrackInfo::StacoLowPt)) return "StacoLowPt";
264  if (track.info().patternRecoInfo(Trk::TrackInfo::Muonboy)) return "Muonboy";
265  if (track.info().patternRecoInfo(Trk::TrackInfo::MuTag)) return "MuTag";
266  if (track.info().patternRecoInfo(Trk::TrackInfo::MuidComb)
267  || track.info().patternRecoInfo(Trk::TrackInfo::MuidCombined))
268  return "MuidCombined";
269  if (track.info().patternRecoInfo(Trk::TrackInfo::MuidStandAlone)) return "MuidStandAlone";
270  if (track.info().patternRecoInfo(Trk::TrackInfo::Moore)) return "Moore";
271  if (track.info().patternRecoInfo(Trk::TrackInfo::MuGirl)) return "MuGirl";
272  if (track.info().patternRecoInfo(Trk::TrackInfo::MuGirlUnrefitted)) return "MuGirlUnrefitted";
273  if (track.info().patternRecoInfo(Trk::TrackInfo::MuidVertexAssociator)) return "MuidVertexAssociator";
274  if (track.info().patternRecoInfo(Trk::TrackInfo::MuGirlLowBeta)) return "MuGirlLowBeta";
275  return "Unknown";
276 }

◆ printStations()

std::string Muon::MuonEDMPrinterTool::printStations ( const Trk::Track track) const

print stations on track to string

Definition at line 136 of file MuonEDMPrinterTool.cxx.

137 {
138 
139  const Trk::MuonTrackSummary* muonSummary = nullptr;
140 
141  // check if the track already has a MuonTrackSummary, if not calculate it using the helper
142  const Trk::TrackSummary* summary = track.trackSummary();
143  if (summary) muonSummary = summary->muonTrackSummary();
144  if (!muonSummary) {
145  ATH_MSG_WARNING("No muon summary is present");
146  return "";
147  }
148 
149  return print(*muonSummary);
150 }

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

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

Definition at line 155 of file MuonEDMPrinterTool.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_edmHelperSvc

ServiceHandle<IMuonEDMHelperSvc> Muon::MuonEDMPrinterTool::m_edmHelperSvc
private
Initial value:
{
this,
"edmHelper",
"Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface",
}

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

Definition at line 137 of file MuonEDMPrinterTool.h.

◆ m_mdtKey

SG::ReadHandleKey<MdtPrepDataContainer> Muon::MuonEDMPrinterTool::m_mdtKey
private
Initial value:
{
this,
"MdtPrdCollection",
"MDT_DriftCircles",
"MDT PRD Container",
}

Definition at line 161 of file MuonEDMPrinterTool.h.

◆ m_pullCalculator

ToolHandle<Trk::IResidualPullCalculator> Muon::MuonEDMPrinterTool::m_pullCalculator
private
Initial value:
{
this,
"ResidualPullCalculator",
"Trk::ResidualPullCalculator/ResidualPullCalculator",
}

Definition at line 149 of file MuonEDMPrinterTool.h.

◆ m_rpcKey

SG::ReadHandleKey<RpcPrepDataContainer> Muon::MuonEDMPrinterTool::m_rpcKey
private
Initial value:
{
this,
"RpcPrdCollection",
"RPC_Measurements",
"RPC PRD Container",
}

Definition at line 167 of file MuonEDMPrinterTool.h.

◆ m_tgcKey

SG::ReadHandleKey<TgcPrepDataContainer> Muon::MuonEDMPrinterTool::m_tgcKey
private
Initial value:
{
this,
"TgcPrdCollection",
"TGC_Measurements",
"TGC PRD Container",
}

Definition at line 173 of file MuonEDMPrinterTool.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:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Trk::AlignmentEffectsOnTrack::effectsLastFromNowOn
bool effectsLastFromNowOn() const
Returns true if the effects of this AlignmentEffectsOnTrack apply to all remaining TrackStatesOnSurfa...
Definition: AlignmentEffectsOnTrack.h:68
Trk::ScatteringAngles::deltaPhi
double deltaPhi() const
returns the
Definition: ScatteringAngles.h:82
mergePhysValFiles.pattern
pattern
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:26
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
Trk::EnergyLoss::sigmaMinusDeltaE
double sigmaMinusDeltaE() const
returns the negative side
Trk::LocalParameters
Definition: LocalParameters.h:98
Trk::TrackStateOnSurface::trackParameters
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
Trk::TrackInfo::MuidCombined
@ MuidCombined
MuidCombined.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:180
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
Trk::PrepRawDataType::MdtPrepData
@ MdtPrepData
Muon::MuonEDMPrinterTool::m_mdtKey
SG::ReadHandleKey< MdtPrepDataContainer > m_mdtKey
Definition: MuonEDMPrinterTool.h:161
Muon::MuonEDMPrinterTool::printData
std::string printData(const Trk::MeasurementBase &measurement) const
print data part of Muon MeasurementBase to string
Definition: MuonEDMPrinterTool.cxx:878
MuonGM::MdtReadoutElement::getNLayers
int getNLayers() const
Returns the number of tube layers inside the multilayer.
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
MuonGM::RpcReadoutElement::NphiStripPanels
int NphiStripPanels() const
returns the number of phi strip panels (1 or 2)
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
Trk::locX
@ locX
Definition: ParamDefs.h:37
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
Trk::PrepRawDataType::CscStripPrepData
@ CscStripPrepData
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
Muon::MuonEDMPrinterTool::m_tgcKey
SG::ReadHandleKey< TgcPrepDataContainer > m_tgcKey
Definition: MuonEDMPrinterTool.h:173
ClusterSeg::residual
@ residual
Definition: ClusterNtuple.h:20
MuonGM::RpcReadoutElement::nGasGapPerLay
int nGasGapPerLay() const
returns the number of gasgaps
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
Muon::RpcPrepDataCollection
MuonPrepDataCollection< RpcPrepData > RpcPrepDataCollection
Definition: MuonPrepDataCollection.h:107
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
Trk::AlignmentEffectsOnTrack::vectorOfAffectedTSOS
const std::vector< Identifier > & vectorOfAffectedTSOS() const
Returns a vector of the affected TSOS in the track.
Definition: AlignmentEffectsOnTrack.h:115
Trk::PrepRawData::localCovariance
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
Trk::TrackInfo::MuidStandAlone
@ MuidStandAlone
MuidStandalone.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:165
Trk::ResidualPull::Unbiased
@ Unbiased
RP with track state that has measurement not included.
Definition: ResidualPull.h:57
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
Trk::LocalParameters::contains
bool contains(ParamDefs par) const
The simple check for the clients whether the parameter is contained.
Trk::ResidualPull::pull
const std::vector< double > & pull() const
return pull vector
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Muon::MdtPrepDataCollection
MuonPrepDataCollection< MdtPrepData > MdtPrepDataCollection
Definition: MuonPrepDataCollection.h:106
Trk::EnergyLoss::sigmaDeltaE
double sigmaDeltaE() const
returns the symmatric error
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
Trk::ScatteringAngles
represents a deflection of the track caused through multiple scattering in material.
Definition: ScatteringAngles.h:26
Trk::TrackStateOnSurface::measurementOnTrack
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
MuonGM::RpcReadoutElement
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:55
Trk::TrackInfo::Muonboy
@ Muonboy
Tracks from MuonBoy.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:117
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
Trk::EnergyLoss::sigmaRad
double sigmaRad() const
Trk::AlignmentEffectsOnTrack::deltaAngle
double deltaAngle() const
returns the
Definition: AlignmentEffectsOnTrack.h:103
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Trk::EnergyLoss::meanIoni
double meanIoni() const
Trk::PrepRawDataType::RpcPrepData
@ RpcPrepData
Trk::AlignmentEffectsOnTrack
Class to represent misalignments or 'discontinuities' on tracks These have a surface where the z axis...
Definition: AlignmentEffectsOnTrack.h:24
Trk::TrackState::unidentified
@ unidentified
Definition: TrackStateDefs.h:27
MuonGM::TgcReadoutElement::nGasGaps
int nGasGaps() const
Returns the number of gas gaps associated with the readout element (2 or 3)
keylayer_zslicemap.strip
strip
Definition: keylayer_zslicemap.py:151
Trk::MuonTrackSummary::ChamberHitSummary
structure to hold information per chamber in the muon system
Definition: MuonTrackSummary.h:32
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
Trk::TrackStateOnSurface::Outlier
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
Definition: TrackStateOnSurface.h:122
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
MuonGM::MdtReadoutElement::globalToLocalTransf
Amg::Transform3D globalToLocalTransf(const int tubeLayer, const int tube) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MdtReadoutElement.cxx:401
Trk::PseudoMeasurementOnTrack
Class to handle pseudo-measurements in fitters and on track objects.
Definition: PseudoMeasurementOnTrack.h:44
Muon::MuonEDMPrinterTool::m_edmHelperSvc
ServiceHandle< IMuonEDMHelperSvc > m_edmHelperSvc
Definition: MuonEDMPrinterTool.h:142
Trk::MaterialEffectsOnTrack
represents the full description of deflection and e-loss of a track in material.
Definition: MaterialEffectsOnTrack.h:40
Trk::EnergyLoss::length
double length() const
Trk::ScatteringAngles::sigmaDeltaTheta
double sigmaDeltaTheta() const
returns the
Definition: ScatteringAngles.h:100
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
Muon::MuonEDMPrinterTool::print
std::string print(const Trk::Track &track) const
print track parameters to string
Definition: MuonEDMPrinterTool.cxx:279
MuonGM::MdtReadoutElement
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MdtReadoutElement.h:51
Trk::TrackStateOnSurface::Hole
@ Hole
A hole on the track - this is defined in the following way.
Definition: TrackStateOnSurface.h:128
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::TrackStateOnSurface::materialEffectsOnTrack
const MaterialEffectsBase * materialEffectsOnTrack() const
return material effects const overload
Trk::TrackInfo::MuGirlUnrefitted
@ MuGirlUnrefitted
Tracks from MuGirl not refitted with iPat.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:120
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
urldecode::states
states
Definition: urldecode.h:39
MuonGM::RpcReadoutElement::NphiStrips
int NphiStrips() const
returns the number of phi strips
Trk::EnergyLoss::deltaE
double deltaE() const
returns the
MuonGM::TgcReadoutElement
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:42
test_pyathena.parent
parent
Definition: test_pyathena.py:15
Trk::TrackInfo::MuidVertexAssociator
@ MuidVertexAssociator
MuidVertexAssociator.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:183
Trk::TrackInfo::MuGirlLowBeta
@ MuGirlLowBeta
MuGirlLowBeta.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:192
python.StandardJetMods.pull
pull
Definition: StandardJetMods.py:282
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::MuonTrackSummary
Detailed track summary for the muon system Give access to hit counts per chamber.
Definition: MuonTrackSummary.h:26
Muon::MuonEDMPrinterTool::m_rpcKey
SG::ReadHandleKey< RpcPrepDataContainer > m_rpcKey
Definition: MuonEDMPrinterTool.h:167
Trk::TrackInfo::STACO
@ STACO
Tracks produced by STACO.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:123
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
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
MuonGM::TgcReadoutElement::nStrips
int nStrips(int gasGap) const
Returns the number of strips in a given gas gap.
DataVector< const Trk::TrackStateOnSurface >
Trk::EnergyLoss::meanRad
double meanRad() const
MuonGM::RpcReadoutElement::NetaStrips
int NetaStrips() const
returns the number of eta strips
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
MuonGM::TgcReadoutElement::nWireGangs
int nWireGangs(int gasGap) const
Returns the number of wire gangs (Random grouping of wires) in a given gas gap.
Muon::MuonEDMPrinterTool::m_pullCalculator
ToolHandle< Trk::IResidualPullCalculator > m_pullCalculator
Definition: MuonEDMPrinterTool.h:149
Trk::MeasurementBase::localCovariance
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
Definition: MeasurementBase.h:138
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::MeasurementBase
Definition: MeasurementBase.h:58
createDCubeDigitHistograms.rpcTime
rpcTime
Definition: createDCubeDigitHistograms.py:64
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
Trk::TrackSummary
A summary of the information contained by a track.
Definition: Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h:287
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trk::EnergyLoss
This class describes energy loss material effects in the ATLAS tracking EDM.
Definition: EnergyLoss.h:34
Trk::MeasurementBase::globalPosition
virtual const Amg::Vector3D & globalPosition() const =0
Interface method to get the global Position.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
MuonCluster
Definition: Trigger/TrigAlgorithms/TrigLongLivedParticles/src/MuonCluster.h:46
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
Trk::TrackInfo::Moore
@ Moore
Moore (MoMu)
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:177
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
a
TList * a
Definition: liststreamerinfos.cxx:10
Trk::MaterialEffectsOnTrack::energyLoss
const EnergyLoss * energyLoss() const
returns the energy loss object.
InDetSimDataHelpers::identifiers
std::vector< Identifier > identifiers(const InDetSimDataCollection &coll)
Definition: InDetSimDataDict.h:15
Trk::TrackInfo::StacoLowPt
@ StacoLowPt
Tracks produced by StacoLowpt.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:126
h
Muon::MuonEDMPrinterTool::printId
std::string printId(const Trk::MeasurementBase &measurement) const
print identifier part of Muon MeasurementBase to string
Definition: MuonEDMPrinterTool.cxx:950
Amg::intersect
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point B' along the line B that's closest to a second line A.
Definition: GeoPrimitivesHelpers.h:347
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
Muon::MuonSegmentCombination::SegmentVec
std::vector< std::unique_ptr< MuonSegment > > SegmentVec
Definition: MuonSegmentCombination.h:32
DeMoScan.first
bool first
Definition: DeMoScan.py:536
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
Trk::MaterialEffectsOnTrack::scatteringAngles
const ScatteringAngles * scatteringAngles() const
returns the MCS-angles object.
Trk::ScatteringAngles::sigmaDeltaPhi
double sigmaDeltaPhi() const
returns the
Definition: ScatteringAngles.h:94
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
Trk::TrackInfo::MuTag
@ MuTag
Tracks produced by MuTag.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:129
extractSporadic.q
list q
Definition: extractSporadic.py:98
Trk::TrackInfo::MuGirl
@ MuGirl
MuGirl.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:186
Trk::FitQuality::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
Trk::AlignmentEffectsOnTrack::sigmaDeltaTranslation
double sigmaDeltaTranslation() const
returns the
Definition: AlignmentEffectsOnTrack.h:97
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
Trk::FitQuality::numberDoF
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Definition: FitQuality.h:60
Muon::TgcPrepDataCollection
MuonPrepDataCollection< TgcPrepData > TgcPrepDataCollection
Definition: MuonPrepDataCollection.h:108
Trk::AlignmentEffectsOnTrack::deltaTranslation
double deltaTranslation() const
returns the
Definition: AlignmentEffectsOnTrack.h:91
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
Trk::ResidualPull::residual
const std::vector< double > & residual() const
return residual vector
Muon::MuonEDMPrinterTool::m_DetectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Definition: MuonEDMPrinterTool.h:155
Trk::ScatteringAngles::deltaTheta
double deltaTheta() const
returns the
Definition: ScatteringAngles.h:88
Muon::MuonEDMPrinterTool::printPatRec
static std::string printPatRec(const Trk::Track &track)
produce a string indicating who produced the track
Definition: MuonEDMPrinterTool.cxx:260
get_generator_info.error
error
Definition: get_generator_info.py:40
MuonGM::MdtReadoutElement::getNtubesperlayer
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
error
Definition: IImpactPoint3dEstimator.h:70
Trk::TrkDetElementBase::center
virtual const Amg::Vector3D & center() const =0
Return the center of the element.
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
Trk::EnergyLoss::sigmaPlusDeltaE
double sigmaPlusDeltaE() const
returns the positive side
Muon::MuonEDMPrinterTool::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: MuonEDMPrinterTool.h:137
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5
Trk::EnergyLoss::sigmaIoni
double sigmaIoni() const
Trk::AlignmentEffectsOnTrack::sigmaDeltaAngle
double sigmaDeltaAngle() const
returns the
Definition: AlignmentEffectsOnTrack.h:109
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...
Trk::TrackInfo::MuidComb
@ MuidComb
Back compatibility with older ESD versions.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/TrackInfo.h:174
Identifier
Definition: IdentifierFieldParser.cxx:14
SCT_Monitoring::summary
@ summary
Definition: SCT_MonitoringNumbers.h:65