27 template <
class H,
class T>
30 const std::vector<T>& vec,
36 static constexpr
char mvaName[] =
"mtdQualMVA";
55 btlMatchChi2Token_(consumes<edm::
ValueMap<float>>(iConfig.getParameter<edm::
InputTag>(
"btlMatchChi2Src"))),
56 btlMatchTimeChi2Token_(
57 consumes<edm::
ValueMap<float>>(iConfig.getParameter<edm::
InputTag>(
"btlMatchTimeChi2Src"))),
58 etlMatchChi2Token_(consumes<edm::
ValueMap<float>>(iConfig.getParameter<edm::
InputTag>(
"etlMatchChi2Src"))),
59 etlMatchTimeChi2Token_(
60 consumes<edm::
ValueMap<float>>(iConfig.getParameter<edm::
InputTag>(
"etlMatchTimeChi2Src"))),
61 mtdTimeToken_(consumes<edm::
ValueMap<float>>(iConfig.getParameter<edm::
InputTag>(
"mtdTimeSrc"))),
62 pathLengthToken_(consumes<edm::
ValueMap<float>>(iConfig.getParameter<edm::
InputTag>(
"pathLengthSrc"))),
63 npixBarrelToken_(consumes<edm::
ValueMap<int>>(iConfig.getParameter<edm::
InputTag>(
"npixBarrelSrc"))),
64 npixEndcapToken_(consumes<edm::
ValueMap<int>>(iConfig.getParameter<edm::
InputTag>(
"npixEndcapSrc"))),
66 produces<edm::ValueMap<float>>(
mvaName);
74 ->setComment(
"BTL Chi2 Matching value Map");
76 ->setComment(
"BTL Chi2 Matching value Map");
78 ->setComment(
"ETL Chi2 Matching value Map");
80 ->setComment(
"ETL Chi2 Matching value Map");
82 ->setComment(
"MTD TIme value Map");
84 ->setComment(
"MTD PathLength value Map");
86 ->setComment(
"# of Barrel pixel associated to refitted tracks");
88 ->setComment(
"# of Endcap pixel associated to refitted tracks");
91 ->setComment(
"Track MTD quality BDT weights");
92 descriptions.
add(
"mtdTrackQualityMVAProducer", desc);
95 template <
class H,
class T>
98 const std::vector<T>& vec,
100 auto out = std::make_unique<edm::ValueMap<T>>();
102 filler.insert(handle, vec.begin(), vec.end());
110 const auto&
tracks = *tracksH;
121 std::vector<float> mvaOutRaw;
124 for (
unsigned int itrack = 0; itrack <
tracks.size(); ++itrack) {
126 if (pathLength[trackref] == -1.)
127 mvaOutRaw.push_back(-1.);
129 mvaOutRaw.push_back(
mva_(trackref,
void fillValueMap(edm::Event &iEvent, const edm::Handle< H > &handle, const std::vector< T > &vec, const std::string &name) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< edm::ValueMap< float > > mtdTimeToken_
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< edm::ValueMap< float > > etlMatchTimeChi2Token_
#define DEFINE_FWK_MODULE(type)
std::vector< Track > TrackCollection
collection of Tracks
auto const & tracks
cannot be loose
edm::EDGetTokenT< edm::ValueMap< float > > btlMatchTimeChi2Token_
bool get(ProductID const &oid, Handle< PROD > &result) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void produce(edm::Event &ev, const edm::EventSetup &es) final
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< edm::ValueMap< float > > btlMatchChi2Token_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< edm::ValueMap< int > > npixEndcapToken_
edm::EDGetTokenT< edm::ValueMap< float > > pathLengthToken_
static constexpr char mvaName[]
edm::EDGetTokenT< reco::TrackCollection > tracksMTDToken_
edm::EDGetTokenT< edm::ValueMap< float > > etlMatchChi2Token_
edm::EDGetTokenT< edm::ValueMap< int > > npixBarrelToken_
MTDTrackQualityMVAProducer(const ParameterSet &pset)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)