17 auto ttClusterDSVForOutput = std::make_unique<edmNew::DetSetVector<TTCluster<Ref_Phase2TrackerDigi_>>>();
18 std::map< DetId, std::vector< Ref_Phase2TrackerDigi_ > > rawHits;
19 this->RetrieveRawHits( rawHits, iEvent );
31 for (
auto gd=theTrackerGeom->
dets().begin(); gd != theTrackerGeom->
dets().end(); gd++) {
32 DetId detid = (*gd)->geographicalId();
34 if(!tTopo->
isLower(detid) )
continue;
35 DetId lowerDetid = detid;
40 std::vector< std::vector< Ref_Phase2TrackerDigi_ > > lowerHits, upperHits;
43 typename std::map< DetId, std::vector< Ref_Phase2TrackerDigi_ > >::const_iterator lowerHitFind = rawHits.find(lowerDetid);
44 typename std::map< DetId, std::vector< Ref_Phase2TrackerDigi_ > >::const_iterator upperHitFind = rawHits.find(upperDetid);
50 if ( lowerHitFind != rawHits.end() ) theClusterFindingAlgoHandle->Cluster( lowerHits, lowerHitFind->second, isPSP );
51 if ( upperHitFind != rawHits.end() ) theClusterFindingAlgoHandle->Cluster( upperHits, upperHitFind->second,
false );
57 for (
unsigned int i = 0;
i < lowerHits.size();
i++ )
62 if ( lowerOutputFiller.
empty() )
63 lowerOutputFiller.abort();
67 for (
unsigned int i = 0;
i < upperHits.size();
i++ )
72 if ( upperOutputFiller.
empty() )
73 upperOutputFiller.abort();
78 iEvent.
put(
std::move(ttClusterDSVForOutput),
"ClusterInclusive" );
88 std::vector< edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > >::iterator it;
89 for ( it = rawHitTokens.begin(); it != rawHitTokens.end(); ++it ) {
98 for ( detsIter = HitHandle->begin(); detsIter != HitHandle->end(); detsIter++ ) {
99 DetId id = detsIter->id;
100 for ( hitsIter = detsIter->data.
begin(); hitsIter != detsIter->data.
end(); hitsIter++ ) {
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Item & push_back(id_type iid)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void RetrieveRawHits(std::map< DetId, std::vector< T > > &mRawHits, const edm::Event &iEvent)
Get hits.
DetId partnerDetId(const DetId &id) const
bool isLower(const DetId &id) const
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
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)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
ModuleType getDetectorType(DetId) const
iterator end()
Return the off-the-end iterator.
NOTE: this is needed even if it seems not.
iterator begin()
Return an iterator to the first DetSet.
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
T const * product() const