CMS 3D CMS Logo

List of all members | Public Member Functions
RPCRecHitStandardAlgo Class Reference

#include <RPCRecHitStandardAlgo.h>

Inheritance diagram for RPCRecHitStandardAlgo:
RPCRecHitBaseAlgo

Public Member Functions

bool compute (const RPCRoll &roll, const RPCCluster &cluster, const float &angle, const GlobalPoint &globPos, LocalPoint &point, LocalError &error, float &time, float &timeErr) const override
 
bool compute (const RPCRoll &roll, const RPCCluster &cluster, LocalPoint &point, LocalError &error, float &time, float &timeErr) const override
 standard local recHit computation More...
 
 RPCRecHitStandardAlgo (const edm::ParameterSet &config)
 Constructor. More...
 
void setES (const edm::EventSetup &setup) override
 Pass the Event Setup to the algo at each event. More...
 
 ~RPCRecHitStandardAlgo () override
 Destructor. More...
 
- Public Member Functions inherited from RPCRecHitBaseAlgo
virtual edm::OwnVector< RPCRecHitreconstruct (const RPCRoll &roll, const RPCDetId &rpcId, const RPCDigiCollection::Range &digiRange, const RollMask &mask)
 Build all hits in the range associated to the rpcId, at the 1st step. More...
 
 RPCRecHitBaseAlgo (const edm::ParameterSet &config)
 Constructor. More...
 
virtual ~RPCRecHitBaseAlgo ()
 Destructor. More...
 

Detailed Description

Concrete implementation of RPCRecHitBaseAlgo.

Author
M. Maggi – INFN Bari

Definition at line 12 of file RPCRecHitStandardAlgo.h.

Constructor & Destructor Documentation

◆ RPCRecHitStandardAlgo()

RPCRecHitStandardAlgo::RPCRecHitStandardAlgo ( const edm::ParameterSet config)
inline

Constructor.

Definition at line 15 of file RPCRecHitStandardAlgo.h.

◆ ~RPCRecHitStandardAlgo()

RPCRecHitStandardAlgo::~RPCRecHitStandardAlgo ( )
inlineoverride

Destructor.

Definition at line 18 of file RPCRecHitStandardAlgo.h.

18 {};

Member Function Documentation

◆ compute() [1/2]

bool RPCRecHitStandardAlgo::compute ( const RPCRoll roll,
const RPCCluster cl,
const float &  angle,
const GlobalPoint globPos,
LocalPoint Point,
LocalError error,
float &  time,
float &  timeErr 
) const
overridevirtual

local recHit computation accounting for track direction and absolute position

Implements RPCRecHitBaseAlgo.

Definition at line 67 of file RPCRecHitStandardAlgo.cc.

74  {
75  this->compute(roll, cl, Point, error, time, timeErr);
76  return true;
77 }

References GetRecoTauVFromDQM_MC_cff::cl, compute(), relativeConstraints::error, and protons_cff::time.

◆ compute() [2/2]

bool RPCRecHitStandardAlgo::compute ( const RPCRoll roll,
const RPCCluster cl,
LocalPoint Point,
LocalError error,
float &  time,
float &  timeErr 
) const
overridevirtual

standard local recHit computation

Implements RPCRecHitBaseAlgo.

Definition at line 18 of file RPCRecHitStandardAlgo.cc.

