CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MassKinFitterCandProducer.cc
Go to the documentation of this file.
7 
9  src_(cfg.getParameter<edm::InputTag>("src")),
10  fitter_(f) {
11  if(f == 0) fitter_.reset(new CandMassKinFitter(cfg.getParameter<double>("mass")));
12  produces<reco::CandidateCollection>();
13 }
14 
16  using namespace edm;
17  using namespace reco;
19  evt.getByLabel(src_, cands);
20  std::auto_ptr<CandidateCollection> refitted( new CandidateCollection );
21  for( CandidateCollection::const_iterator c = cands->begin(); c != cands->end(); ++ c ) {
22  Candidate * clone = c->clone();
23  fitter_->set( * clone );
24  refitted->push_back( clone );
25  }
26  evt.put( refitted );
27 }
28 
T getParameter(std::string const &) const
void produce(edm::Event &, const edm::EventSetup &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
double f[11][100]
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
std::auto_ptr< CandMassKinFitter > fitter_
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
MassKinFitterCandProducer(const edm::ParameterSet &, CandMassKinFitter *=0)