CMS 3D CMS Logo

RPCRoll.cc
Go to the documentation of this file.
4 
6  : GeomDetUnit(bp), _id(id), _rrs(rrs) {
7  setDetId(id);
8 }
9 
11  delete _rrs; //Assume the roll owns it specs (specs are not shared)
12 }
13 
14 const RPCRollSpecs* RPCRoll::specs() const { return _rrs; }
15 
16 RPCDetId RPCRoll::id() const { return _id; }
17 
18 const Topology& RPCRoll::topology() const { return _rrs->topology(); }
19 
20 const GeomDetType& RPCRoll::type() const { return (*_rrs); }
21 
22 const RPCChamber* RPCRoll::chamber() const { return theCh; }
23 
24 int RPCRoll::nstrips() const { return this->specificTopology().nstrips(); }
25 
27  float s = static_cast<float>(strip) - 0.5;
28  return this->specificTopology().localPosition(s);
29 }
30 
31 LocalPoint RPCRoll::centreOfStrip(float strip) const { return this->specificTopology().localPosition(strip); }
32 
33 LocalError RPCRoll::localError(float strip) const { return this->specificTopology().localError(strip, 1. / sqrt(12.)); }
34 
35 float RPCRoll::strip(const LocalPoint& lp) const { return this->specificTopology().strip(lp); }
36 
37 float RPCRoll::localPitch(const LocalPoint& lp) const { return this->specificTopology().localPitch(lp); }
38 
39 float RPCRoll::pitch() const { return this->specificTopology().pitch(); }
40 
41 bool RPCRoll::isBarrel() const { return ((this->id()).region() == 0); }
42 
43 bool RPCRoll::isForward() const
44 
45 {
46  return (!this->isBarrel());
47 }
48 
50 
51 void RPCRoll::setChamber(const RPCChamber* ch) { theCh = ch; }
virtual int nstrips() const =0
LocalError localError(float strip) const
Definition: RPCRoll.cc:33
void setDetId(DetId id)
Definition: GeomDet.h:99
bool isForward() const
Definition: RPCRoll.cc:43
void setChamber(const RPCChamber *ch)
Definition: RPCRoll.cc:51
int nstrips() const
Definition: RPCRoll.cc:24
const RPCRollSpecs * specs() const
Definition: RPCRoll.cc:14
const StripTopology & specificTopology() const
Definition: RPCRollSpecs.cc:38
virtual float strip(const LocalPoint &) const =0
virtual float localPitch(const LocalPoint &) const =0
float pitch() const
Definition: RPCRoll.cc:39
bool isBarrel() const
Definition: RPCRoll.cc:41
T sqrt(T t)
Definition: SSEVec.h:23
RPCRollSpecs * _rrs
Definition: RPCRoll.h:46
const StripTopology & specificTopology() const
Definition: RPCRoll.cc:49
const Topology & topology() const override
Definition: RPCRollSpecs.cc:36
~RPCRoll() override
Definition: RPCRoll.cc:10
const GeomDetType & type() const override
Definition: RPCRoll.cc:20
virtual LocalError localError(float strip, float stripErr2) const =0
float localPitch(const LocalPoint &lp) const
Definition: RPCRoll.cc:37
const Topology & topology() const override
Definition: RPCRoll.cc:18
float strip(const LocalPoint &lp) const
Definition: RPCRoll.cc:35
virtual float pitch() const =0
RPCDetId id() const
Definition: RPCRoll.cc:16
virtual LocalPoint localPosition(float strip) const =0
RPCRoll(RPCDetId id, const BoundPlane::BoundPlanePointer &bp, RPCRollSpecs *rrs)
Definition: RPCRoll.cc:5
RPCDetId _id
Definition: RPCRoll.h:45
const RPCChamber * chamber() const
Return the chamber this roll belongs to.
Definition: RPCRoll.cc:22
const RPCChamber * theCh
Definition: RPCRoll.h:47
LocalPoint centreOfStrip(int strip) const
Definition: RPCRoll.cc:26