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

MTD TDR Reconstruction + MTD Track Association BDT #28815

Merged
merged 28 commits into from
Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2d922a3
Modified the hits sorting logic at the MTD using a time compatibility…
pmeridian Feb 1, 2019
f79a5f9
Add fixed time uncertainty
pmeridian Feb 8, 2019
70df858
Adding TrackPUID MVA producer
pmeridian Feb 13, 2019
de07f69
Fix sigmat0 assignment for fixedError
pmeridian Feb 13, 2019
e479e16
using mtdTrackRef for consitency with training
pmeridian Feb 13, 2019
a5c0d82
using trackref while waiting for updated training
pmeridian Feb 13, 2019
ef85193
Fixing some input variables to latest training
pmeridian Feb 21, 2019
71b0d07
Adding value map to associate genTracks to mtdTracks
pmeridian Feb 21, 2019
491d468
Fixing null refs
pmeridian Feb 22, 2019
25f208d
latest fixes to input variables
pmeridian Feb 22, 2019
1e64154
Now mva only for track-MTD association quality
pmeridian Apr 25, 2019
0040676
changing default file and name
pmeridian Apr 25, 2019
ce23d1d
checks and format
lgray Oct 28, 2019
50a51d4
code review, change to TMVAEvaluator, default gzipped file
lgray Oct 30, 2019
3f05707
merging for CMSSW_11_1_X
pmeridian Jan 27, 2020
61f775f
Moving MTD related tools into RecoMTD
pmeridian Jan 28, 2020
b04490c
Moving Tools into RecoMTD
pmeridian Jan 28, 2020
ca8c653
Addressing comments from PR #28279
pmeridian Jan 28, 2020
6566048
style fixes
pmeridian Jan 28, 2020
4cce131
code-format checks
pmeridian Jan 28, 2020
6c3b270
Fixing _ in module name
pmeridian Jan 29, 2020
15a7fb5
kevin comments and add also preselection for tracks without MTD time
pmeridian Jan 30, 2020
f6caa8e
code-checks again
pmeridian Jan 30, 2020
e2abc64
addressing Review comments
pmeridian Feb 3, 2020
fd68170
code-checks
pmeridian Feb 3, 2020
6b41c7d
Optimisation for CMSSW_11_1 and post TDR BTL geometry
pmeridian Feb 4, 2020
1a41a1d
code-check
pmeridian Feb 4, 2020
d4a01be
latest comments from slava
pmeridian Feb 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CommonTools/RecoAlgos/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<use name="DataFormats/METReco"/>
<use name="DataFormats/RecoCandidate"/>
<use name="DataFormats/Candidate"/>
<use name="DataFormats/VertexReco"/>
<use name="TrackingTools/Records"/>
<use name="TrackingTools/IPTools"/>
<use name="TrackingTools/TransientTrack"/>
Expand Down
4 changes: 0 additions & 4 deletions CommonTools/RecoAlgos/python/tofPID_cfi.py

This file was deleted.

