19 #include "StMuFgtOccTxtMkr.h"
20 #include "StRoot/StFgtUtil/StFgtConsts.h"
21 #include "StRoot/StFgtUtil/geometry/StFgtGeom.h"
22 #include "StRoot/StMuDSTMaker/COMMON/StMuDst.h"
23 #include "StRoot/StMuDSTMaker/COMMON/StMuFgtStrip.h"
24 #include "StRoot/StMuDSTMaker/COMMON/StMuFgtCluster.h"
28 StMuFgtOccTxtMkr::StMuFgtOccTxtMkr(
const Char_t* name ) :
StMaker( name ) { };
31 StMuFgtOccTxtMkr::~StMuFgtOccTxtMkr(){ };
40 TClonesArray *fgtStrips = 0;
41 TClonesArray *fgtClusters = 0;
43 LOG_FATAL <<
"pointer to StMuDst is null" << endm;
48 fgtStrips = muDst->
fgtArray( muFgtStrips );
51 LOG_FATAL <<
"pointer to muFgtStrips is null" << endm;
57 fgtClusters = muDst->
fgtArray( muFgtClusters );
60 LOG_FATAL <<
"pointer to muFgtClusters is null" << endm;
67 Int_t nStrips = fgtStrips->GetEntriesFast();
68 Int_t nClusters = fgtClusters->GetEntriesFast();
69 Int_t nRclus[kFgtNumOctantsPerDisc*kFgtNumDiscs], nPhiClus[kFgtNumOctantsPerDisc*kFgtNumDiscs];
72 for( Int_t i = 0; i < kFgtNumOctantsPerDisc*kFgtNumDiscs; ++i )
73 nRclus[i] = nPhiClus[i] = 0;
75 for( Int_t i = 0; i < nClusters; ++i ){
79 Int_t geoId = clus->getCentralStripGeoId();
81 Short_t disc, quad, strip;
83 StFgtGeom::decodeGeoId( geoId, disc, quad, layer, strip );
85 Int_t idx = (quad*2 + ( StFgtGeom::getOctant( layer, strip ) ==
'S' ))*kFgtNumDiscs + disc;
86 assert( idx < kFgtNumOctantsPerDisc*kFgtNumDiscs );
95 cout <<
"--------------------------------------------------------------" << endl;
96 cout <<
"Event #" << GetEventNumber() <<
", number of strips " << nStrips << endl << endl;
99 cout <<
"disc # | layer";
100 for( Char_t quad =
'A'; quad <=
'D'; ++quad )
101 cout <<
" | " << quad <<
".L | " << quad <<
".S";
104 for( Int_t disc = 0; disc < kFgtNumDiscs; ++disc ){
105 for( Int_t layerIsR = 0; layerIsR < 2; ++layerIsR ){
106 cout <<
" " << disc+1 <<
" | " << (layerIsR ?
'R' :
'P') <<
" ";
107 for( Int_t quad = 0; quad < kFgtNumQuads; ++quad ){
108 for( Int_t oct = 0; oct < 2; ++oct ){
110 Int_t idx = (quad*2 + oct)*kFgtNumDiscs + disc;
111 cout <<
" | " << Form(
"%3d", ( layerIsR ? nRclus[idx] : nPhiClus[idx] ) );
static TClonesArray * fgtArray(int type)
returns pointer to the n-th TClonesArray from the fgt arrays