]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding MuBox generator (Laurent)
authorpcrochet <Philippe.Crochet@cern.ch>
Mon, 30 Jun 2014 12:05:06 +0000 (14:05 +0200)
committerpcrochet <Philippe.Crochet@cern.ch>
Mon, 30 Jun 2014 12:05:06 +0000 (14:05 +0200)
PWG/muondep/AccEffTemplates/GenMuBox.C [new file with mode: 0644]
PWG/muondep/AccEffTemplates/rec.C
PWG/muondep/AliMuonAccEffSubmitter.cxx

diff --git a/PWG/muondep/AccEffTemplates/GenMuBox.C b/PWG/muondep/AccEffTemplates/GenMuBox.C
new file mode 100644 (file)
index 0000000..9cca622
--- /dev/null
@@ -0,0 +1,79 @@
+#if !defined(__CINT__) || defined(__MAKECINT__)
+#include <Riostream.h>
+#include "TRandom.h"
+#include "AliGenerator.h"
+#include "AliGenBox.h"
+#endif
+
+/// Simple 3D-BOX generator for single muons
+/// with a fixed fraction of + and - (50% per default)
+
+class AliGenMuBox : public AliGenBox
+{
+public:
+  
+  AliGenMuBox(Float_t plusShare=0.50);
+
+  virtual ~AliGenMuBox() {}
+  
+  void GenerateN(Int_t ntimes);
+
+  void Generate() { GenerateN(1); }
+
+private:
+  Float_t fPlusShare; // Fraction of plus muons
+  
+  ClassDef(AliGenMuBox,1) // Square box random generator for muons (+ and -)
+};
+
+ClassImp(AliGenMuBox)
+
+AliGenMuBox::AliGenMuBox(Float_t plusShare) : AliGenBox(), fPlusShare(plusShare)
+{
+  if ( fPlusShare <= 0.0 )
+  {
+    fPlusShare = 0.0;
+  }
+  if ( fPlusShare > 1.0 )
+  {
+    fPlusShare = 1.0;
+  }
+}
+
+void AliGenMuBox::GenerateN(Int_t ntimes)
+{
+  Int_t ipart = 13;
+  
+  if ( fPlusShare == 1.0 )
+  {
+    ipart = -13;
+  }
+  else
+  {
+    Float_t x = Rndm();
+  
+    if ( x < fPlusShare )
+    {
+      ipart = -13;
+    }
+  }
+
+  SetPart(ipart);
+  
+  AliGenBox::GenerateN(ntimes);
+}
+
+AliGenerator* GenMuBox()
+{
+  AliGenBox* generator = new AliGenMuBox;
+  
+  generator->SetNumberParticles(1);
+  
+  generator->SetPtRange(VAR_GENMUBOX_PTMIN,VAR_GENMUBOX_PTMAX);
+  generator->SetYRange(VAR_GENMUBOX_YMIN,VAR_GENMUBOX_YMAX);
+  
+  generator->SetPhiRange(0., 360.);
+  generator->SetTrackingFlag(1);
+  
+  return generator;
+}
index d3a1ad1b589d37ddb4293a5eb4dde5d23e624f48..50589dfebb0a8821acda7faf26a60bbd4d5bd62e 100644 (file)
@@ -32,10 +32,9 @@ void rec()
   reco.SetRunPlaneEff(kTRUE);
   reco.SetUseTrackingErrorsForAlignment("ITS");
 
-  // ITS (2 objects)
+  // ITS
   
   reco.SetSpecificStorage("ITS/Align/Data",     "alien://folder=/alice/simulation/2008/v4-15-Release/Residual");
-  reco.SetSpecificStorage("ITS/Calib/SPDSparseDead", "alien://folder=/alice/simulation/2008/v4-15-Release/Residual");
 
   reco.Run();
 }
index d4d922c63be9f46b4ce87f9ce434238f3874222c..16f1569492ac3bfc863896c45375bc114376cf02 100644 (file)
@@ -182,6 +182,13 @@ fUseAODMerging(kFALSE)
   SetVar("VAR_GENPARAMCUSTOMSINGLE_Y_P2","0.141776");
   SetVar("VAR_GENPARAMCUSTOMSINGLE_Y_P3","0.0130173");
 
+  // some default values for GenBox
+  
+  SetVar("VAR_GENMUBOX_PTMIN","0");
+  SetVar("VAR_GENMUBOX_PTMAX","20");
+  SetVar("VAR_GENMUBOX_YMIN","-4.1");
+  SetVar("VAR_GENMUBOX_YMAX","-2.4");
+
   SetVar("VAR_PYTHIA8_CMS_ENERGY","8000");
   SetVar("VAR_PYTHIA6_CMS_ENERGY","8000");