CMS 3D CMS Logo

MTDCPEBase.h
Go to the documentation of this file.
1 #ifndef RecoLocalFastTime_FTLClusterizer_MTDCPEBase_H
2 #define RecoLocalFastTime_FTLClusterizer_MTDCPEBase_H 1
3 
4 //-----------------------------------------------------------------------------
5 // \class MTDCPEBase
6 //-----------------------------------------------------------------------------
7 
8 #include <utility>
9 #include <memory>
10 #include <vector>
11 #include "TMath.h"
12 
14 
20 
22 
26 
27 #include <unordered_map>
28 
29 #include <iostream>
30 
32 public:
33  struct DetParam {
34  DetParam() {}
38 
41  float theThickness;
42  float thePitchX;
43  float thePitchY;
44  };
45 
46  struct ClusterParam {
47  ClusterParam(const FTLCluster& cl) : theCluster(&cl) {}
48 
49  virtual ~ClusterParam() = default;
50 
52  };
53 
54 public:
55  MTDCPEBase(edm::ParameterSet const& conf, const MTDGeometry& geom);
56 
57  inline ReturnType getParameters(const FTLCluster& cl, const GeomDetUnit& det) const override {
58  DetParam const& dp = detParam(det);
59  ClusterParam cp(cl);
60  setTheClu(dp, cp);
61  auto tuple =
62  std::make_tuple(localPosition(dp, cp), localError(dp, cp), clusterTime(dp, cp), clusterTimeError(dp, cp));
63  return tuple;
64  }
65 
66  //--------------------------------------------------------------------------
67  // In principle we could use the track too to get an angle if needed
68  //--------------------------------------------------------------------------
70  const GeomDetUnit& det,
71  const LocalTrajectoryParameters& ltp) const override {
72  return getParameters(cl, det);
73  }
74 
75 private:
76  //--------------------------------------------------------------------------
77  // This is where the action happens.
78  //--------------------------------------------------------------------------
79  virtual LocalPoint localPosition(DetParam const& dp, ClusterParam& cp) const;
80  virtual LocalError localError(DetParam const& dp, ClusterParam& cp) const;
81  virtual TimeValue clusterTime(DetParam const& dp, ClusterParam& cp) const;
82  virtual TimeValueError clusterTimeError(DetParam const& dp, ClusterParam& cp) const;
83 
84  void fillDetParams();
85 
86 protected:
87  //---------------------------------------------------------------------------
88  // Data members
89  //---------------------------------------------------------------------------
90 
91  //--- Global quantities
92  const MTDGeometry& geom_; // geometry
93 
94 protected:
95  void setTheClu(DetParam const& dp, ClusterParam& cp) const;
96 
97  //---------------------------------------------------------------------------
98  // Cluster-level services.
99  //---------------------------------------------------------------------------
100 
101  DetParam const& detParam(const GeomDetUnit& det) const;
102 
103  using DetParams = std::vector<DetParam>;
105 };
106 
107 #endif
virtual LocalError localError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:75
ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det) const override
Definition: MTDCPEBase.h:57
const FTLCluster * theCluster
Definition: MTDCPEBase.h:51
void fillDetParams()
Definition: MTDCPEBase.cc:26
virtual TimeValue clusterTime(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:82
const RectangularMTDTopology * theRecTopol
Definition: MTDCPEBase.h:37
ClusterParam(const FTLCluster &cl)
Definition: MTDCPEBase.h:47
DetParams m_DetParams
Definition: MTDCPEBase.h:104
virtual TimeValueError clusterTimeError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:86
GeomDetType::SubDetector thePart
Definition: MTDCPEBase.h:39
DetParam const & detParam(const GeomDetUnit &det) const
Definition: MTDCPEBase.cc:67
std::vector< DetParam > DetParams
Definition: MTDCPEBase.h:103
const ProxyMTDTopology * theTopol
Definition: MTDCPEBase.h:36
virtual LocalPoint localPosition(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:69
const MTDGeomDetUnit * theDet
Definition: MTDCPEBase.h:35
void setTheClu(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:64
Local3DPoint theOrigin
Definition: MTDCPEBase.h:40
ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det, const LocalTrajectoryParameters &ltp) const override
Definition: MTDCPEBase.h:69
std::tuple< LocalPoint, LocalError, TimeValue, TimeValueError > ReturnType
const MTDGeometry & geom_
Definition: MTDCPEBase.h:92
MTDCPEBase(edm::ParameterSet const &conf, const MTDGeometry &geom)
Definition: MTDCPEBase.cc:21