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  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
MTDCPEBase::setTheClu
void setTheClu(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:64
GeomDetEnumerators::SubDetector
SubDetector
Definition: GeomDetEnumerators.h:10
MTDClusterParameterEstimator::ReturnType
std::tuple< LocalPoint, LocalError, TimeValue, TimeValueError > ReturnType
Definition: MTDClusterParameterEstimator.h:25
GeomDet
Definition: GeomDet.h:27
FTLCluster
Definition: FTLCluster.h:21
MTDCPEBase::DetParam::theThickness
float theThickness
Definition: MTDCPEBase.h:41
MTDCPEBase::geom_
const MTDGeometry & geom_
Definition: MTDCPEBase.h:92
MTDCPEBase
Definition: MTDCPEBase.h:31
MTDGeometry.h
MeasurementError.h
MTDGeomDetUnit.h
GeomDetType.h
MTDCPEBase::detParam
DetParam const & detParam(const GeomDetUnit &det) const
Definition: MTDCPEBase.cc:67
MTDCPEBase::getParameters
ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det, const LocalTrajectoryParameters &ltp) const override
Definition: MTDCPEBase.h:69
MTDCPEBase::getParameters
ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det) const override
Definition: MTDCPEBase.h:57
MTDClusterParameterEstimator::TimeValueError
float TimeValueError
Definition: MTDClusterParameterEstimator.h:23
MTDCPEBase::DetParam::theRecTopol
const RectangularMTDTopology * theRecTopol
Definition: MTDCPEBase.h:37
MTDCPEBase::fillDetParams
void fillDetParams()
Definition: MTDCPEBase.cc:26
MTDCPEBase::m_DetParams
DetParams m_DetParams
Definition: MTDCPEBase.h:104
MTDCPEBase::localError
virtual LocalError localError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:75
LocalTrajectoryParameters
Definition: LocalTrajectoryParameters.h:25
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
MTDClusterParameterEstimator
Definition: MTDClusterParameterEstimator.h:15
MTDCPEBase::clusterTime
virtual TimeValue clusterTime(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:82
Calorimetry_cff.dp
dp
Definition: Calorimetry_cff.py:157
GloballyPositioned.h
RectangularMTDTopology.h
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
MTDCPEBase::DetParam::thePart
GeomDetType::SubDetector thePart
Definition: MTDCPEBase.h:39
Point3DBase< float, LocalTag >
MTDCPEBase::ClusterParam::ClusterParam
ClusterParam(const FTLCluster &cl)
Definition: MTDCPEBase.h:47
MTDCPEBase::ClusterParam::theCluster
const FTLCluster * theCluster
Definition: MTDCPEBase.h:51
MTDCPEBase::DetParam::thePitchY
float thePitchY
Definition: MTDCPEBase.h:43
edm::ParameterSet
Definition: ParameterSet.h:36
MTDCPEBase::localPosition
virtual LocalPoint localPosition(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:69
MTDCPEBase::ClusterParam::~ClusterParam
virtual ~ClusterParam()=default
LocalError
Definition: LocalError.h:12
MTDCPEBase::DetParam::theTopol
const ProxyMTDTopology * theTopol
Definition: MTDCPEBase.h:36
MeasurementPoint.h
MTDGeomDetUnit
Definition: MTDGeomDetUnit.h:15
RectangularMTDTopology
Definition: RectangularMTDTopology.h:39
ProxyMTDTopology
Definition: ProxyMTDTopology.h:28
MTDCPEBase::DetParams
std::vector< DetParam > DetParams
Definition: MTDCPEBase.h:103
ProxyMTDTopology.h
MTDGeometry
Definition: MTDGeometry.h:14
MTDClusterParameterEstimator::TimeValue
float TimeValue
Definition: MTDClusterParameterEstimator.h:22
MTDCPEBase::clusterTimeError
virtual TimeValueError clusterTimeError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:86
MTDClusterParameterEstimator.h
MTDCPEBase::DetParam::theDet
const MTDGeomDetUnit * theDet
Definition: MTDCPEBase.h:35
MTDCPEBase::MTDCPEBase
MTDCPEBase(edm::ParameterSet const &conf, const MTDGeometry &geom)
Definition: MTDCPEBase.cc:21
ParameterSet.h
CommonMethods.cp
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
Definition: CommonMethods.py:192
MTDCPEBase::ClusterParam
Definition: MTDCPEBase.h:46
MTDCPEBase::DetParam::DetParam
DetParam()
Definition: MTDCPEBase.h:34
MTDCPEBase::DetParam::theOrigin
Local3DPoint theOrigin
Definition: MTDCPEBase.h:40
MTDCPEBase::DetParam
Definition: MTDCPEBase.h:33
MTDCPEBase::DetParam::thePitchX
float thePitchX
Definition: MTDCPEBase.h:42