Skip to content

Commit fc74c20

Browse files
committed
Initialize all member data in PropagateToMuon
1 parent 6b4f1d4 commit fc74c20

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

MuonAnalysis/MuonAssociators/interface/PropagateToMuon.h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,27 +67,28 @@ class PropagateToMuon {
6767
edm::ESHandle<Propagator> propagator_, propagatorAny_, propagatorOpposite_;
6868
edm::ESHandle<MuonDetLayerGeometry> muonGeometry_;
6969

70-
bool useSimpleGeometry_;
70+
bool useSimpleGeometry_ = false;
7171

72-
bool useMB2_;
72+
bool useMB2_ = false;
7373

7474
/// Fallback to ME1 if propagation to ME2 fails
75-
bool fallbackToME1_;
75+
bool fallbackToME1_ = false;
7676

7777
/// Labels for input collections
78-
WhichTrack whichTrack_;
79-
WhichState whichState_;
78+
WhichTrack whichTrack_ = None;
79+
WhichState whichState_ = AtVertex;
8080

8181
/// for cosmics, some things change: the along-opposite is not in-out, nor the innermost/outermost states are in-out really
82-
bool cosmicPropagation_;
82+
bool cosmicPropagation_ = false;
8383

84-
bool useMB2InOverlap_;
84+
bool useMB2InOverlap_ = false;
8585

8686
// simplified geometry for track propagation
87-
const BoundCylinder *barrelCylinder_;
88-
const BoundDisk *endcapDiskPos_[3], *endcapDiskNeg_[3];
89-
double barrelHalfLength_;
90-
std::pair<float, float> endcapRadii_[3];
87+
const BoundCylinder *barrelCylinder_ = nullptr;
88+
const BoundDisk *endcapDiskPos_[3] = {nullptr, nullptr, nullptr};
89+
const BoundDisk *endcapDiskNeg_[3] = {nullptr, nullptr, nullptr};
90+
double barrelHalfLength_ = 0.;
91+
std::pair<float, float> endcapRadii_[3] = {{0.f, 0.f}, {0.f, 0.f}, {0.f, 0.f}};
9192

9293
/// Starting state for the propagation
9394
FreeTrajectoryState startingState(const reco::Candidate &reco) const;

0 commit comments

Comments
 (0)