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 {
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);
60  auto tuple =
61  std::make_tuple(localPosition(dp, cp), localError(dp, cp), clusterTime(dp, cp), clusterTimeError(dp, cp));
62  return tuple;
63  }
64 
65  //--------------------------------------------------------------------------
66  // In principle we could use the track too to get an angle if needed
67  //--------------------------------------------------------------------------
69  const GeomDetUnit& det,
70  const LocalTrajectoryParameters& ltp) const override {
71  return getParameters(cl, det);
72  }
73 
74 private:
75  //--------------------------------------------------------------------------
76  // This is where the action happens.
77  //--------------------------------------------------------------------------
78  virtual LocalPoint localPosition(DetParam const& dp, ClusterParam& cp) const;
79  virtual LocalError localError(DetParam const& dp, ClusterParam& cp) const;
80  virtual TimeValue clusterTime(DetParam const& dp, ClusterParam& cp) const;
81  virtual TimeValueError clusterTimeError(DetParam const& dp, ClusterParam& cp) const;
82 
83 protected:
84  //---------------------------------------------------------------------------
85  // Data members
86  //---------------------------------------------------------------------------
87 
88  //--- Global quantities
89  const MTDGeometry& geom_; // geometry
90 
91 protected:
92  //---------------------------------------------------------------------------
93  // Cluster-level services.
94  //---------------------------------------------------------------------------
95 
96  DetParam const& detParam(const GeomDetUnit& det) const;
97 
98  using DetParams = std::vector<DetParam>;
100 };
101 
102 #endif
virtual LocalError localError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:68
const FTLCluster * theCluster
Definition: MTDCPEBase.h:51
DetParam const & detParam(const GeomDetUnit &det) const
Definition: MTDCPEBase.cc:60
const RectangularMTDTopology * theRecTopol
Definition: MTDCPEBase.h:37
ClusterParam(const FTLCluster &cl)
Definition: MTDCPEBase.h:47
virtual TimeValue clusterTime(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:75
DetParams m_DetParams
Definition: MTDCPEBase.h:99
ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det, const LocalTrajectoryParameters &ltp) const override
Definition: MTDCPEBase.h:68
GeomDetType::SubDetector thePart
Definition: MTDCPEBase.h:39
std::vector< DetParam > DetParams
Definition: MTDCPEBase.h:98
const ProxyMTDTopology * theTopol
Definition: MTDCPEBase.h:36
virtual ~ClusterParam()=default
virtual LocalPoint localPosition(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:62
const MTDGeomDetUnit * theDet
Definition: MTDCPEBase.h:35
ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det) const override
Definition: MTDCPEBase.h:57
Local3DPoint theOrigin
Definition: MTDCPEBase.h:40
std::tuple< LocalPoint, LocalError, TimeValue, TimeValueError > ReturnType
virtual TimeValueError clusterTimeError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:79
const MTDGeometry & geom_
Definition: MTDCPEBase.h:89
MTDCPEBase(edm::ParameterSet const &conf, const MTDGeometry &geom)
Definition: MTDCPEBase.cc:21
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)