CMS 3D CMS Logo

MassKinFitterCandProducer.cc
Go to the documentation of this file.
1 #include <memory>
2 
8 
10  : srcToken_(consumes<reco::CandidateCollection>(cfg.getParameter<edm::InputTag>("src"))), fitter_(f) {
11  if (f == nullptr)
12  fitter_ = std::make_unique<CandMassKinFitter>(cfg.getParameter<double>("mass"));
13  produces<reco::CandidateCollection>();
14 }
15 
17  using namespace edm;
18  using namespace reco;
21  auto refitted = std::make_unique<CandidateCollection>();
22  for (CandidateCollection::const_iterator c = cands->begin(); c != cands->end(); ++c) {
23  Candidate* clone = c->clone();
24  fitter_->set(*clone);
25  refitted->push_back(clone);
26  }
27  evt.put(std::move(refitted));
28 }
Handle.h
ESHandle.h
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
edm::Handle
Definition: AssociativeIterator.h:50
CandMassKinFitter
Definition: CandMassKinFitter.h:6
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
MassKinFitterCandProducer.h
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
HLT_FULL_cff.cands
cands
Definition: HLT_FULL_cff.py:15161
MassKinFitterCandProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: MassKinFitterCandProducer.cc:16
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
MassKinFitterCandProducer::fitter_
std::unique_ptr< CandMassKinFitter > fitter_
Definition: MassKinFitterCandProducer.h:20
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
edm::EventSetup
Definition: EventSetup.h:58
looper.cfg
cfg
Definition: looper.py:296
reco::Candidate
Definition: Candidate.h:27
eostools.move
def move(src, dest)
Definition: eostools.py:511
reco::CandidateCollection
edm::OwnVector< Candidate > CandidateCollection
collection of Candidate objects
Definition: CandidateFwd.h:21
ParameterSet.h
MassKinFitterCandProducer::srcToken_
edm::EDGetTokenT< reco::CandidateCollection > srcToken_
Definition: MassKinFitterCandProducer.h:19
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
MassKinFitterCandProducer::MassKinFitterCandProducer
MassKinFitterCandProducer(const edm::ParameterSet &, CandMassKinFitter *=nullptr)
Definition: MassKinFitterCandProducer.cc:9
edm::Event
Definition: Event.h:73