ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonReconstruction
MuonSegmentMakers
MuonSegmentMakerAlgs
CscSegmentMakers
src
Csc4dSegmentMaker.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
Csc4dSegmentMaker.h
"
6
7
#include <sstream>
8
9
#include "
CscClusterization/ICscClusterFitter.h
"
10
#include "
CscClusterization/ICscStripFitter.h
"
11
#include "
CscSegmentMakers/ICscSegmentUtilTool.h
"
12
#include "
EventPrimitives/EventPrimitivesHelpers.h
"
13
#include "
MuonPrepRawData/CscPrepDataContainer.h
"
14
#include "
MuonRIO_OnTrack/CscClusterOnTrack.h
"
15
#include "
MuonRIO_OnTrack/MdtDriftCircleOnTrack.h
"
16
#include "
MuonReadoutGeometry/CscReadoutElement.h
"
17
#include "
MuonReadoutGeometry/MuonDetectorManager.h
"
18
#include "
MuonRecHelperTools/MuonEDMPrinterTool.h
"
19
#include "
MuonSegment/MuonSegment.h
"
20
#include "
MuonSegment/MuonSegmentCombinationCollection.h
"
21
#include "
TrkEventPrimitives/FitQuality.h
"
22
#include "
TrkEventPrimitives/LocalDirection.h
"
23
#include "
TrkRoad/TrackRoad.h
"
24
#include "
TrkSegment/Segment.h
"
25
#include "
TrkSurfaces/PlaneSurface.h
"
26
#include "
TrkSurfaces/TrapezoidBounds.h
"
27
28
using
Muon::CscPrepData
;
29
using
Muon::CscPrepDataCollection
;
30
using
Muon::CscPrepDataContainer
;
31
32
using
MuonGM::CscReadoutElement
;
33
34
using
Muon::CscClusterOnTrack
;
35
using
Muon::MuonSegment
;
36
using
Muon::MuonSegmentCombination
;
37
38
using
Muon::MdtDriftCircleOnTrack
;
39
using
Muon::MuonClusterOnTrack
;
40
41
//******************************************************************************
42
43
Csc4dSegmentMaker::Csc4dSegmentMaker
(
const
std::string&
type
,
const
std::string& aname,
const
IInterface* parent) :
44
AthAlgTool
(
type
, aname, parent) {
45
declareInterface<ICscSegmentFinder>(
this
);
46
}
47
48
//******************************************************************************
49
50
// Destructor.
51
52
Csc4dSegmentMaker::~Csc4dSegmentMaker
() =
default
;
53
54
//******************************************************************************
55
56
StatusCode
Csc4dSegmentMaker::initialize
() {
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
}
71
72
//******************************************************************************
73
74
std::unique_ptr<MuonSegmentCombinationCollection>
Csc4dSegmentMaker::find
(
const
MuonSegmentCombinationCollection
& segcols,
75
const
EventContext& ctx)
const
{
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
}
103
104
// dummy ICscSegmentFinder interface
105
std::unique_ptr<MuonSegmentCombinationCollection>
Csc4dSegmentMaker::find
(
const
std::vector<const Muon::CscPrepDataCollection*>&,
106
const
EventContext&)
const
{
107
return
nullptr
;
108
}
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
Csc4dSegmentMaker.h
CscClusterOnTrack.h
CscPrepDataContainer.h
CscReadoutElement.h
EventPrimitivesHelpers.h
FitQuality.h
ICscClusterFitter.h
ICscSegmentUtilTool.h
ICscStripFitter.h
LocalDirection.h
MdtDriftCircleOnTrack.h
MuonDetectorManager.h
MuonEDMPrinterTool.h
MuonSegmentCombinationCollection.h
MuonSegmentCombinationCollection
DataVector< Muon::MuonSegmentCombination > MuonSegmentCombinationCollection
This typedef represents a collection of MuonSegmentCombination objects.
Definition
MuonSegmentCombinationCollection.h:16
MuonSegment.h
PlaneSurface.h
TrackRoad.h
Segment.h
TrapezoidBounds.h
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
Csc4dSegmentMaker::m_max_slope_phi
Gaudi::Property< double > m_max_slope_phi
Definition
Csc4dSegmentMaker.h:57
Csc4dSegmentMaker::Csc4dSegmentMaker
Csc4dSegmentMaker(const std::string &, const std::string &, const IInterface *)
Definition
Csc4dSegmentMaker.cxx:43
Csc4dSegmentMaker::m_max_chisquare
Gaudi::Property< double > m_max_chisquare
Definition
Csc4dSegmentMaker.h:55
Csc4dSegmentMaker::find
std::unique_ptr< MuonSegmentCombinationCollection > find(const MuonSegmentCombinationCollection &, const EventContext &ctx) const override
Definition
Csc4dSegmentMaker.cxx:74
Csc4dSegmentMaker::m_max_slope_r
Gaudi::Property< double > m_max_slope_r
Definition
Csc4dSegmentMaker.h:56
Csc4dSegmentMaker::initialize
StatusCode initialize() override
Definition
Csc4dSegmentMaker.cxx:56
Csc4dSegmentMaker::~Csc4dSegmentMaker
virtual ~Csc4dSegmentMaker()
Csc4dSegmentMaker::m_max_seg_per_chamber
Gaudi::Property< double > m_max_seg_per_chamber
Definition
Csc4dSegmentMaker.h:58
Csc4dSegmentMaker::m_printer
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
Definition
Csc4dSegmentMaker.h:65
Csc4dSegmentMaker::m_segmentTool
ToolHandle< ICscSegmentUtilTool > m_segmentTool
Definition
Csc4dSegmentMaker.h:60
DataVector< Muon::MuonSegmentCombination >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Definition
DataVector.h:838
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
MuonGM::CscReadoutElement
Definition
CscReadoutElement.h:56
Muon::CscClusterOnTrack
Class to represent the calibrated clusters created from CSC strips.
Definition
CscClusterOnTrack.h:47
Muon::CscPrepData
Class representing clusters from the CSC.
Definition
CscPrepData.h:39
Muon::MdtDriftCircleOnTrack
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Definition
MdtDriftCircleOnTrack.h:37
Muon::MuonClusterOnTrack
Base class for Muon cluster RIO_OnTracks.
Definition
MuonClusterOnTrack.h:34
Muon::MuonSegmentCombination
Class to hold a set of MuonSegments belonging together.
Definition
MuonSegmentCombination.h:30
Muon::MuonSegmentCombination::numberOfStations
unsigned int numberOfStations() const
Number of stations with segment.
Definition
MuonSegmentCombination.h:108
Muon::MuonSegment
This is the common class for 3D segments used in the muon spectrometer.
Definition
MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonSegment/MuonSegment/MuonSegment.h:45
Muon::CscPrepDataCollection
MuonPrepDataCollection< CscPrepData > CscPrepDataCollection
Definition
MuonPrepDataCollection.h:109
Muon::CscPrepDataContainer
MuonPrepDataContainerT< CscPrepData > CscPrepDataContainer
Definition
MuonPrepDataContainer.h:97
type
Generated on
for ATLAS Offline Software by
1.17.0