]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added some print methods and q vector for higher harmonics
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Aug 2008 15:20:24 +0000 (15:20 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Aug 2008 15:20:24 +0000 (15:20 +0000)
PWG2/FLOW/AliFlowCommonHist.cxx
PWG2/FLOW/AliFlowCommonHist.h
PWG2/FLOW/AliFlowEventSimple.cxx
PWG2/FLOW/AliFlowEventSimple.h

index fe77d6621c65a55b6cb87f1243d8041f707da7d6..7db336cc24f6aa7c9cf2195e6d2ed1e29d528a44 100644 (file)
@@ -325,6 +325,26 @@ Double_t AliFlowCommonHist::GetMeanPt(Int_t aBin)
     
 }
 
+void AliFlowCommonHist::Print(Option_t *option) const
+{
+   //   -*-*-*-*-*Print some global quantities for this histogram collection class *-*-*-*-*-*-*-*
+   //             ===============================================
+   //
+   //  If option "base" is given, number of bins and ranges are also printed
+   //  If option "range" is given, bin contents and errors are also printed
+   //                     for all bins in the current range (default 1-->nbins)
+   //  If option "all" is given, bin contents and errors are also printed
+   //                     for all bins including under and overflows.
+   //
+  //   printf( "TH1.Print Name  = %s, Entries= %d, Total sum= %g\n",GetName(),Int_t(fEntries),GetSumOfWeights());
+  printf( "Class.Print Name = AliFlowCommonHist, Histogram list:");
+
+  fHistList->Print(option);
+
+}
+
+
+
 
 
 
index 825f1d73cf8f07fb71c72a0cbc297a56fe171bf1..3ab233df9fb116ae613bf189609eae5eaad539a1 100644 (file)
@@ -48,6 +48,9 @@ class AliFlowCommonHist: public TObject {
   TList*    GetHistList()                   {return fHistList;} ;  
 
   virtual Double_t  Merge(TCollection *aList);  //merge function
+  //method to print stats
+  void Print(Option_t* option = "") const;
+
  
  private:
 
index 06e936cb5dfe88fdf0ca048fa7df02bcd580ec8b..b1ed12fa9197cb59f7b253d67c87a5148e9dc9a0 100644 (file)
@@ -82,7 +82,7 @@ AliFlowTrackSimple* AliFlowEventSimple::GetTrack(Int_t i)
 }
 
 //-----------------------------------------------------------------------   
- AliFlowVector AliFlowEventSimple::GetQ() 
+ AliFlowVector AliFlowEventSimple::GetQ(Int_t n
 {
   //calculate Q. 
   
@@ -90,7 +90,8 @@ AliFlowTrackSimple* AliFlowEventSimple::GetTrack(Int_t i)
   Double_t dQY = 0.;
   AliFlowVector vQ;
   vQ.Set(0.,0.);
-  Double_t dOrder = 2.;
+  
+  Int_t iOrder = n;
   Int_t iUsedTracks = 0;
 
   for (Int_t i=0;i<fNumberOfTracks;i++)                  
@@ -99,8 +100,8 @@ AliFlowTrackSimple* AliFlowEventSimple::GetTrack(Int_t i)
       if (pTrack){
        if (pTrack->UseForIntegratedFlow()) {
          Double_t dPhi = pTrack->Phi();
-         dQX += TMath::Cos(dOrder*dPhi);
-         dQY += TMath::Sin(dOrder*dPhi);
+         dQX += TMath::Cos(iOrder*dPhi);
+         dQY += TMath::Sin(iOrder*dPhi);
          iUsedTracks++;
        }
       } //if particle
@@ -112,4 +113,4 @@ AliFlowTrackSimple* AliFlowEventSimple::GetTrack(Int_t i)
    
   return vQ;
   
-}
+}
\ No newline at end of file
index b6e5b5e4b93089639f98cd34059c6db03c6ea4a9..794d1f4c4f1ec2c4b80defdb8690ee9139797c5e 100644 (file)
@@ -28,7 +28,7 @@ class AliFlowEventSimple: public TObject {
   void SetEventNSelTracksIntFlow(Int_t nr)  { this->fEventNSelTracksIntFlow = nr; }
   AliFlowTrackSimple* GetTrack(Int_t i);
   TObjArray* TrackCollection() const        { return this->fTrackCollection; }
-  AliFlowVector GetQ() ;
+  AliFlowVector GetQ(Int_t n=2);//default harmonic n=2
   
  private:
   TObjArray*           fTrackCollection;         // collection of tracks
@@ -39,4 +39,3 @@ class AliFlowEventSimple: public TObject {
 };
 
 #endif
-