CMS 3D CMS Logo

NamedCandCombinerBase.h
Go to the documentation of this file.
1 #ifndef CommonTools_CandUtils_CandCombinerBase_h
2 #define CommonTools_CandUtils_CandCombinerBase_h
3 
10 #include <vector>
11 #include <string>
12 
14 public:
15  typedef std::vector<std::string> string_coll;
21  NamedCandCombinerBase(std::string name, int, int, int);
23  NamedCandCombinerBase(std::string name, int, int, int, int);
25  NamedCandCombinerBase(std::string name, bool checkCharge, bool checkOverlap, const std::vector<int> &);
27  virtual ~NamedCandCombinerBase();
29  std::unique_ptr<reco::NamedCompositeCandidateCollection> combine(const std::vector<reco::CandidatePtrVector> &,
30  string_coll const &) const;
32  std::unique_ptr<reco::NamedCompositeCandidateCollection> combine(const reco::CandidatePtrVector &,
33  string_coll const &) const;
35  std::unique_ptr<reco::NamedCompositeCandidateCollection> combine(const reco::CandidatePtrVector &,
37  string_coll const &) const;
39  std::unique_ptr<reco::NamedCompositeCandidateCollection> combine(const reco::CandidatePtrVector &,
42  string_coll const &) const;
44  std::unique_ptr<reco::NamedCompositeCandidateCollection> combine(const reco::CandidatePtrVector &,
48  string_coll const &) const;
49 
50 private:
52  bool preselect(const reco::Candidate &, const reco::Candidate &) const;
55  const reco::CandidatePtr &,
56  const reco::CandidatePtr &,
58  std::string) const;
60  typedef std::vector<
61  std::pair<std::pair<reco::CandidatePtr, size_t>, std::vector<reco::CandidatePtrVector>::const_iterator> >
63  typedef std::vector<int> ChargeStack;
65  void combine(size_t collectionIndex,
66  CandStack &,
67  ChargeStack &,
68  string_coll const &names,
69  std::vector<reco::CandidatePtrVector>::const_iterator begin,
70  std::vector<reco::CandidatePtrVector>::const_iterator end,
71  std::unique_ptr<reco::NamedCompositeCandidateCollection> &comps) const;
73  virtual bool select(const reco::Candidate &) const = 0;
75  virtual bool selectPair(const reco::Candidate &c1, const reco::Candidate &c2) const = 0;
77  virtual void setup(reco::NamedCompositeCandidate &) const = 0;
85  std::vector<int> dauCharge_;
90 };
91 
92 #endif
PA_ZEESkim_cff.checkCharge
checkCharge
Definition: PA_ZEESkim_cff.py:27
OverlapChecker
Definition: OverlapChecker.h:17
NamedCandCombinerBase::CandStack
std::vector< std::pair< std::pair< reco::CandidatePtr, size_t >, std::vector< reco::CandidatePtrVector >::const_iterator > > CandStack
temporary candidate stack
Definition: NamedCandCombinerBase.h:62
NamedCandCombinerBase::dauCharge_
std::vector< int > dauCharge_
electric charges of the daughters
Definition: NamedCandCombinerBase.h:85
NamedCandCombinerBase::select
virtual bool select(const reco::Candidate &) const =0
select a candidate
NamedCompositeCandidate.h
NamedCandCombinerBase::checkOverlap_
bool checkOverlap_
flag to specify the checking of overlaps
Definition: NamedCandCombinerBase.h:83
NamedCandCombinerBase
Definition: NamedCandCombinerBase.h:13
NamedCandCombinerBase::name_
std::string name_
Name.
Definition: NamedCandCombinerBase.h:89
NamedCandCombinerBase::NamedCandCombinerBase
NamedCandCombinerBase(std::string name)
default construct
Definition: NamedCandCombinerBase.cc:6
edm::PtrVector< Candidate >
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:124
mps_fire.end
end
Definition: mps_fire.py:242
reco::NamedCompositeCandidate
Definition: NamedCompositeCandidate.h:21
NamedCandCombinerBase::combine
std::unique_ptr< reco::NamedCompositeCandidateCollection > combine(const std::vector< reco::CandidatePtrVector > &, string_coll const &) const
return all selected candidate pairs
Definition: NamedCandCombinerBase.cc:60
NamedCandCombinerBase::~NamedCandCombinerBase
virtual ~NamedCandCombinerBase()
destructor
Definition: NamedCandCombinerBase.cc:36
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
g4TestGeometry_cfi.checkOverlap
def checkOverlap(process)
Definition: g4TestGeometry_cfi.py:3
alignmentValidation.c1
c1
do drawing
Definition: alignmentValidation.py:1025
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
NamedCandCombinerBase::preselect
bool preselect(const reco::Candidate &, const reco::Candidate &) const
verify that the two candidate don't overlap and check charge
Definition: NamedCandCombinerBase.cc:38
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
edm::Ptr< Candidate >
reco::Candidate
Definition: Candidate.h:27
fileCollector.cmp
cmp
Definition: fileCollector.py:125
NamedCandCombinerBase::checkCharge_
bool checkCharge_
flag to specify the checking of electric charge
Definition: NamedCandCombinerBase.h:81
NamedCandCombinerBase::setup
virtual void setup(reco::NamedCompositeCandidate &) const =0
set kinematics to reconstructed composite
NamedCandCombinerBase::ChargeStack
std::vector< int > ChargeStack
Definition: NamedCandCombinerBase.h:63
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
NamedCandCombinerBase::overlap_
OverlapChecker overlap_
utility to check candidate daughters overlap
Definition: NamedCandCombinerBase.h:87
OverlapChecker.h
NamedCandCombinerBase::selectPair
virtual bool selectPair(const reco::Candidate &c1, const reco::Candidate &c2) const =0
select a candidate pair
NamedCandCombinerBase::addDaughter
virtual void addDaughter(reco::NamedCompositeCandidate &cmp, const reco::CandidatePtr &c, std::string name) const =0
add candidate daughter
NamedCandCombinerBase::string_coll
std::vector< std::string > string_coll
Definition: NamedCandCombinerBase.h:15