CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
PuppiProducer Class Reference

#include <PuppiProducer.h>

Inheritance diagram for PuppiProducer:
edm::stream::EDProducer<>

Public Types

typedef edm::View< reco::CandidateCandidateView
 
typedef math::XYZTLorentzVector LorentzVector
 
typedef std::vector< LorentzVectorLorentzVectorCollection
 
typedef std::vector< pat::PackedCandidatePackedOutputCollection
 
typedef std::vector< reco::PFCandidatePFInputCollection
 
typedef std::vector< reco::PFCandidatePFOutputCollection
 
typedef edm::View< reco::PFCandidatePFView
 
typedef reco::VertexCollection VertexCollection
 
- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Public Member Functions

 PuppiProducer (const edm::ParameterSet &)
 
 ~PuppiProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

virtual void beginJob ()
 
virtual void endJob ()
 
void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

bool fClonePackedCands
 
float fDZCut
 
std::unique_ptr< PackedOutputCollectionfPackedPuppiCandidates
 
std::string fPFName
 
float fPtMax
 
std::unique_ptr< PFOutputCollectionfPuppiCandidates
 
std::unique_ptr< PuppiContainerfPuppiContainer
 
bool fPuppiDiagnostics
 
bool fPuppiForLeptons
 
std::string fPuppiName
 
std::string fPVName
 
std::vector< RecoObjfRecoObjCollection
 
bool fUseDZ
 
bool fUseExistingWeights
 
bool fUseWeightsNoLep
 
int fVtxNdofCut
 
double fVtxZCut
 
edm::EDGetTokenT< CandidateViewtokenPFCandidates_
 
edm::EDGetTokenT< VertexCollectiontokenVertices_
 

Detailed Description

Definition at line 22 of file PuppiProducer.h.

Member Typedef Documentation

Definition at line 32 of file PuppiProducer.h.

Definition at line 29 of file PuppiProducer.h.

Definition at line 30 of file PuppiProducer.h.

Definition at line 35 of file PuppiProducer.h.

Definition at line 33 of file PuppiProducer.h.

Definition at line 34 of file PuppiProducer.h.

Definition at line 36 of file PuppiProducer.h.

Definition at line 31 of file PuppiProducer.h.

Constructor & Destructor Documentation

PuppiProducer::PuppiProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 25 of file PuppiProducer.cc.

References fClonePackedCands, fDZCut, fPtMax, fPuppiContainer, fPuppiDiagnostics, fPuppiForLeptons, fUseDZ, fUseExistingWeights, fUseWeightsNoLep, fVtxNdofCut, fVtxZCut, edm::ParameterSet::getParameter(), tokenPFCandidates_, and tokenVertices_.

