164 std::vector<CTPPSPixelDetId> listOfPotWithHighOccupancyPlanes;
165 std::map<CTPPSPixelDetId, uint32_t> mapHitPerPot;
167 for (
const auto &recHitSet : recHitVector) {
170 <<
"Hits found in plane = " << recHitSet.detId() <<
" number = " << recHitSet.size();
172 uint32_t hitOnPlane = recHitSet.size();
175 if (mapHitPerPot.find(tmpRomanPotId) == mapHitPerPot.end()) {
176 mapHitPerPot[tmpRomanPotId] = hitOnPlane;
178 mapHitPerPot[tmpRomanPotId] += hitOnPlane;
184 <<
" ---> To many hits in the plane, pot will be excluded from tracking cleared";
185 listOfPotWithHighOccupancyPlanes.push_back(tmpRomanPotId);
190 for (
const auto &recHitSet : recHitVector) {
192 const auto tmpRomanPotId = tmpDetectorId.
rpId();
195 find(listOfPotWithHighOccupancyPlanes.begin(), listOfPotWithHighOccupancyPlanes.end(), tmpRomanPotId) !=
196 listOfPotWithHighOccupancyPlanes.end()) {
210 std::vector<RPixDetPatternFinder::Road> patternVector =
patternFinder_->getPatterns();
213 int numberOfTracks = 0;
215 for (
const auto &pattern : patternVector) {
219 std::map<CTPPSPixelDetId, std::vector<RPixDetPatternFinder::PointInPlane>>
223 for (
const auto &
hit : pattern) {
227 if (tmpRomanPotId != romanPotId) {
229 <<
"Hits in the pattern must belong to the same tracking station";
232 if (hitOnPlaneMap.find(hitDetId) ==
233 hitOnPlaneMap.end()) {
234 std::vector<RPixDetPatternFinder::PointInPlane> hitOnPlane;
235 hitOnPlane.push_back(
hit);
236 hitOnPlaneMap[hitDetId] = hitOnPlane;
238 hitOnPlaneMap[hitDetId].push_back(
hit);
247 std::vector<CTPPSPixelLocalTrack> tmpTracksVector =
trackFinder_->getLocalTracks();
250 edm::LogInfo(
"CTPPSPixelLocalTrackProducer") <<
"tmpTracksVector = " << tmpTracksVector.size();
253 edm::LogInfo(
"CTPPSPixelLocalTrackProducer") <<
" ---> To many tracks in the pattern, cleared";
257 for (
const auto &
track : tmpTracksVector) {
265 edm::LogInfo(
"CTPPSPixelLocalTrackProducer") <<
"Number of tracks will be saved = " << numberOfTracks;
267 for (
const auto &
track : foundTracks) {
270 <<
"Track found in detId = " <<
track.detId() <<
" number = " <<
track.size();
273 edm::LogInfo(
"CTPPSPixelLocalTrackProducer") <<
" ---> Too many tracks in the pot, cleared";
edm::ESWatcher< VeryForwardRealGeometryRecord > geometryWatcher_
edm::ESGetToken< CTPPSGeometry, VeryForwardRealGeometryRecord > tokenCTPPSGeometry_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void push_back(const T &t)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Run const & getRun() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
reference find_or_insert(det_id_type id)
std::unique_ptr< RPixDetTrackFinder > trackFinder_
The manager class for TOTEM RP geometry.
Log< level::Info, false > LogInfo
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelRecHit > > tokenCTPPSPixelRecHit_
bool check(const edm::EventSetup &iSetup)
std::unique_ptr< RPixDetPatternFinder > patternFinder_
Vector rpTranslation(unsigned int id) const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const