CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes
RPixPlaneCombinatoryTracking Class Reference

#include <RPixPlaneCombinatoryTracking.h>

Inheritance diagram for RPixPlaneCombinatoryTracking:
RPixDetTrackFinder

Public Member Functions

void findTracks (int run) override
 
void initialize () override
 
 RPixPlaneCombinatoryTracking (edm::ParameterSet const &parameterSet)
 
 ~RPixPlaneCombinatoryTracking () override
 
- Public Member Functions inherited from RPixDetTrackFinder
void clear ()
 
const std::vector< CTPPSPixelLocalTrack > & getLocalTracks () const
 
 RPixDetTrackFinder (edm::ParameterSet const &parameterSet)
 
void setGeometry (const CTPPSGeometry *geometry)
 
void setHits (std::map< CTPPSPixelDetId, std::vector< RPixDetPatternFinder::PointInPlane > > *hitMap)
 
void setListOfPlanes (std::vector< uint32_t > listOfAllPlanes)
 
void setRomanPotId (CTPPSPixelDetId rpId)
 
void setZ0 (double z0)
 
virtual ~RPixDetTrackFinder ()
 

Private Types

typedef std::map< CTPPSPixelDetId, size_t > HitReferences
 
typedef std::vector< std::vector< uint32_t > > PlaneCombinations
 
typedef std::map< HitReferences, PointInPlaneListPointAndReferenceMap
 
typedef std::pair< HitReferences, PointInPlaneListPointAndReferencePair
 
typedef std::vector< RPixDetPatternFinder::PointInPlanePointInPlaneList
 

Private Member Functions

bool calculatePointOnDetector (CTPPSPixelLocalTrack *track, CTPPSPixelDetId planeId, GlobalPoint &planeLineIntercept)
 
uint32_t factorial (uint32_t x) const
 
CTPPSPixelLocalTrack fitTrack (PointInPlaneList pointList)
 
void getHitCombinations (const std::map< CTPPSPixelDetId, PointInPlaneList > &mapOfAllHits, std::map< CTPPSPixelDetId, PointInPlaneList >::iterator mapIterator, HitReferences tmpHitPlaneMap, const PointInPlaneList &tmpHitVector, PointAndReferenceMap &outputMap)
 
void getPlaneCombinations (const std::vector< uint32_t > &inputPlaneList, uint32_t numberToExtract, PlaneCombinations &planeCombinations) const
 
std::vector< PointAndReferencePairorderCombinationsPerNumberOrPoints (PointAndReferenceMap inputMap)
 
PointAndReferenceMap produceAllHitCombination (PlaneCombinations inputPlaneCombination)
 

Static Private Member Functions

static bool functionForPlaneOrdering (PointAndReferencePair a, PointAndReferencePair b)
 

Private Attributes

double maximumChi2OverNDF_
 
double maximumXLocalDistanceFromTrack_
 
double maximumYLocalDistanceFromTrack_
 
PlaneCombinations possiblePlaneCombinations_
 
uint32_t trackMinNumberOfPoints_
 
int verbosity_
 

Additional Inherited Members

- Protected Attributes inherited from RPixDetTrackFinder
const CTPPSGeometrygeometry_
 
std::map< CTPPSPixelDetId, std::vector< RPixDetPatternFinder::PointInPlane > > * hitMap_
 
std::vector< uint32_t > listOfAllPlanes_
 
std::vector< CTPPSPixelLocalTracklocalTrackVector_
 
uint32_t numberOfPlanesPerPot_
 
CTPPSPixelDetId romanPotId_
 
double z0_
 

Detailed Description

Definition at line 24 of file RPixPlaneCombinatoryTracking.h.

Member Typedef Documentation

◆ HitReferences

Definition at line 34 of file RPixPlaneCombinatoryTracking.h.

◆ PlaneCombinations

typedef std::vector<std::vector<uint32_t> > RPixPlaneCombinatoryTracking::PlaneCombinations
private

Definition at line 32 of file RPixPlaneCombinatoryTracking.h.

◆ PointAndReferenceMap

Definition at line 35 of file RPixPlaneCombinatoryTracking.h.

◆ PointAndReferencePair

Definition at line 36 of file RPixPlaneCombinatoryTracking.h.

◆ PointInPlaneList

Definition at line 33 of file RPixPlaneCombinatoryTracking.h.

Constructor & Destructor Documentation

◆ RPixPlaneCombinatoryTracking()

RPixPlaneCombinatoryTracking::RPixPlaneCombinatoryTracking ( edm::ParameterSet const &  parameterSet)

Definition at line 16 of file RPixPlaneCombinatoryTracking.cc.

18  trackMinNumberOfPoints_ = parameterSet.getParameter<uint>("trackMinNumberOfPoints");
19  verbosity_ = parameterSet.getUntrackedParameter<int>("verbosity");
20  maximumChi2OverNDF_ = parameterSet.getParameter<double>("maximumChi2OverNDF");
21  maximumXLocalDistanceFromTrack_ = parameterSet.getParameter<double>("maximumXLocalDistanceFromTrack");
22  maximumYLocalDistanceFromTrack_ = parameterSet.getParameter<double>("maximumYLocalDistanceFromTrack");
23  numberOfPlanesPerPot_ = parameterSet.getParameter<int>("numberOfPlanesPerPot");
24 
25  if (trackMinNumberOfPoints_ < 3) {
26  throw cms::Exception("RPixPlaneCombinatoryTracking")
27  << "Minimum number of planes required for tracking is 3, "
28  << "tracking is not possible with " << trackMinNumberOfPoints_ << " hits";
29  }
30 }

References Exception, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), maximumChi2OverNDF_, maximumXLocalDistanceFromTrack_, maximumYLocalDistanceFromTrack_, RPixDetTrackFinder::numberOfPlanesPerPot_, edm::parameterSet(), trackMinNumberOfPoints_, parallelization::uint, and verbosity_.

◆ ~RPixPlaneCombinatoryTracking()

RPixPlaneCombinatoryTracking::~RPixPlaneCombinatoryTracking ( )
override

Definition at line 34 of file RPixPlaneCombinatoryTracking.cc.

34 { possiblePlaneCombinations_.clear(); }

References possiblePlaneCombinations_.

Member Function Documentation

◆ calculatePointOnDetector()

bool RPixPlaneCombinatoryTracking::calculatePointOnDetector ( CTPPSPixelLocalTrack track,
CTPPSPixelDetId  planeId,
GlobalPoint planeLineIntercept 
)
private

Definition at line 594 of file RPixPlaneCombinatoryTracking.cc.

