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 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::maximumXLocalDistanceFromTrack_
double maximumXLocalDistanceFromTrack_
Definition: RPixPlaneCombinatoryTracking.h:41
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
CTPPSPixelLocalTrack.h
RPixPlaneCombinatoryTracking::orderCombinationsPerNumberOrPoints
std::vector< PointAndReferencePair > orderCombinationsPerNumberOrPoints(PointAndReferenceMap inputMap)
Definition: RPixPlaneCombinatoryTracking.cc:644
RPixPlaneCombinatoryTracking::factorial
uint32_t factorial(uint32_t x) const
Definition: RPixPlaneCombinatoryTracking.h:61
RPixPlaneCombinatoryTracking::~RPixPlaneCombinatoryTracking
~RPixPlaneCombinatoryTracking() override
Definition: RPixPlaneCombinatoryTracking.cc:35
RPixPlaneCombinatoryTracking::possiblePlaneCombinations_
PlaneCombinations possiblePlaneCombinations_
Definition: RPixPlaneCombinatoryTracking.h:43
RPixPlaneCombinatoryTracking::functionForPlaneOrdering
static bool functionForPlaneOrdering(PointAndReferencePair a, PointAndReferencePair b)
Definition: RPixPlaneCombinatoryTracking.h:56
DDAxes::x
RPixPlaneCombinatoryTracking::verbosity_
int verbosity_
Definition: RPixPlaneCombinatoryTracking.h:38
RPixPlaneCombinatoryTracking::fitTrack
CTPPSPixelLocalTrack fitTrack(PointInPlaneList pointList)
Definition: RPixPlaneCombinatoryTracking.cc:507
edm::parameterSet
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
RPixPlaneCombinatoryTracking::findTracks
void findTracks(int run) override
Definition: RPixPlaneCombinatoryTracking.cc:161
RPixPlaneCombinatoryTracking::RPixPlaneCombinatoryTracking
RPixPlaneCombinatoryTracking(edm::ParameterSet const &parameterSet)
Definition: RPixPlaneCombinatoryTracking.cc:17
RPixPlaneCombinatoryTracking::produceAllHitCombination
PointAndReferenceMap produceAllHitCombination(PlaneCombinations inputPlaneCombination)
Definition: RPixPlaneCombinatoryTracking.cc:110
RPixPlaneCombinatoryTracking::HitReferences
std::map< CTPPSPixelDetId, size_t > HitReferences
Definition: RPixPlaneCombinatoryTracking.h:34
Point3DBase< float, GlobalTag >
b
double b
Definition: hdecay.h:118
RPixPlaneCombinatoryTracking::PointAndReferencePair
std::pair< HitReferences, PointInPlaneList > PointAndReferencePair
Definition: RPixPlaneCombinatoryTracking.h:36
RPixPlaneCombinatoryTracking::getPlaneCombinations
void getPlaneCombinations(const std::vector< uint32_t > &inputPlaneList, uint32_t numberToExtract, PlaneCombinations &planeCombinations) const
Definition: RPixPlaneCombinatoryTracking.cc:62
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:88
edm::ParameterSet
Definition: ParameterSet.h:47
a
double a
Definition: hdecay.h:119
RPixDetTrackFinder
Definition: RPixDetTrackFinder.h:24
CTPPSPixelLocalTrack
Definition: CTPPSPixelLocalTrack.h:84
RPixPlaneCombinatoryTracking::PointInPlaneList
std::vector< RPixDetPatternFinder::PointInPlane > PointInPlaneList
Definition: RPixPlaneCombinatoryTracking.h:33
RPixPlaneCombinatoryTracking::initialize
void initialize() override
Definition: RPixPlaneCombinatoryTracking.cc:39
DetSetVector.h
CTPPSPixelDetId
Definition: CTPPSPixelDetId.h:16
RPixPlaneCombinatoryTracking
Definition: RPixPlaneCombinatoryTracking.h:24
RPixPlaneCombinatoryTracking::PointAndReferenceMap
std::map< HitReferences, PointInPlaneList > PointAndReferenceMap
Definition: RPixPlaneCombinatoryTracking.h:35
RPixPlaneCombinatoryTracking::maximumYLocalDistanceFromTrack_
double maximumYLocalDistanceFromTrack_
Definition: RPixPlaneCombinatoryTracking.h:42
writedatasetfile.run
run
Definition: writedatasetfile.py:27
RPixPlaneCombinatoryTracking::trackMinNumberOfPoints_
uint32_t trackMinNumberOfPoints_
Definition: RPixPlaneCombinatoryTracking.h:39
RPixPlaneCombinatoryTracking::calculatePointOnDetector
bool calculatePointOnDetector(CTPPSPixelLocalTrack *track, CTPPSPixelDetId planeId, GlobalPoint &planeLineIntercept)
Definition: RPixPlaneCombinatoryTracking.cc:595
ParameterSet.h
RPixPlaneCombinatoryTracking::PlaneCombinations
std::vector< std::vector< uint32_t > > PlaneCombinations
Definition: RPixPlaneCombinatoryTracking.h:32
RPixPlaneCombinatoryTracking::maximumChi2OverNDF_
double maximumChi2OverNDF_
Definition: RPixPlaneCombinatoryTracking.h:40
GlobalPoint.h
RPixDetTrackFinder.h