1 #include "StMuFwdTrackUtil.h"
2 #include "StMuFwdTrackCollection.h"
4 #include "StEvent/StFcsCluster.h"
5 #include "StMuDSTMaker/COMMON/StMuFcsCluster.h"
6 #include "StMuDSTMaker/COMMON/StMuFcsHit.h"
7 #include "StMuDSTMaker/COMMON/StMuFcsPoint.h"
8 #include "StMuDSTMaker/COMMON/StMuFcsUtil.h"
9 #include "StMuDSTMaker/COMMON/StMuFcsInfo.h"
10 #include "StMuDSTMaker/COMMON/StMuFcsCollection.h"
13 #include "StEvent/StFwdTrackCollection.h"
14 #include "StEvent/StFwdTrack.h"
15 #include "St_base/StMessMgr.h"
17 #include "StMuFwdTrack.h"
18 #include "StMuFwdTrackCollection.h"
22 if ( evc ==
nullptr ){
23 LOG_WARN <<
"NULL StFwdTrackCollection, cannot fill MuDST" << endm;
36 if ( evc ==
nullptr ){
37 LOG_WARN <<
"NULL StFwdTrackCollection, cannot fill FwdTracks in MuDST" << endm;
41 if ( muc ==
nullptr ){
42 LOG_WARN <<
"NULL StMuFwdTrackCollection, cannot fill FwdTracks in MuDST" << endm;
46 if ( fcsu ==
nullptr ){
47 LOG_WARN <<
"NULL StMuFcsUtil, cannot fill FwdTracks in MuDST" << endm;
51 auto fcsClusterMapEvToMu = fcsu->getClusterMap();
53 const StSPtrVecFwdTrack& evTracks = evc->tracks();
54 LOG_INFO <<
"Adding " << evc->numberOfTracks() <<
" StMuFwdTracks to MuDSt" << endm;
55 for (
size_t i = 0; i < evc->numberOfTracks(); i++ ){
58 muFwdTrack->set( evTrack );
61 const StPtrVecFcsCluster& ecalClus = evTrack->ecalClusters();
62 const StPtrVecFcsCluster& hcalClus = evTrack->hcalClusters();
64 for (
auto eClu : ecalClus ){
66 if ( fcsClusterMapEvToMu.count( eClu ) == 0){
67 LOG_WARN <<
"Cannot find ECAL Cluster in map" << endm;
71 muFwdTrack->addEcalCluster( muClu );
74 for (
auto hClu : hcalClus ){
76 if ( fcsClusterMapEvToMu.count( hClu ) == 0){
77 LOG_WARN <<
"Cannot find HCAL Cluster in map" << endm;
81 muFwdTrack->addHcalCluster( muClu );