596  {
597  double z0 = track->z0();
599 
600  math::Vector<3>::type pointOnLine(parameters[0], parameters[1], z0);
601  GlobalVector tmpLineUnitVector = track->directionVector();
602  math::Vector<3>::type lineUnitVector(tmpLineUnitVector.x(), tmpLineUnitVector.y(), tmpLineUnitVector.z());
603 
604  const CTPPSGeometry::Vector tmpPointLocal(0., 0., 0.);
605  const auto &tmpPointOnPlane = geometry_->localToGlobal(planeId, tmpPointLocal);
606 
607  math::Vector<3>::type pointOnPlane(tmpPointOnPlane.x(), tmpPointOnPlane.y(), tmpPointOnPlane.z());
608  math::Vector<3>::type planeUnitVector(0., 0., 1.);
609 
610  DetGeomDesc::RotationMatrix theRotationMatrix = geometry_->sensor(planeId)->rotation();
611  AlgebraicMatrix33 tmpPlaneRotationMatrixMap;
612  theRotationMatrix.GetComponents(tmpPlaneRotationMatrixMap(0, 0),
613  tmpPlaneRotationMatrixMap(0, 1),
614  tmpPlaneRotationMatrixMap(0, 2),
615  tmpPlaneRotationMatrixMap(1, 0),
616  tmpPlaneRotationMatrixMap(1, 1),
617  tmpPlaneRotationMatrixMap(1, 2),
618  tmpPlaneRotationMatrixMap(2, 0),
619  tmpPlaneRotationMatrixMap(2, 1),
620  tmpPlaneRotationMatrixMap(2, 2));
621 
622  planeUnitVector = tmpPlaneRotationMatrixMap * planeUnitVector;
623 
624  double denominator = ROOT::Math::Dot(lineUnitVector, planeUnitVector);
625  if (denominator == 0) {
626  edm::LogError("RPixPlaneCombinatoryTracking")
627  << "Error in RPixPlaneCombinatoryTracking::calculatePointOnDetector -> "
628  << "Fitted line and plane are parallel. Removing this track";
629  return false;
630  }
631 
632  double distanceFromLinePoint = ROOT::Math::Dot((pointOnPlane - pointOnLine), planeUnitVector) / denominator;
633 
634  math::Vector<3>::type tmpPlaneLineIntercept = distanceFromLinePoint * lineUnitVector + pointOnLine;
635  planeLineIntercept = GlobalPoint(tmpPlaneLineIntercept[0], tmpPlaneLineIntercept[1], tmpPlaneLineIntercept[2]);
636 
637  return true;
638 }

References HLTTauDQMOffline_cfi::denominator, RPixDetTrackFinder::geometry_, CTPPSGeometry::localToGlobal(), DetGeomDesc::rotation(), CTPPSGeometry::sensor(), HLT_2018_cff::track, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::z(), and HLTMuonOfflineAnalyzer_cfi::z0.

Referenced by findTracks(), and fitTrack().

◆ factorial()

uint32_t RPixPlaneCombinatoryTracking::factorial ( uint32_t  x) const
inlineprivate

Definition at line 61 of file RPixPlaneCombinatoryTracking.h.

61  {
62  if (x == 0)
63  return 1;
64  return (x == 1 ? x : x * factorial(x - 1));
65  }

References x.

Referenced by initialize().

◆ findTracks()

void RPixPlaneCombinatoryTracking::findTracks ( int  run)
overridevirtual

Implements RPixDetTrackFinder.

Definition at line 160 of file RPixPlaneCombinatoryTracking.cc.

