85 if (patternFinderAlgorithm ==
"RPixRoadFinder") {
89 <<
"Pattern finder algorithm" << patternFinderAlgorithm <<
" does not exist";
98 if (trackFitterAlgorithm ==
"RPixPlaneCombinatoryTracking") {
102 <<
"Tracking fitter algorithm" << trackFitterAlgorithm <<
" does not exist";
110 produces<edm::DetSetVector<CTPPSPixelLocalTrack>>();
123 ->setComment(
"inputTag of the RecHits input for the tracking algorithm");
124 desc.add<
std::string>(
"patternFinderAlgorithm",
"RPixRoadFinder")->setComment(
"algorithm type for pattern finder");
125 desc.add<
std::string>(
"trackFinderAlgorithm",
"RPixPlaneCombinatoryTracking")
126 ->setComment(
"algorithm type for track finder");
127 desc.add<
uint>(
"trackMinNumberOfPoints", 3)->setComment(
"minimum number of planes to produce a track");
128 desc.addUntracked<
int>(
"verbosity", 0)->setComment(
"verbosity for track producer");
129 desc.add<
double>(
"maximumChi2OverNDF", 5.)->setComment(
"maximum Chi2OverNDF for accepting the track");
130 desc.add<
double>(
"maximumXLocalDistanceFromTrack", 0.2)
131 ->setComment(
"maximum x distance in mm to associate a point not used for fit to the track");
132 desc.add<
double>(
"maximumYLocalDistanceFromTrack", 0.3)
133 ->setComment(
"maximum y distance in mm to associate a point not used for fit to the track");
134 desc.add<
int>(
"maxHitPerPlane", 20)
135 ->setComment(
"maximum hits per plane, events with higher number will not be fitted");
136 desc.add<
int>(
"maxHitPerRomanPot", 60)
137 ->setComment(
"maximum hits per roman pot, events with higher number will not be fitted");
138 desc.add<
int>(
"maxTrackPerRomanPot", 10)
139 ->setComment(
"maximum tracks per roman pot, events with higher track will not be saved");
140 desc.add<
int>(
"maxTrackPerPattern", 5)
141 ->setComment(
"maximum tracks per pattern, events with higher track will not be saved");
142 desc.add<
int>(
"numberOfPlanesPerPot", 6)->setComment(
"number of planes per pot");
143 desc.add<
double>(
"roadRadius", 1.0)->setComment(
"radius of pattern search window");
144 desc.add<
int>(
"minRoadSize", 3)->setComment(
"minimum number of points in a pattern");
145 desc.add<
int>(
"maxRoadSize", 20)->setComment(
"maximum number of points in a pattern");
147 descriptions.
add(
"ctppsPixelLocalTracks",
desc);
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>>
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";