CMS 3D CMS Logo

CandDecaySelector.h
Go to the documentation of this file.
1 #ifndef CandAlgos_CandDecaySelector_h
2 #define CandAlgos_CandDecaySelector_h
3 /* \class helper::CandDecayStoreManager
4  *
5  * \author: Luca Lista, INFN
6  *
7  */
10 
11 namespace helper {
13  public:
16  template <typename I>
17  void cloneAndStore(const I& begin, const I& end, edm::Event& evt) {
18  using namespace reco;
20  for (I i = begin; i != end; ++i)
21  add(cands, **i);
22  }
24  size_t size() const { return selCands_->size(); }
25 
26  private:
28  using namespace reco;
29  using namespace std;
30  auto cmp = std::make_unique<CompositeRefCandidate>(c);
31  CompositeRefCandidate* p = cmp.get();
32  CandidateRef ref(cands, selCands_->size());
33  selCands_->push_back(std::move(cmp));
34  size_t n = c.numberOfDaughters();
35  for (size_t i = 0; i < n; ++i)
36  p->addDaughter(add(cands, *c.daughter(i)));
37  return ref;
38  }
39  std::unique_ptr<reco::CandidateCollection> selCands_;
40  };
41 
42  template <typename EdmFilter>
46  };
47 
48 } // namespace helper
49 
50 #endif
edm::RefProd
Definition: EDProductfwd.h:25
edm::Event::getRefBeforePut
RefProd< PROD > getRefBeforePut()
Definition: Event.h:158
ObjectSelector.h
helper::StoreManagerTrait< reco::CandidateCollection, EdmFilter >::type
CandDecayStoreManager type
Definition: CandDecaySelector.h:44
mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
helper::CandDecayStoreManager::CandDecayStoreManager
CandDecayStoreManager(const edm::Handle< reco::CandidateCollection > &)
Definition: CandDecaySelector.h:15
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Handle
Definition: AssociativeIterator.h:50
helper::StoreManagerTrait
Definition: StoreManagerTrait.h:91
edm::Ref
Definition: AssociativeIterator.h:58
reco::CompositeRefCandidate
Definition: CompositeRefCandidate.h:17
Exhume::I
const std::complex< double > I
Definition: I.h:8
helper::CandDecayStoreManager::size
size_t size() const
Definition: CandDecaySelector.h:24
mps_fire.end
end
Definition: mps_fire.py:242
helper::CandDecayStoreManager::add
reco::CandidateRef add(reco::CandidateRefProd cands, const reco::Candidate &c)
Definition: CandDecaySelector.h:27
helper::ObjectSelectorBase
Definition: StoreManagerTrait.h:86
helper::StoreManagerTrait< reco::CandidateCollection, EdmFilter >::base
ObjectSelectorBase< reco::CandidateCollection, EdmFilter > base
Definition: CandDecaySelector.h:45
HLT_FULL_cff.cands
cands
Definition: HLT_FULL_cff.py:15144
helper::CandDecayStoreManager::selCands_
std::unique_ptr< reco::CandidateCollection > selCands_
Definition: CandDecaySelector.h:39
helper
Definition: helper.py:1
helper::CandDecayStoreManager::put
edm::OrphanHandle< reco::CandidateCollection > put(edm::Event &evt)
Definition: CandDecaySelector.h:23
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
helper::CandDecayStoreManager::cloneAndStore
void cloneAndStore(const I &begin, const I &end, edm::Event &evt)
Definition: CandDecaySelector.h:17
reco::Candidate
Definition: Candidate.h:27
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
edm::OrphanHandle
Definition: EDProductfwd.h:39
fileCollector.cmp
cmp
Definition: fileCollector.py:125
reco::CandidateCollection
edm::OwnVector< Candidate > CandidateCollection
collection of Candidate objects
Definition: CandidateFwd.h:21
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::Event
Definition: Event.h:73
CompositeRefCandidate.h
helper::CandDecayStoreManager::collection
reco::CandidateCollection collection
Definition: CandDecaySelector.h:14
edm::OwnVector
Definition: OwnVector.h:24
helper::CandDecayStoreManager
Definition: CandDecaySelector.h:12