25  {
26  fPuppiDiagnostics = iConfig.getParameter<bool>("puppiDiagnostics");
27  fPuppiForLeptons = iConfig.getParameter<bool>("puppiForLeptons");
28  fUseDZ = iConfig.getParameter<bool>("UseDeltaZCut");
29  fDZCut = iConfig.getParameter<double>("DeltaZCut");
30  fPtMax = iConfig.getParameter<double>("PtMaxNeutrals");
31  fUseExistingWeights = iConfig.getParameter<bool>("useExistingWeights");
32  fUseWeightsNoLep = iConfig.getParameter<bool>("useWeightsNoLep");
33  fClonePackedCands = iConfig.getParameter<bool>("clonePackedCands");
34  fVtxNdofCut = iConfig.getParameter<int>("vtxNdofCut");
35  fVtxZCut = iConfig.getParameter<double>("vtxZCut");
36  fPuppiContainer = std::unique_ptr<PuppiContainer> ( new PuppiContainer(iConfig) );
37 
39  = consumes<CandidateView>(iConfig.getParameter<edm::InputTag>("candName"));
41  = consumes<VertexCollection>(iConfig.getParameter<edm::InputTag>("vertexName"));
42 
43 
44  produces<edm::ValueMap<float> > ();
45  produces<edm::ValueMap<LorentzVector> > ();
46  produces< edm::ValueMap<reco::CandidatePtr> >();
47 
49  produces<pat::PackedCandidateCollection>();
50  else
51  produces<reco::PFCandidateCollection>();
52 
53  if (fPuppiDiagnostics){
54  produces<double> ("PuppiNAlgos");
55  produces<std::vector<double>> ("PuppiRawAlphas");
56  produces<std::vector<double>> ("PuppiAlphas");
57  produces<std::vector<double>> ("PuppiAlphasMed");
58  produces<std::vector<double>> ("PuppiAlphasRms");
59  }
60 }
T getParameter(std::string const &) const
bool fUseWeightsNoLep
Definition: PuppiProducer.h:54
bool fPuppiDiagnostics
Definition: PuppiProducer.h:48
std::unique_ptr< PuppiContainer > fPuppiContainer
Definition: PuppiProducer.h:58
edm::EDGetTokenT< VertexCollection > tokenVertices_
Definition: PuppiProducer.h:44
bool fClonePackedCands
Definition: PuppiProducer.h:55
bool fPuppiForLeptons
Definition: PuppiProducer.h:49
bool fUseExistingWeights
Definition: PuppiProducer.h:53
edm::EDGetTokenT< CandidateView > tokenPFCandidates_
Definition: PuppiProducer.h:43
PuppiProducer::~PuppiProducer ( )
override

Definition at line 62 of file PuppiProducer.cc.

62  {
63 }

Member Function Documentation

void PuppiProducer::beginJob ( void  )
privatevirtual

Definition at line 325 of file PuppiProducer.cc.

325  {
326 }
void PuppiProducer::endJob ( void  )
privatevirtual

Definition at line 328 of file PuppiProducer.cc.

Referenced by o2olib.O2ORunMgr::executeJob().

328  {
329 }
void PuppiProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 331 of file PuppiProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), DEFINE_FWK_MODULE, and edm::ParameterSetDescription::setUnknown().

331  {
332  //The following says we do not know what parameters are allowed so do no validation
333  // Please change this to state exactly what you do use, even if it is no parameters
335  desc.setUnknown();
336  descriptions.addDefault(desc);
337 }
void addDefault(ParameterSetDescription const &psetDescription)
void PuppiProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 65 of file PuppiProducer.cc.

References funct::abs(), edm::View< T >::begin(), RecoObj::charge, RecoObj::d0, pat::PackedCandidate::dxy(), RecoObj::dZ, pat::PackedCandidate::dz(), edm::View< T >::end(), pat::PackedCandidate::energy(), RecoObj::eta, Exception, fClonePackedCands, fDZCut, edm::helper::Filler< Map >::fill(), objects.autophobj::filler, fPackedPuppiCandidates, fPuppiCandidates, fPuppiContainer, fPuppiDiagnostics, fPuppiForLeptons, fRecoObjCollection, pat::PackedCandidate::fromPV(), fUseDZ, fUseExistingWeights, fUseWeightsNoLep, fVtxNdofCut, fVtxZCut, edm::Event::getByToken(), reco::PFCandidate::gsfTrackRef(), mps_fire::i, RecoObj::id, triggerObjects_cff::id, edm::helper::Filler< Map >::insert(), edm::Ref< C, T, F >::isNonnull(), edm::errors::LogicError, RecoObj::m, eostools::move(), reco::LeafCandidate::p4(), RecoObj::phi, edm::Handle< T >::product(), RecoObj::pt, pat::PackedCandidate::puppiWeight(), pat::PackedCandidate::puppiWeightNoLep(), edm::Event::put(), pat::PackedCandidate::PVLoose, pat::PackedCandidate::PVTight, pat::PackedCandidate::PVUsedInFit, pat::PackedCandidate::px(), pat::PackedCandidate::py(), pat::PackedCandidate::pz(), RecoObj::rapidity, edm::View< T >::size(), tokenPFCandidates_, tokenVertices_, reco::PFCandidate::trackRef(), reco::PFCandidate::translatePdgIdToType(), heppy_batch::val, MuonErrorMatrixValues_cff::values, and pat::PackedCandidate::vertexRef().

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