32 changes: 29 additions & 3 deletions PhysicsTools/PatAlgos/plugins/PATPackedCandidateProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ namespace pat {
const bool storeHcalDepthEndcapOnly_;

const bool storeTiming_;
const bool timeFromValueMap_;
const edm::EDGetTokenT<edm::ValueMap<float>> t0Map_;
const edm::EDGetTokenT<edm::ValueMap<float>> t0ErrMap_;

// for debugging
float calcDxy(float dx, float dy, float phi) const { return -dx * std::sin(phi) + dy * std::cos(phi); }
Expand Down Expand Up @@ -143,7 +146,13 @@ pat::PATPackedCandidateProducer::PATPackedCandidateProducer(const edm::Parameter
covariancePackingSchemas_(iConfig.getParameter<std::vector<int>>("covariancePackingSchemas")),
pfCandidateTypesForHcalDepth_(iConfig.getParameter<std::vector<int>>("pfCandidateTypesForHcalDepth")),
storeHcalDepthEndcapOnly_(iConfig.getParameter<bool>("storeHcalDepthEndcapOnly")),
storeTiming_(iConfig.getParameter<bool>("storeTiming")) {
storeTiming_(iConfig.getParameter<bool>("storeTiming")),
timeFromValueMap_(!iConfig.getParameter<edm::InputTag>("timeMap").encode().empty() &&
!iConfig.getParameter<edm::InputTag>("timeMapErr").encode().empty()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the logic in the ::produce suggests that both should be not empty ==> use && .
Also, apparently, the conditions should include && storeTiming_

t0Map_(timeFromValueMap_ ? consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("timeMap"))
: edm::EDGetTokenT<edm::ValueMap<float>>()),
t0ErrMap_(timeFromValueMap_ ? consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("timeMapErr"))
: edm::EDGetTokenT<edm::ValueMap<float>>()) {
std::vector<edm::InputTag> sv_tags =
iConfig.getParameter<std::vector<edm::InputTag>>("secondaryVerticesForWhiteList");
for (auto itag : sv_tags) {
Expand Down Expand Up @@ -219,6 +228,13 @@ void pat::PATPackedCandidateProducer::produce(edm::StreamID, edm::Event &iEvent,
}
}

edm::Handle<edm::ValueMap<float>> t0Map;
edm::Handle<edm::ValueMap<float>> t0ErrMap;
if (timeFromValueMap_) {
iEvent.getByToken(t0Map_, t0Map);
iEvent.getByToken(t0ErrMap_, t0ErrMap);
}

edm::Handle<reco::VertexCollection> PVs;
iEvent.getByToken(PVs_, PVs);
reco::VertexRef PV(PVs.id());
Expand Down Expand Up @@ -425,8 +441,18 @@ void pat::PATPackedCandidateProducer::produce(edm::StreamID, edm::Event &iEvent,
mappingPuppi[((*puppiCandsMap)[pkref]).key()] = ic;
}

if (storeTiming_ && cand.isTimeValid()) {
outPtrP->back().setTime(cand.time(), cand.timeError());
if (storeTiming_) {
if (timeFromValueMap_) {
if (cand.trackRef().isNonnull()) {
auto t0 = (*t0Map)[cand.trackRef()];
auto t0Err = (*t0ErrMap)[cand.trackRef()];
outPtrP->back().setTime(t0, t0Err);
}
} else {
if (cand.isTimeValid()) {
outPtrP->back().setTime(cand.time(), cand.timeError());
}
}
}

mapping[ic] = ic; // trivial at the moment!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
covariancePackingSchemas = cms.vint32(8,264,520,776,0), # more accurate schema +0.6kb/ev
pfCandidateTypesForHcalDepth = cms.vint32(),
storeHcalDepthEndcapOnly = cms.bool(False), # switch to store info only for endcap
storeTiming = cms.bool(False)
storeTiming = cms.bool(False),
timeMap = cms.InputTag(""),
timeMapErr = cms.InputTag("")
)

from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
Expand Down
3 changes: 2 additions & 1 deletion RecoMTD/Configuration/python/RecoMTD_EventContent_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#AOD
RecoMTDAOD = cms.PSet(
outputCommands = cms.untracked.vstring(
'keep *_trackExtenderWithMTD_*_*'
'keep *_trackExtenderWithMTD_*_*',
'keep *_mtdTrackQualityMVA_*_*'
)
)

Expand Down
3 changes: 2 additions & 1 deletion RecoMTD/Configuration/python/RecoMTD_cff.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import FWCore.ParameterSet.Config as cms

from RecoMTD.TrackExtender.trackExtenderWithMTD_cfi import *
from RecoMTD.TimingIDTools.mtdTrackQualityMVA_cfi import *

fastTimingGlobalRecoTask = cms.Task(trackExtenderWithMTD)
fastTimingGlobalRecoTask = cms.Task(trackExtenderWithMTD,mtdTrackQualityMVA)
fastTimingGlobalReco = cms.Sequence(fastTimingGlobalRecoTask)
12 changes: 12 additions & 0 deletions RecoMTD/TimingIDTools/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<use name="FWCore/Framework"/>
<use name="FWCore/ParameterSet"/>
<use name="DataFormats/TrackReco"/>
<use name="DataFormats/BeamSpot"/>
<use name="DataFormats/RecoCandidate"/>
<use name="DataFormats/Candidate"/>
<use name="DataFormats/VertexReco"/>
<use name="CommonTools/MVAUtils"/>

<export>
<lib name="1"/>
</export>
54 changes: 54 additions & 0 deletions RecoMTD/TimingIDTools/interface/MTDTrackQualityMVA.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#ifndef RECOMTD_TIMINGIDTOOLS_MTDTRACKQUALITYMVA
#define RECOMTD_TIMINGIDTOOLS_MTDTRACKQUALITYMVA

#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "DataFormats/Common/interface/ValueMap.h"

#include "CommonTools/MVAUtils/interface/TMVAEvaluator.h"

#define MTDTRACKQUALITYMVA_VARS(MTDBDTVAR) \
MTDBDTVAR(pt) \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the arguments didn't need to have MTD in the prefix, but it's fine.

MTDBDTVAR(eta) \
MTDBDTVAR(phi) \
MTDBDTVAR(chi2) \
MTDBDTVAR(ndof) \
MTDBDTVAR(numberOfValidHits) \
MTDBDTVAR(numberOfValidPixelBarrelHits) \
MTDBDTVAR(numberOfValidPixelEndcapHits) \
MTDBDTVAR(btlMatchChi2) \
MTDBDTVAR(btlMatchTimeChi2) \
MTDBDTVAR(etlMatchChi2) \
MTDBDTVAR(etlMatchTimeChi2) \
MTDBDTVAR(mtdt) \
MTDBDTVAR(path_len)

#define MTDBDTVAR_ENUM(ENUM) ENUM,
#define MTDBDTVAR_STRING(STRING) #STRING,

class MTDTrackQualityMVA {
public:
//---ctors---
MTDTrackQualityMVA(std::string weights_file);

enum class VarID { MTDTRACKQUALITYMVA_VARS(MTDBDTVAR_ENUM) };

//---getters---
// 4D
float operator()(const reco::TrackRef& trk,
const reco::TrackRef& ext_trk,
const edm::ValueMap<float>& btl_chi2s,
const edm::ValueMap<float>& btl_time_chi2s,
const edm::ValueMap<float>& etl_chi2s,
const edm::ValueMap<float>& etl_time_chi2s,
const edm::ValueMap<float>& tmtds,
const edm::ValueMap<float>& trk_lengths) const;

private:
std::vector<std::string> vars_, spec_vars_;
std::unique_ptr<TMVAEvaluator> mva_;
};

#endif
11 changes: 11 additions & 0 deletions RecoMTD/TimingIDTools/plugins/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<library name="RecoMTDTimingIDTools_plugins" file="*.cc">
<use name="FWCore/Framework"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, all "use" statements can be outside of the "library" section.

shouldn't there be a <flags EDM_PLUGIN="1"/>?
OTOH, the build works without it.

@makortel @smuzaffar is this flag not needed anymore?
https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideDeclarePlugins is old

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slava77 , in plugins directory every <library> </library> is by default an edm plugin, so need to explicitly add this <flags EDM_PLUGIN="1"/> flag.

Yes the <export> </export> section has no use here. <export> is only needed in package level BuildFiles

<use name="FWCore/ParameterSet"/>
<use name="DataFormats/TrackReco"/>
<use name="DataFormats/BeamSpot"/>
<use name="DataFormats/RecoCandidate"/>
<use name="DataFormats/Candidate"/>
<use name="DataFormats/VertexReco"/>
<use name="CommonTools/MVAUtils"/>
<use name="RecoMTD/TimingIDTools"/>
</library>
140 changes: 140 additions & 0 deletions RecoMTD/TimingIDTools/plugins/MTDTrackQualityMVAProducer.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"

#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"
#include "DataFormats/Common/interface/ValueMap.h"
#include "DataFormats/BeamSpot/interface/BeamSpot.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/VertexReco/interface/Vertex.h"

#include "RecoMTD/TimingIDTools/interface/MTDTrackQualityMVA.h"

using namespace std;
using namespace edm;

class MTDTrackQualityMVAProducer : public edm::stream::EDProducer<> {
public:
MTDTrackQualityMVAProducer(const ParameterSet& pset);

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

template <class H, class T>
void fillValueMap(edm::Event& iEvent,
const edm::Handle<H>& handle,
const std::vector<T>& vec,
const std::string& name) const;

void produce(edm::Event& ev, const edm::EventSetup& es) final;

private:
static constexpr char mvaName[] = "mtdQualMVA";

edm::EDGetTokenT<reco::TrackCollection> tracksToken_;
edm::EDGetTokenT<reco::TrackCollection> tracksMTDToken_;

edm::EDGetTokenT<edm::ValueMap<float>> btlMatchChi2Token_;
edm::EDGetTokenT<edm::ValueMap<float>> btlMatchTimeChi2Token_;
edm::EDGetTokenT<edm::ValueMap<float>> etlMatchChi2Token_;
edm::EDGetTokenT<edm::ValueMap<float>> etlMatchTimeChi2Token_;
edm::EDGetTokenT<edm::ValueMap<float>> mtdTimeToken_;
edm::EDGetTokenT<edm::ValueMap<float>> pathLengthToken_;
edm::EDGetTokenT<edm::ValueMap<int>> trackAssocToken_;

MTDTrackQualityMVA mva_;
};

MTDTrackQualityMVAProducer::MTDTrackQualityMVAProducer(const ParameterSet& iConfig)
: tracksToken_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("tracksSrc"))),
tracksMTDToken_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("tracksMTDSrc"))),
btlMatchChi2Token_(consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("btlMatchChi2Src"))),
btlMatchTimeChi2Token_(
consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("btlMatchTimeChi2Src"))),
etlMatchChi2Token_(consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("etlMatchChi2Src"))),
etlMatchTimeChi2Token_(
consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("etlMatchTimeChi2Src"))),
mtdTimeToken_(consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("mtdTimeSrc"))),
pathLengthToken_(consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("pathLengthSrc"))),
trackAssocToken_(consumes<edm::ValueMap<int>>(iConfig.getParameter<edm::InputTag>("trackAssocSrc"))),
mva_(iConfig.getParameter<edm::FileInPath>("qualityBDT_weights_file").fullPath()) {
produces<edm::ValueMap<float>>(mvaName);
}

