]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
a patch for adding v2(pt). AddV2(TF1)
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Oct 2010 21:13:32 +0000 (21:13 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Oct 2010 21:13:32 +0000 (21:13 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.h

index bccb49ab8274bbbddb72358ad7b512bd86c32baa..1e4dd1f21a6838661e26df5c86de386db62160ee 100644 (file)
@@ -648,6 +648,19 @@ void AliFlowEventSimple::AddFlow( Double_t v1, Double_t v2, Double_t v3, Double_
   SetUserModified();
 }
 
+//_____________________________________________________________________________
+void AliFlowEventSimple::AddV2( TF1* ptDepV2 )
+{
+  //add v2 to all tracks wrt the reaction plane angle
+  for (Int_t i=0; i<fNumberOfTracks; i++)
+  {
+    AliFlowTrackSimple* track = static_cast<AliFlowTrackSimple*>(fTrackCollection->At(i));
+    Double_t v2 = ptDepV2->Eval(track->Pt());
+    if (track) track->AddV2(v2, fMCReactionPlaneAngle, fAfterBurnerPrecision);
+  }
+  SetUserModified();
+}
+
 //_____________________________________________________________________________
 void AliFlowEventSimple::TagRP( AliFlowTrackSimpleCuts* cuts )
 {
@@ -718,3 +731,17 @@ Int_t AliFlowEventSimple::CleanUpDeadTracks()
   fTrackCollection->Compress(); //clean up empty slots
   return ncleaned;
 }
+
+//_____________________________________________________________________________
+TF1* AliFlowEventSimple::SimplePtDepV2()
+{
+  //return a standard pt dependent v2 formula, user has to clean up!
+  return new TF1("StandardPtDepV2","((x<1.0)*(0.05/1.0)*x+(x>=1.0)*0.05)");
+}
+
+//_____________________________________________________________________________
+TF1* AliFlowEventSimple::SimplePtSpectrum()
+{
+  //return a standard pt spectrum, user has to clean up!
+  return new TF1("StandardPtSpectrum","x*TMath::Exp(-pow(0.13957*0.13957+x*x,0.5)/0.4)",0.1,10.);
+}
index 397404c843cced941180df562201299e72a5b55e..76f7879f3e189e1bd732565b2b05bee4a9f53582 100644 (file)
@@ -70,9 +70,13 @@ class AliFlowEventSimple: public TObject {
   void AddV3( Double_t v3 );
   void AddV4( Double_t v4 );
   void AddFlow( Double_t v1, Double_t v2, Double_t v3, Double_t v4 );
+  void AddV2( TF1* ptDepV2 );
   void DefineDeadZone( Double_t etaMin, Double_t etaMax, Double_t phiMin, Double_t phiMax );
   Int_t CleanUpDeadTracks();
  
+  static TF1* SimplePtSpectrum();
+  static TF1* SimplePtDepV2();
+
   AliFlowTrackSimple* GetTrack(Int_t i);
   void AddTrack( AliFlowTrackSimple* track );