From c11cd0faf441172ef98b8623d84faf1522a4d5d3 Mon Sep 17 00:00:00 2001 From: jotwinow Date: Mon, 17 Jan 2011 14:09:00 +0000 Subject: [PATCH] reduce memory consumption and add high multiplicity flag --- PWG1/TPC/AliPerformanceDEdx.cxx | 11 +++++-- PWG1/TPC/AliPerformanceObject.cxx | 4 +-- PWG1/TPC/AliPerformanceObject.h | 4 +-- PWG1/TPC/AliPerformanceTPC.cxx | 30 ++++++++++++++----- PWG1/TPC/AliPerformanceTPC.h | 6 ++-- PWG1/TPC/macros/AddTaskPerformanceTPCdEdxQA.C | 4 +-- 6 files changed, 40 insertions(+), 19 deletions(-) diff --git a/PWG1/TPC/AliPerformanceDEdx.cxx b/PWG1/TPC/AliPerformanceDEdx.cxx index 2a79e91bff5..31dbd0c4307 100644 --- a/PWG1/TPC/AliPerformanceDEdx.cxx +++ b/PWG1/TPC/AliPerformanceDEdx.cxx @@ -437,13 +437,13 @@ void AliPerformanceDEdx::Analyse() TObjArray *arr[7] = {0}; TF1 *f1[7] = {0}; - for(Int_t i=1; i<8; i++) + for(Int_t i=0; i<7; i++) { arr[i] = new TObjArray; f1[i] = new TF1("gaus","gaus"); //printf("i %d \n",i); - h2D = (TH2F*)fDeDxHisto->Projection(0,i); + h2D = (TH2F*)fDeDxHisto->Projection(0,i+1); f1[i]->SetRange(40,60); // should be pion peak h2D->FitSlicesY(f1[i],0,-1,10,"QNR",arr[i]); // gaus fit of pion peak @@ -472,6 +472,7 @@ void AliPerformanceDEdx::Analyse() aFolderObj->Add(h1D); } + // select MIPs (version from AliTPCPerfomanceSummary) fDeDxHisto->GetAxis(0)->SetRangeUser(35,60); fDeDxHisto->GetAxis(2)->SetRangeUser(-20,20); @@ -509,6 +510,12 @@ void AliPerformanceDEdx::Analyse() if (fFolderObj) delete fFolderObj; fFolderObj = aFolderObj; aFolderObj=0; + + + for(Int_t i=0;i<7;i++) { + if(f1[i]) delete f1[i]; f1[i]=0; + } + } //_____________________________________________________________________________ diff --git a/PWG1/TPC/AliPerformanceObject.cxx b/PWG1/TPC/AliPerformanceObject.cxx index 30d214afa0a..b32f76d87ee 100644 --- a/PWG1/TPC/AliPerformanceObject.cxx +++ b/PWG1/TPC/AliPerformanceObject.cxx @@ -56,14 +56,14 @@ AliPerformanceObject::AliPerformanceObject(): } //_____________________________________________________________________________ -AliPerformanceObject::AliPerformanceObject(const char* name, const char* title, Int_t run): +AliPerformanceObject::AliPerformanceObject(const char* name, const char* title, Int_t run, Bool_t highMult): TNamed(name,title), fAnalysisMode(-1), fRunNumber(run), fHptGenerator(kFALSE), fTriggerClass(0), fUseTrackVertex(kFALSE), - fHighMultiplicity(kFALSE), + fHighMultiplicity(highMult), fUseKinkDaughters(kTRUE), fUseCentralityBin(0) { diff --git a/PWG1/TPC/AliPerformanceObject.h b/PWG1/TPC/AliPerformanceObject.h index 06c69ba7493..f4b64058426 100644 --- a/PWG1/TPC/AliPerformanceObject.h +++ b/PWG1/TPC/AliPerformanceObject.h @@ -24,7 +24,7 @@ class AliESDVertex; class AliPerformanceObject : public TNamed { public : AliPerformanceObject(); - AliPerformanceObject(const char* name="AliPerformanceObject", const char* title="AliPerformanceObject", Int_t run=-1); + AliPerformanceObject(const char* name="AliPerformanceObject", const char* title="AliPerformanceObject", Int_t run=-1, Bool_t highMult=kFALSE); virtual ~AliPerformanceObject(); // Init data members @@ -127,7 +127,7 @@ protected: AliPerformanceObject(const AliPerformanceObject&); // not implemented AliPerformanceObject& operator=(const AliPerformanceObject&); // not implemented - ClassDef(AliPerformanceObject,5); + ClassDef(AliPerformanceObject,6); }; #endif diff --git a/PWG1/TPC/AliPerformanceTPC.cxx b/PWG1/TPC/AliPerformanceTPC.cxx index 20a325e38f6..cb3452a3c8d 100644 --- a/PWG1/TPC/AliPerformanceTPC.cxx +++ b/PWG1/TPC/AliPerformanceTPC.cxx @@ -98,8 +98,8 @@ AliPerformanceTPC::AliPerformanceTPC(): */ //_____________________________________________________________________________ -AliPerformanceTPC::AliPerformanceTPC(Char_t* name, Char_t* title,Int_t analysisMode,Bool_t hptGenerator, Int_t run): - AliPerformanceObject(name,title,run), +AliPerformanceTPC::AliPerformanceTPC(Char_t* name, Char_t* title,Int_t analysisMode,Bool_t hptGenerator, Int_t run, Bool_t highMult): + AliPerformanceObject(name,title,run,highMult), fTPCClustHisto(0), fTPCEventHisto(0), fTPCTrackHisto(0), @@ -169,10 +169,22 @@ void AliPerformanceTPC::Init() // // + //padRow:phi:TPCSide + Int_t binsTPCClustHisto[3] = {160, 144, 2}; + Double_t minTPCClustHisto[3] = {0., 0., 0.}; + Double_t maxTPCClustHisto[3] = {160., 2.*TMath::Pi(), 2.}; + + fTPCClustHisto = new THnSparseF("fTPCClustHisto","padRow:phi:TPCSide",3,binsTPCClustHisto,minTPCClustHisto,maxTPCClustHisto); + fTPCClustHisto->GetAxis(0)->SetTitle("padRow"); + fTPCClustHisto->GetAxis(1)->SetTitle("phi (rad)"); + fTPCClustHisto->GetAxis(2)->SetTitle("TPCSide"); + //fTPCClustHisto->Sumw2(); + //padRow:phi:TPCSide:pad:detector:glZ - Int_t binsTPCClustHisto[6] = {160, 180, 2, 256, 512, 250}; - Double_t minTPCClustHisto[6] = {0., 0., 0., -128, 0, -250}; - Double_t maxTPCClustHisto[6] = {160., 2.*TMath::Pi(), 2., 128, 512,250}; + /* + Int_t binsTPCClustHisto[6] = {160, 144, 2, 128, 72, 50}; + Double_t minTPCClustHisto[6] = {0., 0., 0., 0, 0, -250}; + Double_t maxTPCClustHisto[6] = {160., 2.*TMath::Pi(), 2., 128, 72,250}; fTPCClustHisto = new THnSparseF("fTPCClustHisto","padRow:phi:TPCSide:pad:detector:gZ",6,binsTPCClustHisto,minTPCClustHisto,maxTPCClustHisto); fTPCClustHisto->GetAxis(0)->SetTitle("padRow"); @@ -182,6 +194,7 @@ void AliPerformanceTPC::Init() fTPCClustHisto->GetAxis(4)->SetTitle("detector"); fTPCClustHisto->GetAxis(5)->SetTitle("glZ (cm)"); //fTPCClustHisto->Sumw2(); + */ Int_t maxMult; if (fHighMultiplicity) { maxMult = 4001; } else { maxMult = 151; } @@ -498,12 +511,13 @@ void AliPerformanceTPC::Exec(AliMCEvent* const mcEvent, AliESDEvent *const esdEv //fTPCClustHisto1->Fill(vTPCClust1); // - Float_t pad = cluster->GetPad(); - Int_t detector = cluster->GetDetector(); Double_t phi = TMath::ATan2(gclf[1],gclf[0]); if(phi < 0) phi += 2.*TMath::Pi(); - Double_t vTPCClust[6] = { irow, phi, TPCside, pad, detector, gclf[2] }; + //Float_t pad = cluster->GetPad(); + //Int_t detector = cluster->GetDetector(); + //Double_t vTPCClust[6] = { irow, phi, TPCside, pad, detector, gclf[2] }; + Double_t vTPCClust[3] = { irow, phi, TPCside }; fTPCClustHisto->Fill(vTPCClust); } } diff --git a/PWG1/TPC/AliPerformanceTPC.h b/PWG1/TPC/AliPerformanceTPC.h index 81cea9a3cb1..1845c0b257a 100644 --- a/PWG1/TPC/AliPerformanceTPC.h +++ b/PWG1/TPC/AliPerformanceTPC.h @@ -31,7 +31,7 @@ class AliRecInfoCuts; class AliPerformanceTPC : public AliPerformanceObject { public : //AliPerformanceTPC(); - AliPerformanceTPC(Char_t* name="AliPerformanceTPC", Char_t* title="AliPerformanceTPC",Int_t analysisMode=0,Bool_t hptGenerator=kFALSE, Int_t run=-1); + AliPerformanceTPC(Char_t* name="AliPerformanceTPC", Char_t* title="AliPerformanceTPC",Int_t analysisMode=0,Bool_t hptGenerator=kFALSE, Int_t run=-1, Bool_t highMult = kFALSE); virtual ~AliPerformanceTPC(); @@ -89,7 +89,7 @@ private: static Bool_t fgMergeTHnSparse; // TPC histogram - THnSparseF *fTPCClustHisto; //-> padRow:phi:TPCside:pad:detector + THnSparseF *fTPCClustHisto; //-> padRow:phi:TPCside THnSparseF *fTPCEventHisto; //-> Xv:Yv:Zv:mult:multP:multN:vertStatus THnSparseF *fTPCTrackHisto; //-> nClust:chi2PerClust:nClust/nFindableClust:DCAr:DCAz:eta:phi:pt:charge:vertStatus TObjArray* fFolderObj; // array of analysed histograms @@ -106,7 +106,7 @@ private: AliPerformanceTPC(const AliPerformanceTPC&); // not implemented AliPerformanceTPC& operator=(const AliPerformanceTPC&); // not implemented - ClassDef(AliPerformanceTPC,8); + ClassDef(AliPerformanceTPC,9); }; #endif diff --git a/PWG1/TPC/macros/AddTaskPerformanceTPCdEdxQA.C b/PWG1/TPC/macros/AddTaskPerformanceTPCdEdxQA.C index 97ec4a70d16..9b77057e061 100644 --- a/PWG1/TPC/macros/AddTaskPerformanceTPCdEdxQA.C +++ b/PWG1/TPC/macros/AddTaskPerformanceTPCdEdxQA.C @@ -32,7 +32,7 @@ /////////////////////////////////////////////////////////////////////////////// //____________________________________________ -AliPerformanceTask* AddTaskPerformanceTPCdEdxQA(Bool_t bUseMCInfo=kFALSE, Bool_t bUseESDfriend=kTRUE, const char *triggerClass=0) +AliPerformanceTask* AddTaskPerformanceTPCdEdxQA(Bool_t bUseMCInfo=kFALSE, Bool_t bUseESDfriend=kTRUE, Bool_t highMult = kFALSE, const char *triggerClass=0) { // // Add AliPerformanceTask with TPC performance components @@ -113,7 +113,7 @@ AliPerformanceTask* AddTaskPerformanceTPCdEdxQA(Bool_t bUseMCInfo=kFALSE, Bool_t // // TPC performance // - AliPerformanceTPC *pCompTPC0 = new AliPerformanceTPC("AliPerformanceTPC","AliPerformanceTPC",kTPC,kFALSE); + AliPerformanceTPC *pCompTPC0 = new AliPerformanceTPC("AliPerformanceTPC","AliPerformanceTPC",kTPC,kFALSE,-1,highMult); if(!pCompTPC0) { Error("AddTaskPerformanceTPC", "Cannot create AliPerformanceTPC"); } -- 2.43.0