CMS 3D CMS Logo

MTDClusterParameterEstimator.h
Go to the documentation of this file.
1 #ifndef RecoLocalFastTime_MTDCluster_Parameter_Estimator_H
2 #define RecoLocalFastTime_MTDCluster_Parameter_Estimator_H
3 
6 
10 
12 
13 #include <tuple>
14 
16 public:
18 
19  typedef std::pair<LocalPoint, LocalError> LocalValues;
20  typedef std::vector<LocalValues> VLocalValues;
21 
22  typedef float TimeValue;
23  typedef float TimeValueError;
24 
25  using ReturnType = std::tuple<LocalPoint, LocalError, TimeValue, TimeValueError>;
26 
27  // here just to implement it in the clients;
28  // to be properly implemented in the sub-classes in order to make them thread-safe
29 
30  virtual ReturnType getParameters(const FTLCluster& cl, const GeomDetUnit& det) const = 0;
31 
32  virtual ReturnType getParameters(const FTLCluster& cl,
33  const GeomDetUnit& det,
34  const LocalTrajectoryParameters& ltp) const = 0;
35 
37  const GeomDetUnit& det,
38  const TrajectoryStateOnSurface& tsos) const {
39  return getParameters(cl, det, tsos.localParameters());
40  }
41 
42  virtual VLocalValues localParametersV(const FTLCluster& cluster, const GeomDetUnit& gd) const {
43  VLocalValues vlp;
44  ReturnType tuple = getParameters(cluster, gd);
45  vlp.emplace_back(std::get<0>(tuple), std::get<1>(tuple));
46  return vlp;
47  }
48  virtual VLocalValues localParametersV(const FTLCluster& cluster,
49  const GeomDetUnit& gd,
50  TrajectoryStateOnSurface& tsos) const {
51  VLocalValues vlp;
52  ReturnType tuple = getParameters(cluster, gd, tsos);
53  vlp.emplace_back(std::get<0>(tuple), std::get<1>(tuple));
54  return vlp;
55  }
56 
58 };
59 
60 #endif
virtual VLocalValues localParametersV(const FTLCluster &cluster, const GeomDetUnit &gd) const
virtual VLocalValues localParametersV(const FTLCluster &cluster, const GeomDetUnit &gd, TrajectoryStateOnSurface &tsos) const
std::pair< LocalPoint, LocalError > LocalValues
virtual ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det, const TrajectoryStateOnSurface &tsos) const
const LocalTrajectoryParameters & localParameters() const
std::vector< LocalValues > VLocalValues
std::tuple< LocalPoint, LocalError, TimeValue, TimeValueError > ReturnType
virtual ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det) const =0