Skip to content
Snippets Groups Projects
Commit 5345958c authored by Alberica Toia's avatar Alberica Toia Committed by Volker Friese
Browse files

Bug fix in SetTimeCuts in STS recconstruction

parent ec88aff0
No related branches found
No related tags found
1 merge request!554Bug fix in SetTimeCut's
Pipeline #13651 passed
...@@ -121,6 +121,12 @@ UInt_t CbmRecoSts::CreateModules() ...@@ -121,6 +121,12 @@ UInt_t CbmRecoSts::CreateModules()
// --- Create reco module // --- Create reco module
CbmStsRecoModule* recoModule = new CbmStsRecoModule(setupModule, modPar, sensPar, lorentzF, lorentzB); CbmStsRecoModule* recoModule = new CbmStsRecoModule(setupModule, modPar, sensPar, lorentzF, lorentzB);
assert(recoModule); assert(recoModule);
recoModule->SetTimeCutDigisAbs(fTimeCutDigisAbs);
recoModule->SetTimeCutDigisSig(fTimeCutDigisSig);
recoModule->SetTimeCutClustersAbs(fTimeCutClustersAbs);
recoModule->SetTimeCutClustersSig(fTimeCutClustersSig);
auto result = fModules.insert({moduleAddress, recoModule}); auto result = fModules.insert({moduleAddress, recoModule});
assert(result.second); assert(result.second);
fModuleIndex.push_back(recoModule); fModuleIndex.push_back(recoModule);
......
...@@ -88,10 +88,10 @@ void CbmStsRecoModule::Reconstruct() ...@@ -88,10 +88,10 @@ void CbmStsRecoModule::Reconstruct()
}); });
// --- Perform cluster finding // --- Perform cluster finding
fClusterFinder->Exec(fDigisF, fClustersF, fSetupModule->GetAddress(), fNofStripsF, 0, fTimeCutDigiSig, fClusterFinder->Exec(fDigisF, fClustersF, fSetupModule->GetAddress(), fNofStripsF, 0, fTimeCutDigisSig,
fTimeCutDigiAbs, fConnectEdgeFront, fParModule); fTimeCutDigisAbs, fConnectEdgeFront, fParModule);
fClusterFinder->Exec(fDigisB, fClustersB, fSetupModule->GetAddress(), fNofStripsB, fNofStripsF, fTimeCutDigiSig, fClusterFinder->Exec(fDigisB, fClustersB, fSetupModule->GetAddress(), fNofStripsB, fNofStripsF, fTimeCutDigisSig,
fTimeCutDigiAbs, fConnectEdgeBack, fParModule); fTimeCutDigisAbs, fConnectEdgeBack, fParModule);
// --- Perform cluster analysis // --- Perform cluster analysis
for (auto& cluster : fClustersF) for (auto& cluster : fClustersF)
...@@ -109,12 +109,12 @@ void CbmStsRecoModule::Reconstruct() ...@@ -109,12 +109,12 @@ void CbmStsRecoModule::Reconstruct()
// --- Perform hit finding // --- Perform hit finding
if (fHitFinder) if (fHitFinder)
fHitFinder->Exec(fClustersF, fClustersB, fHits, fSetupModule->GetAddress(), fTimeCutClusterSig, fTimeCutClusterAbs, fHitFinder->Exec(fClustersF, fClustersB, fHits, fSetupModule->GetAddress(), fTimeCutClustersSig,
fDyActive, fNofStripsF, fStripPitchF, fStereoFront, fStereoBack, fLorentzShiftF, fLorentzShiftB, fTimeCutClustersAbs, fDyActive, fNofStripsF, fStripPitchF, fStereoFront, fStereoBack,
fMatrix); fLorentzShiftF, fLorentzShiftB, fMatrix);
else if (fHitFinderOrtho) else if (fHitFinderOrtho)
fHitFinderOrtho->Exec(fClustersF, fClustersB, fHits, fSetupModule->GetAddress(), fTimeCutClusterSig, fHitFinderOrtho->Exec(fClustersF, fClustersB, fHits, fSetupModule->GetAddress(), fTimeCutClustersSig,
fTimeCutClusterAbs, fNofStripsF, fNofStripsB, fStripPitchF, fStripPitchB, fLorentzShiftF, fTimeCutClustersAbs, fNofStripsF, fNofStripsB, fStripPitchF, fStripPitchB, fLorentzShiftF,
fLorentzShiftB, fMatrix); fLorentzShiftB, fMatrix);
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
......
...@@ -117,6 +117,46 @@ public: ...@@ -117,6 +117,46 @@ public:
/** @brief Info to string **/ /** @brief Info to string **/
std::string ToString() const; 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: private:
/** @brief Set and check the needed parameters **/ /** @brief Set and check the needed parameters **/
...@@ -154,10 +194,10 @@ private: ...@@ -154,10 +194,10 @@ private:
std::vector<CbmStsHit> fHits {}; //! std::vector<CbmStsHit> fHits {}; //!
// --- Settings // --- Settings
Double_t fTimeCutDigiSig = 3.; ///< Time cut for cluster finding (in sigma) Double_t fTimeCutDigisSig = 3.; ///< Time cut for cluster finding (in sigma)
Double_t fTimeCutDigiAbs = -1.; ///< Time cut for cluster finding (in ns) Double_t fTimeCutDigisAbs = -1.; ///< Time cut for cluster finding (in ns)
Double_t fTimeCutClusterSig = 4.; ///< Time cut for hit finding (in ns) Double_t fTimeCutClustersSig = 4.; ///< Time cut for hit finding (in ns)
Double_t fTimeCutClusterAbs = -1.; ///< Time cut for hit finding (in sigma) Double_t fTimeCutClustersAbs = -1.; ///< Time cut for hit finding (in sigma)
Bool_t fConnectEdgeFront = kFALSE; ///< Round-the edge clustering front side Bool_t fConnectEdgeFront = kFALSE; ///< Round-the edge clustering front side
Bool_t fConnectEdgeBack = kFALSE; ///< Round-the edge clustering back side Bool_t fConnectEdgeBack = kFALSE; ///< Round-the edge clustering back side
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment