160 std::vector<CTPPSPixelDetId> listOfPotWithHighOccupancyPlanes;
161 std::map<CTPPSPixelDetId, uint32_t> mapHitPerPot;
163 for (
const auto &recHitSet : recHitVector) {
166 <<
"Hits found in plane = " << recHitSet.detId() <<
" number = " << recHitSet.size();
168 uint32_t hitOnPlane = recHitSet.size();
171 if (mapHitPerPot.find(tmpRomanPotId) == mapHitPerPot.end()) {
172 mapHitPerPot[tmpRomanPotId] = hitOnPlane;
174 mapHitPerPot[tmpRomanPotId] += hitOnPlane;
180 <<
" ---> To many hits in the plane, pot will be excluded from tracking cleared";
181 listOfPotWithHighOccupancyPlanes.push_back(tmpRomanPotId);
186 for (
const auto &recHitSet : recHitVector) {
188 const auto tmpRomanPotId = tmpDetectorId.
rpId();
191 find(listOfPotWithHighOccupancyPlanes.begin(), listOfPotWithHighOccupancyPlanes.end(), tmpRomanPotId) !=
192 listOfPotWithHighOccupancyPlanes.end()) {
206 std::vector<RPixDetPatternFinder::Road> patternVector =
patternFinder_->getPatterns();
209 int numberOfTracks = 0;
211 for (
const auto &
pattern : patternVector) {
215 std::map<CTPPSPixelDetId, std::vector<RPixDetPatternFinder::PointInPlane>>
223 if (tmpRomanPotId != romanPotId) {
225 <<
"Hits in the pattern must belong to the same tracking station";
228 if (hitOnPlaneMap.find(hitDetId) ==
229 hitOnPlaneMap.end()) {
230 std::vector<RPixDetPatternFinder::PointInPlane> hitOnPlane;
231 hitOnPlane.push_back(
hit);
232 hitOnPlaneMap[hitDetId] = hitOnPlane;
234 hitOnPlaneMap[hitDetId].push_back(
hit);
243 std::vector<CTPPSPixelLocalTrack> tmpTracksVector =
trackFinder_->getLocalTracks();
246 edm::LogInfo(
"CTPPSPixelLocalTrackProducer") <<
"tmpTracksVector = " << tmpTracksVector.size();
249 edm::LogInfo(
"CTPPSPixelLocalTrackProducer") <<
" ---> To many tracks in the pattern, cleared";
253 for (
const auto &
track : tmpTracksVector) {
261 edm::LogInfo(
"CTPPSPixelLocalTrackProducer") <<
"Number of tracks will be saved = " << numberOfTracks;
263 for (
const auto &
track : foundTracks) {
266 <<
"Track found in detId = " <<
track.detId() <<
" number = " <<
track.size();
269 edm::LogInfo(
"CTPPSPixelLocalTrackProducer") <<
" ---> Too many tracks in the pot, cleared";
edm::ESWatcher< VeryForwardRealGeometryRecord > geometryWatcher_
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)
Event setup record containing the real (actual) geometry information.
reference find_or_insert(det_id_type id)
CLHEP::Hep3Vector rpTranslation(unsigned int id) const
std::unique_ptr< RPixDetTrackFinder > trackFinder_
The manager class for TOTEM RP geometry.
edm::EDGetTokenT< edm::DetSetVector< CTPPSPixelRecHit > > tokenCTPPSPixelRecHit_
bool check(const edm::EventSetup &iSetup)
std::unique_ptr< RPixDetPatternFinder > patternFinder_