diff --git a/reco/L1/CbmL1.cxx b/reco/L1/CbmL1.cxx index 243bcfd26669bd1d2c84b2abd7c3362067be388e..a7cd67c9f52a4a98f93bf49bb41dc45656caa3b7 100644 --- a/reco/L1/CbmL1.cxx +++ b/reco/L1/CbmL1.cxx @@ -502,7 +502,6 @@ InitStatus CbmL1::Init() { LOG(fatal) << GetName() << ": No MCEventList data!"; } - if (!fUseMVD) { listMvdPts = 0; listMvdHitMatches = 0; @@ -1240,8 +1239,8 @@ InitStatus CbmL1::Init() { for (int j = 1, iSta = (NStsStations + NMvdStations + NMuchStations + NTrdStations); - iSta - < (NStsStations + NMvdStations + NMuchStations + NTrdStations + 1); + iSta < (NStsStations + NMvdStations + NMuchStations + NTrdStations + + NTOFStation); iSta++, j++) { TString stationNameSts = stationName; stationNameSts += j; @@ -1290,8 +1289,8 @@ InitStatus CbmL1::Init() { "will be used"; for (int iSta = (NStsStations + NMvdStations + NMuchStations + NTrdStations); - iSta - < (NStsStations + NMvdStations + NMuchStations + NTrdStations + 1); + iSta < (NStsStations + NMvdStations + NMuchStations + NTrdStations + + NTOFStation); iSta++) { algo->fRadThick[iSta].SetBins(1, 100); algo->fRadThick[iSta].table.resize(1); @@ -1310,41 +1309,16 @@ void CbmL1::Reconstruct(CbmEvent* event) { static int nevent = 0; vFileEvent.clear(); - if (fTimesliceMode) { - listStsDigi.clear(); - // The following line was commented out (V.F.) since it uses - // obsolete functionality of CbmTimeSlice. - //listStsDigi = fTimeSlice->GetStsData(); - TClonesArray* fDigis; - TClonesArray* fDigiMatches; - - FairRootManager* ioman = FairRootManager::Instance(); - - fDigis = (TClonesArray*) ioman->GetObject("StsDigi"); - fDigiMatches = (TClonesArray*) ioman->GetObject("StsDigiMatch"); - - UInt_t nDigis = fDigis->GetEntriesFast(); - for (UInt_t iDigi = 0; iDigi < nDigis; iDigi++) { - //CbmStsDigi* digi = (CbmStsDigi*) fDigis->At(iDigi); //unused - CbmMatch* match = (CbmMatch*) fDigiMatches->At(iDigi); + int nofEvents = fEventList->GetNofEvents(); + for (int iE = 0; iE < nofEvents; iE++) { - for (Int_t iLink = 0; iLink < match->GetNofLinks(); iLink++) { - Int_t iFile = match->GetLink(iLink).GetFile(); - Int_t iEvent = match->GetLink(iLink).GetEntry(); - - vFileEvent.insert(DFSET::value_type(iFile, iEvent)); - } //? Compare with existing input - } //# links - - Int_t nLinks = fTimeSlice->GetMatch().GetNofLinks(); - for (Int_t iLink = 0; iLink < nLinks; iLink++) { - Int_t iFile = fTimeSlice->GetMatch().GetLink(iLink).GetFile(); - Int_t iEvent = fTimeSlice->GetMatch().GetLink(iLink).GetEntry(); - - vFileEvent.insert(DFSET::value_type(iFile, iEvent)); + int fileId = fEventList->GetFileIdByIndex(iE); + int eventId = fEventList->GetEventIdByIndex(iE); + vFileEvent.insert(DFSET::value_type(fileId, eventId)); } + } else { Int_t iFile = FairRunAna::Instance()->GetEventHeader()->GetInputFileId(); Int_t iEvent = FairRunAna::Instance()->GetEventHeader()->GetMCEntryNumber(); diff --git a/reco/L1/CbmL1Performance.cxx b/reco/L1/CbmL1Performance.cxx index df932eb94db9b19ba532b0a2841f3852d1249cd9..4edce3d4798589bc96a115a56d97b5dc017053d5 100644 --- a/reco/L1/CbmL1Performance.cxx +++ b/reco/L1/CbmL1Performance.cxx @@ -296,6 +296,7 @@ void CbmL1::EfficienciesPerformance() { static int L1_NEVENTS = 0; static double L1_CATIME = 0.0; + TL1PerfEfficiencies ntra; // efficiencies for current event for (vector<CbmL1Track>::iterator rtraIt = vRTracks.begin(); @@ -323,6 +324,7 @@ void CbmL1::EfficienciesPerformance() { mtraIt++) { CbmL1MCTrack& mtra = *(mtraIt); + // if( !( mtra.pdg == -11 && mtra.mother_ID == -1 ) ) continue; // electrons only if (!mtra.IsReconstructable() && !mtra.IsAdditional()) continue; @@ -2422,7 +2424,6 @@ void CbmL1::InputPerformance() { Int_t nMC = -1; if (listStsPts) { nMC = listStsPts->GetEntries(); } - if (listStsHits && listStsHitMatch) { for (unsigned int iH = 0; iH < vStsHits.size(); iH++) { const CbmL1StsHit& h = vStsHits[iH]; @@ -2458,6 +2459,7 @@ void CbmL1::InputPerformance() { } } + if (stsHitMatch.GetNofLinks() > 0) { Float_t bestWeight = 0.f; for (Int_t iLink = 0; iLink < stsHitMatch.GetNofLinks(); iLink++) { @@ -2468,6 +2470,7 @@ void CbmL1::InputPerformance() { link = stsHitMatch.GetLink(iLink); + pt = (CbmStsPoint*) fStsPoints->Get( iFile, iEvent, stsHitMatch.GetLink(iLink).GetIndex()); } @@ -2476,7 +2479,6 @@ void CbmL1::InputPerformance() { if (pt == 0) continue; - double mcTime = pt->GetTime(); if (fTimesliceMode) @@ -2692,9 +2694,9 @@ void CbmL1::InputPerformance() { mcTime += fEventList->GetEventTime(link.GetEntry(), link.GetFile()); // hit pulls and residuals - if ((sh->GetPlaneId()) == 0) continue; - if ((sh->GetPlaneId()) == 2) continue; - if ((sh->GetPlaneId()) == 4) continue; + // if ((sh->GetPlaneId()) == 0) continue; + // if ((sh->GetPlaneId()) == 2) continue; + // if ((sh->GetPlaneId()) == 4) continue; TVector3 hitPos, mcPos, hitErr; sh->Position(hitPos); @@ -2755,7 +2757,9 @@ void CbmL1::InputPerformance() { link = hm->GetLink(iLink); } } - if (bestWeight / totalWeight < 0.7 || iMCPoint < 0) continue; + // if (bestWeight / totalWeight < 0.7 || iMCPoint < 0) continue; + + if (iMCPoint < 0) continue; CbmTofPoint* pt = (CbmTofPoint*) fTofPoints->Get( link.GetFile(), link.GetEntry(), link.GetIndex()); diff --git a/reco/L1/CbmL1ReadEvent.cxx b/reco/L1/CbmL1ReadEvent.cxx index 569973d9a5b2513fa3d2ea0934ccd289a5cc6ed3..f32c3cf00912598a940eab739cd46d90e21a3ee3 100644 --- a/reco/L1/CbmL1ReadEvent.cxx +++ b/reco/L1/CbmL1ReadEvent.cxx @@ -985,7 +985,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, CbmEvent* event) { TmpStrip& s = tmpStrips[is]; if (s.iStation != th.iStation) continue; if (s.iStrip != th.iStripF) continue; - if (fabs(s.time - th.time) > 20) continue; + if (fabs(s.time - th.time) > 30) continue; if (fabs(s.u - th.u_front) > 1.e-4) continue; th.indStripF = is; } @@ -993,7 +993,7 @@ void CbmL1::ReadEvent(L1AlgoInputData* fData_, CbmEvent* event) { TmpStrip& s = tmpStripsB[is]; if (s.iStation != th.iStation) continue; if (s.iStrip != th.iStripB) continue; - if (fabs(s.time - th.time) > 20) continue; + if (fabs(s.time - th.time) > 30) continue; if (fabs(s.u - th.u_back) > 1.e-4) continue; th.indStripB = is; } @@ -1575,7 +1575,9 @@ void CbmL1::HitMatch() { iEvent = vFileEvent.begin()->second; } int nMvdPoints_ = 0; - if (listMvdPts) nMvdPoints_ = listMvdPts->GetEntriesFast(); + if (!fTimesliceMode) + if (listMvdPts) nMvdPoints_ = listMvdPts->GetEntriesFast(); + Double_t dtrck = dFEI(iFile, iEvent, iIndex + nMvdPoints_); DFEI2I::iterator trk_it = dFEI2vMCPoints.find(dtrck);