test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
RPCRecHitStandardAlgo Class Reference

#include <RPCRecHitStandardAlgo.h>

Inheritance diagram for RPCRecHitStandardAlgo:
RPCRecHitBaseAlgo

Public Member Functions

virtual bool compute (const RPCRoll &roll, const RPCCluster &cluster, LocalPoint &point, LocalError &error, float &time, float &timeErr) const
 standard local recHit computation More...
 
virtual bool compute (const RPCRoll &roll, const RPCCluster &cluster, const float &angle, const GlobalPoint &globPos, LocalPoint &point, LocalError &error, float &time, float &timeErr) const
 
 RPCRecHitStandardAlgo (const edm::ParameterSet &config)
 Constructor. More...
 
virtual void setES (const edm::EventSetup &setup)
 Pass the Event Setup to the algo at each event. More...
 
virtual ~RPCRecHitStandardAlgo ()
 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 ( const edm::ParameterSet config)
inline

Constructor.

Definition at line 15 of file RPCRecHitStandardAlgo.h.

15 :RPCRecHitBaseAlgo(config) {};
RPCRecHitBaseAlgo(const edm::ParameterSet &config)
Constructor.
virtual RPCRecHitStandardAlgo::~RPCRecHitStandardAlgo ( )
inlinevirtual

Destructor.

Definition at line 18 of file RPCRecHitStandardAlgo.h.

18 {};

Member Function Documentation

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

standard local recHit computation

Implements RPCRecHitBaseAlgo.

Definition at line 17 of file RPCRecHitStandardAlgo.cc.

References funct::abs(), RPCRoll::centreOfStrip(), RPCCluster::firstStrip(), RPCCluster::hasTime(), RPCCluster::hasY(), RPCCluster::lastStrip(), RPCRoll::localError(), RPCRoll::specificTopology(), StripTopology::stripLength(), RPCCluster::time(), RPCCluster::timeRMS(), LocalError::xx(), and RPCCluster::y().

Referenced by compute().

22 {
23  // Get Average Strip position
24  const float fstrip = (roll.centreOfStrip(cluster.firstStrip())).x();
25  const float lstrip = (roll.centreOfStrip(cluster.lastStrip())).x();
26  const float centreOfCluster = (fstrip + lstrip)/2;
27 
28  Point = LocalPoint(centreOfCluster,cluster.y(),0);
29  if ( !cluster.hasY() ) {
30  error = LocalError(roll.localError((cluster.firstStrip()+cluster.lastStrip())/2.));
31  }
32  else {
33  // Use the default one for local x error
34  const float ex2 = roll.localError((cluster.firstStrip()+cluster.lastStrip())/2.).xx();
35  // Maximum estimate of local y error, (distance to the boundary)/sqrt(3)
36  // which gives consistent error to the default one at y=0
37  const float stripLen = roll.specificTopology().stripLength();
38  const float maxDy = stripLen/2 - std::abs(cluster.y());
39  error = LocalError(ex2, 0, maxDy*maxDy/3.);
40  }
41 
42  if ( cluster.hasTime() ) {
43  time = cluster.time();
44  timeErr = cluster.timeRMS();
45  }
46  else {
47  time = 0;
48  timeErr = -1;
49  }
50 
51  return true;
52 }
float xx() const
Definition: LocalError.h:24
LocalPoint centreOfStrip(int strip) const
Definition: RPCRoll.cc:52
const StripTopology & specificTopology() const
Definition: RPCRoll.cc:107
virtual float stripLength() const =0
LocalError localError(float strip) const
Definition: RPCRoll.cc:65
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
bool RPCRecHitStandardAlgo::compute ( const RPCRoll roll,
const RPCCluster cl,
const float &  angle,
const GlobalPoint globPos,
LocalPoint Point,
LocalError error,
float &  time,
float &  timeErr 
) const
virtual

local recHit computation accounting for track direction and absolute position

Implements RPCRecHitBaseAlgo.

Definition at line 54 of file RPCRecHitStandardAlgo.cc.

References compute().

61 {
62  this->compute(roll,cl,Point,error,time,timeErr);
63  return true;
64 }
virtual bool compute(const RPCRoll &roll, const RPCCluster &cluster, LocalPoint &point, LocalError &error, float &time, float &timeErr) const
standard local recHit computation
virtual void RPCRecHitStandardAlgo::setES ( const edm::EventSetup setup)
inlinevirtual

Pass the Event Setup to the algo at each event.

Implements RPCRecHitBaseAlgo.

Definition at line 21 of file RPCRecHitStandardAlgo.h.

21 {};