27 template <
class H,
class T>
30 const std::vector<T>& vec,
36 static constexpr
char mvaName[] =
"mtdQualMVA";
56 btlMatchTimeChi2Token_(
59 etlMatchTimeChi2Token_(
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>>();
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,
edm::EDGetTokenT< edm::ValueMap< float > > mtdTimeToken_
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
edm::EDGetTokenT< edm::ValueMap< float > > etlMatchTimeChi2Token_
#define DEFINE_FWK_MODULE(type)
std::vector< Track > TrackCollection
collection of Tracks
edm::EDGetTokenT< edm::ValueMap< float > > btlMatchTimeChi2Token_
void produce(edm::Event &ev, const edm::EventSetup &es) final
auto const & tracks
cannot be loose
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_
void fillValueMap(edm::Event &iEvent, const edm::Handle< H > &handle, const std::vector< T > &vec, const std::string &name) const
edm::EDGetTokenT< edm::ValueMap< float > > etlMatchChi2Token_
edm::EDGetTokenT< edm::ValueMap< int > > npixBarrelToken_
MTDTrackQualityMVAProducer(const ParameterSet &pset)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)