160  {
161  //The loop search for all the possible tracks starting from the one with the smallest chiSquare/NDF
162  //The loop stops when the number of planes with recorded hits is less than the minimum number of planes required
163  //or if the track with minimum chiSquare found has a chiSquare higher than the maximum required
164 
165  while (hitMap_->size() >= trackMinNumberOfPoints_) {
166  if (verbosity_ >= 1)
167  edm::LogInfo("RPixPlaneCombinatoryTracking") << "Number of plane with hits " << hitMap_->size();
168  if (verbosity_ >= 2)
169  for (const auto &plane : *hitMap_)
170  edm::LogInfo("RPixPlaneCombinatoryTracking")
171  << "\tarm " << plane.first.arm() << " station " << plane.first.station() << " rp " << plane.first.rp()
172  << " plane " << plane.first.plane() << " : " << plane.second.size();
173 
174  //I create the map of all the possible combinations of a group of trackMinNumberOfPoints_ points
175  //and the key keeps the reference of which planes and which hit numbers form the combination
176  PointAndReferenceMap mapOfAllMinRequiredPoint;
177  //I produce the map for all cominations of all hits with all trackMinNumberOfPoints_ plane combinations
178  mapOfAllMinRequiredPoint = produceAllHitCombination(possiblePlaneCombinations_);
179 
180  //Fit all the possible combinations with minimum number of planes required and find the track with minimum chi2
181  double theMinChiSquaredOverNDF = maximumChi2OverNDF_ + 1.; //in order to break the loop in case no track is found;
182  HitReferences pointMapWithMinChiSquared;
183  PointInPlaneList pointsWithMinChiSquared;
184  CTPPSPixelLocalTrack bestTrack;
185 
186  if (verbosity_ >= 2)
187  edm::LogInfo("RPixPlaneCombinatoryTracking")
188  << "Number of combinations of trackMinNumberOfPoints_ planes " << mapOfAllMinRequiredPoint.size();
189  for (const auto &pointsAndRef : mapOfAllMinRequiredPoint) {
190  CTPPSPixelLocalTrack tmpTrack = fitTrack(pointsAndRef.second);
191  double tmpChiSquaredOverNDF = tmpTrack.chiSquaredOverNDF();
192  if (verbosity_ >= 2)
193  edm::LogInfo("RPixPlaneCombinatoryTracking") << "ChiSquare of the present track " << tmpChiSquaredOverNDF;
194  if (!tmpTrack.isValid() || tmpChiSquaredOverNDF > maximumChi2OverNDF_ || tmpChiSquaredOverNDF == 0.)
195  continue; //validity check
196  if (tmpChiSquaredOverNDF < theMinChiSquaredOverNDF) {
197  theMinChiSquaredOverNDF = tmpChiSquaredOverNDF;
198  pointMapWithMinChiSquared = pointsAndRef.first;
199  pointsWithMinChiSquared = pointsAndRef.second;
200  bestTrack = tmpTrack;
201  }
202  }
203 
204  //The loop on the fit of all tracks is done, the track with minimum chiSquared is found
205  // and it is verified that it complies with the maximumChi2OverNDF_ requirement
206  if (theMinChiSquaredOverNDF > maximumChi2OverNDF_)
207  break;
208 
209  //The list of planes not included in the minimum chiSquare track is produced.
210  std::vector<uint32_t> listOfExcludedPlanes;
211  for (const auto &plane : listOfAllPlanes_) {
212  CTPPSPixelDetId tmpRpId = romanPotId_; //in order to avoid to modify the data member
213  tmpRpId.setPlane(plane);
214  CTPPSPixelDetId planeDetId = tmpRpId;
215  if (pointMapWithMinChiSquared.find(planeDetId) == pointMapWithMinChiSquared.end())
216  listOfExcludedPlanes.push_back(plane);
217  }
218 
219  //I produce all the possible combinations of planes to be added to the track,
220  //excluding the case of no other plane added since it has been already fitted.
221  PlaneCombinations planePointedHitListCombination;
222  for (uint32_t i = 1; i <= listOfExcludedPlanes.size(); ++i) {
223  PlaneCombinations tmpPlaneCombination;
224  getPlaneCombinations(listOfExcludedPlanes, i, tmpPlaneCombination);
225  for (const auto &combination : tmpPlaneCombination)
226  planePointedHitListCombination.push_back(combination);
227  }
228 
229  //I produce all the possible combinations of points to be added to the track
230  PointAndReferenceMap mapOfAllPointWithAtLeastBestFitSelected;
231  PointAndReferenceMap mapOfPointCombinationToBeAdded;
232  mapOfPointCombinationToBeAdded = produceAllHitCombination(planePointedHitListCombination);
233  //The found hit combination is added to the hits selected by the best fit;
234  for (const auto &element : mapOfPointCombinationToBeAdded) {
235  HitReferences newPointMap = pointMapWithMinChiSquared;
236  PointInPlaneList newPoints = pointsWithMinChiSquared;
237  for (const auto &pointRef : element.first)
238  newPointMap[pointRef.first] = pointRef.second; //add the new point reference
239  for (const auto &point : element.second)
240  newPoints.push_back(point);
241  mapOfAllPointWithAtLeastBestFitSelected[newPointMap] = newPoints;
242  }
243 
244  //I fit all the possible combination of the minimum plane best fit hits plus hits from the other planes
245  if (verbosity_ >= 1)
246  edm::LogInfo("RPixPlaneCombinatoryTracking")
247  << "Minimum chiSquare over NDF for all the tracks " << theMinChiSquaredOverNDF;
248 
249  // I look for the tracks with maximum number of points with a chiSquare over NDF smaller than maximumChi2OverNDF_
250  // If more than one track fulfill the chiSquare requirement with the same number of points I choose the one with smaller chiSquare
251  std::vector<PointAndReferencePair> orderedVectorOfAllPointWithAtLeastBestFitSelected =
252  orderCombinationsPerNumberOrPoints(mapOfAllPointWithAtLeastBestFitSelected);
253  int currentNumberOfPlanes = 0;
254  theMinChiSquaredOverNDF = maximumChi2OverNDF_ + 1.; //in order to break the loop in case no track is found;
255  bool foundTrackWithCurrentNumberOfPlanes = false;
256  for (const auto &pointsAndRef : orderedVectorOfAllPointWithAtLeastBestFitSelected) {
257  int tmpNumberOfPlanes = pointsAndRef.second.size();
258  // If a valid track has been already found with an higher number of planes the loop stops.
259  if (foundTrackWithCurrentNumberOfPlanes && tmpNumberOfPlanes < currentNumberOfPlanes)
260  break;
261  CTPPSPixelLocalTrack tmpTrack = fitTrack(pointsAndRef.second);
262  double tmpChiSquaredOverNDF = tmpTrack.chiSquaredOverNDF();
263  if (!tmpTrack.isValid() || tmpChiSquaredOverNDF > maximumChi2OverNDF_ || tmpChiSquaredOverNDF == 0.)
264  continue; //validity check
265  if (tmpChiSquaredOverNDF < theMinChiSquaredOverNDF) {
266  theMinChiSquaredOverNDF = tmpChiSquaredOverNDF;
267  pointMapWithMinChiSquared = pointsAndRef.first;
268  bestTrack = tmpTrack;
269  currentNumberOfPlanes = tmpNumberOfPlanes;
270  foundTrackWithCurrentNumberOfPlanes = true;
271  }
272  }
273 
274  if (verbosity_ >= 1)
275  edm::LogInfo("RPixPlaneCombinatoryTracking") << "The best track has " << bestTrack.ndf() / 2 + 2;
276 
277  std::vector<uint32_t> listOfPlaneNotUsedForFit = listOfAllPlanes_;
278  //remove the hits belonging to the tracks from the full list of hits
279  for (const auto &hitToErase : pointMapWithMinChiSquared) {
280  std::map<CTPPSPixelDetId, PointInPlaneList>::iterator hitMapElement = hitMap_->find(hitToErase.first);
281  if (hitMapElement == hitMap_->end()) {
282  throw cms::Exception("RPixPlaneCombinatoryTracking")
283  << "The found tracks has hit belonging to a plane which does not have hits";
284  }
285  std::vector<uint32_t>::iterator planeIt;
286  planeIt = std::find(listOfPlaneNotUsedForFit.begin(), listOfPlaneNotUsedForFit.end(), hitToErase.first.plane());
287  listOfPlaneNotUsedForFit.erase(planeIt);
288  hitMapElement->second.erase(hitMapElement->second.begin() + hitToErase.second);
289  //if the plane at which the hit was erased is empty it is removed from the hit map
290  if (hitMapElement->second.empty())
291  hitMap_->erase(hitMapElement);
292  }
293 
294  //search for hit on the other planes which may belong to the same track
295  //even if they did not contributed to the track
296  //in case of multiple hit, the closest one to the track will be considered
297  //If a hit is found these will not be erased from the list of all hits
298  //If no hit is found, the point on the plane intersecting the track will be saved by a CTPPSPixelFittedRecHit
299  //with the isRealHit_ flag set to false
300  for (const auto &plane : listOfPlaneNotUsedForFit) {
301  CTPPSPixelDetId tmpPlaneId = romanPotId_; //in order to avoid to modify the data member
302  tmpPlaneId.setPlane(plane);
303  std::unique_ptr<CTPPSPixelFittedRecHit> fittedRecHit(new CTPPSPixelFittedRecHit());
304  GlobalPoint pointOnDet;
305  calculatePointOnDetector(&bestTrack, tmpPlaneId, pointOnDet);
306 
307  if (hitMap_->find(tmpPlaneId) != hitMap_->end()) {
308  //I convert the hit search window defined in local coordinated into global
309  //This avoids to convert the global plane-line intersection in order not to call the the geometry
310  math::Vector<3>::type maxGlobalPointDistance(
312 
313  DetGeomDesc::RotationMatrix theRotationMatrix = geometry_->sensor(tmpPlaneId)->rotation();
314  AlgebraicMatrix33 tmpPlaneRotationMatrixMap;
315  theRotationMatrix.GetComponents(tmpPlaneRotationMatrixMap(0, 0),
316  tmpPlaneRotationMatrixMap(0, 1),
317  tmpPlaneRotationMatrixMap(0, 2),
318  tmpPlaneRotationMatrixMap(1, 0),
319  tmpPlaneRotationMatrixMap(1, 1),
320  tmpPlaneRotationMatrixMap(1, 2),
321  tmpPlaneRotationMatrixMap(2, 0),
322  tmpPlaneRotationMatrixMap(2, 1),
323  tmpPlaneRotationMatrixMap(2, 2));
324 
325  maxGlobalPointDistance = tmpPlaneRotationMatrixMap * maxGlobalPointDistance;
326  //I avoid the Sqrt since it will not be saved
327  double maximumXdistance = maxGlobalPointDistance[0] * maxGlobalPointDistance[0];
328  double maximumYdistance = maxGlobalPointDistance[1] * maxGlobalPointDistance[1];
329  // to be sure that the first min distance is from a real point
330  double minimumDistance = 1. + maximumXdistance + maximumYdistance;
331  for (const auto &hit : (*hitMap_)[tmpPlaneId]) {
332  double xResidual = hit.globalPoint.x() - pointOnDet.x();
333  double yResidual = hit.globalPoint.y() - pointOnDet.y();
334  double xDistance = xResidual * xResidual;
335  double yDistance = yResidual * yResidual;
336  double distance = xDistance + yDistance;
337  if (xDistance < maximumXdistance && yDistance < maximumYdistance && distance < minimumDistance) {
338  LocalPoint residuals(xResidual, yResidual, 0.);
339  math::Error<3>::type globalError = hit.globalError;
340  LocalPoint pulls(xResidual / std::sqrt(globalError[0][0]), yResidual / std::sqrt(globalError[1][1]), 0.);
341  fittedRecHit.reset(new CTPPSPixelFittedRecHit(hit.recHit, pointOnDet, residuals, pulls));
342  fittedRecHit->setIsRealHit(true);
343  }
344  }
345  } else {
346  LocalPoint fakePoint;
347  LocalError fakeError;
348  CTPPSPixelRecHit fakeRecHit(fakePoint, fakeError);
349  fittedRecHit.reset(new CTPPSPixelFittedRecHit(fakeRecHit, pointOnDet, fakePoint, fakePoint));
350  }
351 
352  bestTrack.addHit(tmpPlaneId, *fittedRecHit);
353  }
354 
355  localTrackVector_.push_back(bestTrack);
356 
357  int pointForTracking = 0;
358  int pointOnTrack = 0;
359 
360  if (verbosity_ >= 1) {
361  for (const auto &planeHits : bestTrack.hits()) {
362  for (const auto &fittedhit : planeHits) {
363  if (fittedhit.isUsedForFit())
364  ++pointForTracking;
365  if (fittedhit.isRealHit())
366  ++pointOnTrack;
367  }
368  }
369  edm::LogInfo("RPixPlaneCombinatoryTracking")
370  << "Best track has " << pointForTracking << " points used for the fit and " << pointOnTrack
371  << " points belonging to the track\n";
372  }
373 
374  } //close of the while loop on all the hits
375 
376  // recoInfo_ calculation
377  // Hardcoded shift periods:
378  // Before run 300802: No shift
379  // Starting from run 300802: Sec45 St2 Rp3 Pl 0,2,3 ROC 0 shifted.
380  // Starting from run 303338: No shift.
381  // Starting from run 305169: Sec45 St2 Rp3 Pl 1,3,5 ROC 0 shifted.
382  // Starting from run 305965: Sec45 St2 Rp3 Pl 1,3,5 ROC 0 shifted & Sec56 St2 Rp3 Pl 2,4,5 ROC 5 shifted.
383  // Starting from run 307083: No shift
384 
385  // These variables hold the information of the runs when the detector was taking data in 3+3 Mode and which planes were bx-shifted
386  // These values will never be changed and the 3+3 Mode will never be used again in the future
387  const CTPPSPixelDetId rpId_arm0_st2 = CTPPSPixelDetId(0, 2, 3);
388  const CTPPSPixelDetId rpId_arm1_st2 = CTPPSPixelDetId(1, 2, 3);
389  static const std::map<unsigned int, std::map<CTPPSPixelDetId, std::vector<bool> > > isPlaneShifted = {
390  {0,
391  {
392  {rpId_arm0_st2, {false, false, false, false, false, false}}, // Shift Period 0 Sec45
393  {rpId_arm1_st2, {false, false, false, false, false, false}} // Shift Period 1 Sec56
394  }},
395  {300802,
396  {
397  {rpId_arm0_st2, {true, false, true, true, false, false}}, // Shift Period 1 Sec45
398  {rpId_arm1_st2, {false, false, false, false, false, false}} // Shift Period 1 Sec56
399  }},
400  {303338,
401  {
402  {rpId_arm0_st2, {false, false, false, false, false, false}}, // Shift Period 2 Sec45
403  {rpId_arm1_st2, {false, false, false, false, false, false}} // Shift Period 2 Sec56
404  }},
405  {305169,
406  {
407  {rpId_arm0_st2, {false, true, false, true, false, true}}, // Shift Period 3 Sec45
408  {rpId_arm1_st2, {false, false, false, false, false, false}} // Shift Period 3 Sec56
409  }},
410  {305965,
411  {
412  {rpId_arm0_st2, {false, true, false, true, false, true}}, // Shift Period 4 Sec45
413  {rpId_arm1_st2, {false, false, true, false, true, true}} // Shift Period 4 Sec56
414  }},
415  {307083,
416  {
417  {rpId_arm0_st2, {false, false, false, false, false, false}}, // Shift Period 0 Sec45
418  {rpId_arm1_st2, {false, false, false, false, false, false}} // Shift Period 1 Sec56
419  }}}; // map< shiftedPeriod, map<DetID,shiftScheme> >
420  const auto &shiftStatusInitialRun = std::prev(isPlaneShifted.upper_bound(run));
421  unsigned short shiftedROC = 10;
422  CTPPSPixelIndices pixelIndices;
423 
424  // Selecting the shifted ROC
425  if (romanPotId_.arm() == 0)
426  shiftedROC = 0;
427  if (romanPotId_.arm() == 1)
428  shiftedROC = 5;
429 
430  // Loop over found tracks to set recoInfo_
431  for (auto &track : localTrackVector_) {
432  if (romanPotId_ != rpId_arm0_st2 && romanPotId_ != rpId_arm1_st2) {
434  if (verbosity_ >= 2)
435  edm::LogInfo("RPixPlaneCombinatoryTracking") << "Analyzing run: " << run << "\nTrack belongs to Arm "
436  << romanPotId_.arm() << " Station " << romanPotId_.station();
437 
438  continue;
439  }
440  unsigned short bxShiftedPlanesUsed = 0;
441  unsigned short bxNonShiftedPlanesUsed = 0;
442  unsigned short hitInShiftedROC = 0;
443 
444  auto const &fittedHits = track.hits();
445  auto const &planeFlags = (shiftStatusInitialRun->second).at(romanPotId_);
446 
447  for (const auto &planeHits : fittedHits) {
448  unsigned short plane = CTPPSPixelDetId(planeHits.detId()).plane();
449  for (const auto &hit : planeHits) {
450  if (hit.isUsedForFit()) {
451  if (pixelIndices.getROCId(hit.minPixelCol(), hit.minPixelRow()) == shiftedROC)
452  hitInShiftedROC++; // Count how many hits are in the shifted ROC
453  if (planeFlags.at(plane))
454  bxShiftedPlanesUsed++; // Count how many bx-shifted planes are used
455  else if (planeFlags != std::vector<bool>(6, false))
456  bxNonShiftedPlanesUsed++; // Count how many non-bx-shifted planes are used, only if there are shifted planes
457  }
458  }
459  }
460 
461  // Set recoInfo_ value
463  invalid); // Initially setting it as invalid. It has to match one of the following options.
464  if (hitInShiftedROC < 3)
466  else {
467  if (bxShiftedPlanesUsed == 0 && bxNonShiftedPlanesUsed == 0)
468  track.setRecoInfo(
469  CTPPSpixelLocalTrackReconstructionInfo::notShiftedRun); // Default value for runs without bx-shift
470  if (bxShiftedPlanesUsed == 3 && bxNonShiftedPlanesUsed == 0)
472  allShiftedPlanes); // Track reconstructed in a shifted ROC, only with bx-shifted planes
473  if (bxShiftedPlanesUsed == 0 && bxNonShiftedPlanesUsed == 3)
474  // Track reconstructed in a shifted ROC, only with non-bx-shifted planes
476  if (bxShiftedPlanesUsed > 0 && bxNonShiftedPlanesUsed > 0)
478  mixedPlanes); // Track reconstructed in a shifted ROC, with mixed planes
479  }
480  if (bxShiftedPlanesUsed + bxNonShiftedPlanesUsed > 6) {
481  throw cms::Exception("RPixPlaneCombinatoryTracking") << "Error in RPixPlaneCombinatoryTracking::findTracks -> "
482  << "More than six points found for a track, skipping.";
483  continue;
484  }
486  throw cms::Exception("RPixPlaneCombinatoryTracking") << "Error in RPixPlaneCombinatoryTracking::findTracks -> "
487  << "recoInfo has not been set properly.";
488  }
489 
490  if (verbosity_ >= 2) {
491  edm::LogInfo("RPixPlaneCombinatoryTracking")
492  << " Track belongs to Arm " << romanPotId_.arm() << " Station " << romanPotId_.station()
493  << "\nFirst run with this bx-shift configuration: " << shiftStatusInitialRun->first
494  << "\nTrack reconstructed with: " << bxShiftedPlanesUsed << " bx-shifted planes, " << bxNonShiftedPlanesUsed
495  << " non-bx-shifted planes, " << hitInShiftedROC << " hits in the bx-shifted ROC"
496  << "\nrecoInfo = " << (unsigned short)track.recoInfo();
497  if (planeFlags != std::vector<bool>(6, false))
498  edm::LogInfo("RPixPlaneCombinatoryTracking") << "The shifted ROC is ROC" << shiftedROC;
499  }
500  }
501  return;
502 }

