ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigTools
IDScanZFinder
src
IDScanZFinder.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// IdScan: IDScanZFinder
7
// ( see header-file for details )
8
// -------------------------------
9
// ATLAS Collaboration
11
12
#include <cmath>
13
#include <vector>
14
15
#include "
IDScanZFinder.h
"
16
#include "
ZFinderConstants.h
"
17
18
#include "
TrigInDetEvent/TrigVertex.h
"
19
#include "
TrigInDetEvent/TrigSiSpacePoint.h
"
20
#include "
IRegionSelector/IRoiDescriptor.h
"
21
22
23
using
CLHEP::millimeter;
24
25
29
30
IDScanZFinder::IDScanZFinder
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent) :
31
Run1
::
IDScanZFinderInternal
<
TrigSiSpacePoint
>(
type
, name),
AthAlgTool
(
type
, name, parent ),
32
m_numberingTool
(
"TrigL2LayerNumberTool"
)
33
{
34
declareInterface< ITrigRun1ZFinder >(
this
);
35
36
declareProperty
(
"PhiBinSize"
,
m_phiBinSize
= 0.2 );
37
declareProperty
(
"UseOnlyPixels"
,
m_pixOnly
=
false
);
38
declareProperty
(
"MinZBinSize"
,
m_minZBinSize
= 0.2 );
39
declareProperty
(
"nFirstLayers"
,
m_nFirstLayers
= 3 );
40
declareProperty
(
"ZBinSizeEtaCoeff"
,
m_zBinSizeEtaCoeff
= 0.1 );
41
declareProperty
(
"DPhiDEta"
,
m_dphideta
= -0.02 );
42
declareProperty
(
"NeighborMultiplier"
,
m_neighborMultiplier
= 1.);
43
declareProperty
(
"NumberOfPeaks"
,
m_numberOfPeaks
= 1 );
44
declareProperty
(
"ChargeAware"
,
m_chargeAware
=
false
);
45
declareProperty
(
"ZHistoPerPhi"
,
m_zHistoPerPhi
=
false
);
46
declareProperty
(
"VrtxDistCut"
,
m_vrtxDistCut
= 0. );
47
declareProperty
(
"nVrtxSeparation"
,
m_nvrtxSeparation
= 0 );
48
declareProperty
(
"VrtxMixing"
,
m_vrtxMixing
= 0. );
49
declareProperty
(
"PreferCentralZ"
,
m_preferCentralZ
=
true
);
50
declareProperty
(
"TrustSPProvider"
,
m_trustSPprovider
=
true
);
51
declareProperty
(
"FullScanMode"
,
m_fullScanMode
=
false
);
52
declareProperty
(
"TripletMode"
,
m_tripletMode
= 0 );
53
declareProperty
(
"TripletDZ"
,
m_tripletDZ
= 25. );
54
declareProperty
(
"TripletDK"
,
m_tripletDK
= 0.005 );
55
declareProperty
(
"TripletDP"
,
m_tripletDP
= 0.05 );
56
declareProperty
(
"WeightThreshold"
,
m_weightThreshold
= 0 );
57
}
58
59
60
StatusCode
IDScanZFinder::initialize
()
61
{
62
// NB: This should go into the InitializeInternal !!!!!!!!!
63
// NO internal settings should be changed in here, this should just
64
// be an athena wrapper !!!
65
66
// phiBinSize is expected in degrees (~0.2); make sure it is > ZFinder_MinPhiSliceSize
67
//
68
71
if
(
m_phiBinSize
<
ZFinder_MinPhiSliceSize
and !
m_forcePhiBinSize
){
72
ATH_MSG_WARNING
(
"Requested PhiBinSize of "
<<
m_phiBinSize
73
<<
" degrees is smaller than the minimum allowed ("
<<
ZFinder_MinPhiSliceSize
74
<<
" degrees). Set to the minimum value."
);
75
// m_phiBinSize = ZFinder_MinPhiSliceSize;
76
}
77
78
// NB: This should go into the InitializeInternal !!!!
79
if
(
m_dphideta
> 0 ){
80
ATH_MSG_WARNING
(
"Requested DPhiDEta of "
<<
m_dphideta
81
<<
" is positive. Setting to its negative!"
);
82
// m_dphideta *= -1.;
83
}
84
85
ATH_CHECK
(
m_numberingTool
.retrieve() );
86
89
int
offsetEndcapPixels =
m_numberingTool
->offsetEndcapPixels();
90
int
maxSiliconLayerNum =
m_numberingTool
->maxSiliconLayerNum();
91
// int offsetBarrelSCT = m_numberingTool->offsetBarrelSCT();
92
93
94
// std::cout << "ZFinder::initialise() offset pixels " << offsetEndcapPixels
95
// << "\toffsetBarrelSCT " << offsetBarrelSCT
96
// << "\tmaxlayers " << maxSiliconLayerNum << std::endl;
97
102
initializeInternal
(maxSiliconLayerNum,offsetEndcapPixels-1);
103
104
ATH_MSG_INFO
(
"IDScanZFinder constructed: name() "
<< name() );
105
ATH_MSG_INFO
(
"IDScanZFinderInternal version: "
<<
getVersion
() );
106
ATH_MSG_INFO
(
"IDScanZFinder::PixOnly set to "
<<
m_pixOnly
);
107
ATH_MSG_INFO
(
"IDScanZFinder::FullScanMode "
<<
m_fullScanMode
);
108
ATH_MSG_INFO
(
"IDScanZFinder::PhiBinSize set to "
<<
m_phiBinSize
);
109
ATH_MSG_INFO
(
"IDScanZFinder::# of peaks to consider: "
<<
m_numberOfPeaks
);
110
ATH_MSG_INFO
(
"IDScanZFinder::z bin size "
<<
m_minZBinSize
);
111
ATH_MSG_INFO
(
"IDScanZFinder::eta coeff "
<<
m_zBinSizeEtaCoeff
);
112
113
ATH_MSG_INFO
(
"IDScanZFinder::m_nFirstLayers = "
<<
m_nFirstLayers
);
114
ATH_MSG_INFO
(
"IDScanZFinder::m_invPhiSliceSize = "
<<
m_invPhiSliceSize
);
115
ATH_MSG_INFO
(
"IDScanZFinder::m_phiBinSize = "
<<
m_phiBinSize
);
116
ATH_MSG_INFO
(
"IDScanZFinder::m_dphideta = "
<<
m_dphideta
);
117
ATH_MSG_INFO
(
"IDScanZFinder::m_neighborMultiplier = "
<<
m_neighborMultiplier
);
118
ATH_MSG_INFO
(
"IDScanZFinder::m_minZBinSize = "
<<
m_minZBinSize
);
119
ATH_MSG_INFO
(
"IDScanZFinder::m_zBinSizeEtaCoeff = "
<<
m_zBinSizeEtaCoeff
);
120
ATH_MSG_INFO
(
"IDScanZFinder::m_chargeAware = "
<<
m_chargeAware
);
121
ATH_MSG_INFO
(
"IDScanZFinder::m_zHistoPerPhi = "
<<
m_zHistoPerPhi
);
122
123
ATH_MSG_INFO
(
"IDScanZFinder::m_nvrtxSeparation = "
<<
m_nvrtxSeparation
);
124
ATH_MSG_INFO
(
"IDScanZFinder::m_vrtxDistCut = "
<<
m_vrtxDistCut
);
125
ATH_MSG_INFO
(
"IDScanZFinder::m_vrtxMixing = "
<<
m_vrtxMixing
);
126
ATH_MSG_INFO
(
"IDScanZFinder::m_preferCentralZ = "
<<
m_preferCentralZ
);
127
128
ATH_MSG_INFO
(
"IDScanZFinder::m_trustSPprovider = "
<<
m_trustSPprovider
);
129
130
ATH_MSG_INFO
(
"IDScanZFinder::m_tripletMode = "
<<
m_tripletMode
);
131
132
ATH_MSG_INFO
(
"IDScanZFinder::m_weigthThreshold = "
<<
m_weightThreshold
);
133
134
return
StatusCode::SUCCESS;
135
}
136
137
138
TrigVertexCollection
*
IDScanZFinder::findZ
(
const
std::vector<const TrigSiSpacePoint *>& spVec,
const
IRoiDescriptor
& roi)
139
{
140
141
TrigVertexCollection
* output =
new
TrigVertexCollection
;
142
143
std::vector<vertex>* vertices =
findZInternal
( spVec, roi);
144
145
ATH_MSG_DEBUG
(
"roi: "
<< roi);
146
ATH_MSG_DEBUG
(
"m_NumPhiSlices: "
<<
m_NumPhiSlices
);
147
148
149
if
(
GetInternalStatus
()==-1 ) {
150
ATH_MSG_WARNING
(
"phi of spacepoint out of range! phi="
<<
GetReturnValue
());
151
ATH_MSG_WARNING
(
"Exiting ZFinder..."
);
152
153
}
154
155
for
(
unsigned
int
i=0 ; i<vertices->size() ; i++ ) {
156
output->push_back(
new
TrigVertex
( (*vertices)[i]._z, (*vertices)[i]._weight,
TrigVertex::NULLID
) );
157
}
158
159
delete
vertices;
160
161
return
output;
162
}
163
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
IDScanZFinder.h
IRoiDescriptor.h
TrigSiSpacePoint.h
TrigVertex.h
ZFinderConstants.h
ZFinder_MinPhiSliceSize
const double ZFinder_MinPhiSliceSize
Definition
ZFinderConstants.h:34
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
IDScanZFinder::initialize
virtual StatusCode initialize() override
Definition
IDScanZFinder.cxx:60
IDScanZFinder::IDScanZFinder
IDScanZFinder(const std::string &, const std::string &, const IInterface *)
Definition
IDScanZFinder.cxx:30
IDScanZFinder::m_numberingTool
ToolHandle< ITrigL2LayerNumberTool > m_numberingTool
no private data members - all inherited from the IDScanZFinderInternal class NB: BE CAREFUL !
Definition
IDScanZFinder.h:58
IDScanZFinder::findZ
virtual TrigVertexCollection * findZ(const std::vector< const TrigSiSpacePoint * > &spVec, const IRoiDescriptor &roi) override
Definition
IDScanZFinder.cxx:138
IRoiDescriptor
Describes the API of the Region of Ineterest geometry.
Definition
IRoiDescriptor.h:23
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_fullScanMode
bool m_fullScanMode
Definition
IDScanZFinderInternal.h:146
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::findZInternal
std::vector< vertex > * findZInternal(const std::vector< const TrigSiSpacePoint * > &spVec, const IRoiDescriptor &roi)
Definition
IDScanZFinderInternal.h:525
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_tripletDK
double m_tripletDK
Definition
IDScanZFinderInternal.h:150
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_weightThreshold
double m_weightThreshold
Definition
IDScanZFinderInternal.h:156
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_dphideta
double m_dphideta
Definition
IDScanZFinderInternal.h:123
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_nvrtxSeparation
int m_nvrtxSeparation
Definition
IDScanZFinderInternal.h:139
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_vrtxDistCut
double m_vrtxDistCut
Definition
IDScanZFinderInternal.h:137
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_neighborMultiplier
double m_neighborMultiplier
Definition
IDScanZFinderInternal.h:124
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_zHistoPerPhi
bool m_zHistoPerPhi
Definition
IDScanZFinderInternal.h:121
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_invPhiSliceSize
double m_invPhiSliceSize
Definition
IDScanZFinderInternal.h:100
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_nFirstLayers
int m_nFirstLayers
Definition
IDScanZFinderInternal.h:135
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::getVersion
const std::string & getVersion() const
Definition
IDScanZFinderInternal.h:79
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_tripletDZ
double m_tripletDZ
Definition
IDScanZFinderInternal.h:149
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_minZBinSize
double m_minZBinSize
Definition
IDScanZFinderInternal.h:108
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_phiBinSize
double m_phiBinSize
Definition
IDScanZFinderInternal.h:103
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_pixOnly
bool m_pixOnly
Definition
IDScanZFinderInternal.h:113
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_vrtxMixing
double m_vrtxMixing
Definition
IDScanZFinderInternal.h:138
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_forcePhiBinSize
bool m_forcePhiBinSize
Definition
IDScanZFinderInternal.h:104
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_tripletMode
int m_tripletMode
Definition
IDScanZFinderInternal.h:148
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::IDScanZFinderInternal
IDScanZFinderInternal(const std::string &, const std::string &)
Definition
IDScanZFinderInternal.h:172
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_trustSPprovider
bool m_trustSPprovider
Definition
IDScanZFinderInternal.h:142
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_NumPhiSlices
long m_NumPhiSlices
Definition
IDScanZFinderInternal.h:101
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::initializeInternal
void initializeInternal(long maxLayers, long lastBarrel)
Definition
IDScanZFinderInternal.h:227
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_tripletDP
double m_tripletDP
Definition
IDScanZFinderInternal.h:152
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::GetInternalStatus
int GetInternalStatus() const
Definition
IDScanZFinderInternal.h:81
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_chargeAware
bool m_chargeAware
Definition
IDScanZFinderInternal.h:120
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::GetReturnValue
double GetReturnValue() const
Definition
IDScanZFinderInternal.h:88
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_zBinSizeEtaCoeff
double m_zBinSizeEtaCoeff
Definition
IDScanZFinderInternal.h:109
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_numberOfPeaks
long m_numberOfPeaks
Definition
IDScanZFinderInternal.h:111
Run1::IDScanZFinderInternal< TrigSiSpacePoint >::m_preferCentralZ
bool m_preferCentralZ
Definition
IDScanZFinderInternal.h:140
TrigSiSpacePoint
Definition
TrigSiSpacePoint.h:12
TrigVertexCollection
Definition
TrigVertexCollection.h:13
TrigVertex
encapsulates LVL2 vertex parameters (in the global reference frame), covariance matrix,...
Definition
TrigVertex.h:29
TrigVertex::NULLID
@ NULLID
Definition
TrigVertex.h:32
Run1
USAGE: openCoraCool.exe "COOLONL_SCT/COMP200".
Definition
openCoraCool.cxx:57
type
Generated on
for ATLAS Offline Software by
1.17.0