ATLAS Offline Software
Loading...
Searching...
No Matches
TrigZFinderInternal.h
Go to the documentation of this file.
1// emacs: this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5*/
6
8//
9// filename: TrigZFinderInternal.h
10//
11// author: Nikos Konstantinidis <n.konstantinidis@ucl.ac.uk>
12//
13//
14// Description: NON ATHENA Internals for the ZFinder primary z vertex finding AlgTool
15//
16// -------------------------------
17// ATLAS Collaboration
19
20
21#ifndef TRIGZFINDERINTERNAL_H
22#define TRIGZFINDERINTERNAL_H
23
24#include <cmath>
25#include <vector>
26#include <string>
27
28#include "ZFinderConstants.h"
31
32
33
35
36public:
37
38 struct vertex {
39 vertex( double z, double weight ) : _z(z), _weight(weight) { }
40 double _z;
41 double _weight;
42 };
43
44public:
45
46 TrigZFinderInternal( const std::string&, const std::string& );
48 // void initializeInternal(long maxLayers=20, long lastBarrel=7);
49 void initializeInternal(long maxLayers, long lastBarrel);
50
51 std::vector<vertex>* findZInternal( const std::vector< TrigSiSpacePointBase >& spVec,
52 const IRoiDescriptor& roi ) const;
53
54 void setLayers(long maxLayers, long lastBarrelLayer) {
55 m_IdScan_MaxNumLayers = maxLayers; // dphiEC depends on this value
56 m_IdScan_LastBrlLayer = lastBarrelLayer; // dphiBrl depends on this value
57 }
58
59protected: // member functions
60
61 const std::string& getType() const { return m_type; }
62 const std::string& getName() const { return m_name; }
63
64
65 // fills phi, rho, z, layer of spacepoints to simple vectors
66
67 long fillVectors( const std::vector<TrigSiSpacePointBase>& spVec,
68 const IRoiDescriptor& roi,
69 std::vector<double>& phi,
70 std::vector<double>& rho,
71 std::vector<double>& zed,
72 std::vector<long>& lyr,
73 std::vector<long>& filledLayers,
74 long& numPhiSlices ) const;
75
76
77 double computeZV(double r1, double z1, double r2, double z2) const;
78 double computeZV(double r1, double p1, double z1, double r2, double p2, double z2) const;
79
80
81protected: // data members
82
86
87
88 // To be read in from jobOptions by IdScanMain
89
90 double m_invPhiSliceSize = 0.0; // the inverse size of the phi slices
91 long m_NumPhiSlices = 0L; // the number of phi slices, given the width of the RoI
92
93 double m_phiBinSize; // the size of the phi slices
94 bool m_forcePhiBinSize = false; // respect the config of phi bin even if below reasonable threshold
95 double m_usedphiBinSize; // the size of the phi slices
96 double m_ROIphiWidth; // the phi width of the ROI
97 double m_minZBinSize; // z-histo bin size: m_minZBinSize+|etaRoI|*m_zBinSizeEtaCoeff (to account for worse resolution in high eta)
98 double m_zBinSizeEtaCoeff; // z-histo bin size: m_minZBinSize+|etaRoI|*m_zBinSizeEtaCoeff (to account for worse resolution in high eta)
99
100 long m_numberOfPeaks; // how many z-positions to return in findZ
101
102 bool m_pixOnly; // use only Pixel space points
103
104 std::string m_type; // type information for internal book keeping
105 std::string m_name; // name information for the same
106
107
108 bool m_chargeAware ; // maintain separate sets of z histos for + & - tracks
109 bool m_zHistoPerPhi; // maintain one set of z histos per each phi slice
110
111 double m_dphideta; // how, as a function of eta, the number of phi neighbours decreases
112 double m_neighborMultiplier; // extra factor to manually increase the number of phi neighbors
113
114 std::vector< std::vector<long> > m_extraPhi; // ( IdScan_MaxNumLayers, std::vector<long>(IdScan_MaxNumLayers) ); // number of phi neighbours to look at
115
116
117 int m_nFirstLayers; // When the pairs of SPs are made, the inner SP comes from up to this "filled layer"
118
119 double m_vrtxDistCut; // The minimum fractional distance between two output vertices
120 double m_vrtxMixing ; // If two vertices are found to be too close, "mix" the second into first
121 int m_nvrtxSeparation; // The minimum number of zbins that any two output vertices should by separated by
122 bool m_preferCentralZ; // Among peaks of same height, should precedence go to the one with smaller |z|
123
124 bool m_trustSPprovider; // Should we re-extract the RoI phi range from the phis of the SPs from the SPP
125
126 double m_returnval = 0.0; // return value for algorithm
127
129
133 double m_halfTripletDK; // replaces m_tripletDK internally to avoid unnecessary multiplication by 2 in curvature calculation, without changing the interface
135
137
140
141
143
145
146 std::vector<int> m_new2old; //transform table for new layer numbering scheme
147
148};
149
150
151#endif
152
Scalar phi() const
phi method
#define z
Describes the API of the Region of Ineterest geometry.
const std::string & getName() const
double computeZV(double r1, double z1, double r2, double z2) const
std::vector< vertex > * findZInternal(const std::vector< TrigSiSpacePointBase > &spVec, const IRoiDescriptor &roi) const
long fillVectors(const std::vector< TrigSiSpacePointBase > &spVec, const IRoiDescriptor &roi, std::vector< double > &phi, std::vector< double > &rho, std::vector< double > &zed, std::vector< long > &lyr, std::vector< long > &filledLayers, long &numPhiSlices) const
TrigZFinderInternal(const std::string &, const std::string &)
std::vector< std::vector< long > > m_extraPhi
std::vector< int > m_new2old
double m_weightThreshold
to apply a threshold to the found vertex candidates
void setLayers(long maxLayers, long lastBarrelLayer)
long m_IdScan_MaxNumLayers
maximum number of layers and last barrel layer
void initializeInternal(long maxLayers, long lastBarrel)
const std::string & getType() const
vertex(double z, double weight)