30 std::vector<edm::EDGetTokenT<reco::VertexCompositeCandidateCollection> >
V0list_;
43 produces<reco::PFV0Collection>();
44 produces<reco::PFRecTrackCollection>();
46 std::vector<edm::InputTag>
tags = iConfig.
getParameter<vector<InputTag> >(
"V0List");
48 for (
unsigned int i = 0;
i < tags.size(); ++
i)
49 V0list_.push_back(consumes<reco::VertexCompositeCandidateCollection>(tags[
i]));
55 LogDebug(
"PFV0Producer") <<
"START event: " << iEvent.
id().
event() <<
" in run " << iEvent.
id().
run();
57 auto pfV0Coll = std::make_unique<PFV0Collection>();
59 auto pfV0RecTrackColl = std::make_unique<reco::PFRecTrackCollection>();
64 for (
unsigned int il = 0; il <
V0list_.size(); il++) {
67 LogDebug(
"PFV0Producer") <<
"V0list_[" << il <<
"] contains " << V0coll->size() <<
" V0 candidates ";
68 for (
unsigned int iv = 0;
iv < V0coll->size();
iv++) {
71 vector<PFRecTrackRef> PFTracks;
72 for (
unsigned int ndx = 0; ndx < V0->numberOfDaughters(); ndx++) {
73 Tracks.push_back((dynamic_cast<const RecoChargedCandidate*>(V0->daughter(ndx)))->track());
82 pfV0RecTrackColl->push_back(pfRecTrack);
85 if ((PFTracks.size() == 2) && (Tracks.size() == 2)) {
86 pfV0Coll->push_back(
PFV0(V0, PFTracks, Tracks));
EventNumber_t event() const
reconstructed track used as an input to particle flow
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
PFV0Producer(const edm::ParameterSet &)
Constructor.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void beginRun(const edm::Run &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
key_type key() const
Accessor for product key.
void produce(edm::Event &, const edm::EventSetup &) override
Produce the PFRecTrack collection.
std::vector< edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > > V0list_
bool getData(T &iHolder) const
~PFV0Producer() override
Destructor.
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
RefProd< PROD > getRefBeforePut()
XYZVectorD XYZVector
spatial vector with cartesian internal representation
PFTrackTransformer * pfTransformer_
PFTrackTransformer.
T getParameter(std::string const &) const
std::vector< PFRecTrack > PFRecTrackCollection
collection of PFRecTrack objects
void endRun(const edm::Run &, const edm::EventSetup &) override