1 #ifndef __StMuRpsCollection_hh__
2 #define __StMuRpsCollection_hh__
8 #include "StMuRpsTrackPoint.h"
9 #include "StMuRpsTrack.h"
10 #include "TClonesArray.h"
28 unsigned char siliconBunch()
const;
32 unsigned int numberOfRomanPots()
const {
return mNumberOfRomanPot; }
33 unsigned int numberOfPlanesWithClusters(
int romanPotId)
const;
34 unsigned int adc(
int romanPotId,
unsigned int)
const;
35 unsigned int tac(
int romanPotId,
unsigned int)
const;
36 unsigned char status(
int romanPotId)
const;
40 unsigned int numberOfPlanes()
const {
return mNumberOfPlanes; }
41 double offsetPlane(
int romanPotId,
int planeId)
const;
42 double zPlane(
int romanPotId,
int planeId)
const;
43 double anglePlane(
int romanPotId,
int planeId)
const;
44 short orientationPlane(
int romanPotId,
int planeId)
const;
45 unsigned char statusPlane(
int romanPotId,
int planeId)
const;
49 int numberOfClusters(
int romanPotId,
int planeId)
const;
50 double positionCluster(
int romanPotId,
int planeId,
int cluster)
const;
51 double positionRMSCluster(
int romanPotId,
int planeId,
int cluster)
const;
52 short lengthCluster(
int romanPotId,
int planeId,
int cluster)
const;
53 double energyCluster(
int romanPotId,
int planeId,
int cluster)
const;
54 double xyCluster(
int romanPotId,
int planeId,
int cluster)
const;
55 unsigned char qualityCluster(
int romanPotId,
int planeId,
int cluster)
const;
58 StMuRpsTrackPoint* trackPoint(
unsigned int i ) {
if ( i < mTrackPoints.size() )
return mTrackPoints[i];
return nullptr; }
59 StMuRpsTrack*
track(
unsigned int i ) {
if ( i < mTracks.size() )
return mTracks[i];
return nullptr; }
61 inline int numberOfTrackPoints()
const {
return mTrackPoints.size(); }
62 inline int numberOfTracks()
const {
return mTracks.size(); }
66 enum {mNumberOfRomanPot = 8, mNumberOfPlanes = 4};
68 unsigned char mSiliconBunch;
70 int mNumberPlanes[mNumberOfRomanPot];
71 int mNumberPlanesWithClusters[mNumberOfRomanPot];
72 unsigned char mStatusRomanPot[mNumberOfRomanPot];
73 int mADC[mNumberOfRomanPot][2];
74 int mTAC[mNumberOfRomanPot][2];
76 double mOffsetPlane[mNumberOfRomanPot][mNumberOfPlanes];
77 double mzPlane[mNumberOfRomanPot][mNumberOfPlanes];
78 double mAnglePlane[mNumberOfRomanPot][mNumberOfPlanes];
79 short mOrientationPlane[mNumberOfRomanPot][mNumberOfPlanes];
80 unsigned char mStatusPlane[mNumberOfRomanPot][mNumberOfPlanes];
81 int mNumberOfClusters[mNumberOfRomanPot][mNumberOfPlanes];
83 vector<double> mPositionCluster[mNumberOfRomanPot][mNumberOfPlanes];
84 vector<double> mPositionRMSCluster[mNumberOfRomanPot][mNumberOfPlanes];
85 vector<short> mLengthCluster[mNumberOfRomanPot][mNumberOfPlanes];
86 vector<double> mEnergyCluster[mNumberOfRomanPot][mNumberOfPlanes];
87 vector<double> mXYCluster[mNumberOfRomanPot][mNumberOfPlanes];
88 vector<unsigned char> mQualityCluster[mNumberOfRomanPot][mNumberOfPlanes];
90 vector<StMuRpsTrackPoint*> mTrackPoints;
91 vector<StMuRpsTrack*> mTracks;
97 map<StRpsTrackPoint *, StMuRpsTrackPoint * > mTrackPointsMap;
103 inline unsigned char StMuRpsCollection::siliconBunch()
const {
return mSiliconBunch ; }
104 inline unsigned int StMuRpsCollection::numberOfPlanesWithClusters(
int romanPotId)
const {
return romanPotId < mNumberOfRomanPot ? mNumberPlanesWithClusters[romanPotId] : 0; }
105 inline unsigned char StMuRpsCollection::status(
int romanPotId)
const {
106 if (romanPotId < mNumberOfRomanPot)
return mStatusRomanPot[romanPotId];
110 inline unsigned int StMuRpsCollection::adc(
int romanPotId,
unsigned int n)
const {
return romanPotId < mNumberOfRomanPot && n < 2 ? mADC[romanPotId][n] : 0;}
111 inline unsigned int StMuRpsCollection::tac(
int romanPotId,
unsigned int n)
const {
return romanPotId < mNumberOfRomanPot && n < 2 ? mTAC[romanPotId][n] : 0;}
112 inline double StMuRpsCollection::offsetPlane(
int romanPotId,
int planeId)
const {
return romanPotId < mNumberOfRomanPot && planeId < mNumberOfPlanes ? mOffsetPlane[romanPotId][planeId] : 0;}
113 inline double StMuRpsCollection::zPlane(
int romanPotId,
int planeId)
const {
return romanPotId < mNumberOfRomanPot && planeId < mNumberOfPlanes ? mzPlane[romanPotId][planeId] : 0;}
114 inline double StMuRpsCollection::anglePlane(
int romanPotId,
int planeId)
const {
return romanPotId < mNumberOfRomanPot && planeId < mNumberOfPlanes ? mAnglePlane[romanPotId][planeId] : 0;}
115 inline short StMuRpsCollection::orientationPlane(
int romanPotId,
int planeId)
const {
return romanPotId < mNumberOfRomanPot && planeId < mNumberOfPlanes ? mOrientationPlane[romanPotId][planeId] : 0;}
116 inline unsigned char StMuRpsCollection::statusPlane(
int romanPotId,
int planeId)
const {
117 if(romanPotId < mNumberOfRomanPot && planeId < mNumberOfPlanes)
return mStatusPlane[romanPotId][planeId];
120 inline int StMuRpsCollection::numberOfClusters(
int romanPotId,
int planeId)
const {
return romanPotId < mNumberOfRomanPot && planeId < mNumberOfPlanes ? mNumberOfClusters[romanPotId][planeId] : 0;}
121 inline double StMuRpsCollection::positionCluster(
int romanPotId,
int planeId,
int cluster)
const {
return romanPotId < mNumberOfRomanPot && planeId < mNumberOfPlanes && cluster < mNumberOfClusters[romanPotId][planeId]? mPositionCluster[romanPotId][planeId][cluster] : 0;}
122 inline double StMuRpsCollection::positionRMSCluster(
int romanPotId,
int planeId,
int cluster)
const {
return romanPotId < mNumberOfRomanPot && planeId < mNumberOfPlanes && cluster < mNumberOfClusters[romanPotId][planeId]? mPositionRMSCluster[romanPotId][planeId][cluster] : 0;}
123 inline short StMuRpsCollection::lengthCluster(
int romanPotId,
int planeId,
int cluster)
const {
return romanPotId < mNumberOfRomanPot && planeId < mNumberOfPlanes && cluster < mNumberOfClusters[romanPotId][planeId]? mLengthCluster[romanPotId][planeId][cluster] : 0;}
124 inline double StMuRpsCollection::energyCluster(
int romanPotId,
int planeId,
int cluster)
const {
return romanPotId < mNumberOfRomanPot && planeId < mNumberOfPlanes && cluster < mNumberOfClusters[romanPotId][planeId]? mEnergyCluster[romanPotId][planeId][cluster] : 0;}
125 inline double StMuRpsCollection::xyCluster(
int romanPotId,
int planeId,
int cluster)
const {
return romanPotId < mNumberOfRomanPot && planeId < mNumberOfPlanes && cluster < mNumberOfClusters[romanPotId][planeId]? mXYCluster[romanPotId][planeId][cluster] : 0;}
126 inline unsigned char StMuRpsCollection::qualityCluster(
int romanPotId,
int planeId,
int cluster)
const {
return romanPotId < mNumberOfRomanPot && planeId < mNumberOfPlanes && cluster < mNumberOfClusters[romanPotId][planeId]? mQualityCluster[romanPotId][planeId][cluster] : 0;}