// $Id: AliHLTTPCCASlicesPerformance.cxx,v 1.4 2010/08/16 23:40:19 ikulakov Exp $ // ************************************************************************** // This file is property of and copyright by the ALICE HLT Project * // ALICE Experiment at CERN, All rights reserved. * // * // Primary Authors: Sergey Gorbunov * // Ivan Kisel * // for The ALICE HLT Project. * // * // Developed by: Igor Kulakov * // Maksym Zyzak * // * // Permission to use, copy, modify and distribute this software and its * // documentation strictly for non-commercial purposes is hereby granted * // without fee, provided that the above copyright notice appears in all * // copies and that both the copyright notice and this permission notice * // appear in the supporting documentation. The authors make no claims * // about the suitability of this software for any purpose. It is * // provided "as is" without express or implied warranty. * // * //*************************************************************************** #ifdef DO_TPCCATRACKER_EFF_PERFORMANCE #include "AliHLTTPCCounters.h" #include "AliHLTTPCCATrackPerformanceBase.h" #include "AliHLTTPCCASlicesPerformance.h" #include "AliHLTTPCCAGBHit.h" #include "AliHLTTPCCAMCTrack.h" #ifndef HLTCA_STANDALONE #include "AliHLTTPCCAMCPoint.h" #endif #include "AliHLTTPCCAOutTrack.h" #include "AliHLTTPCCAGBTrack.h" #include "AliHLTTPCCAGBTracker.h" #include "AliHLTTPCCATracker.h" #include "AliHLTTPCCADisplay.h" #include "TMath.h" #include "TROOT.h" #include "Riostream.h" #include "TFile.h" #include "TH1.h" #include "TH2.h" #include "TProfile.h" #include "TStyle.h" void AliHLTTPCCASlicesPerformance::SetNewEvent(const AliHLTTPCCAGBTracker * const Tracker, AliHLTResizableArray *hitLabels, AliHLTResizableArray *mcTracks, AliHLTResizableArray *localMCPoints) { AliHLTTPCCATrackPerformanceBase::SetNewEvent(Tracker, hitLabels, mcTracks, localMCPoints); /// Init subperformances if (fFirstCall){ slicePerformances.resize(fTracker->NSlices()); for (unsigned int iPerf = 0; iPerf < slicePerformances.size(); iPerf++){ slicePerformances[iPerf] = new AliHLTTPCCASlicePerformance(iPerf); } } fFirstCall = false; for (unsigned int iPerf = 0; iPerf < slicePerformances.size(); iPerf++){ slicePerformances[iPerf]->SetNewEvent(fTracker, fHitLabels, fMCTracks, fLocalMCPoints); } } // void AliHLTTPCCASlicesPerformance::SetNewEvent void AliHLTTPCCASlicesPerformance::CreateHistos(string histoDir, TFile* outFile) { for (unsigned int iPerf = 0; iPerf < slicePerformances.size(); iPerf++){ // slicePerformances[iPerf]->CreateHistos( histoDir + (string)TString(char(iPerf)), outFile ); // just set diff names, they anyway won't be written slicePerformances[iPerf]->CreateHistos( "", 0 ); } AliHLTTPCCATrackPerformanceBase::CreateHistos(histoDir, outFile); } void AliHLTTPCCASlicesPerformance::Exec(bool print) { for (unsigned int iPerf = 0; iPerf < slicePerformances.size(); iPerf++){ slicePerformances[iPerf]->Exec(0); } AliHLTTPCCATrackPerformanceBase::Exec(print); } // void AliHLTTPCCASlicesPerformance::Exec void AliHLTTPCCASlicesPerformance::EfficiencyPerformance() { for (unsigned int iPerf = 0; iPerf < slicePerformances.size(); iPerf++){ fEff += slicePerformances[iPerf]->GetEff(); } AliHLTTPCCATrackPerformanceBase::EfficiencyPerformance(); } // void AliHLTTPCCASlicesPerformance::EfficiencyPerformance() void AliHLTTPCCASlicesPerformance::FillHistos() { for (int iH = 0; iH < NHisto; iH++){ for (unsigned int iPerf = 0; iPerf < slicePerformances.size(); iPerf++){ // move all data fHistos[iH]->Add(slicePerformances[iPerf]->fHistos[iH]); slicePerformances[iPerf]->fHistos[iH]->Reset(); } } } // void AliHLTTPCCASlicesPerformance::FillHistos() #endif //DO_TPCCATRACKER_EFF_PERFORMANCE