Add new functionalities (Laurent)
authorpcrochet <pcrochet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Mar 2013 12:52:54 +0000 (12:52 +0000)
committerpcrochet <pcrochet@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 11 Mar 2013 12:52:54 +0000 (12:52 +0000)
PWG/muondep/AccEffTemplates/GenCorrHF.C [new file with mode: 0644]
PWG/muondep/AccEffTemplates/GenParam.C [new file with mode: 0644]
PWG/muondep/AccEffTemplates/GenParamCustom.C [new file with mode: 0644]

diff --git a/PWG/muondep/AccEffTemplates/GenCorrHF.C b/PWG/muondep/AccEffTemplates/GenCorrHF.C
new file mode 100644 (file)
index 0000000..83ba8cd
--- /dev/null
@@ -0,0 +1,20 @@
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <Riostream.h>
+#include "TRandom.h"
+#include "AliGenCorrHF.h"
+#endif
+
+AliGenerator* GenCoRRHF()
+{
+  AliGenMC* generator = new AliGenCorrHF(1, VAR_GENCORRHF_QUARK, VAR_GENCORRHF_ENERGY);
+  
+  generator->SetMomentumRange(0,9999);
+  generator->SetChildThetaRange(160.0,180.0);
+  generator->SetForceDecay(kSemiMuonic);
+
+  generator->SetCutOnChild(1);
+  generator->SetChildPhiRange(0.,360.);
+  generator->SetTrackingFlag(1);
+
+  return generator;
+}
diff --git a/PWG/muondep/AccEffTemplates/GenParam.C b/PWG/muondep/AccEffTemplates/GenParam.C
new file mode 100644 (file)
index 0000000..16effad
--- /dev/null
@@ -0,0 +1,24 @@
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <Riostream.h>
+#include "TRandom.h"
+#include "AliGenerator.h"
+#include "AliGenParam.h"
+#endif
+
+AliGenerator* GenParam()
+{
+  AliGenMC* generator = new AliGenParam(1, VAR_GENPARAM_GENLIB_TYPE,VAR_GENPARAM_GENLIB_PARNAME);
+
+  generator->SetMomentumRange(0,999);
+  generator->SetPtRange(0,50.);
+  generator->SetYRange(-4.1,-2.4);
+  generator->SetPhiRange(0., 360.);
+  generator->SetChildThetaRange(0.,180.);
+  generator->SetForceDecay(kDiMuon);
+
+  generator->SetCutOnChild(1);
+  generator->SetChildPhiRange(0.,360.);
+  generator->SetTrackingFlag(1);
+
+  return generator;
+}
diff --git a/PWG/muondep/AccEffTemplates/GenParamCustom.C b/PWG/muondep/AccEffTemplates/GenParamCustom.C
new file mode 100644 (file)
index 0000000..d87039d
--- /dev/null
@@ -0,0 +1,67 @@
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <Riostream.h>
+#include "TRandom.h"
+#include "AliGenerator.h"
+#include "AliGenParam.h"
+#endif
+
+static Int_t IpCustom( TRandom *ran);
+static Double_t PtCustom( const Double_t *px, const Double_t */*dummy*/ );
+static Double_t YCustom( const Double_t *py, const Double_t */*dummy*/ );
+static Double_t V2Custom( const Double_t *pv, const Double_t */*dummy*/ );
+
+//-------------------------------------------------------------------------
+AliGenerator* GenParamCustom()
+{
+  AliGenParam* gener = new AliGenParam(1,-1,PtCustom,YCustom,V2Custom,IpCustom);
+  gener->SetMomentumRange(0,1e6);
+  gener->SetPtRange(0,999.);
+  gener->SetYRange(-4.2, -2.3);
+  gener->SetPhiRange(0., 360.);
+  gener->SetCutOnChild(1);
+  gener->SetChildPhiRange(0.,360.);
+  gener->SetChildThetaRange(0.,180.);
+  gener->SetForceDecay(kDiMuon);
+  gener->SetTrackingFlag(1);
+  
+  return gener;
+}
+
+//-------------------------------------------------------------------------
+Int_t IpCustom( TRandom *)
+{
+  // particle to simulate (e.g. 443 for J/psi)
+  return VAR_GENPARAMCUSTOM_PDGPARTICLECODE;
+}
+
+//-------------------------------------------------------------------------
+Double_t PtCustom( const Double_t *px, const Double_t */*dummy*/ )
+{
+  // pT distribution
+  Double_t x=*px;
+  Float_t p0,p1,p2,p3;
+  p0 = VAR_GENPARAMCUSTOM_PT_P0; // 1.13e9;
+  p1 = VAR_GENPARAMCUSTOM_PT_P1; // 18.05;
+  p2 = VAR_GENPARAMCUSTOM_PT_P2; // 2.05;
+  p3 = VAR_GENPARAMCUSTOM_PT_P3; // 3.34;
+  return p0 *x / TMath::Power( p1 + TMath::Power(x,p2), p3 );
+}
+
+//-------------------------------------------------------------------------
+Double_t YCustom( const Double_t *py, const Double_t */*dummy*/ )
+{
+  // y distribution
+  Double_t y = *py;
+  Float_t p0,p1;
+  p0 = VAR_GENPARAMCUSTOM_Y_P0; // 4.08e5;
+  p1 = VAR_GENPARAMCUSTOM_Y_P1; // 7.1e4;
+  return p0 + p1*y;
+}
+
+//-------------------------------------------------------------------------
+Double_t V2Custom( const Double_t */*dummy*/, const Double_t */*dummy*/ )
+{
+  // v2
+  return 0.;
+}
+