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  static constexpr float sigma_flat = 0.2886751f; // 1.f / std::sqrt(12.f);
84 
85 protected:
86  //---------------------------------------------------------------------------
87  // Data members
88  //---------------------------------------------------------------------------
89 
90  //--- Global quantities
91  const MTDGeometry& geom_; // geometry
92 
93 protected:
94  //---------------------------------------------------------------------------
95  // Cluster-level services.
96  //---------------------------------------------------------------------------
97 
98  DetParam const& detParam(const GeomDetUnit& det) const;
99 
100  using DetParams = std::vector<DetParam>;
102 };
103 
104 #endif
virtual LocalError localError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:74
const FTLCluster * theCluster
Definition: MTDCPEBase.h:51
DetParam const & detParam(const GeomDetUnit &det) const
Definition: MTDCPEBase.cc:60
static constexpr float sigma_flat
Definition: MTDCPEBase.h:83
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:92
DetParams m_DetParams
Definition: MTDCPEBase.h:101
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:100
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:96
const MTDGeometry & geom_
Definition: MTDCPEBase.h:91
MTDCPEBase(edm::ParameterSet const &conf, const MTDGeometry &geom)
Definition: MTDCPEBase.cc:21
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)