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

#include <Csc4dSegmentMaker.h>

Inheritance diagram for Csc4dSegmentMaker:
Collaboration diagram for Csc4dSegmentMaker:

Public Types

typedef std::vector< ClusterTrkClusters
typedef std::vector< ClusterChamberTrkClusters[4]
typedef std::vector< const Trk::RIO_OnTrack * > RioList
typedef DataVector< const Trk::MeasurementBaseMbaseList
typedef Muon::MuonSegmentCombination::SegmentVec SegmentVec
typedef std::vector< SegmentSegments

Public Member Functions

 Csc4dSegmentMaker (const std::string &, const std::string &, const IInterface *)
virtual ~Csc4dSegmentMaker ()
StatusCode initialize () override
std::unique_ptr< MuonSegmentCombinationCollectionfind (const MuonSegmentCombinationCollection &, const EventContext &ctx) const override
std::unique_ptr< MuonSegmentCombinationCollectionfind (const std::vector< const Muon::CscPrepDataCollection * > &pcols, const EventContext &ctx) const override
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

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

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< double > m_max_chisquare {this, "max_chisquare", 25.}
Gaudi::Property< double > m_max_slope_r {this, "max_slope_r", 0.2}
Gaudi::Property< double > m_max_slope_phi {this, "max_slope_phi", 0.2}
Gaudi::Property< double > m_max_seg_per_chamber {this, "max_seg_per_chamber", 50}
ToolHandle< ICscSegmentUtilToolm_segmentTool
PublicToolHandle< Muon::MuonEDMPrinterToolm_printer
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 37 of file Csc4dSegmentMaker.h.

Member Typedef Documentation

◆ ChamberTrkClusters

typedef std::vector<Cluster> ICscSegmentFinder::ChamberTrkClusters[4]
inherited

Definition at line 83 of file ICscSegmentFinder.h.

◆ MbaseList

Definition at line 86 of file ICscSegmentFinder.h.

◆ RioList

typedef std::vector<const Trk::RIO_OnTrack*> ICscSegmentFinder::RioList
inherited

Definition at line 85 of file ICscSegmentFinder.h.

◆ Segments

typedef std::vector<Segment> ICscSegmentFinder::Segments
inherited

Definition at line 132 of file ICscSegmentFinder.h.

◆ SegmentVec

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

◆ TrkClusters

typedef std::vector<Cluster> ICscSegmentFinder::TrkClusters
inherited

Definition at line 82 of file ICscSegmentFinder.h.

Constructor & Destructor Documentation

◆ Csc4dSegmentMaker()

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

Definition at line 43 of file Csc4dSegmentMaker.cxx.

43 :
44 AthAlgTool(type, aname, parent) {
45 declareInterface<ICscSegmentFinder>(this);
46}
AthAlgTool()
Default constructor:

◆ ~Csc4dSegmentMaker()

Csc4dSegmentMaker::~Csc4dSegmentMaker ( )
virtualdefault

Member Function Documentation

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

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

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ find() [1/2]

std::unique_ptr< MuonSegmentCombinationCollection > Csc4dSegmentMaker::find ( const MuonSegmentCombinationCollection & segcols,
const EventContext & ctx ) const
overridevirtual

Implements ICscSegmentFinder.

Definition at line 74 of file Csc4dSegmentMaker.cxx.

75 {
76 // Set dump flag.
77
78 std::unique_ptr<MuonSegmentCombinationCollection> pcols = std::make_unique<MuonSegmentCombinationCollection>();
79 if (segcols.empty()) { return nullptr; }
80
81 for (MuonSegmentCombinationCollection::const_iterator icom = segcols.begin(); icom != segcols.end(); ++icom) {
82 const MuonSegmentCombination& insegs = **icom;
83
84 int nsta = insegs.numberOfStations();
85 if (nsta != 2) { // This can be happened if segment is not made at all in case of two hit layers !!
86 // NOW, 2d segment is not made....
87 // ATH_MSG_FATAL ( " Combination has " << nsta << " stations where 2 are expected" );
88 return pcols;
89 }
90
91 ATH_MSG_DEBUG("Csc4dSegmentMaker called get4dMuonSegmentCombination");
92
93 MuonSegmentCombination* pcol = m_segmentTool->get4dMuonSegmentCombination(&insegs, ctx);
94 if (pcol) {
95 pcols->push_back(pcol);
96 ATH_MSG_DEBUG("Found 4d CSC segment " << std::endl << m_printer->print(*pcol));
97 }
98 }
99
100 ATH_MSG_DEBUG(" Created " << pcols->size() << " 4D segments.");
101 return pcols;
102}
#define ATH_MSG_DEBUG(x)
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
ToolHandle< ICscSegmentUtilTool > m_segmentTool
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
bool empty() const noexcept
Returns true if the collection is empty.
unsigned int numberOfStations() const
Number of stations with segment.

