diff --git a/reco/detectors/sts/CbmRecoSts.cxx b/reco/detectors/sts/CbmRecoSts.cxx index 835f6a9fe10bfc4068d88a7de04d10a5a92dca1e..b3eecca84b875c42694b9fe0bd3ac68d3d10bedd 100644 --- a/reco/detectors/sts/CbmRecoSts.cxx +++ b/reco/detectors/sts/CbmRecoSts.cxx @@ -121,6 +121,12 @@ UInt_t CbmRecoSts::CreateModules() // --- Create reco module CbmStsRecoModule* recoModule = new CbmStsRecoModule(setupModule, modPar, sensPar, lorentzF, lorentzB); assert(recoModule); + + recoModule->SetTimeCutDigisAbs(fTimeCutDigisAbs); + recoModule->SetTimeCutDigisSig(fTimeCutDigisSig); + recoModule->SetTimeCutClustersAbs(fTimeCutClustersAbs); + recoModule->SetTimeCutClustersSig(fTimeCutClustersSig); + auto result = fModules.insert({moduleAddress, recoModule}); assert(result.second); fModuleIndex.push_back(recoModule); diff --git a/reco/detectors/sts/CbmStsRecoModule.cxx b/reco/detectors/sts/CbmStsRecoModule.cxx index f6fef2b7ea31f62a2b3c50e413d19caa771d2e0d..a0c2173258e71bb922246d40f6f2cc4d906ac695 100644 --- a/reco/detectors/sts/CbmStsRecoModule.cxx +++ b/reco/detectors/sts/CbmStsRecoModule.cxx @@ -88,10 +88,10 @@ void CbmStsRecoModule::Reconstruct() }); // --- Perform cluster finding - fClusterFinder->Exec(fDigisF, fClustersF, fSetupModule->GetAddress(), fNofStripsF, 0, fTimeCutDigiSig, - fTimeCutDigiAbs, fConnectEdgeFront, fParModule); - fClusterFinder->Exec(fDigisB, fClustersB, fSetupModule->GetAddress(), fNofStripsB, fNofStripsF, fTimeCutDigiSig, - fTimeCutDigiAbs, fConnectEdgeBack, fParModule); + fClusterFinder->Exec(fDigisF, fClustersF, fSetupModule->GetAddress(), fNofStripsF, 0, fTimeCutDigisSig, + fTimeCutDigisAbs, fConnectEdgeFront, fParModule); + fClusterFinder->Exec(fDigisB, fClustersB, fSetupModule->GetAddress(), fNofStripsB, fNofStripsF, fTimeCutDigisSig, + fTimeCutDigisAbs, fConnectEdgeBack, fParModule); // --- Perform cluster analysis for (auto& cluster : fClustersF) @@ -109,12 +109,12 @@ void CbmStsRecoModule::Reconstruct() // --- Perform hit finding if (fHitFinder) - fHitFinder->Exec(fClustersF, fClustersB, fHits, fSetupModule->GetAddress(), fTimeCutClusterSig, fTimeCutClusterAbs, - fDyActive, fNofStripsF, fStripPitchF, fStereoFront, fStereoBack, fLorentzShiftF, fLorentzShiftB, - fMatrix); + fHitFinder->Exec(fClustersF, fClustersB, fHits, fSetupModule->GetAddress(), fTimeCutClustersSig, + fTimeCutClustersAbs, fDyActive, fNofStripsF, fStripPitchF, fStereoFront, fStereoBack, + fLorentzShiftF, fLorentzShiftB, fMatrix); else if (fHitFinderOrtho) - fHitFinderOrtho->Exec(fClustersF, fClustersB, fHits, fSetupModule->GetAddress(), fTimeCutClusterSig, - fTimeCutClusterAbs, fNofStripsF, fNofStripsB, fStripPitchF, fStripPitchB, fLorentzShiftF, + fHitFinderOrtho->Exec(fClustersF, fClustersB, fHits, fSetupModule->GetAddress(), fTimeCutClustersSig, + fTimeCutClustersAbs, fNofStripsF, fNofStripsB, fStripPitchF, fStripPitchB, fLorentzShiftF, fLorentzShiftB, fMatrix); } // ------------------------------------------------------------------------- diff --git a/reco/detectors/sts/CbmStsRecoModule.h b/reco/detectors/sts/CbmStsRecoModule.h index 49173be8bd4393eed27348bfacb9ac8e69cc8b88..7a591b329a0cafbee8e326d05874b9a1d3566de2 100644 --- a/reco/detectors/sts/CbmStsRecoModule.h +++ b/reco/detectors/sts/CbmStsRecoModule.h @@ -117,6 +117,46 @@ public: /** @brief Info to string **/ std::string ToString() const; + /** @brief Time cut on clusters for hit finding + ** @param value Maximal time difference between two clusters in a hit [ns] + ** + ** Two clusters are considered compatible if their time difference + ** is below value. + ** Setting this cut parameter to a positive value will override + ** the time cut defined by SetTimeCutClustersSig. + **/ + void SetTimeCutClustersAbs(Double_t value) { fTimeCutClustersAbs = value; } + + + /** @brief Time cut on clusters for hit finding + ** @param value Maximal time difference in units of error + ** + ** Two clusters are considered compatible if their time difference + ** is below value * sqrt(terr1**2 + terr2*+2). + **/ + void SetTimeCutClustersSig(Double_t value) { fTimeCutClustersSig = value; } + + + /** @brief Time cut on digis for cluster finding + ** @param value Maximal time difference between two digis in a cluster [ns] + ** + ** Two digis are considered compatible if their time difference + ** is below value. + ** Setting this cut parameter to a positive value will override + ** the time cut defined by SetTimeCutDigisSig. + **/ + void SetTimeCutDigisAbs(Double_t value) { fTimeCutDigisAbs = value; } + + + /** @brief Time cut on digis for hit finding + ** @param value Maximal time difference in units of error + ** + ** Two digis are considered compatible if their time difference + ** is below value * sqrt2 * sigma(t), where the time error of + ** the digis is assumed to be the same. + **/ + void SetTimeCutDigisSig(Double_t value) { fTimeCutDigisSig = value; } + private: /** @brief Set and check the needed parameters **/ @@ -154,10 +194,10 @@ private: std::vector<CbmStsHit> fHits {}; //! // --- Settings - Double_t fTimeCutDigiSig = 3.; ///< Time cut for cluster finding (in sigma) - Double_t fTimeCutDigiAbs = -1.; ///< Time cut for cluster finding (in ns) - Double_t fTimeCutClusterSig = 4.; ///< Time cut for hit finding (in ns) - Double_t fTimeCutClusterAbs = -1.; ///< Time cut for hit finding (in sigma) + Double_t fTimeCutDigisSig = 3.; ///< Time cut for cluster finding (in sigma) + Double_t fTimeCutDigisAbs = -1.; ///< Time cut for cluster finding (in ns) + Double_t fTimeCutClustersSig = 4.; ///< Time cut for hit finding (in ns) + Double_t fTimeCutClustersAbs = -1.; ///< Time cut for hit finding (in sigma) Bool_t fConnectEdgeFront = kFALSE; ///< Round-the edge clustering front side Bool_t fConnectEdgeBack = kFALSE; ///< Round-the edge clustering back side