hooks for PMD flow analysis
[u/mrichter/AliRoot.git] / PWG2 / FLOW / macros / readStarEventsSimple.C
CommitLineData
f553869e 1//example script on what to do with the star events
2//run e.g. like this:
3// root readStarEventSimple.C
4
5void readStarEventsSimple()
6{
7 gSystem->Load("libTree.so");
8 gSystem->Load("libVMC.so");
9 gSystem->Load("libPhysics.so");
f553869e 10 gSystem->Load("libPWG2flowCommon");
f553869e 11
b4dba88d 12 Int_t maxNumberOfEvents = 1000;
f553869e 13
b4dba88d 14 //define reference particles
15 AliStarTrackCuts* rpCuts = AliStarTrackCuts::StandardCuts();
16
17 //define particles of interest
18 AliStarTrackCuts* poiCuts = AliStarTrackCuts::StandardCuts();
19 poiCuts->SetPtMin(1.0);
20
21 //define event cuts
22 AliStarEventCuts* starEventCuts = AliStarEventCuts::StandardCuts();
23
24 Int_t i=0;
25 AliStarEventReader starReader("/data/alice3/jthomas/testData/") ;
26 while ( starReader.GetNextEvent() ) // Get next event
f553869e 27 {
b4dba88d 28 AliStarEvent* starEvent = starReader.GetEvent();
29 if ( !starEventCuts->PassesCuts(starEvent) ) continue; // Test if the event is good
f553869e 30
b4dba88d 31 AliFlowEventSimple* flowEvent = new AliFlowEventStar(starEvent,rpCuts,poiCuts); // make a flow event from a star event (aka "the magic")
f553869e 32
33 /////analysis here////////////////
34
35
36
37 //////////////////////////////////
38
b4dba88d 39 //starEvent->Print("all");
40 flowEvent->Print();
f553869e 41
42 delete flowEvent;
f553869e 43
b4dba88d 44 i++;
45 if (i>maxNumberOfEvents) break;
46 }
47 delete rpCuts;
48 delete poiCuts;
49 delete starEventCuts;
f553869e 50}