Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make statics const #1428

Merged
merged 4 commits into from Nov 14, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -46,7 +46,7 @@ class L1MuonPixelTrackFitter : public PixelFitter {
};

public:
L1MuonPixelTrackFitter() {}

L1MuonPixelTrackFitter( const edm::ParameterSet& cfg);

virtual ~L1MuonPixelTrackFitter(){}
Expand Down Expand Up @@ -82,10 +82,18 @@ class L1MuonPixelTrackFitter : public PixelFitter {
double deltaPhi( double phi1, double phi2) const;
static void param( double eta, double &p1, double& p2, double& p3);


private:

edm::ParameterSet theConfig;

const double invPtErrorScale;
const double phiErrorScale;
const double cotThetaErrorScale;
const double tipErrorScale;
const double zipErrorScale;


// L1 constraint
double thePhiL1, theEtaL1; int theChargeL1;

Expand Down
13 changes: 6 additions & 7 deletions RecoMuon/TrackerSeedGenerator/src/L1MuonPixelTrackFitter.cc
Expand Up @@ -15,7 +15,12 @@
template <class T> T sqr( T t) {return t*t;}

L1MuonPixelTrackFitter::L1MuonPixelTrackFitter(const edm::ParameterSet& cfg)
: theConfig(cfg)
: theConfig(cfg),
invPtErrorScale{theConfig.getParameter<double>("invPtErrorScale")},
phiErrorScale{theConfig.getParameter<double>("phiErrorScale")},
cotThetaErrorScale{theConfig.getParameter<double>("cotThetaErrorScale")},
tipErrorScale{theConfig.getParameter<double>("tipErrorScale")},
zipErrorScale{theConfig.getParameter<double>("zipErrorScale")}
{ }

void L1MuonPixelTrackFitter::setL1Constraint(const L1MuGMTCand & muon)
Expand Down Expand Up @@ -52,12 +57,6 @@ reco::Track* L1MuonPixelTrackFitter::run( const edm::EventSetup& es,
double valZip = this->valZip(curvature, theHit1,theHit2);
double valCotTheta = this->valCotTheta(PixelRecoLineRZ(theHit1,theHit2));

static double invPtErrorScale = theConfig.getParameter<double>("invPtErrorScale");
static double phiErrorScale= theConfig.getParameter<double>("phiErrorScale");
static double cotThetaErrorScale = theConfig.getParameter<double>("cotThetaErrorScale");
static double tipErrorScale = theConfig.getParameter<double>("tipErrorScale");
static double zipErrorScale = theConfig.getParameter<double>("zipErrorScale");

// if ( (fabs(invPt)-0.1)/invPtErr > 3.) return 0;

PixelTrackBuilder builder;
Expand Down