new histogram + extra info statement
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Jun 2009 11:35:12 +0000 (11:35 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Jun 2009 11:35:12 +0000 (11:35 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.cxx
PWG2/FLOW/AliFlowCommon/AliFlowAnalysisWithMCEventPlane.h
PWG2/FLOW/macros/runFlowAnalysis.C

index 2869cd6..07c4857 100644 (file)
@@ -58,7 +58,8 @@ ClassImp(AliFlowAnalysisWithMCEventPlane)
    fHistProDiffFlowEtaRP(NULL),
    fHistProDiffFlowPtEtaPOI(NULL),
    fHistProDiffFlowPtPOI(NULL),
-   fHistProDiffFlowEtaPOI(NULL)
+   fHistProDiffFlowEtaPOI(NULL),
+   fHistSpreadOfFlow(NULL)
 {
 
   // Constructor.
@@ -160,7 +161,12 @@ void AliFlowAnalysisWithMCEventPlane::Init() {
   fHistProDiffFlowEtaPOI = new TProfile("FlowPro_VetaPOI_MCEP","FlowPro_VetaPOI_MCEP",iNbinsEta,dEtaMin,dEtaMax);
   fHistProDiffFlowEtaPOI->SetXTitle("#eta");
   fHistProDiffFlowEtaPOI->SetYTitle("");
-  fHistList->Add(fHistProDiffFlowEtaPOI);          
+  fHistList->Add(fHistProDiffFlowEtaPOI);         
+  
+  fHistSpreadOfFlow = new TH1D("fHistSpreadOfFlow","fHistSpreadOfFlow",1000,0,1);
+  fHistSpreadOfFlow->SetXTitle("v_{2}");
+  fHistSpreadOfFlow->SetYTitle("counts");
+  fHistList->Add(fHistSpreadOfFlow);           
  
   fEventNumber = 0;  //set number of events to zero
       
@@ -193,8 +199,11 @@ void AliFlowAnalysisWithMCEventPlane::Make(AliFlowEventSimple* anEvent) {
     Double_t dv2  = 0.;
     Double_t dPt  = 0.;
     Double_t dEta = 0.;
-    //Double_t dPi = TMath::Pi();                   
-                                                             
+    //Double_t dPi = TMath::Pi();  
+    
+    // profile to calculate flow e-b-y:
+    TProfile *flowEBE = new TProfile("flowEBE","flowEBE",1,0,1);
+                                                                                         
     //calculate flow
     //loop over the tracks of the event
     Int_t iNumberOfTracks = anEvent->NumberOfTracks(); 
@@ -205,10 +214,12 @@ void AliFlowAnalysisWithMCEventPlane::Make(AliFlowEventSimple* anEvent) {
          if (pTrack->InRPSelection()){
             dPhi = pTrack->Phi();
             dv2  = TMath::Cos(2*(dPhi-aRP));
-           dPt  = pTrack->Pt();
-           dEta = pTrack->Eta();
-            //no-name int. flow (to be improved):
+                dPt  = pTrack->Pt();
+                dEta = pTrack->Eta();
+            //no-name int. flow (to be improved = name needed!):
             fHistProIntFlow->Fill(0.,dv2);
+            //no-name int. flow e-b-e (to be improved = name needed!):
+            flowEBE->Fill(0.,dv2);
             //differential flow (Pt, Eta, RP):
             fHistProDiffFlowPtEtaRP->Fill(dPt,dEta,dv2,1.);
             //differential flow (Pt, RP):
@@ -235,6 +246,10 @@ void AliFlowAnalysisWithMCEventPlane::Make(AliFlowEventSimple* anEvent) {
          
     fEventNumber++;
     //    cout<<"@@@@@ "<<fEventNumber<<" events processed"<<endl;
+    
+    // store flow value for this event:
+    fHistSpreadOfFlow->Fill(flowEBE->GetBinContent(1));
+    delete flowEBE; 
   }
 }
   //--------------------------------------------------------------------    
index 5d29a74..d29d027 100644 (file)
@@ -91,8 +91,12 @@ class AliFlowAnalysisWithMCEventPlane {
    
    TProfile* GetHistProDiffFlowEtaPOI()   {return this->fHistProDiffFlowEtaPOI; } 
    void      SetHistProDiffFlowEtaPOI(TProfile* aHistProDiffFlowEtaPOI) 
-     {this->fHistProDiffFlowEtaPOI = aHistProDiffFlowEtaPOI; }    
-
+     {this->fHistProDiffFlowEtaPOI = aHistProDiffFlowEtaPOI; } 
+     
+   TH1D* GetHistSpreadOfFlow()   {return this->fHistSpreadOfFlow; } 
+   void      SetHistSpreadOfFlow(TH1D* aHistSpreadOfFlow) 
+     {this->fHistSpreadOfFlow = aHistSpreadOfFlow; }    
+   
  private:
  
    AliFlowAnalysisWithMCEventPlane(const AliFlowAnalysisWithMCEventPlane& aAnalysis);             //copy constructor
@@ -119,7 +123,8 @@ class AliFlowAnalysisWithMCEventPlane {
    TProfile*    fHistProDiffFlowEtaRP;    // profile used to calculate the differential flow (Eta) of RP particles 
    TProfile2D*  fHistProDiffFlowPtEtaPOI; // profile used to calculate the differential flow (Pt,Eta) of POI particles
    TProfile*    fHistProDiffFlowPtPOI;    // profile used to calculate the differential flow (Pt) of POI particles 
-   TProfile*    fHistProDiffFlowEtaPOI ;  // profile used to calculate the differential flow (Eta) of POI particles    
+   TProfile*    fHistProDiffFlowEtaPOI;   // profile used to calculate the differential flow (Eta) of POI particles
+   TH1D*        fHistSpreadOfFlow;        // histogram filled with NONAME integrated flow calculated e-b-e    
    
    ClassDef(AliFlowAnalysisWithMCEventPlane,1)  // Analyse particle distribution versus MC reaction plane
      };
index e558fe5..7e16779 100644 (file)
@@ -366,7 +366,10 @@ int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 10, const char*
              Int_t nNewMultOfEvent = random3Temp.Gaus(nMultiplicityOfEvent,nSigmaMult);
              cout << "new multiplicity: " << nNewMultOfEvent << endl;
              Double_t xNewFlowValue = random3Temp.Gaus(xEllipticFlowValue,xSigmaFlow);
-             cout << "new flow value: " << xNewFlowValue << endl;
+             if ( (fCount % 100) == 0) {
+               cout << "new multiplicity: " << nNewMultOfEvent << endl;
+               cout << "new flow value: " << xNewFlowValue << endl;
+             }
              fEventMaker->SetNoOfLoops(nLoops);
              fEventMaker->SetEllipticFlowValue(xNewFlowValue);
              fEventMaker->SetMultiplicityOfEvent(nNewMultOfEvent);