diff --git a/StRoot/StFwdUtils/StFwdAnalysisMaker.cxx b/StRoot/StFwdUtils/StFwdAnalysisMaker.cxx index ce8c0935233..8ff49c18799 100644 --- a/StRoot/StFwdUtils/StFwdAnalysisMaker.cxx +++ b/StRoot/StFwdUtils/StFwdAnalysisMaker.cxx @@ -120,8 +120,10 @@ int StFwdAnalysisMaker::Init() { mHists[ "matchedEcaldR" ] = new TH1F( "matchedEcaldR", ";dr (trk - ecal); counts", 400, 0, 400 ); mHists[ "hcaldX" ] = new TH1F( "hcaldX", ";dx (trk - hcal); counts", 400, -200, 200 ); + mHists[ "hcaldXdNFit" ] = new TH2F( "hcaldXdNFit", ";dx (trk - hcal); nFit", 400, -200, 200, 10, 0, 10 ); mHists[ "matchedHcaldX" ] = new TH1F( "matchedHcaldX", ";dx (trk - hcal); counts", 400, -200, 200 ); mHists[ "hcaldY" ] = new TH1F( "hcaldY", ";dy (trk - hcal); counts", 400, -200, 200 ); + mHists[ "hcaldYdNFit" ] = new TH2F( "hcaldYdNFit", ";dy (trk - hcal); nFit", 400, -200, 200, 10, 0, 10 ); mHists[ "matchedHcaldY" ] = new TH1F( "matchedHcaldY", ";dy (trk - hcal); counts", 400, -200, 200 ); mHists[ "hcaldR" ] = new TH1F( "hcaldR", ";dr (trk - hcal); counts", 400, 0, 400 ); mHists[ "hcalMindR" ] = new TH1F( "hcalMindR", ";dr (trk - hcal); counts", 400, 0, 400 ); @@ -188,7 +190,7 @@ void StFwdAnalysisMaker::ProcessFwdTracks( ){ size_t fwdMultEcalClusters = 0; size_t fwdMultHcalClusters = 0; for ( int iDet = 0; iDet < 4; iDet++ ){ - for( int i = 0; i < fcs->clusters(iDet).size(); i++){ + for( size_t i = 0; i < fcs->clusters(iDet).size(); i++){ StFcsCluster * clu = fcs->clusters(iDet)[i]; if ( iDet < 2 ){ @@ -232,7 +234,6 @@ void StFwdAnalysisMaker::ProcessFwdTracks( ){ mHists["pt"]->Fill( fwdTrack->momentum().perp() ); // ecal proj - float c[9]; int detId = kFcsWcalId; TVector3 ecalXYZ; TVector3 ecapP; @@ -242,7 +243,7 @@ void StFwdAnalysisMaker::ProcessFwdTracks( ){ LOG_INFO << "EcalProj z= " << ecalProj.mXYZ.z() << endm; LOG_INFO << "HcalProj z= " << hcalProj.mXYZ.z() << endm; - for ( int iEcal = 0; iEcal < fwdTrack->ecalClusters().size(); iEcal++ ){ + for ( size_t iEcal = 0; iEcal < fwdTrack->ecalClusters().size(); iEcal++ ){ StFcsCluster *clu = fwdTrack->ecalClusters()[iEcal]; LOG_INFO << "Ecal clu detId = " << clu->detectorId() << endm; mHists["matchedEcalEnergy"]->Fill( clu->energy() ); @@ -260,7 +261,7 @@ void StFwdAnalysisMaker::ProcessFwdTracks( ){ double mindR = 999; StFcsCluster * cclu = nullptr; // closet cluster for ( int iDet = 0; iDet < 2; iDet++ ){ - for( int i = 0; i < fcs->clusters(iDet).size(); i++){ + for( size_t i = 0; i < fcs->clusters(iDet).size(); i++){ StFcsCluster * clu = fcs->clusters(iDet)[i]; StThreeVectorD xyz = mFcsDb->getStarXYZfromColumnRow(clu->detectorId(), clu->x(), clu->y()); @@ -298,7 +299,7 @@ void StFwdAnalysisMaker::ProcessFwdTracks( ){ double mindR = 999; StFcsCluster * cclu = nullptr; for ( int iDet = 2; iDet < 4; iDet++ ){ - for( int i = 0; i < fcs->clusters(iDet).size(); i++){ + for( size_t i = 0; i < fcs->clusters(iDet).size(); i++){ StFcsCluster * clu = fcs->clusters(iDet)[i]; if (!clu) continue; StThreeVectorD xyz = mFcsDb->getStarXYZfromColumnRow(clu->detectorId(), clu->x(), clu->y()); @@ -308,10 +309,15 @@ void StFwdAnalysisMaker::ProcessFwdTracks( ){ float dy = hcalProj.mXYZ.y() - xyz.y(); float dr = sqrt(dx*dx + dy*dy); - if ( fabs(dy) < 25 ) + if ( fabs(dy) < 25 ){ mHists[ "hcaldX" ]->Fill( dx ); - if ( fabs(dx) < 25 ) + mHists[ "hcaldXdNFit" ]->Fill( dx, fwdTrack->numberOfFitPoints() ); + + } + if ( fabs(dx) < 25 ){ mHists[ "hcaldY" ]->Fill( dy ); + mHists[ "hcaldYdNFit" ]->Fill( dy, fwdTrack->numberOfFitPoints() ); + } mHists[ "hcaldR" ]->Fill( dr ); if ( dr < mindR ){ @@ -399,7 +405,6 @@ void StFwdAnalysisMaker::ProcessFwdMuTracks( ){ // ecal proj - float c[9]; int detId = kFcsWcalId; TVector3 ecalXYZ; TVector3 ecapP; @@ -410,7 +415,7 @@ void StFwdAnalysisMaker::ProcessFwdMuTracks( ){ if (foundEcalProj){ // LOG_INFO << "EcalProj z= " << ecalProj.mXYZ.Z() << endm; - for( int i = 0; i < fcs->numberOfClusters(); i++){ + for( size_t i = 0; i < fcs->numberOfClusters(); i++){ StMuFcsCluster * clu = fcs->getCluster(i); if ( clu->detectorId() > 1 ) continue; @@ -434,7 +439,7 @@ void StFwdAnalysisMaker::ProcessFwdMuTracks( ){ } - for ( size_t i = 0; i < muFwdTrack->mEcalClusters.GetEntries(); i++ ){ + for ( int i = 0; i < muFwdTrack->mEcalClusters.GetEntries(); i++ ){ auto c = (StMuFcsCluster*) muFwdTrack->mEcalClusters.At(i); if (!c) continue; mHists["ecalEnergy"]->Fill( c->energy() ); @@ -452,7 +457,7 @@ void StFwdAnalysisMaker::ProcessFwdMuTracks( ){ mHists["ecalMatchPerTrack"]->Fill( muFwdTrack->mEcalClusters.GetEntries() ); mHists["hcalMatchPerTrack"]->Fill( muFwdTrack->mHcalClusters.GetEntries() ); - for ( size_t i = 0; i < muFwdTrack->mHcalClusters.GetEntries(); i++ ){ + for ( int i = 0; i < muFwdTrack->mHcalClusters.GetEntries(); i++ ){ auto c = (StMuFcsCluster*) muFwdTrack->mHcalClusters.At(i); if (!c) continue; mHists["hcalEnergy"]->Fill( c->energy() );