diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index e4d11805e3fdbb17e05c38e15461b2dc2de95c93..c1e8fdb281f2bd915a33666add5ad14d492117af 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -109,6 +109,31 @@ CbmL1::~CbmL1() if (fInstance == this) fInstance = nullptr; } +void CbmL1::CheckDetectorPresence() +{ + Bool_t IsMuch = 0; + Bool_t IsTrd = 0; + Bool_t IsTof = 0; + Bool_t IsSts = 0; + Bool_t IsMvd = 0; + TObjArray* topNodes = gGeoManager->GetTopNode()->GetNodes(); + + for (Int_t iTopNode = 0; iTopNode < topNodes->GetEntriesFast(); iTopNode++) { + TGeoNode* topNode = static_cast<TGeoNode*>(topNodes->At(iTopNode)); + + if (TString(topNode->GetName()).Contains("much")) IsMuch = 1; + if (TString(topNode->GetName()).Contains("trd")) IsTrd = 1; + if (TString(topNode->GetName()).Contains("tof")) IsTof = 1; + if (TString(topNode->GetName()).Contains("sts")) IsSts = 1; + if (TString(topNode->GetName()).Contains("mvd")) IsMvd = 1; + } + + fUseMUCH = (fUseMUCH && IsMuch); + fUseTRD = fUseTRD && IsTrd; + fUseTOF = fUseTOF && IsTof; + fUseMVD = fUseMVD && IsMvd; +} + void CbmL1::SetParContainers() { @@ -207,6 +232,8 @@ InitStatus CbmL1::Init() fUseTOF = 0; } + CheckDetectorPresence(); + fStsPoints = 0; fMvdPoints = 0; @@ -1441,7 +1468,7 @@ void CbmL1::Reconstruct(CbmEvent* event) if (fVerbose > 1) { cout << "L1 Track finder..." << endl; } algo->CATrackFinder(); - // IdealTrackFinder(); + // IdealTrackFinder(); fTrackingTime += algo->fCATime; if (fVerbose > 1) { cout << "L1 Track finder ok" << endl; } diff --git a/reco/L1/CbmL1.h b/reco/L1/CbmL1.h index 75bb1aac031d8abbbff833a584b263becd6a951d..20075dc30046baf9f88711db0b458438b414bcf8 100644 --- a/reco/L1/CbmL1.h +++ b/reco/L1/CbmL1.h @@ -125,6 +125,7 @@ public: static CbmL1* Instance() { return fInstance; } void SetParContainers(); + void CheckDetectorPresence(); virtual InitStatus ReInit(); virtual InitStatus Init(); void Exec(Option_t* option); diff --git a/reco/L1/CbmL1ReadEvent.cxx b/reco/L1/CbmL1ReadEvent.cxx index 7c1c04dc8a5e046c0010690145b432f917022551..837d47c7dbc6e769602a1745ca88adfca348b2e5 100644 --- a/reco/L1/CbmL1ReadEvent.cxx +++ b/reco/L1/CbmL1ReadEvent.cxx @@ -387,7 +387,6 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, float& TsStart, float& TsLength, ? (NMvdStations + NStsStations + NMuchStations + NTrdStations + iSt) : MC.iStation; if (MC.iStation < 0) continue; - if (MC.z < 240) continue; assert(MC.iStation >= 0); int iTofSta = MC.iStation - (NMvdStations + NStsStations + NMuchStations + NTrdStations);