////////////////////////////////////////////////////////////////////////////////
-#include <Riostream.h>
+#include <iostream.h>
#include "TROOT.h"
#include "TCanvas.h"
#include "AliGenGeVSim.h"
#include "AliGeVSimParticle.h"
+#include "AliGenGeVSimEventHeader.h"
ClassImp(AliGenGeVSim);
if (psi < 0 || psi > 360 )
Error ("AliGenGeVSim", "Reaction plane angle ( %d )out of range [0..360]", psi);
- fPsi = psi * 2 * TMath::Pi() / 360. ;
+ fPsi = psi * TMath::Pi() / 180. ;
fIsMultTotal = isMultTotal;
// initialization
form = 0;
form = (TF1 *)gROOT->GetFunction("gevsimPsi");
- if (form) fPsi = form->Eval(gAlice->GetEvNumber());
+ if (form) fPsi = form->Eval(gAlice->GetEvNumber()) * TMath::Pi() / 180;
form = 0;
form = (TF1 *)gROOT->GetFunction("gevsimPsiRndm");
- if (form) fPsi = form->GetRandom();
+ if (form) fPsi = form->GetRandom() * TMath::Pi() / 180;
+
+
+ cout << "Psi = " << fPsi << "\t" << (Int_t)(fPsi*180./TMath::Pi()) << endl;
fPhiFormula->SetParameter(0, fPsi);
}
fPtYHist = (TH2D*)gROOT->FindObject(buff);
}
- if (!fPtYHist) Error(where, msg[3], pdg);
+ if (!fPtYHist) Error(where, msg[4], pdg);
}
}
}
}
+ // prepare and store header
+
+ AliGenGeVSimEventHeader *header = new AliGenGeVSimEventHeader("GeVSim header");
+ TArrayF eventVertex(3,orgin);
+
+ header->SetPrimaryVertex(eventVertex);
+ header->SetEventPlane(fPsi);
+ header->SetEllipticFlow(fPhiFormula->GetParameter(2));
+
+ gAlice->SetGenEventHeader(header);
+
delete v;
}
TF1 *fPtFormula; //! Pt formula for model (1)
TF1 *fYFormula; //! Y formula for model (1)
- TF2 *fPtYFormula[4]; //! Pt,Y formulae for model (2)-(4)
+ TF2 *fPtYFormula[3]; //! Pt,Y formulae for model (2)-(4)
TF1 *fPhiFormula; //! phi formula
TFormula *fCurrentForm; //! currently used formula
--- /dev/null
+//
+// Event header for GeVSim event generator
+// support event plane and elliptic flow
+// in next release will suport full differential
+// directed and elliptic flow
+//
+// Sylwester Radomski, GSI
+// mail: S.Radomski@gsi
+// 31 Oct, 2002
+//
+//
+
+#include "AliGenGeVSimEventHeader.h"
+
+
+ClassImp(AliGenGeVSimEventHeader);
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+AliGenGeVSimEventHeader::AliGenGeVSimEventHeader()
+ :AliGenEventHeader() {
+ //
+ // Default Constructor
+ //
+
+ fEventPlane = 0;
+ fEllipticFlow = 0;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+
+AliGenGeVSimEventHeader::AliGenGeVSimEventHeader(const char *name)
+ :AliGenEventHeader(name) {
+ //
+ // Standard constructor
+ //
+
+ fEventPlane = 0;
+ fEllipticFlow = 0;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+void AliGenGeVSimEventHeader::SetEventPlane(Float_t psi) {
+ //
+ // Psi in rad.
+ //
+
+ fEventPlane = psi;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+void AliGenGeVSimEventHeader::SetEllipticFlow(Float_t v2) {
+ //
+ // Set elliptic flow
+ //
+
+ fEllipticFlow = v2;
+}
+
+////////////////////////////////////////////////////////////////////////////////
--- /dev/null
+#ifndef AliGenGeVSimEventHeader_h
+#define AliGenGeVSimEventHeader_h
+
+//
+// Event header for GeVSim event generator
+// support event plane and elliptic flow
+// in next release will suport full differential
+// directed and elliptic flow
+//
+// Sylwester Radomski, GSI
+// mail: S.Radomski@gsi
+// 31 Oct, 2002
+//
+
+#include "AliGenEventHeader.h"
+
+
+class AliGenGeVSimEventHeader: public AliGenEventHeader {
+
+ public:
+
+ //Constructors
+ AliGenGeVSimEventHeader();
+ AliGenGeVSimEventHeader(const char *name);
+ ~AliGenGeVSimEventHeader() {}
+
+ //Getters
+ Float_t GetEventPlane() const {return fEventPlane;}
+ Float_t GetEllipticFlow(Int_t pdg) const {return fEllipticFlow;}
+
+ //Setters
+ void SetEventPlane(Float_t psi);
+ void SetEllipticFlow(Float_t v2);
+
+ private:
+
+ Float_t fEventPlane; // event plane in rad.
+ Float_t fEllipticFlow; // elliptic flow (fast solution)
+
+ public:
+ ClassDef(AliGenGeVSimEventHeader, 1) // Event Header for GeVSim
+
+};
+
+
+
+#endif
#pragma link C++ class AliGenReaderEcalHijing++;
#pragma link C++ class AliGenReaderEcalJets++;
#pragma link C++ class AliGenGeVSim+;
+#pragma link C++ class AliGenGeVSimEventHeader+;
#pragma link C++ class AliGeVSimParticle+;
#pragma link C++ class AliGenBeamGas+;
#pragma link C++ class AliGenAfterBurnerFlow+;
AliGenThetaSlice.cxx AliGenSTRANGElib.cxx AliGenBeamGas.cxx\
AliGenAfterBurnerFlow.cxx \
AliPartonicEnergyLoss.cxx AliGenHerwig.cxx \
- AliStructFuncType.cxx AliGenGrayParticles.cxx
+ AliStructFuncType.cxx AliGenGrayParticles.cxx \
+ AliGenGeVSimEventHeader.cxx
# Headerfiles for this particular package (Path respect to own directory)
HDRS= $(SRCS:.cxx=.h)