ATLAS Offline Software
Loading...
Searching...
No Matches
TrigZFinder.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
5// IdScan: TrigZFinder
6// ( see header-file for details )
7// -------------------------------
8// ATLAS Collaboration
10
11#include <cmath>
12#include <vector>
13
14#include "TrigZFinder.h"
15#include "ZFinderConstants.h"
16
20
21
25
26TrigZFinder::TrigZFinder( const std::string& type, const std::string& name, const IInterface* parent) :
27 TrigZFinder::TrigZFinderInternal(type, name), AthAlgTool( type, name, parent ),
28 m_numberingTool("TrigL2LayerNumberTool")
29{
30 declareInterface< ITrigZFinder >( this );
31
32 // std::cout << "ZFinder::ZFinder() " << name << " " << type << "\tm_nFirstLayers " << m_nFirstLayers << std::endl;
33 // std::cout << "ZFinder::ZFinder() version " << name << " " << type << "\tTrigZFinder-00-00-62"<< std::endl;
34
35 declareProperty( "PhiBinSize", m_phiBinSize = 0.2 );
36 declareProperty( "ForcePhiBinSize", m_forcePhiBinSize = false );
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 declareProperty( "MaxLayer", m_maxLayer = 32 );
58 declareProperty( "MinVtxSignificance", m_minVtxSignificance = 0 );
59 declareProperty( "Percentile", m_percentile = 1 );
60
61
62 declareProperty( "LayerNumberTool", m_numberingTool);
63
64 // std::cout << "ZFinder::ZFinder() " << name << " " << type << "\tm_nFirstLayers " << m_nFirstLayers << std::endl;
65
66}
67
68
70{
71 // NB: This should go into the InitializeInternal !!!!!!!!!
72 // NO internal settings should be changed in here, this should just
73 // be an athena wrapper !!!
74
75 // phiBinSize is expected in degrees (~0.2); make sure it is > ZFinder_MinPhiSliceSize
76 //
77
81 ATH_MSG_WARNING("Requested PhiBinSize of " << m_phiBinSize
82 << " degrees is smaller than the minimum allowed (" << ZFinder_MinPhiSliceSize
83 << " degrees). Set to the minimum value.");
84 // m_phiBinSize = ZFinder_MinPhiSliceSize;
85 }
86
87 // NB: This should go into the InitializeInternal !!!!
88 if ( m_dphideta > 0 ){
89 ATH_MSG_WARNING("Requested DPhiDEta of " << m_dphideta
90 << " is positive. Setting to its negative!");
91 // m_dphideta *= -1.;
92 }
93
94 ATH_CHECK(m_numberingTool.retrieve());
95
98 int offsetEndcapPixels = m_numberingTool->offsetEndcapPixels();
99 int maxSiliconLayerNum = m_numberingTool->maxSiliconLayerNum();
100 // int offsetBarrelSCT = m_numberingTool->offsetBarrelSCT();
101
102
103 // std::cout << "ZFinder::initialise() offset pixels " << offsetEndcapPixels
104 // << "\toffsetBarrelSCT " << offsetBarrelSCT
105 // << "\tmaxlayers " << maxSiliconLayerNum << std::endl;
106
111
112 initializeInternal(maxSiliconLayerNum,offsetEndcapPixels-1);
113
114 ATH_MSG_INFO("TrigZFinder constructed: name() " << name() );
115 ATH_MSG_INFO("TrigZFinder::PixOnly set to " << m_pixOnly );
116 ATH_MSG_INFO("TrigZFinder::FullScanMode " << m_fullScanMode );
117 ATH_MSG_INFO("TrigZFinder::PhiBinSize set to " << m_phiBinSize );
118 ATH_MSG_INFO("TrigZFinder::# of peaks to consider: " << m_numberOfPeaks );
119 ATH_MSG_INFO("TrigZFinder::z bin size " << m_minZBinSize );
120 ATH_MSG_INFO("TrigZFinder::eta coeff " << m_zBinSizeEtaCoeff);
121
122 ATH_MSG_INFO("TrigZFinder::m_nFirstLayers = " << m_nFirstLayers );
123 ATH_MSG_INFO("TrigZFinder::m_invPhiSliceSize = " << m_invPhiSliceSize );
124 ATH_MSG_INFO("TrigZFinder::m_phiBinSize = " << m_phiBinSize );
125 ATH_MSG_INFO("TrigZFinder::m_dphideta = " << m_dphideta );
126 ATH_MSG_INFO("TrigZFinder::m_neighborMultiplier = " << m_neighborMultiplier);
127 ATH_MSG_INFO("TrigZFinder::m_minZBinSize = " << m_minZBinSize );
128 ATH_MSG_INFO("TrigZFinder::m_zBinSizeEtaCoeff = " << m_zBinSizeEtaCoeff);
129 ATH_MSG_INFO("TrigZFinder::m_chargeAware = " << m_chargeAware );
130 ATH_MSG_INFO("TrigZFinder::m_zHistoPerPhi = " << m_zHistoPerPhi );
131
132 ATH_MSG_INFO("TrigZFinder::m_nvrtxSeparation = " << m_nvrtxSeparation );
133 ATH_MSG_INFO("TrigZFinder::m_vrtxDistCut = " << m_vrtxDistCut );
134 ATH_MSG_INFO("TrigZFinder::m_vrtxMixing = " << m_vrtxMixing );
135 ATH_MSG_INFO("TrigZFinder::m_preferCentralZ = " << m_preferCentralZ );
136
137 ATH_MSG_INFO("TrigZFinder::m_trustSPprovider = " << m_trustSPprovider );
138
139 ATH_MSG_INFO("TrigZFinder::m_tripletMode = " << m_tripletMode );
140
141 ATH_MSG_INFO("TrigZFinder::m_maxLayer = " << m_maxLayer );
142
143 ATH_MSG_INFO("TrigZFinder::m_minVtxSignificance = " << m_minVtxSignificance );
144
145 if ( m_minVtxSignificance>0 ) {
146 ATH_MSG_INFO("TrigZFinder::m_percentile = " << m_percentile );
147 }
148
149 ATH_MSG_INFO("TrigZFinder::m_weigthThreshold = " << m_weightThreshold );
150
151 ATH_MSG_INFO("TrigZFinder::m_tripletDZ = " << m_tripletDZ );
152 ATH_MSG_INFO("TrigZFinder::m_tripletDK = " << m_tripletDK );
153 ATH_MSG_INFO("TrigZFinder::m_tripletDP = " << m_tripletDP );
154
155 return StatusCode::SUCCESS;
156}
157
158
159
160
161TrigVertexCollection* TrigZFinder::findZ( const std::vector<TrigSiSpacePointBase>& spVec, const IRoiDescriptor& roi) const
162{
163
165
166 std::vector<vertex>* vertices = findZInternal( spVec, roi );
167
168 ATH_MSG_DEBUG( "findZ() roi: " << roi );
169
170 for ( unsigned int i=0 ; i<vertices->size() ; i++ ) {
171 auto vtx = new TrigVertex((*vertices)[i]._z, (*vertices)[i]._weight, TrigVertex::NULLID);
172 output->push_back(vtx);
173 }
174
175 delete vertices;
176
177 return output;
178}
179
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
const double ZFinder_MinPhiSliceSize
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Describes the API of the Region of Ineterest geometry.
encapsulates LVL2 vertex parameters (in the global reference frame), covariance matrix,...
Definition TrigVertex.h:28
std::vector< vertex > * findZInternal(const std::vector< TrigSiSpacePointBase > &spVec, const IRoiDescriptor &roi) const
TrigZFinderInternal(const std::string &, const std::string &)
double m_weightThreshold
to apply a threshold to the found vertex candidates
void initializeInternal(long maxLayers, long lastBarrel)
virtual TrigVertexCollection * findZ(const std::vector< TrigSiSpacePointBase > &spVec, const IRoiDescriptor &roi) const override
TrigZFinder(const std::string &, const std::string &, const IInterface *)
ToolHandle< ITrigL2LayerNumberTool > m_numberingTool
no private data members - all inherited from the TrigZFinderInternal class NB: BE CAREFUL !
Definition TrigZFinder.h:58
virtual StatusCode initialize() override