// Configuration descriptions
void MTDTrackQualityMVAProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("tracksSrc", edm::InputTag("generalTracks"))->setComment("Input tracks collection");
desc.add<edm::InputTag>("tracksMTDSrc", edm::InputTag("trackExtenderWithMTD"))
->setComment("Input tracks collection for MTD extended tracks");
desc.add<edm::InputTag>("btlMatchChi2Src", edm::InputTag("trackExtenderWithMTD", "btlMatchChi2"))
->setComment("BTL Chi2 Matching value Map");
desc.add<edm::InputTag>("btlMatchTimeChi2Src", edm::InputTag("trackExtenderWithMTD", "btlMatchTimeChi2"))
->setComment("BTL Chi2 Matching value Map");
desc.add<edm::InputTag>("etlMatchChi2Src", edm::InputTag("trackExtenderWithMTD", "etlMatchChi2"))
->setComment("ETL Chi2 Matching value Map");
desc.add<edm::InputTag>("etlMatchTimeChi2Src", edm::InputTag("trackExtenderWithMTD", "etlMatchTimeChi2"))
->setComment("ETL Chi2 Matching value Map");
desc.add<edm::InputTag>("mtdTimeSrc", edm::InputTag("trackExtenderWithMTD", "tmtd"))
->setComment("MTD TIme value Map");
desc.add<edm::InputTag>("pathLengthSrc", edm::InputTag("trackExtenderWithMTD", "pathLength"))
->setComment("MTD PathLength value Map");
desc.add<edm::InputTag>("trackAssocSrc", edm::InputTag("trackExtenderWithMTD", "generalTrackassoc"))
->setComment("Association between General and MTD Extended tracks");
desc.add<edm::FileInPath>("qualityBDT_weights_file",
edm::FileInPath("RecoMTD/TimingIDTools/data/clf4D_MTDquality_bo.xml"))
->setComment("Track MTD quality BDT weights");
descriptions.add("mtdTrackQualityMVAProducer", desc);
}

