CMS 3D CMS Logo

DetRodOneR.cc
Go to the documentation of this file.
4 
7 
8 #include <algorithm>
9 #include <cmath>
10 
11 using namespace std;
12 
14 
15 DetRodOneR::DetRodOneR(vector<const GeomDet*>::const_iterator first, vector<const GeomDet*>::const_iterator last)
16  : DetRod(false), theDets(first, last) {
17  initialize();
18 }
19 
20 DetRodOneR::DetRodOneR(const vector<const GeomDet*>& dets) : DetRod(false), theDets(dets) { initialize(); }
21 
23  // assume the dets ARE in a rod;
24  // sort them in Z
25 
27 
29 }
30 
31 // It needs that the basic component to have the compatible() method
32 bool DetRodOneR::add(int idet,
33  vector<DetWithState>& result,
34  const TrajectoryStateOnSurface& startingState,
35  const Propagator& prop,
36  const MeasurementEstimator& est) const {
37  pair<bool, TrajectoryStateOnSurface> compat =
38  theCompatibilityChecker.isCompatible(theDets[idet], startingState, prop, est);
39 
40  if (compat.first) {
41  result.push_back(DetWithState(theDets[idet], compat.second));
42  }
43 
44  return compat.first;
45 }
DetRodOneR(std::vector< const GeomDet * >::const_iterator first, std::vector< const GeomDet * >::const_iterator last)
Construct from iterators on GeomDet*.
Definition: DetRodOneR.cc:15
std::vector< const GeomDet * > theDets
Definition: DetRodOneR.h:37
bool add(int idet, std::vector< DetWithState > &result, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
Query detector idet for compatible and add the output to result.
Definition: DetRodOneR.cc:32
GeomDetCompatibilityChecker theCompatibilityChecker
ExtractZ< GeomDet, float > DetZ
Definition: DetSorting.h:50
static std::pair< bool, TrajectoryStateOnSurface > isCompatible(const GeomDet *theDet, const TrajectoryStateOnSurface &ts, const Propagator &prop, const MeasurementEstimator &est)
Definition: DetRod.h:13
~DetRodOneR() override
Definition: DetRodOneR.cc:13
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr, const Compare &comp)
void setPlane(Plane *plane)
Set the rod&#39;s plane.
Definition: DetRod.h:28
void initialize()
Definition: DetRodOneR.cc:22
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState