]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGPP/macros/makeEventList.C
adding scripts and macros for V0 automatic QA and trending
[u/mrichter/AliRoot.git] / PWGPP / macros / makeEventList.C
1 void makeEventList(const char* file, Double_t ptMinHighPt = 8., Double_t ptMinV0s = 3.)
2 {
3   ///////////////////
4   // make event lists based on the filtered ESD trees (Filter_Events.root)
5   // WARNING: output of this needs to be parsed by the makeEventList.sh script!
6
7   TFile f(file);
8
9   TTree* c = NULL;
10   Long_t nEvents=0;
11
12   c=(TTree*)f.Get("highPt");
13   if (c)
14   {
15     if (c->GetEntries()>0)
16     { 
17       printf("offlineTrigger: highPt\n");
18       c->SetScanField(nEvents);
19       c->Scan("esdTrack.Pt():runNumber:evtNumberInFile:fileName.GetString():gid:evtTimeStamp",Form("esdTrack.Pt()>%lf",ptMinHighPt),"col=.2f:8.d:8.d:130.s:15.lu:12.d");
20     }
21   }
22
23   c=(TTree*)f.Get("V0s");
24   if (c)
25   {
26     if (c->GetEntries()>0)
27     { 
28       printf("offlineTrigger: V0s\n");
29       c->SetScanField(nEvents);
30       c->Scan("v0.Pt():runNumber:evtNumberInFile:fileName.GetString():gid:evtTimeStamp",Form("v0.Pt()>%lf",ptMinV0s),"col=.2f:8.d:8.d:130.s:15.lu:12.d");
31     }
32   }
33
34   c=(TTree*)f.Get("Laser");
35   if (c)
36   {
37     if (c->GetEntries()>0)
38     { 
39       printf("offlineTrigger: Laser\n");
40       c->SetScanField(nEvents);
41       c->Scan("runNumber:runNumber:evtNumberInFile:fileName.GetString():gid:evtTimeStamp","","col=8.d:8.d:8.d:130.s:15.lu:12.d");
42     }
43   }
44
45   c=(TTree*)f.Get("CosmicPairs");
46   if (c)
47   {
48     if (c->GetEntries()>0)
49     { 
50       printf("offlineTrigger: CosmicPairs\n");
51       TCut ptCut="abs(t0.fP[4])<0.33"; //cut on 1/pt < 0.33
52       TCut cutDCA="abs(0.5*(t0.fD-t1.fD))>5&&abs(0.5*(t0.fD-t1.fD))<80"; //tracks crossing the inner field cage (80cm)
53       TCut cutCross="t0.fOp.fP[1]*t1.fOp.fP[1]<0"; //tracks crossing central electrode
54       c->SetScanField(nEvents);
55       c->Scan("runNumber:runNumber:evtNumberInFile:fileName.GetString():gid:evtTimeStamp", ptCut && cutDCA && cutCross,"col=8.d:8.d:8.d:130.s:15.lu:12.d");
56     }
57   }
58 }//dumpList
59