23  {
24  // Get Average Strip position
25  const float fstrip = (roll.centreOfStrip(cluster.firstStrip())).x();
26  const float lstrip = (roll.centreOfStrip(cluster.lastStrip())).x();
27  const float centreOfCluster = (fstrip + lstrip) / 2;
28  const double y = cluster.hasY() ? cluster.y() : 0;
29  Point = LocalPoint(centreOfCluster, y, 0);
30 
31  if (!cluster.hasY()) {
32  error = LocalError(roll.localError((cluster.firstStrip() + cluster.lastStrip()) / 2.));
33  } else {
34  // Use the default one for local x error
35  float ex2 = roll.localError((cluster.firstStrip() + cluster.lastStrip()) / 2.).xx();
36  // Maximum estimate of local y error, (distance to the boundary)/sqrt(3)
37  // which gives consistent error to the default one at y=0
38  const float stripLen = roll.specificTopology().stripLength();
39  const float maxDy = stripLen / 2 - std::abs(cluster.y());
40 
41  // Apply x-position correction for the endcap
42  if (roll.id().region() != 0) {
43  const auto& topo = dynamic_cast<const TrapezoidalStripTopology&>(roll.topology());
44  const double angle = topo.stripAngle((cluster.firstStrip() + cluster.lastStrip()) / 2.);
45  const double x = centreOfCluster - y * std::tan(angle);
46  Point = LocalPoint(x, y, 0);
47 
48  // rescale x-error by the change of local pitch
49  const double scale = topo.localPitch(Point) / topo.pitch();
50  ex2 *= scale * scale;
51  }
52 
53  error = LocalError(ex2, 0, maxDy * maxDy / 3.);
54  }
55 
56  if (cluster.hasTime()) {
57  time = cluster.time();
58  timeErr = cluster.timeRMS();
59  } else {
60  time = 0;
61  timeErr = -1;
62  }
63 
64  return true;
65 }

References funct::abs(), angle(), RPCRoll::centreOfStrip(), relativeConstraints::error, RPCCluster::firstStrip(), RPCCluster::hasTime(), RPCCluster::hasY(), RPCRoll::id(), RPCCluster::lastStrip(), RPCRoll::localError(), RPCDetId::region(), L1EGammaCrystalsEmulatorProducer_cfi::scale, RPCRoll::specificTopology(), StripTopology::stripLength(), funct::tan(), RPCCluster::time(), protons_cff::time, RPCCluster::timeRMS(), RPCRoll::topology(), x, LocalError::xx(), y, and RPCCluster::y().

Referenced by compute().

◆ setES()

void RPCRecHitStandardAlgo::setES ( const edm::EventSetup setup)
inlineoverridevirtual

Pass the Event Setup to the algo at each event.

Implements RPCRecHitBaseAlgo.

Definition at line 21 of file RPCRecHitStandardAlgo.h.

21 {};
DDAxes::y
RPCDetId::region
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
Definition: RPCDetId.h:53
L1EGammaCrystalsEmulatorProducer_cfi.scale
scale
Definition: L1EGammaCrystalsEmulatorProducer_cfi.py:10
protons_cff.time
time
Definition: protons_cff.py:39
DDAxes::x
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
relativeConstraints.error
error
Definition: relativeConstraints.py:53
RPCRoll::topology
const Topology & topology() const override
Definition: RPCRoll.cc:18
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
config
Definition: config.py:1
RPCRoll::id
RPCDetId id() const
Definition: RPCRoll.cc:16
LocalError::xx
float xx() const
Definition: LocalError.h:22
RPCRoll::specificTopology
const StripTopology & specificTopology() const
Definition: RPCRoll.cc:49
RPCRoll::centreOfStrip
LocalPoint centreOfStrip(int strip) const
Definition: RPCRoll.cc:26
RPCRecHitStandardAlgo::compute
bool compute(const RPCRoll &roll, const RPCCluster &cluster, LocalPoint &point, LocalError &error, float &time, float &timeErr) const override
standard local recHit computation
Definition: RPCRecHitStandardAlgo.cc:18
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
StripTopology::stripLength
virtual float stripLength() const =0
LocalError
Definition: LocalError.h:12
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
angle
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
RPCRoll::localError
LocalError localError(float strip) const
Definition: RPCRoll.cc:33
RPCRecHitBaseAlgo::RPCRecHitBaseAlgo
RPCRecHitBaseAlgo(const edm::ParameterSet &config)
Constructor.
Definition: RPCRecHitBaseAlgo.cc:13