◆ find() [2/2]

std::unique_ptr< MuonSegmentCombinationCollection > Csc4dSegmentMaker::find ( const std::vector< const Muon::CscPrepDataCollection * > & pcols,
const EventContext & ctx ) const
overridevirtual

Implements ICscSegmentFinder.

Definition at line 105 of file Csc4dSegmentMaker.cxx.

106 {
107 return nullptr;
108}

◆ initialize()

StatusCode Csc4dSegmentMaker::initialize ( )
override

Definition at line 56 of file Csc4dSegmentMaker.cxx.

56 {
57 ATH_MSG_DEBUG("Initializing");
58
59 // Show keys.
60 ATH_MSG_DEBUG(" Max chi-square: " << m_max_chisquare);
61 ATH_MSG_DEBUG(" Max r slope: " << m_max_slope_r);
62 ATH_MSG_DEBUG(" Max phi slope: " << m_max_slope_phi);
63 ATH_MSG_DEBUG(" Max segments/chamber: " << m_max_seg_per_chamber);
64 ATH_MSG_DEBUG(" SegmentTool: " << m_segmentTool.typeAndName());
65
66 ATH_CHECK(m_segmentTool.retrieve());
67 ATH_CHECK(m_printer.retrieve());
68
69 return StatusCode::SUCCESS;
70}
#define ATH_CHECK
Evaluate an expression and check for errors.
Gaudi::Property< double > m_max_slope_phi
Gaudi::Property< double > m_max_chisquare
Gaudi::Property< double > m_max_slope_r
Gaudi::Property< double > m_max_seg_per_chamber

◆ inputHandles()

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

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & ICscSegmentFinder::interfaceID ( )
inlinestaticinherited

Definition at line 31 of file ICscSegmentFinder.h.

31{ return IID_ICscSegmentFinder; }
static const InterfaceID IID_ICscSegmentFinder("ICscSegmentFinder", 1, 0)
Must declare this, with name of interface.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

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

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

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

Perform system initialization for an algorithm.

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

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

◆ sysStart()

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

Handle START transition.

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_max_chisquare

Gaudi::Property<double> Csc4dSegmentMaker::m_max_chisquare {this, "max_chisquare", 25.}
private

Definition at line 55 of file Csc4dSegmentMaker.h.

55{this, "max_chisquare", 25.};

◆ m_max_seg_per_chamber

Gaudi::Property<double> Csc4dSegmentMaker::m_max_seg_per_chamber {this, "max_seg_per_chamber", 50}
private

Definition at line 58 of file Csc4dSegmentMaker.h.

58{this, "max_seg_per_chamber", 50};

◆ m_max_slope_phi

Gaudi::Property<double> Csc4dSegmentMaker::m_max_slope_phi {this, "max_slope_phi", 0.2}
private

Definition at line 57 of file Csc4dSegmentMaker.h.

57{this, "max_slope_phi", 0.2};

◆ m_max_slope_r

Gaudi::Property<double> Csc4dSegmentMaker::m_max_slope_r {this, "max_slope_r", 0.2}
private

Definition at line 56 of file Csc4dSegmentMaker.h.

56{this, "max_slope_r", 0.2};

◆ m_printer

PublicToolHandle<Muon::MuonEDMPrinterTool> Csc4dSegmentMaker::m_printer
private
Initial value:
{
this,
"Printer",
"Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
}

Definition at line 65 of file Csc4dSegmentMaker.h.

65 {
66 this,
67 "Printer",
68 "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
69 };

◆ m_segmentTool

ToolHandle<ICscSegmentUtilTool> Csc4dSegmentMaker::m_segmentTool
private
Initial value:
{
this,
"segmentTool",
"CscSegmentUtilTool/CscSegmentUtilTool",
}

Definition at line 60 of file Csc4dSegmentMaker.h.

60 {
61 this,
62 "segmentTool",
63 "CscSegmentUtilTool/CscSegmentUtilTool",
64 };

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