From: pcrochet Date: Mon, 30 Jun 2014 12:05:06 +0000 (+0200) Subject: Adding MuBox generator (Laurent) X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=f9fda76e5e9683154781f5c9d2b5a4dd001cc14b;p=u%2Fmrichter%2FAliRoot.git Adding MuBox generator (Laurent) --- diff --git a/PWG/muondep/AccEffTemplates/GenMuBox.C b/PWG/muondep/AccEffTemplates/GenMuBox.C new file mode 100644 index 00000000000..9cca62280f1 --- /dev/null +++ b/PWG/muondep/AccEffTemplates/GenMuBox.C @@ -0,0 +1,79 @@ +#if !defined(__CINT__) || defined(__MAKECINT__) +#include +#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; +} diff --git a/PWG/muondep/AccEffTemplates/rec.C b/PWG/muondep/AccEffTemplates/rec.C index d3a1ad1b589..50589dfebb0 100644 --- a/PWG/muondep/AccEffTemplates/rec.C +++ b/PWG/muondep/AccEffTemplates/rec.C @@ -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(); } diff --git a/PWG/muondep/AliMuonAccEffSubmitter.cxx b/PWG/muondep/AliMuonAccEffSubmitter.cxx index d4d922c63be..16f1569492a 100644 --- a/PWG/muondep/AliMuonAccEffSubmitter.cxx +++ b/PWG/muondep/AliMuonAccEffSubmitter.cxx @@ -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");