ATLAS Offline Software
Loading...
Searching...
No Matches
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
21
22
23using CLHEP::millimeter;
24
25
29
30IDScanZFinder::IDScanZFinder( const std::string& type, const std::string& name, const IInterface* 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
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
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
138TrigVertexCollection* IDScanZFinder::findZ( const std::vector<const TrigSiSpacePoint *>& spVec, const IRoiDescriptor& roi)
139{
140
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
#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)
virtual StatusCode initialize() override
IDScanZFinder(const std::string &, const std::string &, const IInterface *)
ToolHandle< ITrigL2LayerNumberTool > m_numberingTool
no private data members - all inherited from the IDScanZFinderInternal class NB: BE CAREFUL !
virtual TrigVertexCollection * findZ(const std::vector< const TrigSiSpacePoint * > &spVec, const IRoiDescriptor &roi) override
Describes the API of the Region of Ineterest geometry.
std::vector< vertex > * findZInternal(const std::vector< const TrigSiSpacePoint * > &spVec, const IRoiDescriptor &roi)
IDScanZFinderInternal(const std::string &, const std::string &)
void initializeInternal(long maxLayers, long lastBarrel)
encapsulates LVL2 vertex parameters (in the global reference frame), covariance matrix,...
Definition TrigVertex.h:28
USAGE: openCoraCool.exe "COOLONL_SCT/COMP200".