References CTPPSPixelLocalTrack::addHit(), allShiftedPlanes, CTPPSDetId::arm(), calculatePointOnDetector(), CTPPSPixelLocalTrack::chiSquaredOverNDF(), HLT_2018_cff::distance, Exception, spr::find(), fitTrack(), RPixDetTrackFinder::geometry_, getPlaneCombinations(), CTPPSPixelIndices::getROCId(), RPixDetTrackFinder::hitMap_, CTPPSPixelLocalTrack::hits(), mps_fire::i, invalid, CTPPSPixelLocalTrack::isValid(), RPixDetTrackFinder::listOfAllPlanes_, RPixDetTrackFinder::localTrackVector_, maximumChi2OverNDF_, maximumXLocalDistanceFromTrack_, maximumYLocalDistanceFromTrack_, mixedPlanes, CTPPSPixelLocalTrack::ndf(), noShiftedPlanes, notShiftedRun, orderCombinationsPerNumberOrPoints(), point, possiblePlaneCombinations_, produceAllHitCombination(), RPixDetTrackFinder::romanPotId_, DetGeomDesc::rotation(), writedatasetfile::run, CTPPSGeometry::sensor(), CTPPSPixelDetId::setPlane(), mathSSE::sqrt(), CTPPSDetId::station(), HLT_2018_cff::track, trackMinNumberOfPoints_, verbosity_, PV3DBase< T, PVType, FrameType >::x(), hit::x, PV3DBase< T, PVType, FrameType >::y(), and hit::y.

