57 getTokenTTStubDetSetVec_ = consumes<TTStubDetSetVec>(iConfig.
getParameter<
InputTag>(
"InputTagTTStubDetSetVec"));
58 getTokenTTClusterAssMap_ = consumes<TTClusterAssMap>(iConfig.
getParameter<
InputTag>(
"InputTagTTClusterAssMap"));
59 putTokenReconstructable_ = produces<StubAssociation>(iConfig.
getParameter<
string>(
"BranchReconstructable"));
60 putTokenSelection_ = produces<StubAssociation>(iConfig.
getParameter<
string>(
"BranchSelection"));
62 esGetTokenSetup_ = esConsumes<Setup, SetupRcd>();
70 auto const& ttClusterAssMap =
iEvent.get(getTokenTTClusterAssMap_);
72 map<TPPtr, vector<TTStubRef>> mapTPPtrsTTStubRefs;
73 auto isNonnull = [](
const TPPtr& tpPtr) {
return tpPtr.isNonnull(); };
75 ttModule != handleTTStubDetSetVec->
end();
80 for (
unsigned int iClus = 0; iClus < 2; iClus++) {
81 const vector<TPPtr>& assocPtrs = ttClusterAssMap.findTrackingParticlePtrs(ttStubRef->clusterRef(iClus));
82 copy_if(assocPtrs.begin(), assocPtrs.end(), inserter(tpPtrs, tpPtrs.begin()), isNonnull);
84 for (
const TPPtr& tpPtr : tpPtrs)
85 mapTPPtrsTTStubRefs[tpPtr].push_back(ttStubRef);
91 for (
const auto&
p : mapTPPtrsTTStubRefs) {
92 if (!
setup.useForReconstructable(*
p.first) || !
setup.reconstructable(
p.second))
94 reconstructable.
insert(
p.first,
p.second);
95 if (
setup.useForAlgEff(*
p.first))
T getParameter(std::string const &) const
EDPutTokenT< StubAssociation > putTokenReconstructable_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
data_type const * const_iterator
Class to associate reconstrucable TrackingParticles with TTStubs and vice versa. It may associate mul...
const_iterator end(bool update=false) const
ESGetToken< Setup, SetupRcd > esGetTokenSetup_
Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, det_id_type iDetID, typename HandleT::element_type::value_type::const_iterator itIter)
Class to associate reconstrucable TrackingParticles with TTStubs and vice versa It may associate mult...
#define DEFINE_FWK_MODULE(type)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator begin(bool update=false) const
void insert(const TPPtr &tpPtr, const std::vector< TTStubRef > &ttSTubRefs)
EDGetTokenT< TTStubDetSetVec > getTokenTTStubDetSetVec_
EDGetTokenT< TTClusterAssMap > getTokenTTClusterAssMap_
EDPutTokenT< StubAssociation > putTokenSelection_