20 #include "StRpsCluster.h"
22 static const char rcsid[] =
"$Id: StRpsCluster.cxx,v 2.2 2015/10/02 19:50:09 ullrich Exp $";
28 mPosition = mEnergy = mXY = 0;
31 mPlaneId = mRomanPotId = 0;
34 StRpsCluster::StRpsCluster(
double pos,
double posRMS,
short len,
35 double e,
double xy,
unsigned char qual)
38 mPositionRMS = posRMS;
43 mPlaneId = mRomanPotId = 0;
47 StRpsCluster::~StRpsCluster() { };
50 StRpsCluster::position()
const {
return mPosition; }
53 StRpsCluster::positionRMS()
const {
return mPositionRMS; }
56 StRpsCluster::length()
const {
return mLength; }
59 StRpsCluster::energy()
const {
return mEnergy; }
62 StRpsCluster::xy()
const {
return mXY; }
65 StRpsCluster::quality()
const {
return mQuality; }
68 StRpsCluster::romanPotId()
const {
return mRomanPotId; }
71 StRpsCluster::planeId()
const {
return mPlaneId; }
74 StRpsCluster::setPosition(
double val) { mPosition = val; }
77 StRpsCluster::setPositionRMS(
double val) { mPositionRMS = val; }
80 StRpsCluster::setLength(
short val) { mLength = val; }
83 StRpsCluster::setEnergy(
double val) { mEnergy = val; }
86 StRpsCluster::setXY(
double val) { mXY = val; }
89 StRpsCluster::setQuality(
unsigned char val) { mQuality = val; }
92 StRpsCluster::setPlaneId(
unsigned char val) { mPlaneId = val; }
95 StRpsCluster::setRomanPotId(
unsigned char val) { mRomanPotId = val; }
100 ostream& operator<<(ostream& os,
const StRpsCluster& cluster)
102 os <<
"position = " << cluster.position() << endl;
103 os <<
"position rms = " << cluster.positionRMS() << endl;
104 os <<
"length = " << cluster.length() << endl;
105 os <<
"energy = " << cluster.energy() << endl;
106 os <<
"xy = " << cluster.xy() << endl;
107 os <<
"quality = " <<
static_cast<unsigned int>(cluster.quality()) << endl;
108 os <<
"roman pot id = " << cluster.romanPotId() << endl;
109 os <<
"plane id = " << cluster.planeId() << endl;