CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RPCRoll.cc
Go to the documentation of this file.
4 
5 
6 RPCRoll::RPCRoll(RPCDetId id, BoundPlane::BoundPlanePointer bp, RPCRollSpecs* rrs) :
7  GeomDetUnit(bp), _id(id),_rrs(rrs)
8 {
9  setDetId(id);
10 }
11 
13 {
14  delete _rrs; //Assume the roll owns it specs (specs are not shared)
15 }
16 
17 const RPCRollSpecs*
19 {
20  return _rrs;
21 }
22 
24 RPCRoll::id() const
25 {
26  return _id;
27 }
28 
29 const Topology&
31 {
32  return _rrs->topology();
33 }
34 
35 const GeomDetType&
37 {
38  return (*_rrs);
39 }
40 
41 const RPCChamber* RPCRoll::chamber() const {
42  return theCh;
43 }
44 
45 int
47 {
48  return this->specificTopology().nstrips();
49 }
50 
52 RPCRoll::centreOfStrip(int strip) const
53 {
54  float s = static_cast<float>(strip)-0.5;
55  return this->specificTopology().localPosition(s);
56 }
57 
59 RPCRoll::centreOfStrip(float strip) const
60 {
61  return this->specificTopology().localPosition(strip);
62 }
63 
65 RPCRoll::localError(float strip) const
66 {
67  return this->specificTopology().localError(strip,1./sqrt(12.));
68 }
69 
70 float
71 RPCRoll::strip(const LocalPoint& lp) const
72 {
73  return this->specificTopology().strip(lp);
74 
75 }
76 
77 float
79 {
80  return this->specificTopology().localPitch(lp);
81 
82 }
83 
84 float
86 {
87  return this->specificTopology().pitch();
88 
89 }
90 
91 bool
93 {
94  return ((this->id()).region()==0);
95 }
96 
97 bool
99 
100 {
101  return (!this->isBarrel());
102 }
103 
104 
105 
106 const StripTopology&
108 {
109  return _rrs->specificTopology();
110 }
111 
112 
113 
114 
115 void
117 {
118  theCh = ch;
119 }
virtual int nstrips() const =0
float strip(const LocalPoint &lp) const
Definition: RPCRoll.cc:71
LocalPoint centreOfStrip(int strip) const
Definition: RPCRoll.cc:52
const Topology & topology() const
Definition: RPCRoll.cc:30
void setDetId(DetId id)
Definition: GeomDet.h:114
void setChamber(const RPCChamber *ch)
Definition: RPCRoll.cc:116
int nstrips() const
Definition: RPCRoll.cc:46
const RPCRollSpecs * specs() const
Definition: RPCRoll.cc:18
const StripTopology & specificTopology() const
Definition: RPCRoll.cc:107
bool isBarrel() const
Definition: RPCRoll.cc:92
virtual float strip(const LocalPoint &) const =0
virtual float localPitch(const LocalPoint &) const =0
RPCDetId id() const
Definition: RPCRoll.cc:24
LocalError localError(float strip) const
Definition: RPCRoll.cc:65
const StripTopology & specificTopology() const
Definition: RPCRollSpecs.cc:49
T sqrt(T t)
Definition: SSEVec.h:48
const GeomDetType & type() const
Definition: RPCRoll.cc:36
const RPCChamber * chamber() const
Return the chamber this roll belongs to.
Definition: RPCRoll.cc:41
RPCRollSpecs * _rrs
Definition: RPCRoll.h:44
~RPCRoll()
Definition: RPCRoll.cc:12
float localPitch(const LocalPoint &lp) const
Definition: RPCRoll.cc:78
float pitch() const
Definition: RPCRoll.cc:85
virtual LocalError localError(float strip, float stripErr2) const =0
virtual float pitch() const =0
virtual LocalPoint localPosition(float strip) const =0
RPCRoll(RPCDetId id, BoundPlane::BoundPlanePointer bp, RPCRollSpecs *rrs)
Definition: RPCRoll.cc:6
bool isForward() const
Definition: RPCRoll.cc:98
RPCDetId _id
Definition: RPCRoll.h:43
const RPCChamber * theCh
Definition: RPCRoll.h:45
const Topology & topology() const
Definition: RPCRollSpecs.cc:43