CMS 3D CMS Logo

RPixPlaneCombinatoryTracking.h
Go to the documentation of this file.
1 /*
2  *
3 * This is a part of CTPPS offline software.
4 * Author:
5 * Fabrizio Ferro (ferro@ge.infn.it)
6 * Enrico Robutti (robutti@ge.infn.it)
7 * Fabio Ravera (fabio.ravera@cern.ch)
8 *
9 */
10 #ifndef RecoCTPPS_PixelLocal_RPixPlaneCombinatoryTracking_H
11 #define RecoCTPPS_PixelLocal_RPixPlaneCombinatoryTracking_H
12 
16 
20 
21 #include <vector>
22 #include <map>
23 
25 
26  public:
29  void initialize() override;
30  void findTracks() override;
31 
32  private:
33  typedef std::vector<std::vector<uint32_t> > PlaneCombinations;
34  typedef std::vector<RPixDetPatternFinder::PointInPlane> PointInPlaneList;
35  typedef std::map<CTPPSPixelDetId, size_t> HitReferences;
36  typedef std::map< HitReferences, PointInPlaneList > PointAndReferenceMap;
37  typedef std::pair<HitReferences, PointInPlaneList > PointAndReferencePair;
38 
44  PlaneCombinations possiblePlaneCombinations_;
45 
46  void getPlaneCombinations(const std::vector<uint32_t> &inputPlaneList, uint32_t numberToExtract, PlaneCombinations &planeCombinations) const;
47  CTPPSPixelLocalTrack fitTrack(PointInPlaneList pointList);
48  void getHitCombinations(
49  const std::map<CTPPSPixelDetId, PointInPlaneList > &mapOfAllHits,
50  std::map<CTPPSPixelDetId, PointInPlaneList >::iterator mapIterator,
51  HitReferences tmpHitPlaneMap,
52  const PointInPlaneList &tmpHitVector,
53  PointAndReferenceMap &outputMap);
54  PointAndReferenceMap produceAllHitCombination(PlaneCombinations inputPlaneCombination);
57  PointAndReferencePair a,
58  PointAndReferencePair b) {
59  return (a.second.size() > b.second.size()); }
60  std::vector<PointAndReferencePair > orderCombinationsPerNumberOrPoints(
61  PointAndReferenceMap inputMap);
62 
63 
64  inline uint32_t factorial(uint32_t x) const {
65  if(x==0) return 1;
66  return (x == 1 ? x : x * factorial(x - 1));
67  }
68 
69 };
70 
71 #endif
std::map< HitReferences, PointInPlaneList > PointAndReferenceMap
RPixPlaneCombinatoryTracking(edm::ParameterSet const &parameterSet)
std::map< CTPPSPixelDetId, size_t > HitReferences
bool calculatePointOnDetector(CTPPSPixelLocalTrack *track, CTPPSPixelDetId planeId, GlobalPoint &planeLineIntercept)
std::vector< PointAndReferencePair > orderCombinationsPerNumberOrPoints(PointAndReferenceMap inputMap)
uint32_t factorial(uint32_t x) const
void getHitCombinations(const std::map< CTPPSPixelDetId, PointInPlaneList > &mapOfAllHits, std::map< CTPPSPixelDetId, PointInPlaneList >::iterator mapIterator, HitReferences tmpHitPlaneMap, const PointInPlaneList &tmpHitVector, PointAndReferenceMap &outputMap)
CTPPSPixelLocalTrack fitTrack(PointInPlaneList pointList)
std::vector< RPixDetPatternFinder::PointInPlane > PointInPlaneList
double b
Definition: hdecay.h:120
PointAndReferenceMap produceAllHitCombination(PlaneCombinations inputPlaneCombination)
std::pair< HitReferences, PointInPlaneList > PointAndReferencePair
double a
Definition: hdecay.h:121
static bool functionForPlaneOrdering(PointAndReferencePair a, PointAndReferencePair b)
std::vector< std::vector< uint32_t > > PlaneCombinations
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
void getPlaneCombinations(const std::vector< uint32_t > &inputPlaneList, uint32_t numberToExtract, PlaneCombinations &planeCombinations) const