reduce memory consumption and add high multiplicity flag
authorjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Jan 2011 14:09:00 +0000 (14:09 +0000)
committerjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 17 Jan 2011 14:09:00 +0000 (14:09 +0000)
PWG1/TPC/AliPerformanceDEdx.cxx
PWG1/TPC/AliPerformanceObject.cxx
PWG1/TPC/AliPerformanceObject.h
PWG1/TPC/AliPerformanceTPC.cxx
PWG1/TPC/AliPerformanceTPC.h
PWG1/TPC/macros/AddTaskPerformanceTPCdEdxQA.C

index 2a79e91..31dbd0c 100644 (file)
@@ -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;
+  }
+
 }
 
 //_____________________________________________________________________________
index 30d214a..b32f76d 100644 (file)
@@ -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)
 {
index 06c69ba..f4b6405 100644 (file)
@@ -24,7 +24,7 @@ class AliESDVertex;
 class AliPerformanceObject : public TNamed {\r
 public :\r
   AliPerformanceObject(); \r
-  AliPerformanceObject(const char* name="AliPerformanceObject", const char* title="AliPerformanceObject", Int_t run=-1); \r
+  AliPerformanceObject(const char* name="AliPerformanceObject", const char* title="AliPerformanceObject", Int_t run=-1, Bool_t highMult=kFALSE); \r
   virtual ~AliPerformanceObject();\r
 \r
   // Init data members\r
@@ -127,7 +127,7 @@ protected:
   AliPerformanceObject(const AliPerformanceObject&); // not implemented\r
   AliPerformanceObject& operator=(const AliPerformanceObject&); // not implemented\r
 \r
-  ClassDef(AliPerformanceObject,5);\r
+  ClassDef(AliPerformanceObject,6);\r
 };\r
 \r
 #endif\r
index 20a325e..cb3452a 100644 (file)
@@ -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);
         }
       }
index 81cea9a..1845c0b 100644 (file)
@@ -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
index 97ec4a7..9b77057 100644 (file)
@@ -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");
   }