template <class H, class T>
void MTDTrackQualityMVAProducer::fillValueMap(edm::Event& iEvent,
const edm::Handle<H>& handle,
const std::vector<T>& vec,
const std::string& name) const {
auto out = std::make_unique<edm::ValueMap<T>>();
typename edm::ValueMap<T>::Filler filler(*out);
filler.insert(handle, vec.begin(), vec.end());
filler.fill();
iEvent.put(std::move(out), name);
}

void MTDTrackQualityMVAProducer::produce(edm::Event& ev, const edm::EventSetup& es) {
edm::Handle<reco::TrackCollection> tracksH;
ev.getByToken(tracksToken_, tracksH);
const auto& tracks = *tracksH;

edm::Handle<reco::TrackCollection> tracksMTDH;
ev.getByToken(tracksMTDToken_, tracksMTDH);

const auto& btlMatchChi2 = ev.get(btlMatchChi2Token_);
const auto& btlMatchTimeChi2 = ev.get(btlMatchTimeChi2Token_);
const auto& etlMatchChi2 = ev.get(etlMatchChi2Token_);
const auto& etlMatchTimeChi2 = ev.get(etlMatchTimeChi2Token_);
const auto& pathLength = ev.get(pathLengthToken_);
const auto& trackAssoc = ev.get(trackAssocToken_);
const auto& mtdTime = ev.get(mtdTimeToken_);

std::vector<float> mvaOutRaw;

//Loop over tracks collection
for (unsigned int itrack = 0; itrack < tracks.size(); ++itrack) {
const reco::TrackRef trackref(tracksH, itrack);
if (trackAssoc[trackref] == -1)
mvaOutRaw.push_back(-1.);
else {
const reco::TrackRef mtdTrackref = reco::TrackRef(tracksMTDH, trackAssoc[trackref]);
mvaOutRaw.push_back(mva_(
trackref, mtdTrackref, btlMatchChi2, btlMatchTimeChi2, etlMatchChi2, etlMatchTimeChi2, mtdTime, pathLength));
}
}
fillValueMap(ev, tracksH, mvaOutRaw, mvaName);
}

