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 33 of file MTDCPEBase.h.

Member Typedef Documentation

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

Definition at line 120 of file MTDCPEBase.h.

Constructor & Destructor Documentation

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

Definition at line 22 of file MTDCPEBase.cc.

References fillDetParams().

24  : geom_(geom)
25 {
26  fillDetParams();
27 }
void fillDetParams()
Definition: MTDCPEBase.cc:33
const MTDGeometry & geom_
Definition: MTDCPEBase.h:108

Member Function Documentation

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

Definition at line 104 of file MTDCPEBase.cc.

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

Referenced by getParameters().

105 {
106  return cp.theCluster->time();
107 }
MTDCPEBase::TimeValueError MTDCPEBase::clusterTimeError ( DetParam const &  dp,
ClusterParam cp 
) const
privatevirtual

Definition at line 111 of file MTDCPEBase.cc.

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

Referenced by getParameters().

112 {
113  return cp.theCluster->timeError();
114 }
MTDCPEBase::DetParam const & MTDCPEBase::detParam ( const GeomDetUnit det) const
protected

Definition at line 81 of file MTDCPEBase.cc.

References GeomDet::index(), and m_DetParams.

Referenced by getParameters().

82 {
83  return m_DetParams.at(det.index());
84 }
DetParams m_DetParams
Definition: MTDCPEBase.h:121
int index() const
Definition: GeomDet.h:99
void MTDCPEBase::fillDetParams ( )
private

Definition at line 33 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().

34 {
35  auto const & dus = geom_.detUnits();
36  unsigned detectors = dus.size();
37  m_DetParams.resize(detectors);
38  LogDebug("MTDCPEBase::fillDetParams():") <<"caching "<<detectors<<"MTD detectors"<<endl;
39  for (unsigned i=0; i!=detectors;++i)
40  {
41  auto & p=m_DetParams[i];
42  p.theDet = dynamic_cast<const MTDGeomDetUnit*>(dus[i]);
43  assert(p.theDet);
44 
45  p.theOrigin = p.theDet->surface().toLocal(GlobalPoint(0,0,0));
46 
47  //--- p.theDet->type() returns a GeomDetType, which implements subDetector()
48  p.thePart = p.theDet->type().subDetector();
49 
50  //--- bounds() is implemented in BoundSurface itself.
51  p.theThickness = p.theDet->surface().bounds().thickness();
52 
53  // Cache the det id for templates and generic erros
54  p.theTopol = &(static_cast<const ProxyMTDTopology&>(p.theDet->topology()));
55  assert(p.theTopol);
56  p.theRecTopol = &(static_cast<const RectangularMTDTopology&>(p.theTopol->specificTopology()));
57  assert(p.theRecTopol);
58 
59  //--- The geometrical description of one module/plaquette
60  std::pair<float,float> pitchxy = p.theRecTopol->pitch();
61  p.thePitchX = pitchxy.first; // pitch along x
62  p.thePitchY = pitchxy.second; // pitch along y
63 
64  LogDebug("MTDCPEBase::fillDetParams()") << "***** MTD LAYOUT *****"
65  << " thePart = " << p.thePart
66  << " theThickness = " << p.theThickness
67  << " thePitchX = " << p.thePitchX
68  << " thePitchY = " << p.thePitchY;
69  }
70 }
#define LogDebug(id)
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
Definition: MTDGeometry.h:28
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:121
const MTDGeometry & geom_
Definition: MTDCPEBase.h:108
ReturnType MTDCPEBase::getParameters ( const FTLCluster cl,
const GeomDetUnit det 
) const
inlineoverridevirtual

Implements MTDClusterParameterEstimator.

Definition at line 63 of file MTDCPEBase.h.

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

Referenced by getParameters().

65  {
66 
67  DetParam const & dp = detParam(det);
68  ClusterParam cp(cl);
69  setTheClu( dp, cp );
70  auto tuple = std::make_tuple(
71  localPosition(dp, cp),
72  localError(dp, cp),
73  clusterTime(dp, cp),
74  clusterTimeError(dp, cp)
75  );
76  return tuple;
77  }
virtual LocalError localError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:95
virtual TimeValue clusterTime(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:104
virtual TimeValueError clusterTimeError(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:111
DetParam const & detParam(const GeomDetUnit &det) const
Definition: MTDCPEBase.cc:81
virtual LocalPoint localPosition(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:87
void setTheClu(DetParam const &dp, ClusterParam &cp) const
Definition: MTDCPEBase.cc:76
ReturnType MTDCPEBase::getParameters ( const FTLCluster cl,
const GeomDetUnit det,
const LocalTrajectoryParameters ltp 
) const
inlineoverridevirtual

Implements MTDClusterParameterEstimator.

Definition at line 82 of file MTDCPEBase.h.

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

85  {
86  return getParameters(cl,det);
87  }
ReturnType getParameters(const FTLCluster &cl, const GeomDetUnit &det) const override
Definition: MTDCPEBase.h:63
LocalError MTDCPEBase::localError ( DetParam const &  dp,
ClusterParam cp 
) const
privatevirtual

Definition at line 95 of file MTDCPEBase.cc.

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

Referenced by getParameters().

96 {
97  constexpr double one_over_twelve = 1./12.;
98  MeasurementPoint pos(cp.theCluster->x(),cp.theCluster->y());
99  MeasurementError simpleRect(one_over_twelve,0,one_over_twelve);
100  return dp.theTopol->localError(pos,simpleRect);
101 }
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 87 of file MTDCPEBase.cc.

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

Referenced by getParameters().

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

Definition at line 76 of file MTDCPEBase.cc.

Referenced by getParameters().

77 {
78 }

Member Data Documentation

const MTDGeometry& MTDCPEBase::geom_
protected

Definition at line 108 of file MTDCPEBase.h.

Referenced by fillDetParams().

DetParams MTDCPEBase::m_DetParams
protected

Definition at line 121 of file MTDCPEBase.h.

Referenced by detParam(), and fillDetParams().