1 #include "StMuRpsCollection.h"
2 #include "StEvent/StRpsCollection.h"
3 #include "StEvent/StRpsRomanPot.h"
4 #include "StEvent/StRpsPlane.h"
5 #include "StEvent/StRpsCluster.h"
13 mSiliconBunch = rps.siliconBunch();
15 for(
int i=0;i<mNumberOfRomanPot;i++){
17 mNumberPlanesWithClusters[i] = rps.romanPot(i)->numberOfPlanesWithClusters();
18 mStatusRomanPot[i] = rps.romanPot(i)->status();
19 mADC[i][0] = rps.romanPot(i)->adc(0);
20 mADC[i][1] = rps.romanPot(i)->adc(1);
21 mTAC[i][0] = rps.romanPot(i)->tac(0);
22 mTAC[i][1] = rps.romanPot(i)->tac(1);
24 for(
int j=0;j<mNumberOfPlanes;j++){
26 mOffsetPlane[i][j] = rps.romanPot(i)->plane(j)->offset();
27 mzPlane[i][j] = rps.romanPot(i)->plane(j)->z();
28 mAnglePlane[i][j] = rps.romanPot(i)->plane(j)->angle();
29 mOrientationPlane[i][j] = rps.romanPot(i)->plane(j)->orientation();
30 mStatusPlane[i][j] = rps.romanPot(i)->plane(j)->status();
31 mNumberOfClusters[i][j] = rps.romanPot(i)->plane(j)->numberOfClusters();
33 for(
int k=0;k<mNumberOfClusters[i][j];k++){
35 mPositionCluster[i][j].push_back(rps.romanPot(i)->plane(j)->cluster(k)->position());
36 mPositionRMSCluster[i][j].push_back(rps.romanPot(i)->plane(j)->cluster(k)->positionRMS());
37 mLengthCluster[i][j].push_back(rps.romanPot(i)->plane(j)->cluster(k)->length());
38 mEnergyCluster[i][j].push_back(rps.romanPot(i)->plane(j)->cluster(k)->energy());
39 mXYCluster[i][j].push_back(rps.romanPot(i)->plane(j)->cluster(k)->xy());
40 mQualityCluster[i][j].push_back(rps.romanPot(i)->plane(j)->cluster(k)->quality());
47 int nTrackPoints = rps.trackPoints().size();
48 for (
int i = 0; i < nTrackPoints; i++ ){
49 addTrackPoint( rps.trackPoints()[i] );
53 int nTracks = rps.tracks().size();
54 for (
int iTrack = 0; iTrack < nTracks; iTrack++ ){
59 for (
int iStation = 0; iStation < StMuRpsTrack::mNumberOfStationsInBranch; iStation++ ){
60 if ( rps.tracks()[iTrack] && rps.tracks()[iTrack]->trackPoint( iStation ) ){
61 StMuRpsTrackPoint * ptp = addTrackPoint( rps.tracks()[iTrack]->trackPoint( iStation ) );
62 muRpsTrack->setTrackPoint( ptp, iStation );
66 muRpsTrack->setP( TVector3( rps.tracks()[iTrack]->pVec().x(), rps.tracks()[iTrack]->pVec().y(), rps.tracks()[iTrack]->pVec().z() ) );
67 muRpsTrack->setBranch( rps.tracks()[iTrack]->branch() );
68 muRpsTrack->setType( (StMuRpsTrack::StMuRpsTrackType)rps.tracks()[iTrack]->type() );
71 mTracks.push_back( muRpsTrack );
79 if ( mTrackPointsMap.count( rpsTP ) ){
80 return mTrackPointsMap[ rpsTP ];
85 muRpsTrackPoint->setPosition( TVector3( rpsTP->x(), rpsTP->y(), rpsTP->z() ) );
86 muRpsTrackPoint->setQuality( (StMuRpsTrackPoint::StMuRpsTrackPointQuality)rpsTP->quality() );
87 muRpsTrackPoint->setRpId( rpsTP->rpId() );
89 for (
int iPlane = 0; iPlane < StMuRpsTrackPoint::mNumberOfPlanesInRp; iPlane++ ){
90 muRpsTrackPoint->setClusterId( rpsTP->clusterId( iPlane ), iPlane );
93 for (
int iPmt = 0; iPmt < StMuRpsTrackPoint::mNumberOfPmtsInRp; iPmt++ ){
94 muRpsTrackPoint->setTime( rpsTP->time( iPmt ), iPmt );
97 mTrackPoints.push_back( muRpsTrackPoint );
98 mTrackPointsMap[ rpsTP ] = muRpsTrackPoint;
99 return muRpsTrackPoint;