65  {
66 
67  // Get PFCandidate Collection
68  edm::Handle<CandidateView> hPFProduct;
69  iEvent.getByToken(tokenPFCandidates_,hPFProduct);
70  const CandidateView *pfCol = hPFProduct.product();
71 
72  // Get vertex collection w/PV as the first entry?
74  iEvent.getByToken(tokenVertices_,hVertexProduct);
75  const reco::VertexCollection *pvCol = hVertexProduct.product();
76 
77  int npv = 0;
78  const reco::VertexCollection::const_iterator vtxEnd = pvCol->end();
79  for (reco::VertexCollection::const_iterator vtxIter = pvCol->begin(); vtxEnd != vtxIter; ++vtxIter) {
80  if (!vtxIter->isFake() && vtxIter->ndof()>=fVtxNdofCut && std::abs(vtxIter->z())<=fVtxZCut)
81  npv++;
82  }
83 
84  //Fill the reco objects
85  fRecoObjCollection.clear();
86  for(CandidateView::const_iterator itPF = pfCol->begin(); itPF!=pfCol->end(); itPF++) {
87  // std::cout << "itPF->pdgId() = " << itPF->pdgId() << std::endl;
88  RecoObj pReco;
89  pReco.pt = itPF->pt();
90  pReco.eta = itPF->eta();
91  pReco.phi = itPF->phi();
92  pReco.m = itPF->mass();
93  pReco.rapidity = itPF->rapidity();
94  pReco.charge = itPF->charge();
95  const reco::Vertex *closestVtx = nullptr;
96  double pDZ = -9999;
97  double pD0 = -9999;
98  int pVtxId = -9999;
99  bool lFirst = true;
100  const pat::PackedCandidate *lPack = dynamic_cast<const pat::PackedCandidate*>(&(*itPF));
101  if(lPack == nullptr ) {
102 
103  const reco::PFCandidate *pPF = dynamic_cast<const reco::PFCandidate*>(&(*itPF));
104  double curdz = 9999;
105  int closestVtxForUnassociateds = -9999;
106  for(reco::VertexCollection::const_iterator iV = pvCol->begin(); iV!=pvCol->end(); ++iV) {
107  if(lFirst) {
108  if ( pPF->trackRef().isNonnull() ) pDZ = pPF->trackRef() ->dz(iV->position());
109  else if ( pPF->gsfTrackRef().isNonnull() ) pDZ = pPF->gsfTrackRef()->dz(iV->position());
110  if ( pPF->trackRef().isNonnull() ) pD0 = pPF->trackRef() ->d0();
111  else if ( pPF->gsfTrackRef().isNonnull() ) pD0 = pPF->gsfTrackRef()->d0();
112  lFirst = false;
113  if(pDZ > -9999) pVtxId = 0;
114  }
115  if(iV->trackWeight(pPF->trackRef())>0) {
116  closestVtx = &(*iV);
117  break;
118  }
119  // in case it's unassocciated, keep more info
120  double tmpdz = 99999;
121  if ( pPF->trackRef().isNonnull() ) tmpdz = pPF->trackRef() ->dz(iV->position());
122  else if ( pPF->gsfTrackRef().isNonnull() ) tmpdz = pPF->gsfTrackRef()->dz(iV->position());
123  if (std::abs(tmpdz) < curdz){
124  curdz = std::abs(tmpdz);
125  closestVtxForUnassociateds = pVtxId;
126  }
127  pVtxId++;
128 
129  }
130  int tmpFromPV = 0;
131  // mocking the miniAOD definitions
132  if (closestVtx != nullptr && std::abs(pReco.charge) > 0 && pVtxId > 0) tmpFromPV = 0;
133  if (closestVtx != nullptr && std::abs(pReco.charge) > 0 && pVtxId == 0) tmpFromPV = 3;
134  if (closestVtx == nullptr && std::abs(pReco.charge) > 0 && closestVtxForUnassociateds == 0) tmpFromPV = 2;
135  if (closestVtx == nullptr && std::abs(pReco.charge) > 0 && closestVtxForUnassociateds != 0) tmpFromPV = 1;
136  pReco.dZ = pDZ;
137  pReco.d0 = pD0;
138  pReco.id = 0;
139  if (std::abs(pReco.charge) == 0){ pReco.id = 0; }
140  else{
141  if (tmpFromPV == 0){ pReco.id = 2; } // 0 is associated to PU vertex
142  if (tmpFromPV == 3){ pReco.id = 1; }
143  if (tmpFromPV == 1 || tmpFromPV == 2){
144  pReco.id = 0;
145  if (!fPuppiForLeptons && fUseDZ && (std::abs(pDZ) < fDZCut)) pReco.id = 1;
146  if (!fPuppiForLeptons && fUseDZ && (std::abs(pDZ) > fDZCut)) pReco.id = 2;
147  if (fPuppiForLeptons && tmpFromPV == 1) pReco.id = 2;
148  if (fPuppiForLeptons && tmpFromPV == 2) pReco.id = 1;
149  }
150  }
151  }
152  else if(lPack->vertexRef().isNonnull() ) {
153  pDZ = lPack->dz();
154  pD0 = lPack->dxy();
155  pReco.dZ = pDZ;
156  pReco.d0 = pD0;
157 
158  pReco.id = 0;
159  if (std::abs(pReco.charge) == 0){ pReco.id = 0; }
160  if (std::abs(pReco.charge) > 0){
161  if (lPack->fromPV() == 0){ pReco.id = 2; } // 0 is associated to PU vertex
162  if (lPack->fromPV() == (pat::PackedCandidate::PVUsedInFit)){ pReco.id = 1; }
163  if (lPack->fromPV() == (pat::PackedCandidate::PVTight) || lPack->fromPV() == (pat::PackedCandidate::PVLoose)){
164  pReco.id = 0;
165  if (!fPuppiForLeptons && fUseDZ && (std::abs(pDZ) < fDZCut)) pReco.id = 1;
166  if (!fPuppiForLeptons && fUseDZ && (std::abs(pDZ) > fDZCut)) pReco.id = 2;
167  if (fPuppiForLeptons && lPack->fromPV() == (pat::PackedCandidate::PVLoose)) pReco.id = 2;
168  if (fPuppiForLeptons && lPack->fromPV() == (pat::PackedCandidate::PVTight)) pReco.id = 1;
169  }
170  }
171  }
172 
173  fRecoObjCollection.push_back(pReco);
174 
175  }
176 
177  fPuppiContainer->initialize(fRecoObjCollection);
178  fPuppiContainer->setNPV( npv );
179 
180  std::vector<double> lWeights;
181  std::vector<PuppiCandidate> lCandidates;
182  if (!fUseExistingWeights){
183  //Compute the weights and get the particles
184  lWeights = fPuppiContainer->puppiWeights();
185  lCandidates = fPuppiContainer->puppiParticles();
186  }
187  else{
188  //Use the existing weights
189  int lPackCtr = 0;
190  for(CandidateView::const_iterator itPF = pfCol->begin(); itPF!=pfCol->end(); itPF++) {
191  const pat::PackedCandidate *lPack = dynamic_cast<const pat::PackedCandidate*>(&(*itPF));
192  float curpupweight = -1.;
193  if(lPack == nullptr ) {
194  // throw error
195  throw edm::Exception(edm::errors::LogicError,"PuppiProducer: cannot get weights since inputs are not PackedCandidates");
196  }
197  else{
198  if (fUseWeightsNoLep){ curpupweight = lPack->puppiWeightNoLep(); }
199  else{ curpupweight = lPack->puppiWeight(); }
200  }
201  lWeights.push_back(curpupweight);
202  PuppiCandidate curjet( curpupweight*lPack->px(), curpupweight*lPack->py(), curpupweight*lPack->pz(), curpupweight*lPack->energy());
203  curjet.set_user_index(lPackCtr);
204  lCandidates.push_back(curjet);
205  lPackCtr++;
206  }
207  }
208 
209  //Fill it into the event
210  std::unique_ptr<edm::ValueMap<float> > lPupOut(new edm::ValueMap<float>());
211  edm::ValueMap<float>::Filler lPupFiller(*lPupOut);
212  lPupFiller.insert(hPFProduct,lWeights.begin(),lWeights.end());
213  lPupFiller.fill();
214 
215  // This is a dummy to access the "translate" method which is a
216  // non-static member function even though it doesn't need to be.
217  // Will fix in the future.
218  static const reco::PFCandidate dummySinceTranslateIsNotStatic;
219 
220  // Fill a new PF/Packed Candidate Collection and write out the ValueMap of the new p4s.
221  // Since the size of the ValueMap must be equal to the input collection, we need
222  // to search the "puppi" particles to find a match for each input. If none is found,
223  // the input is set to have a four-vector of 0,0,0,0
226  std::unique_ptr<edm::ValueMap<LorentzVector> > p4PupOut(new edm::ValueMap<LorentzVector>());
227  LorentzVectorCollection puppiP4s;
228  std::vector<reco::CandidatePtr> values(hPFProduct->size());
229 
230  for ( auto i0 = hPFProduct->begin(),
231  i0begin = hPFProduct->begin(),
232  i0end = hPFProduct->end(); i0 != i0end; ++i0 ) {
233  std::unique_ptr<pat::PackedCandidate> pCand;
234  std::unique_ptr<reco::PFCandidate> pfCand;
236  const pat::PackedCandidate *cand = dynamic_cast<const pat::PackedCandidate*>(&(*i0));
237  if(!cand)
238  throw edm::Exception(edm::errors::LogicError,"PuppiProducer: inputs are not PackedCandidates");
239  pCand.reset( new pat::PackedCandidate(*cand) );
240  } else {
241  auto id = dummySinceTranslateIsNotStatic.translatePdgIdToType(i0->pdgId());
242  const reco::PFCandidate *cand = dynamic_cast<const reco::PFCandidate*>(&(*i0));
243  pfCand.reset( new reco::PFCandidate( cand ? *cand : reco::PFCandidate(i0->charge(), i0->p4(), id) ) );
244  }
245  LorentzVector pVec = i0->p4();
246  int val = i0 - i0begin;
247 
248  // Find the Puppi particle matched to the input collection using the "user_index" of the object.
249  auto puppiMatched = find_if( lCandidates.begin(), lCandidates.end(), [&val]( PuppiCandidate const & i ){ return i.user_index() == val; } );
250  if ( puppiMatched != lCandidates.end() ) {
251  pVec.SetPxPyPzE(puppiMatched->px(),puppiMatched->py(),puppiMatched->pz(),puppiMatched->E());
253  if(fPuppiForLeptons)
254  pCand->setPuppiWeight(pCand->puppiWeight(),lWeights[val]);
255  else
256  pCand->setPuppiWeight(lWeights[val],pCand->puppiWeightNoLep());
257  }
258  } else {
259  pVec.SetPxPyPzE( 0, 0, 0, 0);
261  pCand->setPuppiWeight(0,0);
262  }
263  }
264  puppiP4s.push_back( pVec );
265 
267  pCand->setP4(pVec);
268  pCand->setSourceCandidatePtr( i0->sourceCandidatePtr(0) );
269  fPackedPuppiCandidates->push_back(*pCand);
270  } else {
271  pfCand->setP4(pVec);
272  pfCand->setSourceCandidatePtr( i0->sourceCandidatePtr(0) );
273  fPuppiCandidates->push_back(*pfCand);
274  }
275  }
276 
277  //Compute the modified p4s
278  edm::ValueMap<LorentzVector>::Filler p4PupFiller(*p4PupOut);
279  p4PupFiller.insert(hPFProduct,puppiP4s.begin(), puppiP4s.end() );
280  p4PupFiller.fill();
281 
282  iEvent.put(std::move(lPupOut));
283  iEvent.put(std::move(p4PupOut));
286  for(unsigned int ic=0, nc = oh->size(); ic < nc; ++ic) {
287  reco::CandidatePtr pkref( oh, ic );
288  values[ic] = pkref;
289  }
290  } else {
292  for(unsigned int ic=0, nc = oh->size(); ic < nc; ++ic) {
293  reco::CandidatePtr pkref( oh, ic );
294  values[ic] = pkref;
295  }
296  }
297  std::unique_ptr<edm::ValueMap<reco::CandidatePtr> > pfMap_p(new edm::ValueMap<reco::CandidatePtr>());
299  filler.insert(hPFProduct, values.begin(), values.end());
300  filler.fill();
301  iEvent.put(std::move(pfMap_p));
302 
303 
306 
307  // all the different alphas per particle
308  // THE alpha per particle
309  std::unique_ptr<std::vector<double> > theAlphas(new std::vector<double>(fPuppiContainer->puppiAlphas()));
310  std::unique_ptr<std::vector<double> > theAlphasMed(new std::vector<double>(fPuppiContainer->puppiAlphasMed()));
311  std::unique_ptr<std::vector<double> > theAlphasRms(new std::vector<double>(fPuppiContainer->puppiAlphasRMS()));
312  std::unique_ptr<std::vector<double> > alphas(new std::vector<double>(fPuppiContainer->puppiRawAlphas()));
313  std::unique_ptr<double> nalgos(new double(fPuppiContainer->puppiNAlgos()));
314 
315  iEvent.put(std::move(alphas),"PuppiRawAlphas");
316  iEvent.put(std::move(nalgos),"PuppiNAlgos");
317  iEvent.put(std::move(theAlphas),"PuppiAlphas");
318  iEvent.put(std::move(theAlphasMed),"PuppiAlphasMed");
319  iEvent.put(std::move(theAlphasRms),"PuppiAlphasRms");
320  }
321 
322 }
float puppiWeight() const
Set both weights at once (with option for only full PUPPI)
virtual float dz(size_t ipv=0) const
dz with respect to the PV[ipv]
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:137
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
double px() const override
x coordinate of momentum vector
float puppiWeightNoLep() const
Weight from full PUPPI.
float d0
Definition: RecoObj.h:28
bool fUseWeightsNoLep
Definition: PuppiProducer.h:54
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
std::vector< reco::PFCandidate > PFOutputCollection
Definition: PuppiProducer.h:34
Definition: RecoObj.h:4
bool fPuppiDiagnostics
Definition: PuppiProducer.h:48
std::vector< pat::PackedCandidate > PackedOutputCollection
Definition: PuppiProducer.h:35
std::vector< RecoObj > fRecoObjCollection
Definition: PuppiProducer.h:59
size_type size() const
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
const reco::VertexRef vertexRef() const
std::unique_ptr< PuppiContainer > fPuppiContainer
Definition: PuppiProducer.h:58
int charge
Definition: RecoObj.h:29
double pz() const override
z coordinate of momentum vector
edm::EDGetTokenT< VertexCollection > tokenVertices_
Definition: PuppiProducer.h:44
float dZ
Definition: RecoObj.h:27
double py() const override
y coordinate of momentum vector
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:442
float rapidity
Definition: RecoObj.h:17
float pt
Definition: RecoObj.h:17
const_iterator begin() const
int id
Definition: RecoObj.h:18
float phi
Definition: RecoObj.h:17
const PVAssoc fromPV(size_t ipv=0) const
std::unique_ptr< PackedOutputCollection > fPackedPuppiCandidates
Definition: PuppiProducer.h:61
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool fClonePackedCands
Definition: PuppiProducer.h:55
double energy() const override
energy
math::XYZTLorentzVector LorentzVector
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:99
edm::View< reco::Candidate > CandidateView
Definition: PuppiProducer.h:32
bool fPuppiForLeptons
Definition: PuppiProducer.h:49
std::vector< LorentzVector > LorentzVectorCollection
float m
Definition: RecoObj.h:17
T const * product() const
Definition: Handle.h:81
ParticleType translatePdgIdToType(int pdgid) const
Definition: PFCandidate.cc:233
float eta
Definition: RecoObj.h:17
bool fUseExistingWeights
Definition: PuppiProducer.h:53
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
Definition: View.h:86
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:480
edm::EDGetTokenT< CandidateView > tokenPFCandidates_
Definition: PuppiProducer.h:43
const_iterator end() const
virtual float dxy() const
dxy with respect to the PV ref
std::unique_ptr< PFOutputCollection > fPuppiCandidates
Definition: PuppiProducer.h:60
def move(src, dest)
Definition: eostools.py:510

