CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
pat::PATPackedCandidateProducer Class Reference
Inheritance diagram for pat::PATPackedCandidateProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

bool candsOrdering (pat::PackedCandidate i, pat::PackedCandidate j)
 
 PATPackedCandidateProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
template<typename T >
std::vector< size_t > sort_indexes (const std::vector< T > &v)
 
 ~PATPackedCandidateProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

float calcDxy (float dx, float dy, float phi)
 
float calcDz (reco::Candidate::Point p, reco::Candidate::Point v, const reco::Candidate &c)
 

Private Attributes

edm::EDGetTokenT
< reco::PFCandidateCollection
Cands_
 
double minPtForTrackProperties_
 
edm::EDGetTokenT< std::vector
< reco::PFCandidate > > 
PuppiCands_
 
edm::EDGetTokenT
< edm::ValueMap
< reco::CandidatePtr > > 
PuppiCandsMap_
 
edm::EDGetTokenT
< edm::ValueMap< float > > 
PuppiWeight_
 
edm::EDGetTokenT
< edm::Association
< reco::VertexCollection > > 
PVAsso_
 
edm::EDGetTokenT
< edm::ValueMap< int > > 
PVAssoQuality_
 
edm::EDGetTokenT
< reco::VertexCollection
PVOrigs_
 
edm::EDGetTokenT
< reco::VertexCollection
PVs_
 
edm::EDGetTokenT< edm::View
< reco::CompositePtrCandidate > > 
SVWhiteList_
 
edm::EDGetTokenT
< reco::TrackCollection
TKOrigs_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 36 of file PATPackedCandidateProducer.cc.

Constructor & Destructor Documentation

pat::PATPackedCandidateProducer::PATPackedCandidateProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 88 of file PATPackedCandidateProducer.cc.

88  :
89  Cands_(consumes<reco::PFCandidateCollection>(iConfig.getParameter<edm::InputTag>("inputCollection"))),
90  PVs_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("inputVertices"))),
92  PVAssoQuality_(consumes<edm::ValueMap<int> >(iConfig.getParameter<edm::InputTag>("vertexAssociator"))),
93  PVOrigs_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("originalVertices"))),
94  TKOrigs_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("originalTracks"))),
97  PuppiCands_(consumes<std::vector< reco::PFCandidate > >(iConfig.getParameter<edm::InputTag>("PuppiSrc"))),
98  SVWhiteList_(consumes<edm::View< reco::CompositePtrCandidate > >(iConfig.getParameter<edm::InputTag>("secondaryVerticesForWhiteList"))),
99  minPtForTrackProperties_(iConfig.getParameter<double>("minPtForTrackProperties"))
100 {
101  produces< std::vector<pat::PackedCandidate> > ();
102  produces< edm::Association<pat::PackedCandidateCollection> > ();
103  produces< edm::Association<reco::PFCandidateCollection> > ();
104 }
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::View< reco::CompositePtrCandidate > > SVWhiteList_
edm::EDGetTokenT< reco::TrackCollection > TKOrigs_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< edm::ValueMap< reco::CandidatePtr > > PuppiCandsMap_
edm::EDGetTokenT< reco::PFCandidateCollection > Cands_
edm::EDGetTokenT< reco::VertexCollection > PVs_
edm::EDGetTokenT< std::vector< reco::PFCandidate > > PuppiCands_
edm::EDGetTokenT< edm::ValueMap< int > > PVAssoQuality_
edm::EDGetTokenT< edm::Association< reco::VertexCollection > > PVAsso_
edm::EDGetTokenT< edm::ValueMap< float > > PuppiWeight_
edm::EDGetTokenT< reco::VertexCollection > PVOrigs_
pat::PATPackedCandidateProducer::~PATPackedCandidateProducer ( )

Definition at line 106 of file PATPackedCandidateProducer.cc.

106 {}

Member Function Documentation

float pat::PATPackedCandidateProducer::calcDxy ( float  dx,
float  dy,
float  phi 
)
inlineprivate

Definition at line 79 of file PATPackedCandidateProducer.cc.

References funct::cos(), and funct::sin().

