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

Do not apply DT vdrift correction (that accounts for field in phi SLs… #9319

Merged
merged 1 commit into from May 29, 2015
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
12 changes: 11 additions & 1 deletion RecoLocalMuon/DTRecHit/plugins/DTLinearDriftFromDBAlgo.cc
Expand Up @@ -17,12 +17,17 @@
#include "CondFormats/DTObjects/interface/DTRecoUncertainties.h"
#include "CondFormats/DataRecord/interface/DTRecoUncertaintiesRcd.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "MagneticField/Engine/interface/MagneticField.h"
#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"

using namespace std;
using namespace edm;

DTLinearDriftFromDBAlgo::DTLinearDriftFromDBAlgo(const ParameterSet& config) :
DTRecHitBaseAlgo(config),
mTimeMap(0),
field(0),
nominalB(-1),
minTime(config.getParameter<double>("minTime")),
maxTime(config.getParameter<double>("maxTime")),
doVdriftCorr(config.getParameter<bool>("doVdriftCorr")),
Expand Down Expand Up @@ -57,6 +62,11 @@ void DTLinearDriftFromDBAlgo::setES(const EventSetup& setup) {
setup.get<DTMtimeRcd>().get(mTimeHandle);
mTimeMap = &*mTimeHandle;

ESHandle<MagneticField> magfield;
setup.get<IdealMagneticFieldRecord>().get(magfield);
field = &*magfield;
nominalB = field->nominalValue();

if (useUncertDB) {
ESHandle<DTRecoUncertainties> uncerts;
setup.get<DTRecoUncertaintiesRcd>().get(uncerts);
Expand Down Expand Up @@ -172,7 +182,7 @@ bool DTLinearDriftFromDBAlgo::compute(const DTLayer* layer,
}

//only in step 3
if(doVdriftCorr && step == 3){
if(doVdriftCorr && step == 3 && nominalB !=0){
if (abs(wireId.wheel()) == 2 &&
wireId.station() == 1 &&
wireId.superLayer() != 2) {
Expand Down
5 changes: 5 additions & 0 deletions RecoLocalMuon/DTRecHit/plugins/DTLinearDriftFromDBAlgo.h
Expand Up @@ -13,6 +13,7 @@

class DTMtime;
class DTRecoUncertainties;
class MagneticField;

class DTLinearDriftFromDBAlgo : public DTRecHitBaseAlgo {
public:
Expand Down Expand Up @@ -83,6 +84,10 @@ class DTLinearDriftFromDBAlgo : public DTRecHitBaseAlgo {
//Map of meantimes
const DTMtime *mTimeMap;

// MF field
const MagneticField* field;
int nominalB;

// Map of hit uncertainties
const DTRecoUncertainties *uncertMap;

Expand Down