◆ fitTrack()

CTPPSPixelLocalTrack RPixPlaneCombinatoryTracking::fitTrack ( PointInPlaneList  pointList)
private

Definition at line 506 of file RPixPlaneCombinatoryTracking.cc.

506  {
507  uint32_t const numberOfPlanes = 6;
511 
512  //The matrices and vector xyCoordinates, varianceMatrix and varianceMatrix are built from the points
513  for (uint32_t iHit = 0; iHit < numberOfPlanes; iHit++) {
514  if (iHit < pointList.size()) {
515  const auto &globalPoint = pointList[iHit].globalPoint;
516  xyCoordinates[2 * iHit] = globalPoint.x();
517  xyCoordinates[2 * iHit + 1] = globalPoint.y();
518  zMatrix(2 * iHit, 0) = 1.;
519  zMatrix(2 * iHit, 2) = globalPoint.z() - z0_;
520  zMatrix(2 * iHit + 1, 1) = 1.;
521  zMatrix(2 * iHit + 1, 3) = globalPoint.z() - z0_;
522 
523  AlgebraicMatrix33 globalError = pointList[iHit].globalError;
524  varianceMatrix(2 * iHit, 2 * iHit) = globalError(0, 0);
525  varianceMatrix(2 * iHit, 2 * iHit + 1) = globalError(0, 1);
526  varianceMatrix(2 * iHit + 1, 2 * iHit) = globalError(1, 0);
527  varianceMatrix(2 * iHit + 1, 2 * iHit + 1) = globalError(1, 1);
528  } else {
529  varianceMatrix(2 * iHit, 2 * iHit) = 1.;
530  varianceMatrix(2 * iHit + 1, 2 * iHit + 1) = 1.;
531  }
532  }
533 
534  //Get real point variance matrix
535  if (!varianceMatrix.Invert()) {
536  edm::LogError("RPixPlaneCombinatoryTracking") << "Error in RPixPlaneCombinatoryTracking::fitTrack -> "
537  << "Point variance matrix is singular, skipping.";
538  CTPPSPixelLocalTrack badTrack;
539  badTrack.setValid(false);
540  return badTrack;
541  }
542 
543  math::Error<4>::type covarianceMatrix = ROOT::Math::SimilarityT(zMatrix, varianceMatrix);
544 
545  //To have the real parameter covariance matrix, covarianceMatrix needs to be inverted
546  if (!covarianceMatrix.Invert()) {
547  edm::LogError("RPixPlaneCombinatoryTracking") << "Error in RPixPlaneCombinatoryTracking::fitTrack -> "
548  << "Parameter covariance matrix is singular, skipping.";
549  CTPPSPixelLocalTrack badTrack;
550  badTrack.setValid(false);
551  return badTrack;
552  }
553 
554  // track parameters: (x0, y0, tx, ty); x = x0 + tx*(z-z0)
555  math::Vector<4>::type zMatrixTransposeTimesVarianceMatrixTimesXyCoordinates =
556  ROOT::Math::Transpose(zMatrix) * varianceMatrix * xyCoordinates;
557  math::Vector<4>::type parameterVector = covarianceMatrix * zMatrixTransposeTimesVarianceMatrixTimesXyCoordinates;
558  math::Vector<2 *numberOfPlanes>::type xyCoordinatesMinusZmatrixTimesParameters =
559  xyCoordinates - (zMatrix * parameterVector);
560 
561  double chiSquare = ROOT::Math::Dot(xyCoordinatesMinusZmatrixTimesParameters,
562  (varianceMatrix * xyCoordinatesMinusZmatrixTimesParameters));
563 
564  CTPPSPixelLocalTrack goodTrack(z0_, parameterVector, covarianceMatrix, chiSquare);
565  goodTrack.setValid(true);
566 
567  for (const auto &hit : pointList) {
568  const auto &globalPoint = hit.globalPoint;
569  GlobalPoint pointOnDet;
570  bool foundPoint = calculatePointOnDetector(&goodTrack, hit.detId, pointOnDet);
571  if (!foundPoint) {
572  CTPPSPixelLocalTrack badTrack;
573  badTrack.setValid(false);
574  return badTrack;
575  }
576  double xResidual = globalPoint.x() - pointOnDet.x();
577  double yResidual = globalPoint.y() - pointOnDet.y();
578  LocalPoint residuals(xResidual, yResidual);
579 
580  math::Error<3>::type globalError(hit.globalError);
581  LocalPoint pulls(xResidual / std::sqrt(globalError(0, 0)), yResidual / std::sqrt(globalError(0, 0)));
582 
583  CTPPSPixelFittedRecHit fittedRecHit(hit.recHit, pointOnDet, residuals, pulls);
584  fittedRecHit.setIsUsedForFit(true);
585  goodTrack.addHit(hit.detId, fittedRecHit);
586  }
587 
588  return goodTrack;
589 }

