Skip to content

Commit 66bb301

Browse files
authored
Merge pull request #47454 from kerstinlovisa/KalmanVertexFit_configurableTrackerBounds
Function to set tracker bounds in KalmanVertexFitter
2 parents e92ef10 + fcb435c commit 66bb301

File tree

3 files changed

+26
-7
lines changed

3 files changed

+26
-7
lines changed

RecoVertex/KalmanVertexFit/interface/KalmanVertexFitter.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,17 @@ class KalmanVertexFitter : public VertexFitter<5> {
2929

3030
KalmanVertexFitter(bool useSmoothing = false);
3131

32+
/**
33+
* Same as above, including a boolean for extending tracker bounds to muon system
34+
* \param useMuonSystemBounds Specifies whether the tracker bounds should include the muon system or not.
35+
*/
36+
KalmanVertexFitter(bool useSmoothing, bool useMuonSystemBounds);
37+
3238
/**
3339
* Same as above, using a ParameterSet to set the convergence criteria
3440
*/
3541

36-
KalmanVertexFitter(const edm::ParameterSet& pSet, bool useSmoothing = false);
42+
KalmanVertexFitter(const edm::ParameterSet& pSet, bool useSmoothing = false, bool useMuonSystemBounds = false);
3743

3844
KalmanVertexFitter(const KalmanVertexFitter& other) : theSequentialFitter(other.theSequentialFitter->clone()) {}
3945

@@ -104,11 +110,11 @@ class KalmanVertexFitter : public VertexFitter<5> {
104110
// edm::ParameterSet defaultParameters() const;
105111

106112
private:
107-
void setup(const edm::ParameterSet& pSet, bool useSmoothing);
113+
void setup(const edm::ParameterSet& pSet, bool useSmoothing, bool useMuonSystemBounds);
108114

109115
edm::ParameterSet defaultParameters() const;
110116

111-
const SequentialVertexFitter<5>* theSequentialFitter;
117+
SequentialVertexFitter<5>* theSequentialFitter;
112118
};
113119

114120
#endif

RecoVertex/KalmanVertexFit/src/KalmanVertexFitter.cc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77
#include "RecoVertex/KalmanVertexFit/interface/KalmanTrackToTrackCovCalculator.h"
88
#include "RecoVertex/LinearizationPointFinders/interface/FsmwLinearizationPointFinder.h"
99

10-
KalmanVertexFitter::KalmanVertexFitter(bool useSmoothing) {
10+
KalmanVertexFitter::KalmanVertexFitter(bool useSmoothing) : KalmanVertexFitter(useSmoothing, false) {}
11+
12+
KalmanVertexFitter::KalmanVertexFitter(bool useSmoothing, bool useMuonSystemBounds) {
1113
edm::ParameterSet pSet = defaultParameters();
12-
setup(pSet, useSmoothing);
14+
setup(pSet, useSmoothing, useMuonSystemBounds);
1315
}
1416

15-
KalmanVertexFitter::KalmanVertexFitter(const edm::ParameterSet& pSet, bool useSmoothing) { setup(pSet, useSmoothing); }
17+
KalmanVertexFitter::KalmanVertexFitter(const edm::ParameterSet& pSet, bool useSmoothing, bool useMuonSystemBounds) {
18+
setup(pSet, useSmoothing, useMuonSystemBounds);
19+
}
1620

17-
void KalmanVertexFitter::setup(const edm::ParameterSet& pSet, bool useSmoothing) {
21+
void KalmanVertexFitter::setup(const edm::ParameterSet& pSet, bool useSmoothing, bool useMuonSystemBounds) {
1822
if (useSmoothing) {
1923
KalmanVertexTrackUpdator<5> vtu;
2024
KalmanSmoothedVertexChi2Estimator<5> vse;
@@ -33,6 +37,8 @@ void KalmanVertexFitter::setup(const edm::ParameterSet& pSet, bool useSmoothing)
3337
smoother,
3438
LinearizedTrackStateFactory());
3539
}
40+
if (useMuonSystemBounds)
41+
theSequentialFitter->setMuonSystemBounds();
3642
}
3743

3844
edm::ParameterSet KalmanVertexFitter::defaultParameters() const {

RecoVertex/VertexTools/interface/SequentialVertexFitter.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ class SequentialVertexFitter : public VertexFitter<N> {
180180
trackerBoundsHalfLength = halfLength;
181181
}
182182

183+
void setMuonSystemBounds() {
184+
trackerBoundsRadius = kMuonSystemBoundsRadius;
185+
trackerBoundsHalfLength = kMuonSystemBoundsHalfLength;
186+
}
187+
183188
protected:
184189
/**
185190
* Default constructor. Is here, as we do not want anybody to use it.
@@ -245,6 +250,8 @@ class SequentialVertexFitter : public VertexFitter<N> {
245250
// FIXME using hard-coded tracker bounds as default instead of taking them from geometry service
246251
float trackerBoundsRadius{112.};
247252
float trackerBoundsHalfLength{273.5};
253+
static constexpr float kMuonSystemBoundsRadius = 740.;
254+
static constexpr float kMuonSystemBoundsHalfLength = 960.;
248255

249256
edm::ParameterSet thePSet;
250257
LinearizationPointFinder* theLinP;

0 commit comments

Comments
 (0)