10 ParticleFlowForChargedMETProducer::ParticleFlowForChargedMETProducer(
const edm::ParameterSet& iConfig)
15 pfCandidatesToken = consumes<PFCandidateCollection>(pfCollectionLabel);
16 pvCollectionToken = consumes<VertexCollection>(pvCollectionLabel);
19 neutralEtThreshold = iConfig.
getParameter<
double>(
"neutralEtThreshold");
21 produces<PFCandidateCollection>();
29 iEvent.
getByToken(pvCollectionToken, pvCollection);
30 VertexCollection::const_iterator vertex = pvCollection->begin();
34 iEvent.
getByToken(pfCandidatesToken, pfCandidates);
38 if (pvCollection->size()>0) {
39 for(
unsigned i=0;
i<pfCandidates->size();
i++ ) {
44 if (pfCandPtr->trackRef()->dz((*vertex).position()) < dzCut) {
50 else if (neutralEtThreshold>0 and
51 pfCandPtr->pt()>neutralEtThreshold) {
66 ParticleFlowForChargedMETProducer::~ParticleFlowForChargedMETProducer(){}
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
bool isNonnull() const
Checks for non-null.
tuple chargedPFCandidates
Particle reconstructed by the particle flow algorithm.