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 
28 #include <unordered_map>
29 
30 #include <iostream>
31 
32 
34 {
35 public:
36  struct DetParam
37  {
38  DetParam() {}
42 
45  float theThickness;
46  float thePitchX;
47  float thePitchY;
48  };
49 
50  struct ClusterParam
51  {
52  ClusterParam(const FTLCluster & cl) : theCluster(&cl) {}
53 
54  virtual ~ClusterParam() = default;
55 
57  };
58 
59 public:
60  MTDCPEBase(edm::ParameterSet const& conf, const MTDGeometry& geom);
61 
62 
64  const GeomDetUnit & det ) const override
65  {
66 
67  DetParam const & dp = detParam(det);
68  ClusterParam cp(cl);
69  setTheClu( dp, cp );
70  auto tuple = std::make_tuple(
71  localPosition(dp, cp),
72  localError(dp, cp),
73  clusterTime(dp, cp),
74  clusterTimeError(dp, cp)
75  );
76  return tuple;
77  }
78 
79  //--------------------------------------------------------------------------
80  // In principle we could use the track too to get an angle if needed
81  //--------------------------------------------------------------------------
83  const GeomDetUnit & det,
84  const LocalTrajectoryParameters & ltp ) const override
85  {
86  return getParameters(cl,det);
87  }
88 
89 
90 
91 private:
92  //--------------------------------------------------------------------------
93  // This is where the action happens.
94  //--------------------------------------------------------------------------
95  virtual LocalPoint localPosition(DetParam const & dp, ClusterParam & cp) const;
96  virtual LocalError localError (DetParam const & dp, ClusterParam & cp) const;
97  virtual TimeValue clusterTime(DetParam const & dp, ClusterParam & cp) const;
98  virtual TimeValueError clusterTimeError(DetParam const & dp, ClusterParam & cp) const;
99 
100  void fillDetParams();
101 
102 protected:
103  //---------------------------------------------------------------------------
104  // Data members
105  //---------------------------------------------------------------------------
106 
107  //--- Global quantities
108  const MTDGeometry & geom_; // geometry
109 
110 protected:
111 
112  void setTheClu( DetParam const & dp, ClusterParam & cp ) const ;
113 
114  //---------------------------------------------------------------------------
115  // Cluster-level services.
116  //---------------------------------------------------------------------------
117 
118  DetParam const & detParam(const GeomDetUnit & det) const;
119 
120  using DetParams=std::vector<DetParam>;
122 
123 };
124 
125 #endif
126 
127 
virtual LocalError localError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:95
ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det) const override
Definition: MTDCPEBase.h:63
const FTLCluster * theCluster
Definition: MTDCPEBase.h:56
void fillDetParams()
Definition: MTDCPEBase.cc:33
virtual TimeValue clusterTime(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:104
const RectangularMTDTopology * theRecTopol
Definition: MTDCPEBase.h:41
ClusterParam(const FTLCluster &cl)
Definition: MTDCPEBase.h:52
DetParams m_DetParams
Definition: MTDCPEBase.h:121
virtual TimeValueError clusterTimeError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:111
GeomDetType::SubDetector thePart
Definition: MTDCPEBase.h:43
std::tuple< LocalPoint, LocalError, TimeValue, TimeValueError > ReturnType
DetParam const & detParam(const GeomDetUnit &det) const
Definition: MTDCPEBase.cc:81
std::vector< DetParam > DetParams
Definition: MTDCPEBase.h:120
const ProxyMTDTopology * theTopol
Definition: MTDCPEBase.h:40
virtual LocalPoint localPosition(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:87
const MTDGeomDetUnit * theDet
Definition: MTDCPEBase.h:39
void setTheClu(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:76
Local3DPoint theOrigin
Definition: MTDCPEBase.h:44
ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det, const LocalTrajectoryParameters &ltp) const override
Definition: MTDCPEBase.h:82
const MTDGeometry & geom_
Definition: MTDCPEBase.h:108
MTDCPEBase(edm::ParameterSet const &conf, const MTDGeometry &geom)
Definition: MTDCPEBase.cc:22