21 #include "StMuETofCollection.h"
22 #include "StMuETofHeader.h"
23 #include "StMuETofDigi.h"
24 #include "StMuETofHit.h"
26 #include "StETofCollection.h"
27 #include "StETofHeader.h"
28 #include "StETofDigi.h"
29 #include "StETofHit.h"
31 #include "StMessMgr.h"
34 StMuETofCollection::StMuETofCollection()
40 StMuETofCollection::~StMuETofCollection()
48 if( etofColl->etofHeader() ) {
49 mETofHeader.push_back( etofColl->etofHeader() );
57 std::map< int, vector< unsigned int > > mapStoreHit;
59 LOG_DEBUG <<
"StMuETofCollection ctor -- filling hits into storage" << endm;
62 if( etofColl->hitsPresent() ) {
63 const StSPtrVecETofHit& vecHit = etofColl->etofHits();
65 for(
size_t i=0; i<vecHit.size(); i++ ){
74 mapStoreHit[ detIndex ].push_back( i );
90 if( etofColl->digisPresent() ) {
91 const StSPtrVecETofDigi& vecDigi = etofColl->etofDigis();
93 for(
size_t i=0; i<vecDigi.size(); i++ ) {
96 if( !pDigi )
continue;
107 if( mapStoreHit.count( detIndex ) ) {
108 for(
auto v : mapStoreHit.at( detIndex ) ) {
109 if( fabs( mETofHits.at( v ).localX() - assocLocalX ) > 0.0001 )
continue;
110 if( fabs( mETofHits.at( v ).localY() - assocLocalY ) > 0.0001 )
continue;
111 if( fabs( mETofHits.at( v ).time() - assocTime ) > 0.0001 )
continue;
117 mETofDigis.push_back(
StMuETofDigi( pDigi, assocHitId ) );
118 LOG_DEBUG <<
"StMuETofCollection ctor -- added digi with associatedHitId = " << assocHitId << endm;
122 LOG_DEBUG <<
"StMuETofCollection ctor -- added digi with associatedHitId = -1" << endm;
132 StMuETofCollection::etofHeader()
const {
133 return &mETofHeader.at( 0 );
137 StMuETofCollection::etofHeader() {
138 return &mETofHeader.at( 0 );
143 StMuETofCollection::etofDigi(
int i ) {
144 return &mETofDigis.at( i );
149 StMuETofCollection::etofHit(
int i ) {
150 return &mETofHits.at( i );
155 StMuETofCollection::digisPresent() {
156 return mETofDigis.size();
160 StMuETofCollection::hitsPresent() {
161 return mETofHits.size();
StETofHit * associatedHit()
pointer to the hit which has been reconstructed from this digi
unsigned int zPlane() const
ZPlane.
double time() const
Time.
unsigned int sector() const
Sector.
unsigned int counter() const
Counter.
unsigned int zPlane() const
ZPlane.
double localX() const
X-position.
double localY() const
Y-position.
unsigned int sector() const
Sector.
unsigned int counter() const
Counter.