Commit b91b7de1 authored by drslebedev's avatar drslebedev Committed by Volker Friese
Browse files

Changes in RICH reconstruction log.

parent 42edd5cb
......@@ -40,6 +40,7 @@
#include "TClonesArray.h"
#include <iomanip>
#include <iostream>
using std::cout;
......@@ -98,22 +99,36 @@ InitStatus CbmRichReconstruction::Init()
void CbmRichReconstruction::Exec(Option_t* /*opt*/)
{
TStopwatch timer;
timer.Start();
if (fRichTrackParamZ != nullptr) fRichTrackParamZ->Delete();
if (fRichProjections != nullptr) fRichProjections->Delete();
if (fRichRings != nullptr) fRichRings->Delete();
fNofTs++;
if (fCbmEvents == nullptr) {
LOG(info) << "CbmRichReconstruction: Event " << ++fEventNum;
fNofEvents++;
ProcessData(nullptr);
}
else {
int nEvents = fCbmEvents->GetEntriesFast();
LOG(info) << "CbmRichReconstruction: Timeslice " << ++fEventNum << " with " << nEvents << " events";
fNofEvents += nEvents;
for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
CbmEvent* event = static_cast<CbmEvent*>(fCbmEvents->At(iEvent));
ProcessData(event);
}
}
timer.Stop();
fCalcTime += timer.RealTime();
fTotalNofHits += fRichHits->GetEntriesFast();
fTotalNofRings += fRichRings->GetEntriesFast();
fTotalNofTrackProj += (fRichProjections ? fRichProjections->GetEntriesFast() : 0);
LOG(info) << setw(20) << left << GetName() << "[" << fixed << setw(8) << setprecision(1) << right
<< timer.RealTime() * 1000. << " ms] "
<< "TS " << fNofTs << ", hits " << fRichHits->GetEntriesFast() << ", rings " << fRichRings->GetEntriesFast()
<< ", trackProj " << (fRichProjections ? fRichProjections->GetEntriesFast() : 0);
}
void CbmRichReconstruction::ProcessData(CbmEvent* event)
......@@ -249,6 +264,24 @@ void CbmRichReconstruction::RunTrackAssign(CbmEvent* event)
fRingTrackAssign->DoAssign(event, fRichRings, fRichProjections);
}
void CbmRichReconstruction::Finish() {}
void CbmRichReconstruction::Finish()
{
std::cout << std::endl;
LOG(info) << "=====================================";
LOG(info) << GetName() << ": Run summary";
LOG(info) << "Time slices : " << fNofTs;
LOG(info) << "Events : " << fNofEvents;
LOG(info) << "Events / TS : " << fixed << setprecision(2) << fNofEvents / (Double_t) fNofTs;
LOG(info) << "Hits / TS : " << fixed << setprecision(2) << fTotalNofHits / (Double_t) fNofTs;
LOG(info) << "Ring / TS : " << fixed << setprecision(2) << fTotalNofRings / (Double_t) fNofTs;
LOG(info) << "TrackProj / TS : " << fixed << setprecision(2) << fTotalNofTrackProj / (Double_t) fNofTs;
LOG(info) << "Time / TS : " << fixed << setprecision(2) << 1000. * fCalcTime / Double_t(fNofTs) << " ms";
LOG(info) << "Hits / ev : " << fixed << setprecision(2) << fTotalNofHits / (Double_t) fNofEvents;
LOG(info) << "Ring / ev : " << fixed << setprecision(2) << fTotalNofRings / (Double_t) fNofEvents;
LOG(info) << "TrackProj / ev : " << fixed << setprecision(2) << fTotalNofTrackProj / (Double_t) fNofEvents;
LOG(info) << "Time / ev : " << fixed << setprecision(2) << 1000. * fCalcTime / Double_t(fNofEvents) << " ms";
LOG(info) << "=====================================\n";
}
ClassImp(CbmRichReconstruction)
......@@ -96,7 +96,13 @@ private:
TClonesArray* fGlobalTracks = nullptr;
TClonesArray* fCbmEvents = nullptr;
Int_t fEventNum = 0; // event or timeslice counter
Int_t fNofTs = 0;
Int_t fNofEvents = 0;
Double_t fCalcTime = 0.;
Int_t fTotalNofHits = 0;
Int_t fTotalNofRings = 0;
Int_t fTotalNofTrackProj = 0;
// pointers to the algorithms
CbmRichRingFinder* fRingFinder = nullptr;
......
......@@ -111,9 +111,9 @@ Int_t CbmRichRingFinderHough::DoFind(CbmEvent* event, TClonesArray* rHitArray, T
Double_t dt3 = timer.RealTime();
int nofFoundRings = event ? event->GetNofData(ECbmDataType::kRichRing) : rRingArray->GetEntriesFast();
LOG(info) << "CbmRichRingFinderHough::DoFind(): Event:" << fEventNum << " hits:" << nofRichHits
<< " rings:" << nofFoundRings << " ringsInTS:" << rRingArray->GetEntriesFast()
<< " Time:" << dt1 + dt2 + dt3;
LOG(debug) << "CbmRichRingFinderHough::DoFind(): Event:" << fEventNum << " hits:" << nofRichHits
<< " rings:" << nofFoundRings << " ringsInTS:" << rRingArray->GetEntriesFast()
<< " Time:" << dt1 + dt2 + dt3;
return 1;
}
......
......@@ -59,9 +59,9 @@ void CbmRichRingTrackAssignClosestD::DoAssign(CbmEvent* event, TClonesArray* rin
Int_t nofTracks = event ? event->GetNofData(ECbmDataType::kRichTrackProjection) : richProj->GetEntriesFast();
Int_t nofRings = event ? event->GetNofData(ECbmDataType::kRichRing) : rings->GetEntriesFast();
LOG(info) << "CbmRichRingTrackAssignClosestD::DoAssign(): Event:" << fEventNum << " rings:" << nofRings
<< " ringsInTS:" << rings->GetEntriesFast() << " tracks:" << nofTracks
<< " tracksInTS:" << richProj->GetEntriesFast();
LOG(debug) << "CbmRichRingTrackAssignClosestD::DoAssign(): Event:" << fEventNum << " rings:" << nofRings
<< " ringsInTS:" << rings->GetEntriesFast() << " tracks:" << nofTracks
<< " tracksInTS:" << richProj->GetEntriesFast();
}
void CbmRichRingTrackAssignClosestD::DoAssignRingTrack(CbmEvent* event, TClonesArray* rings, TClonesArray* richProj)
......
......@@ -33,16 +33,16 @@ CbmRichTrackExtrapolationIdeal::~CbmRichTrackExtrapolationIdeal() {}
void CbmRichTrackExtrapolationIdeal::Init()
{
FairRootManager* manager = FairRootManager::Instance();
if (manager = nullptr) LOG(fatal) << "CbmRichTrackExtrapolationIdeal::Init(): FairRootManager is nullptr.";
if (manager == nullptr) LOG(fatal) << "CbmRichTrackExtrapolationIdeal::Init(): FairRootManager is nullptr.";
fRefPlanePoints = (TClonesArray*) manager->GetObject("RefPlanePoint");
if (fRefPlanePoints = nullptr) LOG(fatal) << "CbmRichTrackExtrapolationIdeal::Init(): No RefPlanePoint array.";
if (fRefPlanePoints == nullptr) LOG(fatal) << "CbmRichTrackExtrapolationIdeal::Init(): No RefPlanePoint array.";
fStsTracks = (TClonesArray*) manager->GetObject("StsTrack");
if (fStsTracks = nullptr) LOG(fatal) << "CbmRichTrackExtrapolationIdeal::Init(): No StsTrack array.";
if (fStsTracks == nullptr) LOG(fatal) << "CbmRichTrackExtrapolationIdeal::Init(): No StsTrack array.";
fStsTrackMatches = (TClonesArray*) manager->GetObject("StsTrackMatch");
if (fStsTrackMatches = nullptr) LOG(fatal) << "CbmRichTrackExtrapolationIdeal::Init(): No StsTrackMatch array.";
if (fStsTrackMatches == nullptr) LOG(fatal) << "CbmRichTrackExtrapolationIdeal::Init(): No StsTrackMatch array.";
}
void CbmRichTrackExtrapolationIdeal::DoExtrapolation(CbmEvent* event, TClonesArray* globalTracks,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment