StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuFttCluster.cxx
1 /***************************************************************************
2  *
3  * $Id: StMuFttCluster.cxx
4  *
5  * Author: jdb, Nov 2021
6  ***************************************************************************
7  *
8  * Description:
9  *
10  ***************************************************************************/
11 #include "StMuFttCluster.h"
12 #include "StMuFttPoint.h"
13 #include "StMuFttRawHit.h"
14 #include "StEvent/StFttCluster.h"
15 
16 
17 StMuFttCluster::StMuFttCluster() : TObject(),
18 mId(-1),
19 mOrientation(kFttUnknownOrientation),
20 mNStrips(0),
21 mSumAdc(0.0),
22 mX(0.0),
23 mSigma(0.0),
24 mRawHits(0),
25 mNeighbors(0),
26 mPoints(0),
27 mIdTruth(0),
28 mQaTruth(0)
29 {
30 
31 }
32 
33 
34 StMuFttCluster::~StMuFttCluster(){}
35 
36 void StMuFttCluster::addPoint(StMuFttPoint* p) {
37  mPoints.Add(p);
38 }
39 
40 void StMuFttCluster::addRawHit(StMuFttRawHit* p) {
41  mRawHits.Add(p);
42 }
43 
44 void StMuFttCluster::addNeighbor(StMuFttCluster* neighbor) {
45  int n=nNeighbors();
46  for(int i=0; i<n; i++) if(mNeighbors[i]==neighbor) return; //already there, do nothing
47  mNeighbors.Add(neighbor);
48 }
49 
50 void StMuFttCluster::set( StFttCluster * clu ){
51  mId = clu->id();
52  mPlane = clu->plane();
53  mQuadrant = clu->quadrant();
54  mOrientation = clu->orientation();
55  mNStrips = clu->nStrips();
56  mSumAdc = clu->sumAdc();
57  mX = clu->x();
58  mSigma = clu->sigma();
59  mIdTruth = clu->idTruth();
60  mQaTruth = clu->qaTruth();
61 }