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
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:20
MTDCPEBase::DetParam::theThickness
float theThickness
Definition: MTDCPEBase.h:41
MTDCPEBase::geom_
const MTDGeometry & geom_
Definition: MTDCPEBase.h:89
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:60
MTDCPEBase::getParameters
ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det, const LocalTrajectoryParameters &ltp) const override
Definition: MTDCPEBase.h:68
MTDCPEBase::getParameters
ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det) const override
Definition: MTDCPEBase.h:57
MTDClusterParameterEstimator::TimeValueError
float TimeValueError
Definition: MTDClusterParameterEstimator.h:23
hgcal_conditions::parameters
Definition: HGCConditions.h:86
MTDCPEBase::DetParam::theRecTopol
const RectangularMTDTopology * theRecTopol
Definition: MTDCPEBase.h:37
MTDCPEBase::m_DetParams
DetParams m_DetParams
Definition: MTDCPEBase.h:99
MTDCPEBase::localError
virtual LocalError localError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:68
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:75
Calorimetry_cff.dp
dp
Definition: Calorimetry_cff.py:158
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:47
MTDCPEBase::localPosition
virtual LocalPoint localPosition(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:62
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:98
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:79
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:191
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