16 auto ttClusterDSVForOutput = std::make_unique<edmNew::DetSetVector<TTCluster<Ref_Phase2TrackerDigi_>>>();
17 std::map<DetId, std::vector<Ref_Phase2TrackerDigi_>>
rawHits;
23 auto const& theClusterFindingAlgo = iSetup.
getData(theClusterFindingAlgoToken);
26 for (
auto gd = theTrackerGeom->
dets().begin(); gd != theTrackerGeom->
dets().end(); gd++) {
28 if (
detid.subdetId() == 1 ||
detid.subdetId() == 2)
37 std::vector<std::vector<Ref_Phase2TrackerDigi_>> lowerHits, upperHits;
40 typename std::map<DetId, std::vector<Ref_Phase2TrackerDigi_>>::const_iterator lowerHitFind =
42 typename std::map<DetId, std::vector<Ref_Phase2TrackerDigi_>>::const_iterator upperHitFind =
49 if (lowerHitFind !=
rawHits.end())
50 theClusterFindingAlgo.Cluster(lowerHits, lowerHitFind->second, isPSP);
51 if (upperHitFind !=
rawHits.end())
52 theClusterFindingAlgo.Cluster(upperHits, upperHitFind->second,
false);
59 for (
unsigned int i = 0;
i < lowerHits.size();
i++) {
63 if (lowerOutputFiller.
empty())
64 lowerOutputFiller.abort();
69 for (
unsigned int i = 0;
i < upperHits.size();
i++) {
73 if (upperOutputFiller.
empty())
74 upperOutputFiller.abort();
88 std::vector<edm::EDGetTokenT<edm::DetSetVector<Phase2TrackerDigi>>>::iterator
it;
89 for (
it = rawHitTokens.begin();
it != rawHitTokens.end(); ++
it) {
97 for (detsIter = HitHandle->begin(); detsIter != HitHandle->end(); detsIter++) {
98 DetId id = detsIter->id;
99 for (hitsIter = detsIter->data.
begin(); hitsIter != detsIter->data.
end(); hitsIter++) {
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Item & push_back(id_type iid)
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
void RetrieveRawHits(std::map< DetId, std::vector< T > > &mRawHits, const edm::Event &iEvent)
Get hits.
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)
ModuleType getDetectorType(DetId) const
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Mandatory methods.
DetId partnerDetId(const DetId &id) const
iterator end()
Return the off-the-end iterator.
bool isLower(const DetId &id) const
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