251 #if !defined(ST_NO_NAMESPACES)
257 #include "StAssociationMaker.h"
258 #include "StMcParameterDB.h"
259 #include "StTrackPairInfo.hh"
261 #include "StGlobals.hh"
262 #include "PhysicalConstants.h"
263 #include "SystemOfUnits.h"
264 #include "StThreeVectorF.hh"
266 #include "StMessMgr.h"
268 #include "St_DataSet.h"
269 #include "St_DataSetIter.h"
272 #include "StEventTypes.h"
274 #include "StMcEventTypes.hh"
276 #include "StMcEvent.hh"
278 #include "StMemoryInfo.hh"
345 void setReferenceZ(
float z) { mRefZ = z; }
348 bool compFuncMcTpcHit::operator()(
const StMcTpcHit* h)
const {
350 return (h->position().z()) > mRefZ;
356 void setReferencePhi(
float phi) { mRefPhi = phi; }
359 bool compFuncMcFtpcHit::operator()(
const StMcFtpcHit* h)
const {
362 return (h->position().phi()/degree) > mRefPhi;
387 ostream& operator<<(ostream& out,
388 const pair< const StGlobalTrack* const, StTrackPairInfo*>& p)
390 out <<
"const StGlobalTrack at : " << (
void*)p.first << endl;
391 out <<
"const StMcTrack at : " << (
void*)(p.second->partnerMcTrack()) << endl;
392 out <<
"Common TPC Hits : " << p.second->commonTpcHits() << endl;
393 out <<
"Common SVT Hits : " << p.second->commonSvtHits() << endl;
394 out <<
"Common SSD Hits : " << p.second->commonSsdHits() << endl;
395 out <<
"Common FTPC Hits : " << p.second->commonFtpcHits() << endl;
399 ostream& operator<<(ostream& out,
400 const pair< const StMcTrack* const, StTrackPairInfo*>& p)
402 out <<
"const StMcTrack at : " << (
void*)p.first << endl;
403 out <<
"const StGlobalTrack at : " << (
void*)(p.second->partnerTrack()) << endl;
404 out <<
"Common TPC Hits : " << p.second->commonTpcHits() << endl;
405 out <<
"Common SVT Hits : " << p.second->commonSvtHits() << endl;
406 out <<
"Common SSD Hits : " << p.second->commonSsdHits() << endl;
407 out <<
"Common FTPC Hits : " << p.second->commonFtpcHits() << endl;
413 ostream& operator<<(ostream& out,
const rcTrackMapType& tm)
415 #if __SUNPRO_CC != 0x500
416 copy(tm.begin(),tm.end(), ostream_iterator<rcTrackMapValType>(out,
"\n"));
419 out <<
"Sorry, can't use ostream_iterator with this version of Stiostream.h !" << endl ;
424 ostream& operator<<(ostream& out,
const mcTrackMapType& tm)
426 #if __SUNPRO_CC != 0x500
427 copy(tm.begin(),tm.end(), ostream_iterator<mcTrackMapValType>(out,
"\n"));
429 out <<
"Sorry, can't use ostream_iterator with this version of Stiostream.h !" << endl ;
461 mTpcLocalHitResolution = 0;
462 mSvtHitResolution = 0;
463 mSsdHitResolution = 0;
464 mFtpcHitResolution = 0;
466 doPrintMemoryInfo = kFALSE;
467 mL3TriggerOn =
false;
468 mInTrackerOn = kTRUE;
469 mEstTracksOn =
false;
470 mDistanceAssoc = kFALSE;
474 StAssociationMaker::~StAssociationMaker()
477 if(Debug()) gMessMgr->Info() <<
"Inside StAssociationMaker Destructor" << endm;
480 mRcTpcHitMap->clear();
481 SafeDelete(mRcTpcHitMap);
484 mMcTpcHitMap->clear();
485 SafeDelete(mMcTpcHitMap);
488 mRcSvtHitMap->clear();
489 SafeDelete(mRcSvtHitMap);
492 mMcSvtHitMap->clear();
493 SafeDelete(mMcSvtHitMap);
496 mRcSsdHitMap->clear();
497 SafeDelete(mRcSsdHitMap);
500 mMcSsdHitMap->clear();
501 SafeDelete(mMcSsdHitMap);
504 mRcFtpcHitMap->clear();
505 SafeDelete(mRcFtpcHitMap);
508 mMcFtpcHitMap->clear();
509 SafeDelete(mMcFtpcHitMap);
515 for (rcTrackMapIter i=mRcTrackMap->begin(); i!=mRcTrackMap->end(); i++){
519 mRcTrackMap->clear();
520 SafeDelete(mRcTrackMap);
523 mMcTrackMap->clear();
524 SafeDelete(mMcTrackMap);
528 SafeDelete(mRcKinkMap);
532 SafeDelete(mMcKinkMap);
536 SafeDelete(mRcV0Map);
540 SafeDelete(mMcV0Map);
544 SafeDelete(mRcXiMap);
548 SafeDelete(mMcXiMap);
554 void StAssociationMaker::Clear(
const char* c)
557 if (doPrintMemoryInfo)
558 StMemoryInfo::instance()->snapshot();
562 mRcTpcHitMap->clear();
563 SafeDelete(mRcTpcHitMap);
564 if (doPrintMemoryInfo)
565 cout <<
"Deleted Rec. Tpc Hit Map" << endl;
568 mMcTpcHitMap->clear();
569 SafeDelete(mMcTpcHitMap);
570 if (doPrintMemoryInfo)
571 cout <<
"Deleted M.C. Tpc Hit Map" << endl;
574 mRcSvtHitMap->clear();
575 SafeDelete(mRcSvtHitMap);
576 if (doPrintMemoryInfo)
577 cout <<
"Deleted Rec. Svt Hit Map" << endl;
580 mMcSvtHitMap->clear();
581 SafeDelete(mMcSvtHitMap);
582 if (doPrintMemoryInfo)
583 cout <<
"Deleted M.C. Svt Hit Map" << endl;
586 mRcSsdHitMap->clear();
587 SafeDelete(mRcSsdHitMap);
588 if (doPrintMemoryInfo)
589 cout <<
"Deleted Rec. Ssd Hit Map" << endl;
592 mMcSsdHitMap->clear();
593 SafeDelete(mMcSsdHitMap);
594 if (doPrintMemoryInfo)
595 cout <<
"Deleted M.C. Ssd Hit Map" << endl;
598 mRcFtpcHitMap->clear();
599 SafeDelete(mRcFtpcHitMap);
600 if (doPrintMemoryInfo)
601 cout <<
"Deleted Rec. Ftpc Hit Map" << endl;
604 mMcFtpcHitMap->clear();
605 SafeDelete(mMcFtpcHitMap);
606 if (doPrintMemoryInfo)
607 cout <<
"Deleted M.C. Ftpc Hit Map" << endl;
613 for (rcTrackMapIter i=mRcTrackMap->begin(); i!=mRcTrackMap->end(); i++){
614 SafeDelete((*i).second);
617 mRcTrackMap->clear();
618 SafeDelete(mRcTrackMap);
619 if (doPrintMemoryInfo)
620 cout <<
"Deleted Rec. Track Map" << endl;
623 mMcTrackMap->clear();
624 SafeDelete(mMcTrackMap);
625 if (doPrintMemoryInfo)
626 cout <<
"Deleted M.C. Track Map" << endl;
631 SafeDelete(mRcKinkMap);
632 if (doPrintMemoryInfo)
633 cout <<
"Deleted Rec. Kink Map" << endl;
637 SafeDelete(mMcKinkMap);
638 if (doPrintMemoryInfo)
639 cout <<
"Deleted M.C. Kink Map" << endl;
643 SafeDelete(mRcV0Map);
644 if (doPrintMemoryInfo)
645 cout <<
"Deleted Rec. V0 Map" << endl;
649 SafeDelete(mMcV0Map);
650 if (doPrintMemoryInfo)
651 cout <<
"Deleted M.C. V0 Map" << endl;
655 SafeDelete(mRcXiMap);
656 if (doPrintMemoryInfo)
657 cout <<
"Deleted Rec. Xi Map" << endl;
661 SafeDelete(mMcXiMap);
662 if (doPrintMemoryInfo)
663 cout <<
"Deleted M.C. Xi Map" << endl;
666 if (doPrintMemoryInfo) {
667 StMemoryInfo::instance()->snapshot();
668 StMemoryInfo::instance()->print();
680 Int_t StAssociationMaker::Init()
689 mTpcLocalHitResolution =
new TH2F(
"TpcLocalHitResolution",
690 "Delta Z Vs Delta X for Nearby Hits",
693 mTpcLocalHitResolution->SetXTitle(
"Local (Xmc - Xrec) (cm)");
694 mTpcLocalHitResolution->SetYTitle(
"Zmc - Zrec (cm)");
700 "Delta Z Vs Delta X for Nearby Hits",
709 "Delta Z Vs Delta X for Nearby Hits",
719 "Delta Z Vs Delta X for Nearby Hits",
725 gMessMgr->Info() <<
"Cuts used in association for this run: " << endm;
726 gMessMgr->Info() <<
"\n" << *(StMcParameterDB::instance()) <<
"\n" << endm;
728 gMessMgr->Info() <<
"Using IT Tracks in Association" << endm;
731 gMessMgr->Info() <<
"Using EST Tracks in Association" << endm;
733 return StMaker::Init();
740 gMessMgr->Info() <<
"AssociationMaker::Make()" << endm;
741 if (doPrintMemoryInfo)
742 StMemoryInfo::instance()->snapshot();
744 if (mL3TriggerOn && mInTrackerOn) {
745 gMessMgr->Warning() <<
"AssociationMaker::Make(): L3 and IT Tracks are both on!" << endm;
748 if (mEstTracksOn && mInTrackerOn) {
749 gMessMgr->Warning() <<
"AssociationMaker::Make(): EST and IT Tracks are both on!" << endm;
753 if (mDistanceAssoc==
true) {
754 gMessMgr->Info() <<
"Using Distance Association" << endm;
757 gMessMgr->Info() <<
"Using Id Association" << endm;
765 rEvent = (
StEvent*) GetInputDS(
"StEvent");
767 gMessMgr->Warning() <<
"No StEvent!!! " << endm;
768 gMessMgr->Warning() <<
"Bailing out ..." << endm;
792 rcTpcHitColl = rEvent->tpcHitCollection();
793 rcSvtHitColl = rEvent->svtHitCollection();
794 rcSsdHitColl = rEvent->ssdHitCollection();
795 rcFtpcHitColl = rEvent->ftpcHitCollection();
800 rL3Event = rEvent->l3Trigger();
804 rcTpcHitColl = rL3Event->tpcHitCollection();
817 StSPtrVecTrackNode& rcTrackNodes = (!mL3TriggerOn) ? rEvent->trackNodes() : rL3Event->trackNodes();
823 mEvent = (
StMcEvent*) GetDataSet(
"StMcEvent");
825 gMessMgr->Error() <<
"No StMcEvent!!! " << endm;
826 gMessMgr->Error() <<
"Bailing out ..." << endm;
834 mcTpcHitColl = mEvent->tpcHitCollection();
835 mcSvtHitColl = mEvent->svtHitCollection();
836 mcSsdHitColl = mEvent->ssdHitCollection();
837 mcFtpcHitColl = mEvent->ftpcHitCollection();
849 if (rcTpcHitColl && mcTpcHitColl) {
850 if (Debug()) gMessMgr->Info() <<
"Making TPC Hit Associations..." << endm;
856 mRcTpcHitMap =
new rcTpcHitMapType;
857 mMcTpcHitMap =
new mcTpcHitMapType;
861 float tpcHitDistance = 9999;
862 if (Debug()) cout <<
"In Sector : ";
864 for (
unsigned int iSector=0;
865 iSector<rcTpcHitColl->numberOfSectors(); iSector++) {
867 if (Debug()) cout << iSector + 1 <<
" ";
869 for (
unsigned int iPadrow=0;
870 iPadrow<tpcSectHitColl->numberOfPadrows();
874 int padrowMatchesId = 0;
875 int padrowMatchesDi = 0;
876 if (Debug()>=2 && iPadrow>=0) {
878 cout <<
"Padrow " << iPadrow+1 << endl;
879 cout <<
"Reco hit index \tX pos\tY pos\tZ pos\tmIdTruth" << endl;
881 for (
unsigned int iHit=0;
882 iHit<tpcPadRowHitColl->hits().size();
884 rcTpcHit = tpcPadRowHitColl->hits()[iHit];
885 int qatru=rcTpcHit->qaTruth();
int idtru= rcTpcHit->idTruth();
886 cout << iHit <<
"\t" << rcTpcHit->position() <<
"\t" << idtru <<
"\t" << qatru << endl;
888 cout <<
"MC Hit Key\tX pos\tY pos\tZ pos\tparent key" << endl;
889 for (StMcTpcHitIterator jHit = mcTpcHitColl->sector(iSector)->padrow(iPadrow)->hits().begin();
890 jHit != mcTpcHitColl->sector(iSector)->padrow(iPadrow)->hits().end();
893 cout << mcTpcHit->key() <<
"\t" << mcTpcHit->position() <<
"\t" << mcTpcHit->parentTrack()->key() << endl;
897 for (
unsigned int iHit=0; iHit<tpcPadRowHitColl->hits().size(); iHit++){
900 rcTpcHit = tpcPadRowHitColl->hits()[iHit];
917 float xDiff, yDiff, zDiff;
918 xDiff = yDiff = zDiff = -999;
919 for (StMcTpcHitIterator jHit = mcTpcHitColl->sector(iSector)->padrow(iPadrow)->hits().begin();
920 jHit != mcTpcHitColl->sector(iSector)->padrow(iPadrow)->hits().end();
928 if (mDistanceAssoc || !rcTpcHit->idTruth()) {
929 xDiff = mcTpcHit->position().x()-rcTpcHit->position().x();
930 yDiff = mcTpcHit->position().y()-rcTpcHit->position().y();
931 zDiff = mcTpcHit->position().z()-rcTpcHit->position().z();
932 if (!closestTpcHit) {
933 tpcHitDistance=xDiff*xDiff+zDiff*zDiff;
934 closestTpcHit = mcTpcHit;
936 if (xDiff*xDiff+zDiff*zDiff<tpcHitDistance) {
937 tpcHitDistance = xDiff*xDiff+zDiff*zDiff;
938 closestTpcHit = mcTpcHit;
941 if ( fabs(xDiff)>= parDB->xCutTpc() ||
942 fabs(yDiff)>= parDB->yCutTpc() ||
943 fabs(zDiff)>= parDB->zCutTpc(mcTpcHit->position().z()))
continue;
945 if (mcTpcHit->parentTrack()->key() != rcTpcHit->idTruth())
continue;
950 mRcTpcHitMap->insert(rcTpcHitMapValType (rcTpcHit, mcTpcHit) );
951 mMcTpcHitMap->insert(mcTpcHitMapValType (mcTpcHit, rcTpcHit) );
952 rcTpcHit->SetBit(StMcHit::kMatched,1);
953 mcTpcHit->SetBit(StMcHit::kMatched,1);
959 mTpcLocalHitResolution->Fill(closestTpcHit->position().x()-
960 rcTpcHit->position().x(),
961 closestTpcHit->position().z()-
962 rcTpcHit->position().z() );
964 if (Debug()>=2 && iPadrow>=0) {
965 cout <<
"Reco Hits in Padrow " << tpcPadRowHitColl->hits().size() << endl;
966 cout <<
"Id Matches in Padrow " << padrowMatchesId << endl;
967 cout <<
"Distance Matches in pr " << padrowMatchesDi << endl;
974 gMessMgr->Info() <<
"Number of Entries in TPC Hit Maps: " << mRcTpcHitMap->size()
975 <<
" counter " << matchedR << endm;
977 if (doPrintMemoryInfo) {
978 if (Debug()) gMessMgr->Info() <<
"End of TPC Hit Associations\n" << endm;
979 StMemoryInfo::instance()->snapshot();
980 StMemoryInfo::instance()->print();
986 if (rcSvtHitColl && mcSvtHitColl) {
988 if (Debug()) gMessMgr->Info() <<
"Making SVT Hit Associations..." << endm;
994 mRcSvtHitMap =
new rcSvtHitMapType;
995 mMcSvtHitMap =
new mcSvtHitMapType;
997 float svtHitDistance = 9999;
998 unsigned int nSvtHits = rcSvtHitColl->numberOfHits();
999 if (Debug()) cout <<
"In Barrel : ";
1000 for (
unsigned int iBarrel=0; nSvtHits &&
1001 iBarrel<rcSvtHitColl->numberOfBarrels(); iBarrel++) {
1003 if (Debug()) cout << iBarrel + 1 <<
" ";
1005 for (
unsigned int iLadder=0;
1006 iLadder<rcSvtHitColl->barrel(iBarrel)->numberOfLadders();
1009 for (
unsigned int iWafer=0;
1010 iWafer<rcSvtHitColl->barrel(iBarrel)->ladder(iLadder)->numberOfWafers();
1014 for (
unsigned int iHit=0;
1015 iHit<rcSvtHitColl->barrel(iBarrel)->ladder(iLadder)->wafer(iWafer)->hits().size();
1018 rcSvtHit = rcSvtHitColl->barrel(iBarrel)->ladder(iLadder)->wafer(iWafer)->hits()[iHit];
1022 for (
unsigned int jHit=0;
1023 jHit<mcSvtHitColl->barrel(iBarrel)->ladder(iLadder)->wafer(iWafer)->hits().size();
1026 mcSvtHit = mcSvtHitColl->barrel(iBarrel)->ladder(iLadder)->wafer(iWafer)->hits()[jHit];
1027 if (mDistanceAssoc || !rcSvtHit->idTruth()) {
1028 float xDiff = mcSvtHit->position().x() - rcSvtHit->position().x();
1029 float yDiff = mcSvtHit->position().y() - rcSvtHit->position().y();
1030 float zDiff = mcSvtHit->position().z() - rcSvtHit->position().z();
1031 if ( zDiff > parDB->zCutSvt() )
break;
1034 svtHitDistance=xDiff*xDiff+yDiff*yDiff+zDiff*zDiff;
1035 closestSvtHit = mcSvtHit;
1037 if ( (newDist = xDiff*xDiff+yDiff*yDiff+zDiff*zDiff) < svtHitDistance) {
1038 svtHitDistance = newDist;
1039 closestSvtHit = mcSvtHit;
1042 if ( fabs(xDiff)>= parDB->xCutSvt() ||
1043 fabs(yDiff)>= parDB->yCutSvt() ||
1044 fabs(zDiff)>= parDB->zCutSvt())
continue;
1046 if (mcSvtHit->parentTrack()->key() != rcSvtHit->idTruth())
continue;
1048 mRcSvtHitMap->insert(rcSvtHitMapValType (rcSvtHit, mcSvtHit) );
1049 mMcSvtHitMap->insert(mcSvtHitMapValType (mcSvtHit, rcSvtHit) );
1050 rcSvtHit->SetBit(StMcHit::kMatched,1);
1051 mcSvtHit->SetBit(StMcHit::kMatched,1);
1055 rcSvtHit->position().x(),
1056 closestSvtHit->position().z()-
1057 rcSvtHit->position().z() );
1065 gMessMgr->Info() <<
"Number of Entries in SVT Hit Maps: " << mRcSvtHitMap->size() << endm;
1067 if (doPrintMemoryInfo) {
1068 if (Debug()) gMessMgr->Info() <<
"End of SVT Hit Associations\n" << endm;
1069 StMemoryInfo::instance()->snapshot();
1070 StMemoryInfo::instance()->print();
1076 if (rcSsdHitColl && mcSsdHitColl) {
1078 if (Debug()) gMessMgr->Info() <<
"Making SSD Hit Associations..." << endm;
1084 mRcSsdHitMap =
new rcSsdHitMapType;
1085 mMcSsdHitMap =
new mcSsdHitMapType;
1087 float ssdHitDistance = 9999;
1088 unsigned int nSsdHits = rcSsdHitColl->numberOfHits();
1089 if (Debug()) cout <<
"In Ladder : ";
1090 for (
unsigned int iLadder=0; nSsdHits &&
1091 iLadder<rcSsdHitColl->numberOfLadders(); iLadder++) {
1093 if (Debug()) cout << iLadder + 1 <<
" ";
1095 for (
unsigned int iWafer=0;
1096 iWafer<rcSsdHitColl->ladder(iLadder)->numberOfWafers();
1100 for (
unsigned int iHit=0;
1101 iHit<rcSsdHitColl->ladder(iLadder)->wafer(iWafer)->hits().size();
1104 rcSsdHit = rcSsdHitColl->ladder(iLadder)->wafer(iWafer)->hits()[iHit];
1108 for (
unsigned int jHit=0;
1109 jHit<mcSsdHitColl->ladder(iLadder)->wafer(iWafer)->hits().size();
1112 mcSsdHit = mcSsdHitColl->ladder(iLadder)->wafer(iWafer)->hits()[jHit];
1113 float xDiff = mcSsdHit->position().x() - rcSsdHit->position().x();
1114 float yDiff = mcSsdHit->position().y() - rcSsdHit->position().y();
1115 float zDiff = mcSsdHit->position().z() - rcSsdHit->position().z();
1116 if ( zDiff > parDB->zCutSsd() )
break;
1119 ssdHitDistance=xDiff*xDiff+yDiff*yDiff+zDiff*zDiff;
1120 closestSsdHit = mcSsdHit;
1122 if ( (newDist = xDiff*xDiff+yDiff*yDiff+zDiff*zDiff) < ssdHitDistance) {
1123 ssdHitDistance = newDist;
1124 closestSsdHit = mcSsdHit;
1126 if (mDistanceAssoc || !rcSsdHit->idTruth()) {
1127 if ( fabs(xDiff)>= parDB->xCutSsd() ||
1128 fabs(yDiff)>= parDB->yCutSsd() ||
1129 fabs(zDiff)>= parDB->zCutSsd())
continue;
1131 if (mcSsdHit->parentTrack()->key() != rcSsdHit->idTruth())
continue;
1133 mRcSsdHitMap->insert(rcSsdHitMapValType (rcSsdHit, mcSsdHit) );
1134 mMcSsdHitMap->insert(mcSsdHitMapValType (mcSsdHit, rcSsdHit) );
1135 rcSsdHit->SetBit(StMcHit::kMatched,1);
1136 mcSsdHit->SetBit(StMcHit::kMatched,1);
1140 rcSsdHit->position().x(),
1141 closestSsdHit->position().z()-
1142 rcSsdHit->position().z() );
1149 gMessMgr->Info() <<
"Number of Entries in SSD Hit Maps: " << mRcSsdHitMap->size() << endm;
1151 if (doPrintMemoryInfo) {
1152 if (Debug()) gMessMgr->Info() <<
"End of SSD Hit Associations\n" << endm;
1153 StMemoryInfo::instance()->snapshot();
1154 StMemoryInfo::instance()->print();
1160 if (rcFtpcHitColl && mcFtpcHitColl) {
1161 if (Debug()) gMessMgr->Info() <<
"Making FTPC Hit Associations..." << endm;
1167 mRcFtpcHitMap =
new rcFtpcHitMapType;
1168 mMcFtpcHitMap =
new mcFtpcHitMapType;
1170 float ftpcHitDistance = 0;
1171 float minHitDistance = 0;
1172 if (Debug()) cout <<
"In Plane : ";
1173 for (
unsigned int iPlane=0;
1174 iPlane<rcFtpcHitColl->numberOfPlanes(); iPlane++) {
1176 if (Debug()) cout << iPlane + 1 <<
" ";
1178 for (
unsigned int iSector=0;
1179 iSector<rcFtpcHitColl->plane(iPlane)->numberOfSectors();
1185 for (
unsigned int iHit=0;
1186 iHit<rcFtpcHitColl->plane(iPlane)->sector(iSector)->hits().size();
1190 rcFtpcHit = rcFtpcHitColl->plane(iPlane)->sector(iSector)->hits()[iHit];
1192 ftpcComp.setReferencePhi((rcFtpcHit->position().phi()/degree) - parDB->phiCutFtpc());
1194 float rDiff, phiDiff, rDiffMin, phiDiffMin;
1195 rDiff = phiDiff = rDiffMin = phiDiffMin =0;
1199 StMcFtpcHitIterator ftpcHitSeed = mcFtpcHitColl->plane(iPlane)->hits().begin();
1200 bool isFirst =
true;
1201 for (StMcFtpcHitIterator jHit = ftpcHitSeed;
1202 jHit != mcFtpcHitColl->plane(iPlane)->hits().end();
1206 rDiff = mcFtpcHit->position().perp() - rcFtpcHit->position().perp();
1207 phiDiff = (mcFtpcHit->position().phi() - rcFtpcHit->position().phi())/degree;
1209 if ( phiDiff > parDB->phiCutFtpc() )
break;
1211 ftpcHitDistance = (mcFtpcHit->position() - rcFtpcHit->position()).mag2();
1214 minHitDistance=ftpcHitDistance;
1219 if (ftpcHitDistance < minHitDistance) {
1220 minHitDistance = ftpcHitDistance;
1225 if ( fabs(rDiff)< parDB->rCutFtpc() && fabs(phiDiff) < parDB->phiCutFtpc()) {
1227 mRcFtpcHitMap->insert(rcFtpcHitMapValType (rcFtpcHit, mcFtpcHit) );
1228 mMcFtpcHitMap->insert(mcFtpcHitMapValType (mcFtpcHit, rcFtpcHit) );
1229 rcFtpcHit->SetBit(StMcHit::kMatched,1);
1230 rcFtpcHit->setIdTruth(mcFtpcHit->parentTrack()->key(),100);
1231 mcFtpcHit->SetBit(StMcHit::kMatched,1);
1243 gMessMgr->Info() <<
"Number of Entries in Ftpc Hit Maps: " << mRcFtpcHitMap->size() << endm;
1245 if (doPrintMemoryInfo) {
1246 if (Debug()) gMessMgr->Info() <<
"End of FTPC Hit Associations\n" << endm;
1247 StMemoryInfo::instance()->snapshot();
1248 StMemoryInfo::instance()->print();
1255 bool smallTpcHitMap, smallSvtHitMap, smallSsdHitMap, smallFtpcHitMap;
1256 smallTpcHitMap = smallSvtHitMap = smallSsdHitMap = smallFtpcHitMap =
false;
1258 if (mRcTpcHitMap && mRcTpcHitMap->size()>0 && mRcTpcHitMap->size() < parDB->reqCommonHitsTpc()) {
1259 gMessMgr->Warning() <<
"\n----------- WARNING ---------------\n"
1260 <<
" The Tpc Hit Map is too small for \n"
1261 <<
" any meaningful track association. \n"
1262 <<
" ------------------------------------ \n"
1263 <<
"Entries in Hit Map : " << mRcTpcHitMap->size() <<
"\n"
1264 <<
"Required Common Hits: " << parDB->reqCommonHitsTpc() <<
"\n"
1265 <<
"Suggest increase distance cuts." << endm;
1266 smallTpcHitMap =
true;
1269 if (mRcSvtHitMap && mRcSvtHitMap->size()>0 && mRcSvtHitMap->size() < parDB->reqCommonHitsSvt()) {
1270 gMessMgr->Warning() <<
"\n----------- WARNING ---------------\n"
1271 <<
" The Svt Hit Map is too small for \n"
1272 <<
" any meaningful track association. \n"
1273 <<
" ------------------------------------ \n"
1274 <<
"Entries in Hit Map : " << mRcSvtHitMap->size() <<
"\n"
1275 <<
"Required Common Hits: " << parDB->reqCommonHitsSvt() <<
"\n"
1276 <<
"Suggest increase distance cuts." << endm;
1277 smallSvtHitMap =
true;
1279 if (mRcSsdHitMap && mRcSsdHitMap->size()>0 && mRcSsdHitMap->size() < parDB->reqCommonHitsSsd()) {
1280 gMessMgr->Warning() <<
"\n----------- WARNING ---------------\n"
1281 <<
" The Ssd Hit Map is too small for \n"
1282 <<
" any meaningful track association. \n"
1283 <<
" ------------------------------------ \n"
1284 <<
"Entries in Hit Map : " << mRcSsdHitMap->size() <<
"\n"
1285 <<
"Required Common Hits: " << parDB->reqCommonHitsSsd() <<
"\n"
1286 <<
"Suggest increase distance cuts." << endm;
1287 smallSsdHitMap =
true;
1289 if (mRcFtpcHitMap && mRcFtpcHitMap->size()>0 && mRcFtpcHitMap->size() < parDB->reqCommonHitsFtpc()) {
1290 gMessMgr->Warning() <<
"\n----------- WARNING ---------------\n"
1291 <<
" The Ftpc Hit Map is too small for \n"
1292 <<
" any meaningful track association. \n"
1293 <<
" ------------------------------------ \n"
1294 <<
"Entries in Hit Map : " << mRcFtpcHitMap->size() <<
"\n"
1295 <<
"Required Common Hits: " << parDB->reqCommonHitsFtpc() <<
"\n"
1296 <<
"Suggest increase distance cuts." << endm;
1297 smallFtpcHitMap =
true;
1300 if ((smallTpcHitMap && smallSvtHitMap && smallSsdHitMap && smallFtpcHitMap) ||
1301 (!mRcTpcHitMap && !mRcSvtHitMap && mRcSsdHitMap && !mRcFtpcHitMap)) {
1302 gMessMgr->Error() <<
"No Useful Hit Map to make Track Associations" << endm;
1319 pair<rcTpcHitMapIter,rcTpcHitMapIter> boundsTpc;
1320 pair<rcSvtHitMapIter,rcSvtHitMapIter> boundsSvt;
1321 pair<rcSsdHitMapIter,rcSsdHitMapIter> boundsSsd;
1322 pair<rcFtpcHitMapIter,rcFtpcHitMapIter> boundsFtpc;
1324 rcTpcHitMapIter tpcHMIter;
1325 rcSvtHitMapIter svtHMIter;
1326 rcSsdHitMapIter ssdHMIter;
1327 rcFtpcHitMapIter ftpcHMIter;
1338 initializedTrackPing.mcTrack = 0;
1339 initializedTrackPing.nPingsTpc = 0;
1340 initializedTrackPing.nPingsSvt = 0;
1341 initializedTrackPing.nPingsSsd = 0;
1342 initializedTrackPing.nPingsFtpc = 0;
1346 mRcTrackMap =
new rcTrackMapType;
1347 mMcTrackMap =
new mcTrackMapType;
1349 if(Debug()) gMessMgr->Info() <<
"Making Track Associations..." << endm;
1354 unsigned int trkNodeI;
1355 for (trkNodeI = 0; trkNodeI < rcTrackNodes.size(); trkNodeI++){
1357 #ifndef ST_NO_TEMPLATE_DEF_ARGS
1358 vector<trackPing> candidates(20, initializedTrackPing);
1360 vector<trackPing, allocator<trackPing> > candidates(20, initializedTrackPing);
1362 vector<const StMcTrack*> pingedMcTracks(16, 0);
1363 unsigned int nPingedMcTracks = 0;
1365 trkNode = rcTrackNodes[trkNodeI];
1367 rcTrack =
dynamic_cast<const StGlobalTrack*
>(trkNode->track(global));
1369 rcTrack =
dynamic_cast<const StGlobalTrack*
>(trkNode->track(global));
1371 if (!rcTrack)
continue;
1373 if (!(rcTrack->detectorInfo())) {
1374 static int mykount=0; mykount++;
1375 Warning(
"Make",
"*** %d No detectorInfo, track ignored ***", mykount);
1378 if (!(rcTrack->detectorInfo()->hits().size()))
continue;
1379 if (mInTrackerOn && rcTrack->encodedMethod()!=263)
continue;
1380 if (!mInTrackerOn && rcTrack->encodedMethod()==263)
continue;
1381 unsigned int nCandidates = 0;
1389 StPtrVecHit recTpcHits = rcTrack->detectorInfo()->hits(kTpcId);
1390 unsigned int recTpcHitI;
1391 for (recTpcHitI = 0; recTpcHitI < recTpcHits.size(); recTpcHitI++) {
1393 rcHit = recTpcHits[recTpcHitI];
1394 rcKeyTpcHit =
dynamic_cast<StTpcHit*
>(rcHit);
1396 if (!rcKeyTpcHit)
continue;
1397 nPingedMcTracks = 0;
1398 boundsTpc = mRcTpcHitMap->equal_range(rcKeyTpcHit);
1400 for (tpcHMIter=boundsTpc.first; tpcHMIter!=boundsTpc.second; ++tpcHMIter) {
1402 mcValueTpcHit = (*tpcHMIter).second;
1403 if (! mcValueTpcHit)
continue;
1404 trackCand = mcValueTpcHit->parentTrack();
1408 bool countedMcTrack =
false;
1409 for (
unsigned int iMcTrack = 0; iMcTrack<nPingedMcTracks; iMcTrack++) {
1410 if (trackCand == pingedMcTracks[iMcTrack]) {
1411 countedMcTrack =
true;
1415 if (countedMcTrack)
continue;
1416 if (nPingedMcTracks>=pingedMcTracks.size()) pingedMcTracks.resize(nPingedMcTracks+16,0);
1417 pingedMcTracks[nPingedMcTracks] = trackCand;
1425 if (nCandidates == 0) {
1426 candidates[0].mcTrack = trackCand;
1427 candidates[0].nPingsTpc = 1;
1433 for (
unsigned int iCandidate=0; iCandidate<nCandidates; iCandidate++){
1434 if (trackCand==candidates[iCandidate].mcTrack){
1435 candidates[iCandidate].nPingsTpc++;
1438 if (iCandidate == (nCandidates-1)){
1439 candidates[nCandidates].mcTrack = trackCand;
1440 candidates[nCandidates].nPingsTpc = 1;
1444 if (nCandidates>=candidates.size()) {
1445 candidates.resize(nCandidates+20, initializedTrackPing);
1446 if (Debug()) cout <<
"Resizing in the TPC hits of the track " << endl;
1461 StPtrVecHit recSvtHits = rcTrack->detectorInfo()->hits(kSvtId);
1462 unsigned int recSvtHitI;
1463 for (recSvtHitI = 0; recSvtHitI < recSvtHits.size(); recSvtHitI++) {
1466 rcHit = recSvtHits[recSvtHitI];
1467 rcKeySvtHit =
dynamic_cast<StSvtHit*
>(rcHit);
1469 if (!rcKeySvtHit)
continue;
1470 nPingedMcTracks = 0;
1471 boundsSvt = mRcSvtHitMap->equal_range(rcKeySvtHit);
1473 for (svtHMIter=boundsSvt.first; svtHMIter!=boundsSvt.second; ++svtHMIter) {
1475 mcValueSvtHit = (*svtHMIter).second;
1476 trackCand = mcValueSvtHit->parentTrack();
1480 bool countedMcTrack =
false;
1481 for (
unsigned int iMcTrack = 0; iMcTrack<nPingedMcTracks; iMcTrack++) {
1482 if (trackCand == pingedMcTracks[iMcTrack]) {
1483 countedMcTrack =
true;
1487 if (countedMcTrack)
continue;
1488 if (nPingedMcTracks>=pingedMcTracks.size()) pingedMcTracks.resize(nPingedMcTracks+16,0);
1489 pingedMcTracks[nPingedMcTracks] = trackCand;
1497 if (nCandidates == 0) {
1498 candidates[0].mcTrack = trackCand;
1499 candidates[0].nPingsSvt = 1;
1505 for (
unsigned int iCandidate=0; iCandidate<nCandidates; iCandidate++){
1506 if (trackCand==candidates[iCandidate].mcTrack){
1507 candidates[iCandidate].nPingsSvt++;
1510 if (iCandidate == (nCandidates-1)){
1511 candidates[nCandidates].mcTrack = trackCand;
1512 candidates[nCandidates].nPingsSvt = 1;
1516 if (nCandidates>=candidates.size()) {
1517 candidates.resize(nCandidates+20, initializedTrackPing);
1518 if (Debug()) cout <<
"Resizing in the SVT hits of the track " << endl;
1533 StPtrVecHit recSsdHits = rcTrack->detectorInfo()->hits(kSsdId);
1534 unsigned int recSsdHitI;
1535 for (recSsdHitI = 0; recSsdHitI < recSsdHits.size(); recSsdHitI++) {
1538 rcHit = recSsdHits[recSsdHitI];
1539 rcKeySsdHit =
dynamic_cast<StSsdHit*
>(rcHit);
1541 if (!rcKeySsdHit)
continue;
1542 nPingedMcTracks = 0;
1543 boundsSsd = mRcSsdHitMap->equal_range(rcKeySsdHit);
1545 for (ssdHMIter=boundsSsd.first; ssdHMIter!=boundsSsd.second; ++ssdHMIter) {
1547 mcValueSsdHit = (*ssdHMIter).second;
1548 trackCand = mcValueSsdHit->parentTrack();
1552 bool countedMcTrack =
false;
1553 for (
unsigned int iMcTrack = 0; iMcTrack<nPingedMcTracks; iMcTrack++) {
1554 if (trackCand == pingedMcTracks[iMcTrack]) {
1555 countedMcTrack =
true;
1559 if (countedMcTrack)
continue;
1560 if (nPingedMcTracks>=pingedMcTracks.size()) pingedMcTracks.resize(nPingedMcTracks+16,0);
1561 pingedMcTracks[nPingedMcTracks] = trackCand;
1569 if (nCandidates == 0) {
1570 candidates[0].mcTrack = trackCand;
1571 candidates[0].nPingsSsd = 1;
1577 for (
unsigned int iCandidate=0; iCandidate<nCandidates; iCandidate++){
1578 if (trackCand==candidates[iCandidate].mcTrack){
1579 candidates[iCandidate].nPingsSsd++;
1582 if (iCandidate == (nCandidates-1)){
1583 candidates[nCandidates].mcTrack = trackCand;
1584 candidates[nCandidates].nPingsSsd = 1;
1588 if (nCandidates>=candidates.size()) {
1589 candidates.resize(nCandidates+20, initializedTrackPing);
1590 if (Debug()) cout <<
"Resizing in the SSD hits of the track " << endl;
1607 if (mRcFtpcHitMap) {
1608 StPtrVecHit recFtpcHitsW = rcTrack->detectorInfo()->hits(kFtpcWestId);
1609 StPtrVecHit recFtpcHitsE = rcTrack->detectorInfo()->hits(kFtpcEastId);
1610 unsigned int recFtpcHitI;
1613 for (recFtpcHitI = 0; recFtpcHitI < recFtpcHitsW.size(); recFtpcHitI++) {
1615 rcHit = recFtpcHitsW[recFtpcHitI];
1616 rcKeyFtpcHit =
dynamic_cast<StFtpcHit*
>(rcHit);
1618 if (!rcKeyFtpcHit)
continue;
1619 nPingedMcTracks = 0;
1620 boundsFtpc = mRcFtpcHitMap->equal_range(rcKeyFtpcHit);
1622 for (ftpcHMIter=boundsFtpc.first; ftpcHMIter!=boundsFtpc.second; ++ftpcHMIter) {
1624 mcValueFtpcHit = (*ftpcHMIter).second;
1625 trackCand = mcValueFtpcHit->parentTrack();
1629 bool countedMcTrack =
false;
1630 for (
unsigned int iMcTrack = 0; iMcTrack<nPingedMcTracks; iMcTrack++) {
1631 if (trackCand == pingedMcTracks[iMcTrack]) {
1632 countedMcTrack =
true;
1636 if (countedMcTrack)
continue;
1637 if (nPingedMcTracks>=pingedMcTracks.size()) pingedMcTracks.resize(nPingedMcTracks+16,0);
1638 pingedMcTracks[nPingedMcTracks] = trackCand;
1646 if (nCandidates == 0) {
1647 candidates[0].mcTrack = trackCand;
1648 candidates[0].nPingsFtpc = 1;
1654 for (
unsigned int iCandidate=0; iCandidate<nCandidates; iCandidate++){
1655 if (trackCand==candidates[iCandidate].mcTrack){
1656 candidates[iCandidate].nPingsFtpc++;
1659 if (iCandidate == (nCandidates-1)){
1660 candidates[nCandidates].mcTrack = trackCand;
1661 candidates[nCandidates].nPingsFtpc = 1;
1665 if (nCandidates>=candidates.size()) {
1666 candidates.resize(nCandidates+20, initializedTrackPing);
1667 if (Debug()) cout <<
"Resizing in the East FTPC hits of the track " << endl;
1679 for (recFtpcHitI = 0; recFtpcHitI < recFtpcHitsE.size(); recFtpcHitI++) {
1682 rcHit = recFtpcHitsE[recFtpcHitI];
1683 rcKeyFtpcHit =
dynamic_cast<StFtpcHit*
>(rcHit);
1685 if (!rcKeyFtpcHit)
continue;
1686 nPingedMcTracks = 0;
1687 boundsFtpc = mRcFtpcHitMap->equal_range(rcKeyFtpcHit);
1689 for (ftpcHMIter=boundsFtpc.first; ftpcHMIter!=boundsFtpc.second; ++ftpcHMIter) {
1691 mcValueFtpcHit = (*ftpcHMIter).second;
1692 trackCand = mcValueFtpcHit->parentTrack();
1696 bool countedMcTrack =
false;
1697 for (
unsigned int iMcTrack = 0; iMcTrack<nPingedMcTracks; iMcTrack++) {
1698 if (trackCand == pingedMcTracks[iMcTrack]) {
1699 countedMcTrack =
true;
1703 if (countedMcTrack)
continue;
1704 if (nPingedMcTracks>=pingedMcTracks.size()) pingedMcTracks.resize(nPingedMcTracks+16,0);
1705 pingedMcTracks[nPingedMcTracks] = trackCand;
1713 if (nCandidates == 0) {
1714 candidates[0].mcTrack = trackCand;
1715 candidates[0].nPingsFtpc = 1;
1721 for (
unsigned int iCandidate=0; iCandidate<nCandidates; iCandidate++){
1722 if (trackCand==candidates[iCandidate].mcTrack){
1723 candidates[iCandidate].nPingsFtpc++;
1726 if (iCandidate == (nCandidates-1)){
1727 candidates[nCandidates].mcTrack = trackCand;
1728 candidates[nCandidates].nPingsFtpc = 1;
1732 if (nCandidates>=candidates.size()) {
1733 candidates.resize(nCandidates+20, initializedTrackPing);
1734 if (Debug()) cout <<
"Resizing in the West FTPC hits of the track " << endl;
1749 if (nCandidates>20 || candidates.size()>20)
1750 cout <<
"We Have " << candidates.size() <<
" candidates!!! " << endl;
1751 if (candidates.size()<nCandidates) {
1752 cout <<
"The candidate track vector has grown more than expected!! " << endl;
1753 cout <<
"Something is wrong! We probably went out-of-bounds! " << endl;
1755 for (
unsigned int iCandidate=0; iCandidate<nCandidates; iCandidate++){
1759 if (candidates[iCandidate].nPingsTpc >= parDB->reqCommonHitsTpc() ||
1760 candidates[iCandidate].nPingsSvt >= parDB->reqCommonHitsSvt() ||
1761 candidates[iCandidate].nPingsSsd >= parDB->reqCommonHitsSsd() ||
1762 candidates[iCandidate].nPingsFtpc >= parDB->reqCommonHitsFtpc()){
1767 candidates[iCandidate].mcTrack,
1768 candidates[iCandidate].nPingsTpc,
1769 candidates[iCandidate].nPingsSvt,
1770 candidates[iCandidate].nPingsSsd,
1771 candidates[iCandidate].nPingsFtpc);
1772 mRcTrackMap->insert(rcTrackMapValType (rcTrack, trkPair));
1773 mMcTrackMap->insert(mcTrackMapValType (candidates[iCandidate].mcTrack, trkPair));
1784 cout <<
"The RcTrack map is now" << endl << *mRcTrackMap << endl;
1785 cout <<
"The McTrack map is now" << endl << *mMcTrackMap << endl;
1789 gMessMgr->Info() <<
"Number of Entries in Track Maps: " << mRcTrackMap->size() << endm;
1791 if (doPrintMemoryInfo) {
1792 cout <<
"End of Track Associations\n";
1793 StMemoryInfo::instance()->snapshot();
1794 StMemoryInfo::instance()->print();
1800 if (!mL3TriggerOn) {
1802 mRcKinkMap =
new rcKinkMapType;
1803 mMcKinkMap =
new mcKinkMapType;
1804 mRcV0Map =
new rcV0MapType;
1805 mMcV0Map =
new mcV0MapType;
1806 mRcXiMap =
new rcXiMapType;
1807 mMcXiMap =
new mcXiMapType;
1809 if(Debug()) gMessMgr->Info() <<
"Making Vertex Associations" << endm;
1811 StSPtrVecKinkVertex& kinks = rEvent->kinkVertices();
1814 if(Debug()) gMessMgr->Info() <<
"Kinks..." << endm;
1818 pair<rcTrackMapIter, rcTrackMapIter> kinkBoundsDaughter, kinkBoundsParent;
1820 const StMcVertex* primary = mEvent->primaryVertex();
1821 for (StKinkVertexIterator kvi = kinks.begin(); kvi!=kinks.end(); kvi++) {
1824 StTrack* kinkDaughter = rcKink->daughter(0);
1826 if (!gKinkDaughter)
continue;
1828 StTrack* kinkParent = rcKink->parent();
1830 if (!gKinkParent)
continue;
1833 kinkBoundsDaughter = mRcTrackMap->equal_range(gKinkDaughter);
1835 for (rcTrackMapIter trkIter = kinkBoundsDaughter.first; trkIter!=kinkBoundsDaughter.second; trkIter++) {
1836 const StMcTrack* mcDaughter = (*trkIter).second->partnerMcTrack();
1838 const StMcVertex* mcKink = mcDaughter->startVertex();
1839 if (mcKink == primary || mcKink == 0)
continue;
1840 const StMcTrack* mcParent = mcKink->parent();
1843 kinkBoundsParent = mRcTrackMap->equal_range(gKinkParent);
1845 for (rcTrackMapIter trkIter2 = kinkBoundsParent.first;
1846 trkIter2!=kinkBoundsParent.second; trkIter2++) {
1848 if (mcParent == (*trkIter2).second->partnerMcTrack() ) {
1851 mRcKinkMap->insert(rcKinkMapValType (rcKink, mcKink));
1852 mMcKinkMap->insert(mcKinkMapValType (mcKink, rcKink));
1859 gMessMgr->Info() <<
"Number of Entries in kink Maps: " << mRcKinkMap->size() << endm;
1861 if (doPrintMemoryInfo) {
1862 cout <<
"End of kink Associations\n";
1863 StMemoryInfo::instance()->snapshot();
1864 StMemoryInfo::instance()->print();
1867 if(Debug()) gMessMgr->Info() <<
"V0s..." << endm;
1869 StSPtrVecV0Vertex& v0s = rEvent->v0Vertices();
1872 for (StV0VertexIterator v0vi = v0s.begin(); v0vi!=v0s.end(); v0vi++) {
1874 StTrack* v0Daughter1 = rcV0->daughter(0);
1875 if (mEstTracksOn && rcV0->chiSquared()==-16)
continue;
1876 if (!mEstTracksOn && rcV0->chiSquared()<-16)
continue;
1878 if (!gV0Daughter1)
continue;
1880 StTrack* v0Daughter2 = rcV0->daughter(1);
1882 if (!gV0Daughter2)
continue;
1884 pair<rcTrackMapIter, rcTrackMapIter> v0Bounds1 = mRcTrackMap->equal_range(gV0Daughter1);
1885 pair<rcTrackMapIter, rcTrackMapIter> v0Bounds2 = mRcTrackMap->equal_range(gV0Daughter2);
1886 for (rcTrackMapIter trkIter1 = v0Bounds1.first; trkIter1!=v0Bounds1.second; trkIter1++) {
1887 const StMcTrack* mcDaughter1 = (*trkIter1).second->partnerMcTrack();
1888 for (rcTrackMapIter trkIter2 = v0Bounds2.first; trkIter2!=v0Bounds2.second; trkIter2++) {
1889 const StMcTrack* mcDaughter2 = (*trkIter2).second->partnerMcTrack();
1890 if (mcDaughter1->startVertex() == mcDaughter2->startVertex() &&
1891 mcDaughter1->startVertex() != primary &&
1892 mcDaughter1->startVertex() != 0) {
1894 mRcV0Map->insert(rcV0MapValType (rcV0, mcDaughter1->startVertex()));
1895 mMcV0Map->insert(mcV0MapValType (mcDaughter1->startVertex(), rcV0));
1903 gMessMgr->Info() <<
"Number of Entries in V0 Maps: " << mRcV0Map->size() << endm;
1905 if (doPrintMemoryInfo) {
1906 cout <<
"End of V0 Associations\n";
1907 StMemoryInfo::instance()->snapshot();
1908 StMemoryInfo::instance()->print();
1911 if(Debug()) gMessMgr->Info() <<
"Xis..." << endm;
1913 StSPtrVecXiVertex& xis = rEvent->xiVertices();
1916 for (StXiVertexIterator xvi = xis.begin(); xvi!=xis.end(); xvi++) {
1918 if (mEstTracksOn && rcXi->chiSquared()==-16)
continue;
1919 if (!mEstTracksOn && rcXi->chiSquared()<-16)
continue;
1921 StTrack* rcBachelor = rcXi->bachelor();
1923 if (!gRcBachelor)
continue;
1924 pair<rcTrackMapIter, rcTrackMapIter> xiBounds = mRcTrackMap->equal_range(gRcBachelor);
1925 for (rcTrackMapIter trkIter3 = xiBounds.first; trkIter3!= xiBounds.second; trkIter3++){
1926 const StMcTrack* mcBachelor = (*trkIter3).second->partnerMcTrack();
1927 const StMcVertex* mcXi = mcBachelor->startVertex();
1928 if (mcXi == primary || mcXi == 0)
continue;
1929 pair<rcV0MapIter, rcV0MapIter> xiBoundsV0 = mRcV0Map->equal_range(rcV0ofXi);
1930 for (rcV0MapIter v0Iter = xiBoundsV0.first; v0Iter!= xiBoundsV0.second; v0Iter++){
1932 if (mcV0->parent() != 0 && mcXi == mcV0->parent()->startVertex()) {
1934 mRcXiMap->insert(rcXiMapValType (rcXi, mcXi));
1935 mMcXiMap->insert(mcXiMapValType (mcXi, rcXi));
1942 gMessMgr->Info() <<
"Number of Entries in Xi Maps: " << mRcXiMap->size() << endm;
1946 if (doPrintMemoryInfo) {
1947 cout <<
"End of Make()\n";
1948 StMemoryInfo::instance()->snapshot();
1949 StMemoryInfo::instance()->print();
TH2F * mSsdHitResolution
Diff btw global x and z coords of SVT hits.
virtual void Clear(Option_t *option="")
User defined functions.
TH2F * mFtpcHitResolution
Diff btw global x and z coords of SSD hits.
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...
TH2F * mSvtHitResolution
Diff btw local x and z coords of TPC hits.