CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
MTDCPEBase Class Reference

#include <MTDCPEBase.h>

Inheritance diagram for MTDCPEBase:
MTDClusterParameterEstimator

Classes

struct  ClusterParam
 
struct  DetParam
 

Public Member Functions

ReturnType getParameters (const FTLCluster &cl, const GeomDetUnit &det) const override
 
ReturnType getParameters (const FTLCluster &cl, const GeomDetUnit &det, const LocalTrajectoryParameters &ltp) const override
 
 MTDCPEBase (edm::ParameterSet const &conf, const MTDGeometry &geom)
 
- Public Member Functions inherited from MTDClusterParameterEstimator
virtual ReturnType getParameters (const FTLCluster &cl, const GeomDetUnit &det, const TrajectoryStateOnSurface &tsos) const
 
virtual VLocalValues localParametersV (const FTLCluster &cluster, const GeomDetUnit &gd) const
 
virtual VLocalValues localParametersV (const FTLCluster &cluster, const GeomDetUnit &gd, TrajectoryStateOnSurface &tsos) const
 
 MTDClusterParameterEstimator ()
 
virtual ~MTDClusterParameterEstimator ()
 

Protected Types

using DetParams = std::vector< DetParam >
 

Protected Member Functions

DetParam const & detParam (const GeomDetUnit &det) const
 
void setTheClu (DetParam const &dp, ClusterParam &cp) const
 

Protected Attributes

const MTDGeometrygeom_
 
DetParams m_DetParams
 

Private Member Functions

virtual TimeValue clusterTime (DetParam const &dp, ClusterParam &cp) const
 
virtual TimeValueError clusterTimeError (DetParam const &dp, ClusterParam &cp) const
 
void fillDetParams ()
 
virtual LocalError localError (DetParam const &dp, ClusterParam &cp) const
 
virtual LocalPoint localPosition (DetParam const &dp, ClusterParam &cp) const
 

Additional Inherited Members

- Public Types inherited from MTDClusterParameterEstimator
typedef std::pair< LocalPoint, LocalErrorLocalValues
 
using ReturnType = std::tuple< LocalPoint, LocalError, TimeValue, TimeValueError >
 
typedef float TimeValue
 
typedef float TimeValueError
 
typedef std::vector< LocalValuesVLocalValues
 

Detailed Description

Definition at line 31 of file MTDCPEBase.h.

Member Typedef Documentation

using MTDCPEBase::DetParams = std::vector<DetParam>
protected

Definition at line 103 of file MTDCPEBase.h.

Constructor & Destructor Documentation

MTDCPEBase::MTDCPEBase ( edm::ParameterSet const &  conf,
const MTDGeometry geom 
)

Definition at line 21 of file MTDCPEBase.cc.

References fillDetParams().

21 : geom_(geom) { fillDetParams(); }
void fillDetParams()
Definition: MTDCPEBase.cc:26
const MTDGeometry & geom_
Definition: MTDCPEBase.h:92

Member Function Documentation

MTDCPEBase::TimeValue MTDCPEBase::clusterTime ( DetParam const &  dp,
ClusterParam cp 
) const
privatevirtual

Definition at line 82 of file MTDCPEBase.cc.

References MTDCPEBase::ClusterParam::theCluster, and FTLCluster::time().

Referenced by getParameters().

82  {
83  return cp.theCluster->time();
84 }
MTDCPEBase::TimeValueError MTDCPEBase::clusterTimeError ( DetParam const &  dp,
ClusterParam cp 
) const
privatevirtual

Definition at line 86 of file MTDCPEBase.cc.

References MTDCPEBase::ClusterParam::theCluster, and FTLCluster::timeError().

Referenced by getParameters().

86  {
87  return cp.theCluster->timeError();
88 }
MTDCPEBase::DetParam const & MTDCPEBase::detParam ( const GeomDetUnit det) const
protected

Definition at line 67 of file MTDCPEBase.cc.

References GeomDet::index(), and m_DetParams.

Referenced by getParameters().

67 { return m_DetParams.at(det.index()); }
DetParams m_DetParams
Definition: MTDCPEBase.h:104
int index() const
Definition: GeomDet.h:83
void MTDCPEBase::fillDetParams ( )
private

Definition at line 26 of file MTDCPEBase.cc.

References MuonGeometrySanityCheck_cfi::detectors(), MTDGeometry::detUnits(), geom_, mps_fire::i, LogDebug, m_DetParams, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by getParameters(), and MTDCPEBase().

