]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Made weights AliAnalysisTaskPi0FlowMC unit, and moved old paramterisation to Pi0FlowM...
authorhqvigsta <hqvigsta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 20 Jun 2013 16:01:36 +0000 (16:01 +0000)
committerhqvigsta <hqvigsta@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 20 Jun 2013 16:01:36 +0000 (16:01 +0000)
PWGGA/CMakelibPWGGAPHOSTasks.pkg
PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0FlowMC.cxx
PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0FlowMC.h
PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0FlowMCHijing.cxx [new file with mode: 0644]
PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0FlowMCHijing.h [new file with mode: 0644]
PWGGA/PWGGAPHOSTasksLinkDef.h

index c1e0381bbb17dae653d1a5ad289ddecccadda683..a3b9503e340b40020232d28aa2d15b8152854fbb 100644 (file)
@@ -31,6 +31,7 @@ set ( SRCS
  PHOSTasks/PHOS_pp_pi0/AliAnalysisTaskPi0.cxx
  PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0Flow.cxx
  PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0FlowMC.cxx
+ PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0FlowMCHijing.cxx
  PHOSTasks/PHOS_PbPb/AliPHOSTenderTask.cxx
  PHOSTasks/PHOS_PbPb_MC/AliPHOSHijingEfficiency.cxx
  PHOSTasks/PHOS_embedding/AliPHOSEmbedding.cxx
index 0ac661a0dbebda0660be667cfeda1c6f0f501b15..effdb0431505945b810baa2515f34ae63603c80b 100644 (file)
@@ -1273,84 +1273,11 @@ void AliAnalysisTaskPi0FlowMC::FillAllHistograms(const char * particleName,AliCa
 
 //___________________________________________________________________________
 Double_t AliAnalysisTaskPi0FlowMC::PrimaryWeight(Int_t primary){
-   //Check who is the primary and introduce weight to correct primary spectrum
-  
-  if(primary<0 || primary>=fStack->GetNtrack())
-    return 1 ;
-  //trace primaries up to IP
-  TParticle* particle =  fStack->Particle(primary);
-  Double_t r=particle->R() ;
-  Int_t mother = particle->GetFirstMother() ;
-  while(mother>-1){
-    if(r<1. && particle->GetPdgCode()==111)
-      break ;
-    particle =  fStack->Particle(mother);
-    mother = particle->GetFirstMother() ;
-    r=particle->R() ;
-  }
-
-  return TMath::Max(0.,PrimaryParticleWeight(particle)) ;
+  return 1.;
 }
 //________________________________________________________________________
 Double_t AliAnalysisTaskPi0FlowMC::PrimaryParticleWeight(TParticle * particle){
-
-  Int_t pdg = particle->GetPdgCode() ;
-  Int_t type=0 ;
-  if(pdg == 111 || TMath::Abs(pdg)==211){
-    type =1 ;
-  }
-  else{
-    if(TMath::Abs(pdg)<1000){ //Kaon-like
-      type =2 ;    
-    }
-    else
-      type = 3;  //baryons
-  }
-    
-  Double_t pt = particle->Pt() ;
-  if(type==1){
-   if(fCentBin==0) //0-5
-     return (1.662990+1.140890*pt-0.192088*pt*pt)/(1.-0.806630*pt+0.304771*pt*pt)+0.141690*pt ;
-   if(fCentBin==1) //5-10
-     return (1.474351+0.791492*pt-0.066369*pt*pt)/(1.-0.839338*pt+0.317312*pt*pt)+0.093289*pt ;
-   if(fCentBin==2) //10-20
-     return (1.174728+0.959681*pt-0.137695*pt*pt)/(1.-0.788873*pt+0.299538*pt*pt)+0.128759*pt ; 
-   if(fCentBin==3) //20-40
-     return (0.927335+0.475349*pt+0.004364*pt*pt)/(1.-0.817966*pt+0.309787*pt*pt)+0.086899*pt ; 
-   if(fCentBin==4) //40-60
-     return (0.676878+0.190680*pt+0.077031*pt*pt)/(1.-0.790623*pt+0.305183*pt*pt)+0.064510*pt ; 
-   if(fCentBin==5) //60-80
-     return (0.684726-0.606262*pt+0.409963*pt*pt)/(1.-1.080061*pt+0.456933*pt*pt)+0.005151*pt ; 
-  }
-  if(type==2){
-   if(fCentBin==0) //0-5
-     return (-0.417131+2.253936*pt-0.337731*pt*pt)/(1.-0.909892*pt+0.316820*pt*pt)+0.157312*pt ;
-   if(fCentBin==1) //5-10
-     return (-0.352275+1.844466*pt-0.248598*pt*pt)/(1.-0.897048*pt+0.316462*pt*pt)+0.132461*pt ; 
-   if(fCentBin==2) //10-20
-     return (-0.475481+1.975108*pt-0.336013*pt*pt)/(1.-0.801028*pt+0.276705*pt*pt)+0.188164*pt ; 
-   if(fCentBin==3) //20-40
-     return (-0.198954+1.068789*pt-0.103540*pt*pt)/(1.-0.848354*pt+0.299209*pt*pt)+0.112939*pt ; 
-   if(fCentBin==4) //40-60
-     return (-0.111052+0.664041*pt-0.019717*pt*pt)/(1.-0.804916*pt+0.300779*pt*pt)+0.095784*pt ;
-   if(fCentBin==5) //0-5
-     return (0.202788-0.439832*pt+0.564585*pt*pt)/(1.-1.254029*pt+0.679444*pt*pt)+0.016235*pt ;
-  }
-  if(type==3){
-   if(fCentBin==0) //0-5
-     return (-1.312732+2.743568*pt-0.375775*pt*pt)/(1.-0.717533*pt+0.164694*pt*pt)+0.164445*pt ;
-   if(fCentBin==1) //5-10
-     return (-1.229425+2.585889*pt-0.330164*pt*pt)/(1.-0.715892*pt+0.167386*pt*pt)+0.133085*pt ; 
-   if(fCentBin==2) //10-20
-     return (-1.135677+2.397489*pt-0.320355*pt*pt)/(1.-0.709312*pt+0.164350*pt*pt)+0.146095*pt ; 
-   if(fCentBin==3) //20-40
-     return (-0.889993+1.928263*pt-0.220785*pt*pt)/(1.-0.715991*pt+0.174729*pt*pt)+0.095098*pt ; 
-   if(fCentBin==4) //40-60
-     return (-0.539237+1.329118*pt-0.115439*pt*pt)/(1.-0.722906*pt+0.186832*pt*pt)+0.059267*pt ; 
-   if(fCentBin==5) //60-80
-     return (-0.518126+1.327628*pt-0.130881*pt*pt)/(1.-0.665649*pt+0.184300*pt*pt)+0.081701*pt ;   
-  }
-  return 1. ;  
+  return 1.;
 }
 
 //___________________________________________________________________________
index 3e803685cc59d89ab63d2eb31d1f9477ea064723..f008da33c93d385caee3ba1860f2ec010aae9fdf 100644 (file)
@@ -4,7 +4,7 @@
 // Inclusion of AliPHOSHijingEfficiency,
 // by Dmitri Peressounko, 05.02.2013
 // Authors: Henrik Qvigstad, Dmitri Peressounko
-// Date   : 05.04.2013
+// Date   : 20.06.2013
 /* $Id$ */
 
 
@@ -43,8 +43,8 @@ protected: // member variables:
   
   void FillMCHist();
   
-  Double_t PrimaryWeight(Int_t primary);
-  Double_t PrimaryParticleWeight(TParticle * particle);
+  virtual Double_t PrimaryWeight(Int_t primary);
+  virtual Double_t PrimaryParticleWeight(TParticle * particle);
   void FillSecondaries() ;
   Int_t FindPrimary(AliVCluster* clu,  Bool_t& sure);
   Int_t FindCommonParent(Int_t iPart, Int_t jPart) ;
diff --git a/PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0FlowMCHijing.cxx b/PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0FlowMCHijing.cxx
new file mode 100644 (file)
index 0000000..2ce369c
--- /dev/null
@@ -0,0 +1,121 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+// Extension to Pi0FlowMC, mimicing AliPHOSHijingEfficiency
+// by Dmitri Peressounko, 05.02.2013
+// Authors: Henrik Qvigstad, Dmitri Peressounko
+// Date   : 05.04.2013
+/* $Id$ */
+
+#include "AliStack.h"
+#include "TParticle.h"
+#include "AliCaloPhoton.h"
+
+#include "AliAnalysisTaskPi0FlowMCHijing.h"
+
+ClassImp(AliAnalysisTaskPi0FlowMCHijing);
+
+AliAnalysisTaskPi0FlowMCHijing::AliAnalysisTaskPi0FlowMCHijing(const char* name, AliAnalysisTaskPi0Flow::Period period)
+: AliAnalysisTaskPi0FlowMC(name, period)
+{
+}
+
+AliAnalysisTaskPi0FlowMCHijing::~AliAnalysisTaskPi0FlowMCHijing()
+{
+}
+
+
+Double_t AliAnalysisTaskPi0FlowMCHijing::PrimaryWeight(Int_t primary)
+{
+  //Check who is the primary and introduce weight to correct primary spectrum
+  
+  if(primary<0 || primary>=fStack->GetNtrack())
+    return 1 ;
+  //trace primaries up to IP
+  TParticle* particle =  fStack->Particle(primary);
+  Double_t r=particle->R() ;
+  Int_t mother = particle->GetFirstMother() ;
+  while(mother>-1){
+    if(r<1. && particle->GetPdgCode()==111)
+      break ;
+    particle =  fStack->Particle(mother);
+    mother = particle->GetFirstMother() ;
+    r=particle->R() ;
+  }
+
+  return TMath::Max(0.,PrimaryParticleWeight(particle)) ;
+}
+
+
+Double_t AliAnalysisTaskPi0FlowMCHijing::PrimaryParticleWeight(TParticle* particle)
+{
+  Int_t pdg = particle->GetPdgCode() ;
+  Int_t type=0 ;
+  if(pdg == 111 || TMath::Abs(pdg)==211){
+    type =1 ;
+  }
+  else{
+    if(TMath::Abs(pdg)<1000){ //Kaon-like
+      type =2 ;    
+    }
+    else
+      type = 3;  //baryons
+  }
+    
+  Double_t pt = particle->Pt() ;
+  if(type==1){
+   if(fCentBin==0) //0-5
+     return (1.662990+1.140890*pt-0.192088*pt*pt)/(1.-0.806630*pt+0.304771*pt*pt)+0.141690*pt ;
+   if(fCentBin==1) //5-10
+     return (1.474351+0.791492*pt-0.066369*pt*pt)/(1.-0.839338*pt+0.317312*pt*pt)+0.093289*pt ;
+   if(fCentBin==2) //10-20
+     return (1.174728+0.959681*pt-0.137695*pt*pt)/(1.-0.788873*pt+0.299538*pt*pt)+0.128759*pt ; 
+   if(fCentBin==3) //20-40
+     return (0.927335+0.475349*pt+0.004364*pt*pt)/(1.-0.817966*pt+0.309787*pt*pt)+0.086899*pt ; 
+   if(fCentBin==4) //40-60
+     return (0.676878+0.190680*pt+0.077031*pt*pt)/(1.-0.790623*pt+0.305183*pt*pt)+0.064510*pt ; 
+   if(fCentBin==5) //60-80
+     return (0.684726-0.606262*pt+0.409963*pt*pt)/(1.-1.080061*pt+0.456933*pt*pt)+0.005151*pt ; 
+  }
+  if(type==2){
+   if(fCentBin==0) //0-5
+     return (-0.417131+2.253936*pt-0.337731*pt*pt)/(1.-0.909892*pt+0.316820*pt*pt)+0.157312*pt ;
+   if(fCentBin==1) //5-10
+     return (-0.352275+1.844466*pt-0.248598*pt*pt)/(1.-0.897048*pt+0.316462*pt*pt)+0.132461*pt ; 
+   if(fCentBin==2) //10-20
+     return (-0.475481+1.975108*pt-0.336013*pt*pt)/(1.-0.801028*pt+0.276705*pt*pt)+0.188164*pt ; 
+   if(fCentBin==3) //20-40
+     return (-0.198954+1.068789*pt-0.103540*pt*pt)/(1.-0.848354*pt+0.299209*pt*pt)+0.112939*pt ; 
+   if(fCentBin==4) //40-60
+     return (-0.111052+0.664041*pt-0.019717*pt*pt)/(1.-0.804916*pt+0.300779*pt*pt)+0.095784*pt ;
+   if(fCentBin==5) //0-5
+     return (0.202788-0.439832*pt+0.564585*pt*pt)/(1.-1.254029*pt+0.679444*pt*pt)+0.016235*pt ;
+  }
+  if(type==3){
+   if(fCentBin==0) //0-5
+     return (-1.312732+2.743568*pt-0.375775*pt*pt)/(1.-0.717533*pt+0.164694*pt*pt)+0.164445*pt ;
+   if(fCentBin==1) //5-10
+     return (-1.229425+2.585889*pt-0.330164*pt*pt)/(1.-0.715892*pt+0.167386*pt*pt)+0.133085*pt ; 
+   if(fCentBin==2) //10-20
+     return (-1.135677+2.397489*pt-0.320355*pt*pt)/(1.-0.709312*pt+0.164350*pt*pt)+0.146095*pt ; 
+   if(fCentBin==3) //20-40
+     return (-0.889993+1.928263*pt-0.220785*pt*pt)/(1.-0.715991*pt+0.174729*pt*pt)+0.095098*pt ; 
+   if(fCentBin==4) //40-60
+     return (-0.539237+1.329118*pt-0.115439*pt*pt)/(1.-0.722906*pt+0.186832*pt*pt)+0.059267*pt ; 
+   if(fCentBin==5) //60-80
+     return (-0.518126+1.327628*pt-0.130881*pt*pt)/(1.-0.665649*pt+0.184300*pt*pt)+0.081701*pt ;   
+  }
+  return 1. ;  
+}
\ No newline at end of file
diff --git a/PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0FlowMCHijing.h b/PWGGA/PHOSTasks/PHOS_PbPb/AliAnalysisTaskPi0FlowMCHijing.h
new file mode 100644 (file)
index 0000000..6030152
--- /dev/null
@@ -0,0 +1,30 @@
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+// Authors: Henrik Qvigstad
+// Date   : 20.06.2013
+/* $Id$ */
+
+#ifndef ALIANALYSISTASKPI0FLOWMCHIJING_H
+#define ALIANALYSISTASKPI0FLOWMCHIJING_H
+
+#include <AliAnalysisTaskPi0Flow.h>
+#include <AliAnalysisTaskPi0FlowMC.h>
+
+class AliAnalysisTaskPi0FlowMCHijing :  public AliAnalysisTaskPi0FlowMC
+{
+public:
+  AliAnalysisTaskPi0FlowMCHijing(const char* name = "AliAnalysisTaskPi0Flow", Period period = AliAnalysisTaskPi0Flow::kUndefinedPeriod);
+  virtual ~AliAnalysisTaskPi0FlowMCHijing();
+
+protected: // member functions:
+  AliAnalysisTaskPi0FlowMCHijing(const AliAnalysisTaskPi0FlowMC&); // not implemented
+  AliAnalysisTaskPi0FlowMCHijing& operator=(const AliAnalysisTaskPi0FlowMC&); // not implemented
+
+  virtual Double_t PrimaryWeight(Int_t primary);
+  virtual Double_t PrimaryParticleWeight(TParticle * particle);
+
+  ClassDef(AliAnalysisTaskPi0FlowMCHijing, 1); // PHOS analysis task
+};
+
+#endif // ALIANALYSISTASKPI0FLOWMCHIJING_H
index fd8aca54a9de5930c547699d5c7e7e7fb2ab901b..dc8d377976b21f0b82b6664d1a42dc20a67abd43 100644 (file)
@@ -11,6 +11,7 @@
 //PHOS_PbPb
 #pragma link C++ class AliAnalysisTaskPi0Flow+;
 #pragma link C++ class AliAnalysisTaskPi0FlowMC+;
+#pragma link C++ class AliAnalysisTaskPi0FlowMCHijing+;
 #pragma link C++ class AliPHOSTenderTask+;
 
 //PHOS_PbPb_MC