1 #ifndef RecoAlgos_ConstrainedFitCandProducer_h 2 #define RecoAlgos_ConstrainedFitCandProducer_h 43 template<
typename Fitter,
typename InputCollection,
typename OutputCollection,
typename Init>
48 produces<OutputCollection>();
51 std::vector<std::string> vBoolParams = cfg.template getParameterNamesForType<bool>();
52 bool found =
find(vBoolParams.begin(), vBoolParams.end(), setLongLived) != vBoolParams.end();
53 if(found)
setLongLived_ = cfg.template getParameter<bool>(
"setLongLived");
54 const std::string setMassConstraint(
"setMassConstraint");
55 found =
find(vBoolParams.begin(), vBoolParams.end(), setMassConstraint) != vBoolParams.end();
59 found =
find(vIntParams.begin(), vIntParams.end(), setPdgId) != vIntParams.end();
67 static void add(
C*
c, std::unique_ptr<reco::VertexCompositeCandidate>
t) { c->push_back(*t); }
76 inline void add(
C*
c, std::unique_ptr<reco::VertexCompositeCandidate>
t) {
82 template<
typename Fitter,
typename InputCollection,
typename OutputCollection,
typename Init>
87 auto fitted = std::make_unique<OutputCollection>();
88 fitted->reserve(cands->size());
89 for(
typename InputCollection::const_iterator
c = cands->begin();
c != cands->end(); ++
c) {
90 auto clone = std::make_unique<reco::VertexCompositeCandidate>(*c);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void produce(edm::Event &, const edm::EventSetup &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< InputCollection > srcToken_
S make(const edm::ParameterSet &cfg)
static void add(edm::OwnVector< T > *c, std::unique_ptr< reco::VertexCompositeCandidate > t)
void add(C *c, std::unique_ptr< reco::VertexCompositeCandidate > t)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
static void add(C *c, std::unique_ptr< reco::VertexCompositeCandidate > t)
def template(fileName, svg, replaceme="REPLACEME")
ConstrainedFitCandProducer(const edm::ParameterSet &)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
edm::OwnVector< Candidate > CandidateCollection
collection of Candidate objects