26  {
27  auto const& dus = geom_.detUnits();
28  unsigned detectors = dus.size();
29  m_DetParams.resize(detectors);
30  LogDebug("MTDCPEBase::fillDetParams():") << "caching " << detectors << "MTD detectors" << endl;
31  for (unsigned i = 0; i != detectors; ++i) {
32  auto& p = m_DetParams[i];
33  p.theDet = dynamic_cast<const MTDGeomDetUnit*>(dus[i]);
34  assert(p.theDet);
35 
36  p.theOrigin = p.theDet->surface().toLocal(GlobalPoint(0, 0, 0));
37 
38  //--- p.theDet->type() returns a GeomDetType, which implements subDetector()
39  p.thePart = p.theDet->type().subDetector();
40 
41  //--- bounds() is implemented in BoundSurface itself.
42  p.theThickness = p.theDet->surface().bounds().thickness();
43 
44  // Cache the det id for templates and generic erros
45  p.theTopol = &(static_cast<const ProxyMTDTopology&>(p.theDet->topology()));
46  assert(p.theTopol);
47  p.theRecTopol = &(static_cast<const RectangularMTDTopology&>(p.theTopol->specificTopology()));
48  assert(p.theRecTopol);
49 
50  //--- The geometrical description of one module/plaquette
51  std::pair<float, float> pitchxy = p.theRecTopol->pitch();
52  p.thePitchX = pitchxy.first; // pitch along x
53  p.thePitchY = pitchxy.second; // pitch along y
54 
55  LogDebug("MTDCPEBase::fillDetParams()") << "***** MTD LAYOUT *****"
56  << " thePart = " << p.thePart << " theThickness = " << p.theThickness
57  << " thePitchX = " << p.thePitchX << " thePitchY = " << p.thePitchY;
58  }
59 }
#define LogDebug(id)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: MTDGeometry.h:27
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
def detectors(dt=True, csc=True, me42=False, chambers=True, superlayers=False, layers=False)
DetParams m_DetParams
Definition: MTDCPEBase.h:104
const MTDGeometry & geom_
Definition: MTDCPEBase.h:92
ReturnType MTDCPEBase::getParameters ( const FTLCluster cl,
const GeomDetUnit det 
) const
inlineoverridevirtual

Implements MTDClusterParameterEstimator.

Definition at line 57 of file MTDCPEBase.h.

References clusterTime(), clusterTimeError(), SimDataFormats::CaloAnalysis::cp, detParam(), Calorimetry_cff::dp, localError(), localPosition(), and setTheClu().

Referenced by getParameters().

57  {
58  DetParam const& dp = detParam(det);
59  ClusterParam cp(cl);
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  }
virtual LocalError localError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:75
virtual TimeValue clusterTime(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:82
virtual TimeValueError clusterTimeError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:86
DetParam const & detParam(const GeomDetUnit &det) const
Definition: MTDCPEBase.cc:67
virtual LocalPoint localPosition(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:69
void setTheClu(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:64
ReturnType MTDCPEBase::getParameters ( const FTLCluster cl,
const GeomDetUnit det,
const LocalTrajectoryParameters ltp 
) const
inlineoverridevirtual

Implements MTDClusterParameterEstimator.

Definition at line 69 of file MTDCPEBase.h.

References clusterTime(), clusterTimeError(), SimDataFormats::CaloAnalysis::cp, Calorimetry_cff::dp, fillDetParams(), getParameters(), localError(), and localPosition().

71  {
72  return getParameters(cl, det);
73  }
ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det) const override
Definition: MTDCPEBase.h:57
LocalError MTDCPEBase::localError ( DetParam const &  dp,
ClusterParam cp 
) const
privatevirtual

Definition at line 75 of file MTDCPEBase.cc.

References constexpr, ProxyMTDTopology::localError(), MTDCPEBase::ClusterParam::theCluster, MTDCPEBase::DetParam::theTopol, FTLCluster::x(), and FTLCluster::y().

Referenced by getParameters().

75  {
76  constexpr double one_over_twelve = 1. / 12.;
77  MeasurementPoint pos(cp.theCluster->x(), cp.theCluster->y());
78  MeasurementError simpleRect(one_over_twelve, 0, one_over_twelve);
79  return dp.theTopol->localError(pos, simpleRect);
80 }
float y() const
Same as rapidity().
Definition: CaloParticle.h:149
#define constexpr
LocalPoint MTDCPEBase::localPosition ( DetParam const &  dp,
ClusterParam cp 
) const
privatevirtual

Definition at line 69 of file MTDCPEBase.cc.

References ProxyMTDTopology::localPosition(), MTDCPEBase::ClusterParam::theCluster, MTDCPEBase::DetParam::theTopol, FTLCluster::x(), and FTLCluster::y().

Referenced by getParameters().

69  {
70  //remember measurement point is row(col)+0.5f
71  MeasurementPoint pos(cp.theCluster->x(), cp.theCluster->y());
72  return dp.theTopol->localPosition(pos);
73 }
float y() const
Same as rapidity().
Definition: CaloParticle.h:149
void MTDCPEBase::setTheClu ( DetParam const &  dp,
ClusterParam cp 
) const
protected

Definition at line 64 of file MTDCPEBase.cc.

Referenced by getParameters().

64 {}

Member Data Documentation

const MTDGeometry& MTDCPEBase::geom_
protected

Definition at line 92 of file MTDCPEBase.h.

Referenced by fillDetParams().

DetParams MTDCPEBase::m_DetParams
protected

Definition at line 104 of file MTDCPEBase.h.

Referenced by detParam(), and fillDetParams().