Skip to content

Commit f6aed18

Browse files
author
Lovisa
committed
Test option for the KalmanVertexFitter with useMuonSystemBounds
1 parent c44d306 commit f6aed18

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

RecoVertex/KalmanVertexFit/interface/KalmanVertexFitter.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,20 @@ class KalmanVertexFitter : public VertexFitter<5> {
2727
* \param useSmoothing Specifies whether the tracks should be refit or not.
2828
*/
2929

30-
KalmanVertexFitter(bool useSmoothing = false);
30+
KalmanVertexFitter(bool useSmoothing = false, bool useMuonSystemBounds = false);
3131

3232
/**
3333
* Same as above, using a ParameterSet to set the convergence criteria
3434
*/
3535

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

3838
KalmanVertexFitter(const KalmanVertexFitter& other) : theSequentialFitter(other.theSequentialFitter->clone()) {}
3939

4040
~KalmanVertexFitter() override { delete theSequentialFitter; }
4141

4242
KalmanVertexFitter* clone() const override { return new KalmanVertexFitter(*this); }
4343

44-
void setTrackerBounds(float trackerBoundsRadius, float trackerBoundsHalfLength) {
45-
theSequentialFitter->setTrackerBounds(trackerBoundsRadius, trackerBoundsHalfLength);
46-
}
47-
4844
public:
4945
typedef CachingVertex<5>::RefCountedVertexTrack RefCountedVertexTrack;
5046

@@ -108,11 +104,14 @@ class KalmanVertexFitter : public VertexFitter<5> {
108104
// edm::ParameterSet defaultParameters() const;
109105

110106
private:
111-
void setup(const edm::ParameterSet& pSet, bool useSmoothing);
107+
void setup(const edm::ParameterSet& pSet, bool useSmoothing, bool useMuonSystemBounds);
112108

113109
edm::ParameterSet defaultParameters() const;
114110

115111
SequentialVertexFitter<5>* theSequentialFitter;
112+
113+
float muonSystemBoundsRadius{740.};
114+
float muonSystemBoundsHalfLength{960.};
116115
};
117116

118117
#endif

RecoVertex/KalmanVertexFit/src/KalmanVertexFitter.cc

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
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, bool useMuonSystemBounds) {
1111
edm::ParameterSet pSet = defaultParameters();
12-
setup(pSet, useSmoothing);
12+
setup(pSet, useSmoothing, useMuonSystemBounds);
1313
}
1414

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

17-
void KalmanVertexFitter::setup(const edm::ParameterSet& pSet, bool useSmoothing) {
19+
void KalmanVertexFitter::setup(const edm::ParameterSet& pSet, bool useSmoothing, bool useMuonSystemBounds) {
1820
if (useSmoothing) {
1921
KalmanVertexTrackUpdator<5> vtu;
2022
KalmanSmoothedVertexChi2Estimator<5> vse;
@@ -33,6 +35,9 @@ void KalmanVertexFitter::setup(const edm::ParameterSet& pSet, bool useSmoothing)
3335
smoother,
3436
LinearizedTrackStateFactory());
3537
}
38+
if (useMuonSystemBounds) {
39+
theSequentialFitter->setTrackerBounds(muonSystemBoundsRadius, muonSystemBoundsHalfLength);
40+
}
3641
}
3742

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

0 commit comments

Comments
 (0)