Skip to content

Commit

Permalink
Merge pull request #1428 from gartung/statics-RecoMuon-TrackerSeedGen…
Browse files Browse the repository at this point in the history
…erator

Multithreading fixes -- Make statics const in RecoMuon/TrackerSeedGenerator
  • Loading branch information
ktf committed Nov 14, 2013
2 parents 76d99d3 + 5a8e988 commit 857bf21
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
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

0 comments on commit 857bf21

Please sign in to comment.