32 std::vector<edm::EDGetTokenT<reco::VertexCompositeCandidateCollection>>
V0list_;
42 desc.add<std::vector<edm::InputTag>>(
52 produces<reco::PFV0Collection>();
53 produces<reco::PFRecTrackCollection>();
55 std::vector<edm::InputTag>
tags = iConfig.
getParameter<vector<InputTag>>(
"V0List");
57 for (
unsigned int i = 0;
i <
tags.size(); ++
i)
58 V0list_.push_back(consumes<reco::VertexCompositeCandidateCollection>(
tags[
i]));
64 LogDebug(
"PFV0Producer") <<
"START event: " <<
iEvent.id().event() <<
" in run " <<
iEvent.id().run();
66 auto pfV0Coll = std::make_unique<PFV0Collection>();
68 auto pfV0RecTrackColl = std::make_unique<reco::PFRecTrackCollection>();
73 for (
unsigned int il = 0; il <
V0list_.size(); il++) {
76 LogDebug(
"PFV0Producer") <<
"V0list_[" << il <<
"] contains " << V0coll->size() <<
" V0 candidates ";
77 for (
unsigned int iv = 0;
iv < V0coll->size();
iv++) {
80 vector<PFRecTrackRef> PFTracks;
81 for (
unsigned int ndx = 0; ndx < V0->numberOfDaughters(); ndx++) {
82 Tracks.push_back((dynamic_cast<const RecoChargedCandidate*>(V0->daughter(ndx)))->track());
91 pfV0RecTrackColl->push_back(pfRecTrack);
94 if ((PFTracks.size() == 2) && (
Tracks.size() == 2)) {
95 pfV0Coll->push_back(
PFV0(V0, PFTracks,
Tracks));
reconstructed track used as an input to particle flow
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
PFV0Producer(const edm::ParameterSet &)
Constructor.
void beginRun(const edm::Run &, const edm::EventSetup &) override
void produce(edm::Event &, const edm::EventSetup &) override
Produce the PFRecTrack collection.
key_type key() const
Accessor for product key.
std::vector< edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > > V0list_
~PFV0Producer() override
Destructor.
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
PFTrackTransformer * pfTransformer_
PFTrackTransformer.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< PFRecTrack > PFRecTrackCollection
collection of PFRecTrack objects
void endRun(const edm::Run &, const edm::EventSetup &) override