StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StRpsPlane.cxx
1 /***************************************************************************
2  *
3  * $Id: StRpsPlane.cxx,v 2.1 2009/11/23 22:18:25 ullrich Exp $
4  *
5  * Author: Thomas Ullrich, Nov 2009
6  ***************************************************************************
7  *
8  * Description: Reconstructed cluster in the Roman Pot Silicon
9  * detectors.
10  *
11  ***************************************************************************
12  *
13  * $Log: StRpsPlane.cxx,v $
14  * Revision 2.1 2009/11/23 22:18:25 ullrich
15  * Initial Revision
16  *
17  **************************************************************************/
18 #include "StRpsPlane.h"
19 #include "StRpsCluster.h"
20 
21 static const char rcsid[] = "$Id: StRpsPlane.cxx,v 2.1 2009/11/23 22:18:25 ullrich Exp $";
22 
23 ClassImp(StRpsPlane)
24 
26 {
27  mOffset = mZ = mAngle = 0;
28  mOrientation = 0;
29  mStatus = 0;
30  mRomanPotId = mPlaneId = 0;
31 }
32 
33 StRpsPlane::~StRpsPlane() { /* noop */ }
34 
35 unsigned int
36 StRpsPlane::planeId() const { return mPlaneId; }
37 
38 double
39 StRpsPlane::offset() const { return mOffset; }
40 
41 double
42 StRpsPlane::z() const { return mZ; }
43 
44 double
45 StRpsPlane::angle() const { return mAngle; }
46 
47 short
48 StRpsPlane::orientation() const { return mOrientation; }
49 
50 unsigned char
51 StRpsPlane::status() const { return mStatus; }
52 
53 unsigned int
54 StRpsPlane::numberOfClusters() const { return mClusters.size(); }
55 
56 const StRpsCluster*
57 StRpsPlane::cluster(unsigned int i) const
58 {
59  if (i < mClusters.size())
60  return mClusters[i];
61  else
62  return 0;
63 }
64 
66 StRpsPlane::cluster(unsigned int i)
67 {
68  if (i < mClusters.size())
69  return mClusters[i];
70  else
71  return 0;
72 }
73 
74 unsigned int
75 StRpsPlane::romanPotId() const { return mRomanPotId; }
76 
77 const StSPtrVecRpsCluster&
78 StRpsPlane::clusters() const { return mClusters; }
79 
80 StSPtrVecRpsCluster&
81 StRpsPlane::clusters() { return mClusters; }
82 
83 void
84 StRpsPlane::addCluster(StRpsCluster* cluster)
85 {
86  if (cluster) {
87  mClusters.push_back(cluster);
88  cluster->setPlaneId(mPlaneId);
89  cluster->setRomanPotId(mRomanPotId);
90  }
91 }
92 
93 void
94 StRpsPlane::setOffset(double val) { mOffset = val; }
95 
96 void
97 StRpsPlane::setZ(double val) { mZ = val; }
98 
99 void
100 StRpsPlane::setAngle(double val) { mAngle = val; }
101 
102 void
103 StRpsPlane::setOrientation(short val) { mOrientation = val; }
104 
105 void
106 StRpsPlane::setStatus(unsigned char val) { mStatus = val; }
107 
108 void
109 StRpsPlane::setPlaneId(unsigned char i) { mPlaneId = i; }
110 
111 void
112 StRpsPlane::setRomanPotId(unsigned char i) { mRomanPotId = i; }
113