79  {
80  return - dx * std::sin(phi) + dy * std::cos(phi);
81  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
float pat::PATPackedCandidateProducer::calcDz ( reco::Candidate::Point  p,
reco::Candidate::Point  v,
const reco::Candidate c 
)
inlineprivate

Definition at line 82 of file PATPackedCandidateProducer.cc.

References reco::Candidate::pt(), reco::Candidate::px(), reco::Candidate::py(), and reco::Candidate::pz().

82  {
83  return p.Z()-v.Z() - ((p.X()-v.X()) * c.px() + (p.Y()-v.Y())*c.py()) * c.pz()/(c.pt()*c.pt());
84  }
virtual double pt() const =0
transverse momentum
virtual double pz() const =0
z coordinate of momentum vector
virtual double py() const =0
y coordinate of momentum vector
virtual double px() const =0
x coordinate of momentum vector
bool pat::PATPackedCandidateProducer::candsOrdering ( pat::PackedCandidate  i,
pat::PackedCandidate  j 
)
inline

Definition at line 44 of file PATPackedCandidateProducer.cc.

References funct::abs(), pat::PackedCandidate::charge(), pat::PackedCandidate::eta(), edm::Ref< C, T, F >::key(), minPtForTrackProperties_, pat::PackedCandidate::pt(), and pat::PackedCandidate::vertexRef().

Referenced by sort_indexes().

44  {
45  if (std::abs(i.charge()) == std::abs(j.charge())) {
46  if(i.charge()!=0){
47  if(i.pt() > minPtForTrackProperties_ and j.pt() <= minPtForTrackProperties_ ) return true;
48  if(i.pt() <= minPtForTrackProperties_ and j.pt() > minPtForTrackProperties_ ) return false;
49  }
50  if(i.vertexRef() == j.vertexRef())
51  return i.eta() > j.eta();
52  else
53  return i.vertexRef().key() < j.vertexRef().key();
54  }
55  return std::abs(i.charge()) > std::abs(j.charge());
56  }
virtual double pt() const
transverse momentum
key_type key() const
Accessor for product key.
Definition: Ref.h:264
virtual double eta() const
momentum pseudorapidity
const reco::VertexRef vertexRef() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
virtual int charge() const
electric charge
void pat::PATPackedCandidateProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDProducer.

Definition at line 110 of file PATPackedCandidateProducer.cc.

References funct::abs(), EnergyCorrector::c, reco::TrackBase::dz(), edm::helper::Filler< Map >::fill(), edm::Event::getByToken(), reco::PFCandidate::gsfTrackRef(), reco::HitPattern::hasValidHitInFirstPixelBarrel(), reco::TrackBase::highPurity, reco::TrackBase::hitPattern(), i, edm::HandleBase::id(), edm::Ptr< T >::id(), edm::Ref< C, T, F >::id(), cuy::ii, edm::helper::Filler< Map >::insert(), edm::Ref< C, T, F >::isNonnull(), edm::HandleBase::isValid(), j, edm::Ptr< T >::key(), edm::Ref< C, T, F >::key(), relval_steps::key, reco::HitPattern::MISSING_INNER_HITS, pat::PackedCandidate::moreLostInnerHits, reco::PFCandidate::muonRef(), pat::PackedCandidate::noLostInnerHits, reco::HitPattern::numberOfLostHits(), pat::PackedCandidate::oneLostInnerHit, reco::LeafCandidate::pdgId(), reco::LeafCandidate::phi(), reco::TrackBase::phi(), reco::LeafCandidate::polarP4(), edm::Handle< T >::product(), edm::Event::put(), HLT_25ns14e33_v1_cff::quality, pat::qualityMap, reco::TrackBase::referencePoint(), edm::View< T >::size(), reco::PFCandidate::trackRef(), pat::PackedCandidate::UsedInFitTight, pat::PackedCandidate::validHitInFirstPixelBarrelLayer, and reco::PFCandidate::vertex().

110  {
111 
113  iEvent.getByToken( Cands_, cands );
114  std::vector<reco::Candidate>::const_iterator cand;
115 
116  edm::Handle< edm::ValueMap<float> > puppiWeight;
117  iEvent.getByToken( PuppiWeight_, puppiWeight );
119  iEvent.getByToken( PuppiCandsMap_, puppiCandsMap );
121  iEvent.getByToken( PuppiCands_, puppiCands );
122  std::vector<int> mappingPuppi(puppiCands->size());
123 
125  iEvent.getByToken( PVOrigs_, PVOrigs );
126 
128  iEvent.getByToken(PVAsso_,assoHandle);
129  edm::Handle<edm::ValueMap<int> > assoQualityHandle;
130  iEvent.getByToken(PVAssoQuality_,assoQualityHandle);
131  const edm::Association<reco::VertexCollection> & associatedPV=*(assoHandle.product());
132  const edm::ValueMap<int> & associationQuality=*(assoQualityHandle.product());
133 
135  iEvent.getByToken(SVWhiteList_,svWhiteListHandle);
136  const edm::View<reco::CompositePtrCandidate > & svWhiteList=*(svWhiteListHandle.product());
137  std::set<unsigned int> whiteList;
138  for(unsigned int i=0; i<svWhiteList.size();i++)
139  {
140  for(unsigned int j=0; j< svWhiteList[i].numberOfSourceCandidatePtrs(); j++) {
141  const edm::Ptr<reco::Candidate> & c = svWhiteList[i].sourceCandidatePtr(j);
142  if(c.id() == cands.id()) whiteList.insert(c.key());
143  }
144  }
145 
146 
148  iEvent.getByToken( PVs_, PVs );
149  reco::VertexRef PV(PVs.id());
150  reco::VertexRefProd PVRefProd(PVs);
151  math::XYZPoint PVpos;
152 
153 
155  iEvent.getByToken( TKOrigs_, TKOrigs );
156  std::auto_ptr< std::vector<pat::PackedCandidate> > outPtrP( new std::vector<pat::PackedCandidate> );
157  std::vector<int> mapping(cands->size());
158  std::vector<int> mappingReverse(cands->size());
159  std::vector<int> mappingTk(TKOrigs->size(), -1);
160 
161  for(unsigned int ic=0, nc = cands->size(); ic < nc; ++ic) {
162  const reco::PFCandidate &cand=(*cands)[ic];
163  float phiAtVtx = cand.phi();
164  const reco::Track *ctrack = 0;
165  if ((abs(cand.pdgId()) == 11 || cand.pdgId() == 22) && cand.gsfTrackRef().isNonnull()) {
166  ctrack = &*cand.gsfTrackRef();
167  } else if (cand.trackRef().isNonnull()) {
168  ctrack = &*cand.trackRef();
169  }
170  if (ctrack) {
171  float dist=1e99;
172  int pvi=-1;
173  for(size_t ii=0;ii<PVs->size();ii++){
174  float dz=std::abs(ctrack->dz( ((*PVs)[ii]).position()));
175  if(dz<dist) {pvi=ii;dist=dz; }
176  }
177  PV = reco::VertexRef(PVs, pvi);
178  math::XYZPoint vtx = cand.vertex();
180  const reco::VertexRef & PVOrig = associatedPV[reco::CandidatePtr(cands,ic)];
181  if(PVOrig.isNonnull()) PV = reco::VertexRef(PVs, PVOrig.key()); // WARNING: assume the PV slimmer is keeping same order
182  int quality=associationQuality[reco::CandidatePtr(cands,ic)];
183 // if ((size_t)pvi!=PVOrig.key()) std::cout << "not closest in Z" << pvi << " " << PVOrig.key() << " " << cand.pt() << " " << quality << std::endl;
184  // TrajectoryStateOnSurface tsos = extrapolator.extrapolate(trajectoryStateTransform::initialFreeState(*ctrack,&*magneticField), RecoVertex::convertPos(PV->position()));
185  // vtx = tsos.globalPosition();
186  // phiAtVtx = tsos.globalDirection().phi();
187  vtx = ctrack->referencePoint();
188  phiAtVtx = ctrack->phi();
190  if (nlost == 0) {
191  if (ctrack->hitPattern().hasValidHitInFirstPixelBarrel()) {
193  }
194  } else {
196  }
197 
198 
199  outPtrP->push_back( pat::PackedCandidate(cand.polarP4(), vtx, phiAtVtx, cand.pdgId(), PVRefProd, PV.key()));
200  outPtrP->back().setAssociationQuality(pat::PackedCandidate::PVAssociationQuality(qualityMap[quality]));
201  if(cand.trackRef().isNonnull() && PVOrig->trackWeight(cand.trackRef()) > 0.5 && quality == 7) {
202  outPtrP->back().setAssociationQuality(pat::PackedCandidate::UsedInFitTight);
203  }
204  // properties of the best track
205  outPtrP->back().setLostInnerHits( lostHits );
206  if(outPtrP->back().pt() > minPtForTrackProperties_ || whiteList.find(ic)!=whiteList.end()) {
207  outPtrP->back().setTrackProperties(*ctrack);
208  //outPtrP->back().setTrackProperties(*ctrack,tsos.curvilinearError());
209  }
210 
211  // these things are always for the CKF track
212  outPtrP->back().setTrackHighPurity( cand.trackRef().isNonnull() && cand.trackRef()->quality(reco::Track::highPurity) );
213  if (cand.muonRef().isNonnull()) {
214  outPtrP->back().setMuonID(cand.muonRef()->isStandAloneMuon(), cand.muonRef()->isGlobalMuon());
215  }
216  } else {
217 
218  if (!PVs->empty()) {
219  PV = reco::VertexRef(PVs, 0);
220  PVpos = PV->position();
221  }
222 
223  outPtrP->push_back( pat::PackedCandidate(cand.polarP4(), PVpos, cand.phi(), cand.pdgId(), PVRefProd, PV.key()));
225  }
226 
227  if (puppiWeight.isValid()){
228  reco::PFCandidateRef pkref( cands, ic );
229  outPtrP->back().setPuppiWeight( (*puppiWeight)[pkref]);
230  mappingPuppi[((*puppiCandsMap)[pkref]).key()]=ic;
231  }
232 
233  mapping[ic] = ic; // trivial at the moment!
234  if (cand.trackRef().isNonnull() && cand.trackRef().id() == TKOrigs.id()) {
235  mappingTk[cand.trackRef().key()] = ic;
236  }
237 
238  }
239 
240  std::auto_ptr< std::vector<pat::PackedCandidate> > outPtrPSorted( new std::vector<pat::PackedCandidate> );
241  std::vector<size_t> order=sort_indexes(*outPtrP);
242  std::vector<size_t> reverseOrder(order.size());
243  for(size_t i=0,nc=cands->size();i<nc;i++) {
244  outPtrPSorted->push_back((*outPtrP)[order[i]]);
245  reverseOrder[order[i]] = i;
246  mappingReverse[order[i]]=i;
247  }
248 
249  // Fix track association for sorted candidates
250  for(size_t i=0,ntk=mappingTk.size();i<ntk;i++){
251  if(mappingTk[i] >= 0)
252  mappingTk[i]=reverseOrder[mappingTk[i]];
253  }
254 
255  for(size_t i=0,ntk=mappingPuppi.size();i<ntk;i++){
256  mappingPuppi[i]=reverseOrder[mappingPuppi[i]];
257  }
258 
259  edm::OrphanHandle<pat::PackedCandidateCollection> oh = iEvent.put( outPtrPSorted );
260 
261  // now build the two maps
262  std::auto_ptr<edm::Association<pat::PackedCandidateCollection> > pf2pc(new edm::Association<pat::PackedCandidateCollection>(oh ));
263  std::auto_ptr<edm::Association<reco::PFCandidateCollection > > pc2pf(new edm::Association<reco::PFCandidateCollection >(cands));
266  pf2pcFiller.insert(cands, mappingReverse.begin(), mappingReverse.end());
267  pc2pfFiller.insert(oh , order.begin(), order.end());
268  // include also the mapping track -> packed PFCand
269  pf2pcFiller.insert(TKOrigs, mappingTk.begin(), mappingTk.end());
270  pf2pcFiller.insert(puppiCands, mappingPuppi.begin(), mappingPuppi.end());
271 
272  pf2pcFiller.fill();
273  pc2pfFiller.fill();
274  iEvent.put(pf2pc);
275  iEvent.put(pc2pf);
276 
277 }
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:634
int i
Definition: DBlmapReader.cc:9
virtual int pdgId() const
PDG identifier.
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
key_type key() const
Definition: Ptr.h:186
ProductID id() const
Definition: HandleBase.cc:15
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
size_type size() const
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:598
key_type key() const
Accessor for product key.
Definition: Ref.h:264
int ii
Definition: cuy.py:588
edm::EDGetTokenT< edm::View< reco::CompositePtrCandidate > > SVWhiteList_
ProductID id() const
Accessor for product ID.
Definition: Ref.h:258
edm::EDGetTokenT< reco::TrackCollection > TKOrigs_
edm::EDGetTokenT< edm::ValueMap< reco::CandidatePtr > > PuppiCandsMap_
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:433
edm::EDGetTokenT< reco::PFCandidateCollection > Cands_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:115
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
virtual const Point & vertex() const
vertex position (overwritten by PF...)
Definition: PFCandidate.cc:647
edm::EDGetTokenT< reco::VertexCollection > PVs_
bool isValid() const
Definition: HandleBase.h:75
edm::Ref< VertexCollection > VertexRef
persistent reference to a Vertex
Definition: VertexFwd.h:13
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
edm::EDGetTokenT< std::vector< reco::PFCandidate > > PuppiCands_
reco::MuonRef muonRef() const
Definition: PFCandidate.cc:450
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:562
LostInnerHits
Enumerator specifying the.
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
T const * product() const
Definition: Handle.h:81
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:411
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< size_t > sort_indexes(const std::vector< T > &v)
ProductID id() const
Accessor for product ID.
Definition: Ptr.h:181
int numberOfLostHits(HitCategory category) const
Definition: HitPattern.h:804
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:39
virtual const PolarLorentzVector & polarP4() const
four-momentum Lorentz vector
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:471
static int qualityMap[8]
conversion map from quality flags used in PV association and miniAOD one
bool hasValidHitInFirstPixelBarrel() const
Definition: HitPattern.cc:276
edm::EDGetTokenT< edm::ValueMap< int > > PVAssoQuality_
edm::EDGetTokenT< edm::Association< reco::VertexCollection > > PVAsso_
edm::EDGetTokenT< edm::ValueMap< float > > PuppiWeight_
virtual double phi() const
momentum azimuthal angle
edm::EDGetTokenT< reco::VertexCollection > PVOrigs_
template<typename T >
std::vector<size_t> pat::PATPackedCandidateProducer::sort_indexes ( const std::vector< T > &  v)
inline

Definition at line 58 of file PATPackedCandidateProducer.cc.

References candsOrdering(), i, customizeTrackingMonitorSeedNumber::idx, python.multivaluedict::sort(), and findQualityFiles::v.

58  {
59  std::vector<size_t> idx(v.size());
60  for (size_t i = 0; i != idx.size(); ++i) idx[i] = i;
61  std::sort(idx.begin(), idx.end(),[&v,this](size_t i1, size_t i2) { return candsOrdering(v[i1],v[i2]);});
62  return idx;
63  }
int i
Definition: DBlmapReader.cc:9
bool candsOrdering(pat::PackedCandidate i, pat::PackedCandidate j)
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...

Member Data Documentation

edm::EDGetTokenT<reco::PFCandidateCollection> pat::PATPackedCandidateProducer::Cands_
private

Definition at line 66 of file PATPackedCandidateProducer.cc.

double pat::PATPackedCandidateProducer::minPtForTrackProperties_
private

Definition at line 77 of file PATPackedCandidateProducer.cc.

Referenced by candsOrdering().

edm::EDGetTokenT<std::vector< reco::PFCandidate > > pat::PATPackedCandidateProducer::PuppiCands_
private

Definition at line 74 of file PATPackedCandidateProducer.cc.

edm::EDGetTokenT<edm::ValueMap<reco::CandidatePtr> > pat::PATPackedCandidateProducer::PuppiCandsMap_
private

Definition at line 73 of file PATPackedCandidateProducer.cc.

edm::EDGetTokenT< edm::ValueMap<float> > pat::PATPackedCandidateProducer::PuppiWeight_
private

Definition at line 72 of file PATPackedCandidateProducer.cc.

edm::EDGetTokenT<edm::Association<reco::VertexCollection> > pat::PATPackedCandidateProducer::PVAsso_
private

Definition at line 68 of file PATPackedCandidateProducer.cc.

edm::EDGetTokenT<edm::ValueMap<int> > pat::PATPackedCandidateProducer::PVAssoQuality_
private

Definition at line 69 of file PATPackedCandidateProducer.cc.

edm::EDGetTokenT<reco::VertexCollection> pat::PATPackedCandidateProducer::PVOrigs_
private

Definition at line 70 of file PATPackedCandidateProducer.cc.

edm::EDGetTokenT<reco::VertexCollection> pat::PATPackedCandidateProducer::PVs_
private

Definition at line 67 of file PATPackedCandidateProducer.cc.

edm::EDGetTokenT<edm::View<reco::CompositePtrCandidate> > pat::PATPackedCandidateProducer::SVWhiteList_
private

Definition at line 75 of file PATPackedCandidateProducer.cc.

edm::EDGetTokenT<reco::TrackCollection> pat::PATPackedCandidateProducer::TKOrigs_
private

Definition at line 71 of file PATPackedCandidateProducer.cc.