Member Data Documentation

bool PuppiProducer::fClonePackedCands
private

Definition at line 55 of file PuppiProducer.h.

Referenced by produce(), and PuppiProducer().

float PuppiProducer::fDZCut
private

Definition at line 51 of file PuppiProducer.h.

Referenced by produce(), and PuppiProducer().

std::unique_ptr< PackedOutputCollection > PuppiProducer::fPackedPuppiCandidates
private

Definition at line 61 of file PuppiProducer.h.

Referenced by produce().

std::string PuppiProducer::fPFName
private

Definition at line 46 of file PuppiProducer.h.

float PuppiProducer::fPtMax
private

Definition at line 52 of file PuppiProducer.h.

Referenced by PuppiProducer().

std::unique_ptr< PFOutputCollection > PuppiProducer::fPuppiCandidates
private

Definition at line 60 of file PuppiProducer.h.

Referenced by produce().

std::unique_ptr<PuppiContainer> PuppiProducer::fPuppiContainer
private

Definition at line 58 of file PuppiProducer.h.

Referenced by produce(), and PuppiProducer().

bool PuppiProducer::fPuppiDiagnostics
private

Definition at line 48 of file PuppiProducer.h.

Referenced by produce(), and PuppiProducer().

bool PuppiProducer::fPuppiForLeptons
private

