CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 RecoPPS_Local_RPixPlaneCombinatoryTracking_H
11 #define RecoPPS_Local_RPixPlaneCombinatoryTracking_H
12 
16 
20 
21 #include <vector>
22 #include <map>
23 
25 public:
28  void initialize() override;
29  void findTracks(int run) override;
30 
31 private:
32  typedef std::vector<std::vector<uint32_t> > PlaneCombinations;
33  typedef std::vector<RPixDetPatternFinder::PointInPlane> PointInPlaneList;
34  typedef std::map<CTPPSPixelDetId, size_t> HitReferences;
35  typedef std::map<HitReferences, PointInPlaneList> PointAndReferenceMap;
36  typedef std::pair<HitReferences, PointInPlaneList> PointAndReferencePair;
37 
44 
45  void getPlaneCombinations(const std::vector<uint32_t> &inputPlaneList,
46  uint32_t numberToExtract,
47  PlaneCombinations &planeCombinations) const;
49  void getHitCombinations(const std::map<CTPPSPixelDetId, PointInPlaneList> &mapOfAllHits,
50  std::map<CTPPSPixelDetId, PointInPlaneList>::iterator mapIterator,
51  HitReferences tmpHitPlaneMap,
52  const PointInPlaneList &tmpHitVector,
53  PointAndReferenceMap &outputMap);
57  return (a.second.size() > b.second.size());
58  }
59  std::vector<PointAndReferencePair> orderCombinationsPerNumberOrPoints(PointAndReferenceMap inputMap);
60 
61  inline uint32_t factorial(uint32_t x) const {
62  if (x == 0)
63  return 1;
64  return (x == 1 ? x : x * factorial(x - 1));
65  }
66 };
67 
68 #endif
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
std::map< HitReferences, PointInPlaneList > PointAndReferenceMap
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)
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
std::vector< RPixDetPatternFinder::PointInPlane > PointInPlaneList
double b
Definition: hdecay.h:118
std::pair< HitReferences, PointInPlaneList > PointAndReferencePair
PointAndReferenceMap produceAllHitCombination(PlaneCombinations inputPlaneCombination)
double a
Definition: hdecay.h:119
static bool functionForPlaneOrdering(PointAndReferencePair a, PointAndReferencePair b)
std::vector< std::vector< uint32_t > > PlaneCombinations
void getPlaneCombinations(const std::vector< uint32_t > &inputPlaneList, uint32_t numberToExtract, PlaneCombinations &planeCombinations) const