#include "AliFlowTrackSimple.h"
#include "TTree.h"
#include "TParticle.h"
-#include "TRandom.h"
-#include "TDatime.h"
#include "AliMCEvent.h"
#include "AliMCParticle.h"
#include "AliESDEvent.h"
fCount(0),
fNoOfLoops(1),
fEllipticFlowValue(0.),
- fMultiplicityOfEvent(1000000000),
- fRandom(NULL),
- fUseRandomRP(kFALSE),
- fSigmaMult(0.),
- fSigmaFlow(0.)
+ fMultiplicityOfEvent(1000000000)
{
//constructor
- TDatime fTime;
- fRandom = new TRandom(fTime.GetTime());
}
//-----------------------------------------------------------------------
AliFlowEventSimpleMaker::~AliFlowEventSimpleMaker()
{
//destructor
-
- delete fRandom;
}
//-----------------------------------------------------------------------
//fills the event from a TTree of kinematic.root files
// number of times to use the same particle (trick to introduce nonflow)
- // Int_t iLoops = 1;
//flags for particles passing int. and diff. flow cuts
Bool_t bPassedRPFlowCuts = kFALSE;
// Int_t fMultiplicityOfEvent = 576; //multiplicity for chi=1.5
// Int_t fMultiplicityOfEvent = 256; //multiplicity for chi=1
// Int_t fMultiplicityOfEvent = 164; //multiplicity for chi=0.8
-
- Int_t fNewMultOfEvent = fRandom->Gaus(fMultiplicityOfEvent,fSigmaMult);
- // cout << "new multiplicity: " << fNewMultOfEvent << endl;
-
- Double_t fNewFlowValue = fRandom->Gaus(fEllipticFlowValue,fSigmaFlow);
- // cout << "new flow value: " << fNewFlowValue << endl;
Int_t iGoodTracks = 0;
Int_t itrkN = 0;
Int_t iSelParticlesRP = 0;
Int_t iSelParticlesPOI = 0;
- // generate some random numbers
- if (fUseRandomRP) {
- fMCReactionPlaneAngle = 2.*TMath::Pi()*fRandom->Uniform(1.);
- }
-
while (itrkN < iNumberOfInputTracks) {
anInput->GetEntry(itrkN); //get input particle
if (pParticle->IsPrimary()) {
AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
pTrack->SetPt(pParticle->Pt());
pTrack->SetEta(pParticle->Eta());
- pTrack->SetPhi(pParticle->Phi()-fNewFlowValue*TMath::Sin(2*(pParticle->Phi()-fMCReactionPlaneAngle)));
+ pTrack->SetPhi(pParticle->Phi()-fEllipticFlowValue*TMath::Sin(2*(pParticle->Phi()-fMCReactionPlaneAngle)));
//marking the particles used for int. flow:
- if(bPassedRPFlowCuts && iSelParticlesRP < fNewMultOfEvent) {
+ if(bPassedRPFlowCuts && iSelParticlesRP < fMultiplicityOfEvent) {
pTrack->SetForRPSelection(kTRUE);
iSelParticlesRP++;
}
class AliMCEvent;
class AliESDEvent;
class AliAODEvent;
-class TRandom;
// AliFlowEventSimpleMaker:
// Class to fill the AliFlowEventSimple with AliFlowTrackSimple objects
void SetMultiplicityOfEvent(Int_t multevnt) {this->fMultiplicityOfEvent = multevnt;}
Int_t GetMultiplicityOfEvent() const {return this->fMultiplicityOfEvent;}
- void SetSigmaFlow(Double_t sigmav) {this->fSigmaFlow = sigmav;}
- void SetSigmaMult(Double_t sigmam) {this->fSigmaMult = sigmam;}
- void UseRandomRP(Bool_t randomRP=kTRUE) {this->fUseRandomRP = randomRP;}
-
private:
AliFlowEventSimpleMaker(const AliFlowEventSimpleMaker& anAnalysis); //copy constructor
AliFlowEventSimpleMaker& operator=(const AliFlowEventSimpleMaker& anAnalysis); //assignment operator
Int_t fNoOfLoops; // number of times to use the same particle (nonflow)
Double_t fEllipticFlowValue; // Add Flow. Must be in range [0,1].
Int_t fMultiplicityOfEvent; // Set maximal multiplicity.
- TRandom *fRandom;
- Bool_t fUseRandomRP;
- Double_t fSigmaMult;
- Double_t fSigmaFlow;
ClassDef(AliFlowEventSimpleMaker,0) // macro for rootcint
};
Double_t phiMinDiff = 0.;
Int_t PIDDiff = 211;
//--------------------------------------------------------------------------------------
+// FLOW SETTINGS (R.Rietkerk)
+Int_t nLoops=1; // Number of times to use the same particle (nonflow).
+Double_t xEllipticFlowValue=0.1; // Add Elliptic Flow. Must be in range [0,1].
+Int_t nMultiplicityOfEvent=500;// Set Average Multiplicity.
+Double_t xSigmaFlow=0.00; // Add Elliptic Flow. Must be in range [0,1].
+Int_t nSigmaMult=50;// Set Average Multiplicity.
+//--------------------------------------------------------------------------------------
enum anaModes {mLocal,mLocalSource,mLocalPAR,};
//mLocal: Analyze data on your computer using aliroot
Int_t offset = 0;
-int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 100, const char*
+int runFlowAnalysis(Int_t mode=mLocal, Int_t aRuns = 1000, const char*
// dir="/data/alice1/kolk/KineOnly3/")
- dir="/Users/snelling/alice_data/KineOnly3/")
+ dir="/Users/snelling/alice_data/KineOnly3/")
+ // dir="/Users/snelling/alice_data/stoomboot/5b/")
{
TStopwatch timer;
timer.Start();
LoadLibraries(mode);
+ TRandom3 random3Temp; //init for manual settings (R.Rietkerk)
+ TTimeStamp dt;
+ Int_t sseed = dt.GetNanoSec()/1000;
+ random3Temp.SetSeed(sseed);
+
if (mode == mLocal || mode == mLocalPAR) {
// AliFlow event in aliroot or with pars
AliFlowEventSimpleMaker* fEventMaker = new AliFlowEventSimpleMaker();
- // fEventMaker->SetNoOfLoops(2);
- // fEventMaker->SetEllipticFlowValue(0.05);
- // fEventMaker->SetSigmaFlow(0.005);
- // fEventMaker->SetMultiplicityOfEvent(250);
- // fEventMaker->SetSigmaMult(10.);
- // fEventMaker->UseRandomRP();
}
else if (mode == mLocalSource) {
// flow event in source mode
TTree* kTree;
TIter next(kineEventsList);
TKey* key;
-
+
+ Double_t xRPAngle;
//loop over the events
while( key=(TKey *)next() )
{
//-----------------------------------------------------------
//fill and save the flow event
+
+ Int_t nNewMultOfEvent = random3Temp.Gaus(nMultiplicityOfEvent,nSigmaMult);
+ cout << "new multiplicity: " << nNewMultOfEvent << endl;
+ Double_t xNewFlowValue = random3Temp.Gaus(xEllipticFlowValue,xSigmaFlow);
+ cout << "new flow value: " << xNewFlowValue << endl;
+ fEventMaker->SetNoOfLoops(nLoops);
+ fEventMaker->SetEllipticFlowValue(xNewFlowValue);
+ fEventMaker->SetMultiplicityOfEvent(nNewMultOfEvent);
+ xRPAngle=TMath::TwoPi()*random3Temp.Rndm();
+ fEventMaker->SetMCReactionPlaneAngle(xRPAngle);
+
AliFlowEventSimple *fEvent = fEventMaker->FillTracks(kTree, cutsInt, cutsDiff);
// do flow analysis for various methods