Fixing memory
authorpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Jan 2012 18:18:24 +0000 (18:18 +0000)
committerpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 16 Jan 2012 18:18:24 +0000 (18:18 +0000)
PWG2/EBYE/AliAnalysisTaskBF.cxx
PWG2/EBYE/AliAnalysisTaskBF.h
PWG2/EBYE/AliBalance.cxx

index 38f6af9..2e43652 100755 (executable)
@@ -56,6 +56,8 @@ AliAnalysisTaskBF::AliAnalysisTaskBF(const char *name)
   fHistPt(0),\r
   fHistEta(0),\r
   fHistPhi(0),\r
+  fHistPhiBefore(0),\r
+  fHistPhiAfter(0),\r
   fHistV0M(0),\r
   fHistRefTracks(0),\r
   fESDtrackCuts(0),\r
@@ -206,6 +208,10 @@ void AliAnalysisTaskBF::UserCreateOutputObjects() {
   fList->Add(fHistEta);\r
   fHistPhi  = new TH1F("fHistPhi","#phi distribution",200,-20,380);\r
   fList->Add(fHistPhi);\r
+  fHistPhiBefore  = new TH1F("fHistPhiBefore","#phi distribution",200,0.,2*TMath::Pi());\r
+  fList->Add(fHistPhiBefore);\r
+  fHistPhiAfter  = new TH1F("fHistPhiAfter","#phi distribution",200,0.,2*TMath::Pi());\r
+  fList->Add(fHistPhiAfter);\r
   fHistV0M  = new TH2F("fHistV0M","V0 Multiplicity C vs. A",500, 0, 20000, 500, 0, 20000);\r
   fList->Add(fHistV0M);\r
   TString gRefTrackName[6] = {"tracks","tracksPos","tracksNeg","tracksTPConly","clusITS0","clusITS1"};\r
@@ -746,6 +752,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
        //Printf("=====================================================");\r
        gReactionPlane = headerH->ReactionPlaneAngle();\r
        gImpactParameter = headerH->ImpactParameter();\r
+       fCentrality = gImpactParameter;\r
       }\r
       // take only events inside centrality class (DIDN'T CHANGE THIS UP TO NOW)\r
       if((fImpactParameterMin > gImpactParameter) || (fImpactParameterMax < gImpactParameter))\r
@@ -832,9 +839,10 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
 \r
            v_charge = track->Charge();\r
            v_y      = track->Y();\r
-           v_phi    = track->Phi() * TMath::RadToDeg();\r
+           v_phi    = track->Phi();\r
            v_E      = track->E();\r
            track->PxPyPz(v_p);\r
+           //Printf("phi (before): %lf",v_phi);\r
 \r
            //Flow after burner\r
            if(fUseFlowAfterBurner) {\r
@@ -843,6 +851,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
 \r
              Double_t phi0 = v_phi;\r
              Double_t gV2 = fDifferentialV2->Eval(v_pt);\r
+             fHistPhiBefore->Fill(v_phi);\r
 \r
              for (Int_t j = 0; j < maxNumberOfIterations; j++) {\r
                Double_t phiprev = v_phi;\r
@@ -851,7 +860,11 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                v_phi -= fl/fp;\r
                if (TMath::AreEqualAbs(phiprev,v_phi,precisionPhi)) break;\r
              }\r
+             //Printf("phi (after): %lf\n",v_phi);\r
+             fHistPhiAfter->Fill(v_phi);\r
            }\r
+           \r
+           v_phi *= TMath::RadToDeg();\r
 \r
            // fill charge vector\r
            chargeVector[0]->push_back(v_charge);\r
index 4c658fe..1e8aefc 100755 (executable)
@@ -124,14 +124,16 @@ class AliAnalysisTaskBF : public AliAnalysisTaskSE {
   TH1F *fHistVy; //y coordinate of the primary vertex\r
   TH1F *fHistVz; //z coordinate of the primary vertex\r
 \r
-  TH2F *fHistClus;\r
-  TH2F *fHistDCA;\r
-  TH1F *fHistChi2;\r
-  TH1F *fHistPt;\r
-  TH1F *fHistEta;\r
-  TH1F *fHistPhi;\r
-  TH2F *fHistV0M;\r
-  TH2F *fHistRefTracks;\r
+  TH2F *fHistClus;//\r
+  TH2F *fHistDCA;//\r
+  TH1F *fHistChi2;//\r
+  TH1F *fHistPt;//\r
+  TH1F *fHistEta;//\r
+  TH1F *fHistPhi;//\r
+  TH1F *fHistPhiBefore;//\r
+  TH1F *fHistPhiAfter;//\r
+  TH2F *fHistV0M;//\r
+  TH2F *fHistRefTracks;//\r
 \r
   AliESDtrackCuts *fESDtrackCuts; //ESD track cuts\r
 \r
index 900fe88..1e6b167 100644 (file)
@@ -188,31 +188,43 @@ void AliBalance::InitHistograms() {
   TString histName;
   for(Int_t iAnalysisType = 0; iAnalysisType < ANALYSIS_TYPES; iAnalysisType++) {
     histName = "fHistP"; histName += gBFAnalysisType[iAnalysisType]; 
+    histName += (Int_t)(fCentStart); histName += "-";
+    histName += (Int_t)(fCentStop);
     if(bShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistP[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,100,fP1Start[iAnalysisType],fP1Stop[iAnalysisType]);
 
     histName = "fHistN"; histName += gBFAnalysisType[iAnalysisType]; 
+    histName += (Int_t)(fCentStart); histName += "-";
+    histName += (Int_t)(fCentStop);
     if(bShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistN[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,100,fP1Start[iAnalysisType],fP1Stop[iAnalysisType]);
   
     histName = "fHistPN"; histName += gBFAnalysisType[iAnalysisType]; 
+    histName += (Int_t)(fCentStart); histName += "-";
+    histName += (Int_t)(fCentStop);
     if(bShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistPN[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,fNumberOfBins[iAnalysisType],fP2Start[iAnalysisType],fP2Stop[iAnalysisType]);
     
     histName = "fHistNP"; histName += gBFAnalysisType[iAnalysisType]; 
+    histName += (Int_t)(fCentStart); histName += "-";
+    histName += (Int_t)(fCentStop);
     if(bShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistNP[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,fNumberOfBins[iAnalysisType],fP2Start[iAnalysisType],fP2Stop[iAnalysisType]);
     
     histName = "fHistPP"; histName += gBFAnalysisType[iAnalysisType]; 
+    histName += (Int_t)(fCentStart); histName += "-";
+    histName += (Int_t)(fCentStop);
     if(bShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistPP[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,fNumberOfBins[iAnalysisType],fP2Start[iAnalysisType],fP2Stop[iAnalysisType]);
     
     histName = "fHistNN"; histName += gBFAnalysisType[iAnalysisType]; 
+    histName += (Int_t)(fCentStart); histName += "-";
+    histName += (Int_t)(fCentStop);
     if(bShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistNN[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,fNumberOfBins[iAnalysisType],fP2Start[iAnalysisType],fP2Stop[iAnalysisType]);