test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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,
16  vector<const GeomDet*>::const_iterator last)
17  : DetRod(false), theDets(first,last)
18 {
19  initialize();
20 }
21 
22 DetRodOneR::DetRodOneR( const vector<const GeomDet*>& dets)
23  : DetRod(false), theDets(dets)
24 {
25  initialize();
26 }
27 
28 
30 {
31  // assume the dets ARE in a rod;
32  // sort them in Z
33 
35 
37 
38 }
39 
40 
41 // It needs that the basic component to have the compatible() method
42 bool DetRodOneR::add( int idet, vector<DetWithState>& result,
43  const TrajectoryStateOnSurface& startingState,
44  const Propagator& prop,
45  const MeasurementEstimator& est) const
46 {
47  pair<bool,TrajectoryStateOnSurface> compat =
48  theCompatibilityChecker.isCompatible(theDets[idet],startingState, prop, est);
49 
50  if (compat.first) {
51  result.push_back( DetWithState( theDets[idet], compat.second));
52  }
53 
54  return compat.first;
55 }
DetRodOneR(std::vector< const GeomDet * >::const_iterator first, std::vector< const GeomDet * >::const_iterator last)
Construct from iterators on GeomDet*.
Definition: DetRodOneR.cc:15
virtual ~DetRodOneR()
Definition: DetRodOneR.cc:13
std::vector< const GeomDet * > theDets
Definition: DetRodOneR.h:40
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:42
GeomDetCompatibilityChecker theCompatibilityChecker
tuple result
Definition: mps_fire.py:83
ExtractZ< GeomDet, float > DetZ
Definition: DetSorting.h:53
static std::pair< bool, TrajectoryStateOnSurface > isCompatible(const GeomDet *theDet, const TrajectoryStateOnSurface &ts, const Propagator &prop, const MeasurementEstimator &est)
Definition: DetRod.h:13
void setPlane(Plane *plane)
Set the rod&#39;s plane.
Definition: DetRod.h:32
void initialize()
Definition: DetRodOneR.cc:29
void precomputed_value_sort(RandomAccessIterator begin, RandomAccessIterator end, const Extractor &extr)
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
volatile std::atomic< bool > shutdown_flag false