Definition at line 49 of file PuppiProducer.h.

Referenced by produce(), and PuppiProducer().

std::string PuppiProducer::fPuppiName
private

Definition at line 45 of file PuppiProducer.h.

std::string PuppiProducer::fPVName
private

Definition at line 47 of file PuppiProducer.h.

std::vector<RecoObj> PuppiProducer::fRecoObjCollection
private

Definition at line 59 of file PuppiProducer.h.

Referenced by produce().

bool PuppiProducer::fUseDZ
private

Definition at line 50 of file PuppiProducer.h.

Referenced by produce(), and PuppiProducer().

bool PuppiProducer::fUseExistingWeights
private

Definition at line 53 of file PuppiProducer.h.

Referenced by produce(), and PuppiProducer().

bool PuppiProducer::fUseWeightsNoLep
private

Definition at line 54 of file PuppiProducer.h.

Referenced by produce(), and PuppiProducer().

int PuppiProducer::fVtxNdofCut
private

Definition at line 56 of file PuppiProducer.h.

Referenced by produce(), and PuppiProducer().

double PuppiProducer::fVtxZCut
private

Definition at line 57 of file PuppiProducer.h.

Referenced by produce(), and PuppiProducer().

edm::EDGetTokenT< CandidateView > PuppiProducer::tokenPFCandidates_
private

Definition at line 43 of file PuppiProducer.h.

Referenced by produce(), and PuppiProducer().

edm::EDGetTokenT< VertexCollection > PuppiProducer::tokenVertices_
private

Definition at line 44 of file PuppiProducer.h.

Referenced by produce(), and PuppiProducer().