References calculatePointOnDetector(), simKBmtfDigis_cfi::chiSquare, spr::goodTrack(), CTPPSPixelFittedRecHit::setIsUsedForFit(), CTPPSPixelLocalTrack::setValid(), mathSSE::sqrt(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and RPixDetTrackFinder::z0_.

Referenced by findTracks().

◆ functionForPlaneOrdering()

static bool RPixPlaneCombinatoryTracking::functionForPlaneOrdering ( PointAndReferencePair  a,
PointAndReferencePair  b 
)
inlinestaticprivate

Definition at line 56 of file RPixPlaneCombinatoryTracking.h.

56  {
57  return (a.second.size() > b.second.size());
58  }

References a, and b.

Referenced by orderCombinationsPerNumberOrPoints().

◆ getHitCombinations()

void RPixPlaneCombinatoryTracking::getHitCombinations ( const std::map< CTPPSPixelDetId, PointInPlaneList > &  mapOfAllHits,
std::map< CTPPSPixelDetId, PointInPlaneList >::iterator  mapIterator,
HitReferences  tmpHitPlaneMap,
const PointInPlaneList tmpHitVector,
PointAndReferenceMap outputMap 
)
private

Definition at line 87 of file RPixPlaneCombinatoryTracking.cc.

91  {
92  //At this point I selected one hit per plane
93  if (mapIterator == mapOfAllHits.end()) {
94  outputMap[tmpHitPlaneMap] = tmpHitVector;
95  return;
96  }
97  for (size_t i = 0; i < mapIterator->second.size(); i++) {
98  HitReferences newHitPlaneMap = tmpHitPlaneMap;
99  newHitPlaneMap[mapIterator->first] = i;
100  PointInPlaneList newVector = tmpHitVector;
101  newVector.push_back(mapIterator->second[i]);
102  std::map<CTPPSPixelDetId, PointInPlaneList>::iterator tmpMapIterator = mapIterator;
103  getHitCombinations(mapOfAllHits, ++tmpMapIterator, newHitPlaneMap, newVector, outputMap);
104  }
105 }

References mps_fire::i.

Referenced by produceAllHitCombination().

◆ getPlaneCombinations()

void RPixPlaneCombinatoryTracking::getPlaneCombinations ( const std::vector< uint32_t > &  inputPlaneList,
uint32_t  numberToExtract,
PlaneCombinations planeCombinations 
) const
private

Definition at line 61 of file RPixPlaneCombinatoryTracking.cc.

63  {
64  uint32_t numberOfPlanes = inputPlaneList.size();
65  std::string bitmask(numberToExtract, 1); // numberToExtract leading 1's
66  bitmask.resize(numberOfPlanes, 0); // numberOfPlanes-numberToExtract trailing 0's
67  planeCombinations.clear();
68 
69  // store the combination and permute bitmask
70  do {
71  planeCombinations.push_back(std::vector<uint32_t>());
72  for (uint32_t i = 0; i < numberOfPlanes; ++i) { // [0..numberOfPlanes-1] integers
73  if (bitmask[i])
74  planeCombinations.back().push_back(inputPlaneList.at(i));
75  }
76  } while (std::prev_permutation(bitmask.begin(), bitmask.end()));
77 
78  return;
79 }

References mps_fire::i, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by findTracks(), and initialize().

◆ initialize()

void RPixPlaneCombinatoryTracking::initialize ( void  )
overridevirtual

Implements RPixDetTrackFinder.

Definition at line 38 of file RPixPlaneCombinatoryTracking.cc.

38  {
39  uint32_t numberOfCombinations =
42  if (verbosity_ >= 2)
43  edm::LogInfo("RPixPlaneCombinatoryTracking") << "Number of combinations = " << numberOfCombinations;
44  possiblePlaneCombinations_.reserve(numberOfCombinations);
45 
47 
48  if (verbosity_ >= 2) {
49  for (const auto &vec : possiblePlaneCombinations_) {
50  for (const auto &num : vec) {
51  edm::LogInfo("RPixPlaneCombinatoryTracking") << num << " - ";
52  }
53  edm::LogInfo("RPixPlaneCombinatoryTracking");
54  }
55  }
56 }

References factorial(), getPlaneCombinations(), RPixDetTrackFinder::listOfAllPlanes_, EgammaValidation_cff::num, RPixDetTrackFinder::numberOfPlanesPerPot_, possiblePlaneCombinations_, trackMinNumberOfPoints_, and verbosity_.

◆ orderCombinationsPerNumberOrPoints()

std::vector< RPixPlaneCombinatoryTracking::PointAndReferencePair > RPixPlaneCombinatoryTracking::orderCombinationsPerNumberOrPoints ( PointAndReferenceMap  inputMap)
private

Definition at line 643 of file RPixPlaneCombinatoryTracking.cc.

643  {
644  std::vector<PointAndReferencePair> sortedVector(inputMap.begin(), inputMap.end());
645  std::sort(sortedVector.begin(), sortedVector.end(), functionForPlaneOrdering);
646 
647  return sortedVector;
648 }

References functionForPlaneOrdering().

Referenced by findTracks().

◆ produceAllHitCombination()

RPixPlaneCombinatoryTracking::PointAndReferenceMap RPixPlaneCombinatoryTracking::produceAllHitCombination ( PlaneCombinations  inputPlaneCombination)
private

Definition at line 109 of file RPixPlaneCombinatoryTracking.cc.

110  {
111  PointAndReferenceMap mapOfAllPoints;
112  CTPPSPixelDetId tmpRpId = romanPotId_; //in order to avoid to modify the data member
113 
114  if (verbosity_ >= 2)
115  edm::LogInfo("RPixPlaneCombinatoryTracking") << "Searching for all combinations...";
116  //Loop on all the plane combinations
117  for (const auto &planeCombination : inputPlaneCombination) {
118  std::map<CTPPSPixelDetId, PointInPlaneList> selectedCombinationHitOnPlane;
119  bool allPlaneAsHits = true;
120 
121  //Loop on all the possible combinations
122  //In this loop the selectedCombinationHitOnPlane is filled
123  //and cases in which one of the selected plane is empty are skipped
124  for (const auto &plane : planeCombination) {
125  tmpRpId.setPlane(plane);
126  CTPPSPixelDetId planeDetId = tmpRpId;
127  if (hitMap_->find(planeDetId) == hitMap_->end()) {
128  if (verbosity_ >= 2)
129  edm::LogInfo("RPixPlaneCombinatoryTracking")
130  << "No data on arm " << planeDetId.arm() << " station " << planeDetId.station() << " rp "
131  << planeDetId.rp() << " plane " << planeDetId.plane();
132  allPlaneAsHits = false;
133  break;
134  }
135  if (selectedCombinationHitOnPlane.find(planeDetId) != selectedCombinationHitOnPlane.end()) {
136  throw cms::Exception("RPixPlaneCombinatoryTracking")
137  << "selectedCombinationHitOnPlane contains already detId " << planeDetId
138  << "Error in the algorithm which created all the possible plane combinations";
139  }
140  selectedCombinationHitOnPlane[planeDetId] = (*hitMap_)[planeDetId];
141  }
142  if (!allPlaneAsHits)
143  continue;
144 
145  //I add the all the hit combinations to the full list of plane combinations
146  auto mapIterator = selectedCombinationHitOnPlane.begin();
147  HitReferences tmpHitPlaneMap; //empty map of plane id and hit number needed the getHitCombinations algorithm
148  PointInPlaneList tmpHitVector; //empty vector of hits needed for the getHitCombinations algorithm
149  getHitCombinations(selectedCombinationHitOnPlane, mapIterator, tmpHitPlaneMap, tmpHitVector, mapOfAllPoints);
150  if (verbosity_ >= 2)
151  edm::LogInfo("RPixPlaneCombinatoryTracking") << "Number of possible tracks " << mapOfAllPoints.size();
152 
153  } //end of loops on all the combinations
154 
155  return mapOfAllPoints;
156 }

References CTPPSDetId::arm(), Exception, getHitCombinations(), RPixDetTrackFinder::hitMap_, CTPPSPixelDetId::plane(), RPixDetTrackFinder::romanPotId_, CTPPSDetId::rp(), CTPPSPixelDetId::setPlane(), CTPPSDetId::station(), and verbosity_.

Referenced by findTracks().

Member Data Documentation

◆ maximumChi2OverNDF_

double RPixPlaneCombinatoryTracking::maximumChi2OverNDF_
private

Definition at line 40 of file RPixPlaneCombinatoryTracking.h.

Referenced by findTracks(), and RPixPlaneCombinatoryTracking().

◆ maximumXLocalDistanceFromTrack_

double RPixPlaneCombinatoryTracking::maximumXLocalDistanceFromTrack_
private

Definition at line 41 of file RPixPlaneCombinatoryTracking.h.

Referenced by findTracks(), and RPixPlaneCombinatoryTracking().

◆ maximumYLocalDistanceFromTrack_

double RPixPlaneCombinatoryTracking::maximumYLocalDistanceFromTrack_
private

Definition at line 42 of file RPixPlaneCombinatoryTracking.h.

Referenced by findTracks(), and RPixPlaneCombinatoryTracking().

◆ possiblePlaneCombinations_

PlaneCombinations RPixPlaneCombinatoryTracking::possiblePlaneCombinations_
private

◆ trackMinNumberOfPoints_

uint32_t RPixPlaneCombinatoryTracking::trackMinNumberOfPoints_
private

◆ verbosity_

int RPixPlaneCombinatoryTracking::verbosity_
private
Vector3DBase
Definition: Vector3DBase.h:8
DetGeomDesc::rotation
RotationMatrix rotation() const
geometry information
Definition: DetGeomDesc.h:63
RPixDetTrackFinder::RPixDetTrackFinder
RPixDetTrackFinder(edm::ParameterSet const &parameterSet)
Definition: RPixDetTrackFinder.h:26
RPixPlaneCombinatoryTracking::maximumXLocalDistanceFromTrack_
double maximumXLocalDistanceFromTrack_
Definition: RPixPlaneCombinatoryTracking.h:41
CTPPSDetId::rp
uint32_t rp() const
Definition: CTPPSDetId.h:69
CTPPSpixelLocalTrackReconstructionInfo
CTPPSpixelLocalTrackReconstructionInfo
Definition: CTPPSPixelLocalTrackRecoInfo.h:17
mps_fire.i
i
Definition: mps_fire.py:355
CTPPSPixelRecHit
Definition: CTPPSPixelRecHit.h:17
RPixPlaneCombinatoryTracking::orderCombinationsPerNumberOrPoints
std::vector< PointAndReferencePair > orderCombinationsPerNumberOrPoints(PointAndReferenceMap inputMap)
Definition: RPixPlaneCombinatoryTracking.cc:643
RPixDetTrackFinder::listOfAllPlanes_
std::vector< uint32_t > listOfAllPlanes_
Definition: RPixDetTrackFinder.h:48
hit::y
double y
Definition: SiStripHitEffFromCalibTree.cc:90
simKBmtfDigis_cfi.chiSquare
chiSquare
Definition: simKBmtfDigis_cfi.py:10
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
CTPPSPixelLocalTrack::ndf
int ndf() const
Definition: CTPPSPixelLocalTrack.h:164
RPixPlaneCombinatoryTracking::factorial
uint32_t factorial(uint32_t x) const
Definition: RPixPlaneCombinatoryTracking.h:61
RPixDetTrackFinder::localTrackVector_
std::vector< CTPPSPixelLocalTrack > localTrackVector_
Definition: RPixDetTrackFinder.h:44
edm::LogInfo
Definition: MessageLogger.h:254
HLT_2018_cff.distance
distance
Definition: HLT_2018_cff.py:6417
RPixPlaneCombinatoryTracking::possiblePlaneCombinations_
PlaneCombinations possiblePlaneCombinations_
Definition: RPixPlaneCombinatoryTracking.h:43
RPixPlaneCombinatoryTracking::functionForPlaneOrdering
static bool functionForPlaneOrdering(PointAndReferencePair a, PointAndReferencePair b)
Definition: RPixPlaneCombinatoryTracking.h:56
spr::goodTrack
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
Definition: TrackSelection.cc:10
AlgebraicMatrix33
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepStd< double, 3, 3 > > AlgebraicMatrix33
Definition: AlgebraicROOTObjects.h:41
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
DDAxes::x
CTPPSpixelLocalTrackReconstructionInfo::invalid
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
parallelization.uint
uint
Definition: parallelization.py:124
CTPPSPixelLocalTrack::chiSquaredOverNDF
float chiSquaredOverNDF() const
Definition: CTPPSPixelLocalTrack.h:157
RPixPlaneCombinatoryTracking::verbosity_
int verbosity_
Definition: RPixPlaneCombinatoryTracking.h:38
RPixPlaneCombinatoryTracking::fitTrack
CTPPSPixelLocalTrack fitTrack(PointInPlaneList pointList)
Definition: RPixPlaneCombinatoryTracking.cc:506
parameters
parameters
Definition: BeamSpot_PayloadInspector.cc:14
CTPPSPixelIndices
Definition: CTPPSPixelIndices.h:74
hit::x
double x
Definition: SiStripHitEffFromCalibTree.cc:89
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
CTPPSDetId::station
uint32_t station() const
Definition: CTPPSDetId.h:62
math::Matrix::type
ROOT::Math::SMatrix< double, N, M > type
Definition: Matrix.h:9
CTPPSPixelLocalTrack::setValid
void setValid(bool valid)
Definition: CTPPSPixelLocalTrack.h:184
RPixDetTrackFinder::romanPotId_
CTPPSPixelDetId romanPotId_
Definition: RPixDetTrackFinder.h:45
RPixDetTrackFinder::z0_
double z0_
Definition: RPixDetTrackFinder.h:49
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
RPixPlaneCombinatoryTracking::produceAllHitCombination
PointAndReferenceMap produceAllHitCombination(PlaneCombinations inputPlaneCombination)
Definition: RPixPlaneCombinatoryTracking.cc:109
RPixPlaneCombinatoryTracking::HitReferences
std::map< CTPPSPixelDetId, size_t > HitReferences
Definition: RPixPlaneCombinatoryTracking.h:34
CTPPSPixelLocalTrack::ParameterVector
math::Vector< dimension >::type ParameterVector
covariance matrix size
Definition: CTPPSPixelLocalTrack.h:91
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
Point3DBase< float, GlobalTag >
CTPPSpixelLocalTrackReconstructionInfo::notShiftedRun
b
double b
Definition: hdecay.h:118
CTPPSPixelDetId::setPlane
void setPlane(uint32_t pl)
Definition: CTPPSPixelDetId.h:41
CTPPSPixelLocalTrack::hits
const edm::DetSetVector< CTPPSPixelFittedRecHit > & hits() const
Definition: CTPPSPixelLocalTrack.h:110
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CTPPSPixelIndices::getROCId
int getROCId(const int col, const int row) const
Definition: CTPPSPixelIndices.h:234
CTPPSDetId::arm
uint32_t arm() const
Definition: CTPPSDetId.h:55
RPixPlaneCombinatoryTracking::getPlaneCombinations
void getPlaneCombinations(const std::vector< uint32_t > &inputPlaneList, uint32_t numberToExtract, PlaneCombinations &planeCombinations) const
Definition: RPixPlaneCombinatoryTracking.cc:61
RPixPlaneCombinatoryTracking::getHitCombinations
void getHitCombinations(const std::map< CTPPSPixelDetId, PointInPlaneList > &mapOfAllHits, std::map< CTPPSPixelDetId, PointInPlaneList >::iterator mapIterator, HitReferences tmpHitPlaneMap, const PointInPlaneList &tmpHitVector, PointAndReferenceMap &outputMap)
Definition: RPixPlaneCombinatoryTracking.cc:87
CTPPSpixelLocalTrackReconstructionInfo::mixedPlanes
edm::LogError
Definition: MessageLogger.h:183
a
double a
Definition: hdecay.h:119
CTPPSPixelFittedRecHit
Definition: CTPPSPixelLocalTrack.h:30
CTPPSPixelLocalTrack
Definition: CTPPSPixelLocalTrack.h:84
LocalError
Definition: LocalError.h:12
CTPPSPixelLocalTrack::addHit
void addHit(unsigned int detId, const CTPPSPixelFittedRecHit &hit)
Definition: CTPPSPixelLocalTrack.h:111
RPixDetTrackFinder::geometry_
const CTPPSGeometry * geometry_
Definition: RPixDetTrackFinder.h:46
RPixPlaneCombinatoryTracking::PointInPlaneList
std::vector< RPixDetPatternFinder::PointInPlane > PointInPlaneList
Definition: RPixPlaneCombinatoryTracking.h:33
math::Vector
fixed size vector
Definition: Vector.h:24
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
CTPPSpixelLocalTrackReconstructionInfo::allShiftedPlanes
CTPPSPixelDetId::plane
uint32_t plane() const
Definition: CTPPSPixelDetId.h:37
RPixDetTrackFinder::numberOfPlanesPerPot_
uint32_t numberOfPlanesPerPot_
Definition: RPixDetTrackFinder.h:47
CTPPSPixelDetId
Definition: CTPPSPixelDetId.h:16
EgammaValidation_cff.num
num
Definition: EgammaValidation_cff.py:34
CTPPSPixelLocalTrack::isValid
bool isValid() const
Definition: CTPPSPixelLocalTrack.h:182
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
RPixPlaneCombinatoryTracking::PointAndReferenceMap
std::map< HitReferences, PointInPlaneList > PointAndReferenceMap
Definition: RPixPlaneCombinatoryTracking.h:35
RPixPlaneCombinatoryTracking::maximumYLocalDistanceFromTrack_
double maximumYLocalDistanceFromTrack_
Definition: RPixPlaneCombinatoryTracking.h:42
HLTTauDQMOffline_cfi.denominator
denominator
Definition: HLTTauDQMOffline_cfi.py:195
writedatasetfile.run
run
Definition: writedatasetfile.py:27
RPixPlaneCombinatoryTracking::trackMinNumberOfPoints_
uint32_t trackMinNumberOfPoints_
Definition: RPixPlaneCombinatoryTracking.h:39
math::Error::type
ErrorD< N >::type type
Definition: Error.h:32
Exception
Definition: hltDiff.cc:246
edm::parameterSet
ParameterSet const & parameterSet(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
RPixPlaneCombinatoryTracking::calculatePointOnDetector
bool calculatePointOnDetector(CTPPSPixelLocalTrack *track, CTPPSPixelDetId planeId, GlobalPoint &planeLineIntercept)
Definition: RPixPlaneCombinatoryTracking.cc:594
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
DetGeomDesc::RotationMatrix
ROOT::Math::Rotation3D RotationMatrix
Definition: DetGeomDesc.h:37
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
RPixPlaneCombinatoryTracking::PlaneCombinations
std::vector< std::vector< uint32_t > > PlaneCombinations
Definition: RPixPlaneCombinatoryTracking.h:32
CTPPSGeometry::localToGlobal
Vector localToGlobal(const DetGeomDesc *, const Vector &) const
Definition: CTPPSGeometry.cc:146
RPixPlaneCombinatoryTracking::maximumChi2OverNDF_
double maximumChi2OverNDF_
Definition: RPixPlaneCombinatoryTracking.h:40
hit
Definition: SiStripHitEffFromCalibTree.cc:88
CTPPSGeometry::sensor
const DetGeomDesc * sensor(unsigned int id) const
returns geometry of a detector performs necessary checks, returns NULL if fails
Definition: CTPPSGeometry.cc:79
RPixDetTrackFinder::hitMap_
std::map< CTPPSPixelDetId, std::vector< RPixDetPatternFinder::PointInPlane > > * hitMap_
Definition: RPixDetTrackFinder.h:43
CTPPSpixelLocalTrackReconstructionInfo::noShiftedPlanes
CTPPSGeometry::Vector
DetGeomDesc::Translation Vector
Definition: CTPPSGeometry.h:39