//define this as a plug-in
#include <FWCore/Framework/interface/MakerMacros.h>
DEFINE_FWK_MODULE(MTDTrackQualityMVAProducer);
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class TOFPIDProducer : public edm::stream::EDProducer<> {
double maxDz_;
double maxDtSignificance_;
double minProbHeavy_;
double fixedT0Error_;
};

TOFPIDProducer::TOFPIDProducer(const ParameterSet& iConfig)
Expand All @@ -67,7 +68,8 @@ TOFPIDProducer::TOFPIDProducer(const ParameterSet& iConfig)
vtxMaxSigmaT_(iConfig.getParameter<double>("vtxMaxSigmaT")),
maxDz_(iConfig.getParameter<double>("maxDz")),
maxDtSignificance_(iConfig.getParameter<double>("maxDtSignificance")),
minProbHeavy_(iConfig.getParameter<double>("minProbHeavy")) {
minProbHeavy_(iConfig.getParameter<double>("minProbHeavy")),
fixedT0Error_(iConfig.getParameter<double>("fixedT0Error")) {
produces<edm::ValueMap<float>>(t0Name);
produces<edm::ValueMap<float>>(sigmat0Name);
produces<edm::ValueMap<float>>(t0safeName);
Expand All @@ -93,7 +95,7 @@ void TOFPIDProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptio
->setComment("Input ValueMap for track path lengh from beamline to MTD");
desc.add<edm::InputTag>("pSrc", edm::InputTag("trackExtenderWithMTD:generalTrackp"))
->setComment("Input ValueMap for track momentum magnitude (normally from refit with MTD hits)");
desc.add<edm::InputTag>("vtxsSrc", edm::InputTag("unsortedOfflinePrimaryVertices4DnoPID"))
desc.add<edm::InputTag>("vtxsSrc", edm::InputTag("unsortedOfflinePrimaryVertices4DwithPID"))
->setComment("Input primary vertex collection");
desc.add<double>("vtxMaxSigmaT", 0.025)
->setComment("Maximum primary vertex time uncertainty for use in particle id [ns]");
Expand All @@ -104,6 +106,7 @@ void TOFPIDProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptio
"Maximum distance in time (normalized by uncertainty) for track-primary vertex association for particle id");
desc.add<double>("minProbHeavy", 0.75)
->setComment("Minimum probability for a particle to be a kaon or proton before reassigning the timestamp");
desc.add<double>("fixedT0Error", 0.)->setComment("Use a fixed T0 uncertainty [ns]");

descriptions.add("tofPIDProducer", desc);
}
Expand Down Expand Up @@ -174,7 +177,7 @@ void TOFPIDProducer::produce(edm::Event& ev, const edm::EventSetup& es) {
float t0 = t0In[trackref];
float t0safe = t0;
float sigmat0safe = sigmat0In[trackref];
float sigmatmtd = sigmatmtdIn[trackref];
float sigmatmtd = (sigmatmtdIn[trackref] > 0. && fixedT0Error_ > 0.) ? fixedT0Error_ : sigmatmtdIn[trackref];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking: is it correct here to require that sigmatmtdIn is positive for the case when fixedT0Error_ is needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we want to keep the sigmatmd = 0 when to time is associated

float sigmat0 = sigmatmtd;

float prob_pi = -1.;
Expand Down
5 changes: 5 additions & 0 deletions RecoMTD/TimingIDTools/python/mtdTrackQualityMVA_cfi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import FWCore.ParameterSet.Config as cms

from RecoMTD.TimingIDTools.mtdTrackQualityMVAProducer_cfi import *

mtdTrackQualityMVA = mtdTrackQualityMVAProducer.clone()
Loading