]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/macros/mini/ConfigPhiSimple.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / macros / mini / ConfigPhiSimple.C
CommitLineData
8082e538 1//
2// *** Configuration script for phi->KK analysis with 2010 runs ***
3//
4// A configuration script for RSN package needs to define the followings:
5//
6// (1) decay tree of each resonance to be studied, which is needed to select
7// true pairs and to assign the right mass to all candidate daughters
8// (2) cuts at all levels: single daughters, tracks, events
9// (3) output objects: histograms or trees
10//
11Bool_t ConfigPhiSimple
12(
13 AliRsnMiniAnalysisTask *task,
14 Bool_t isMC,
15
16 const char *name,
17 const char *outType,
18 const char *computationType,
19 char charge1,
20 char charge2,
21 Bool_t useIM,
22
23 AliRsnCutSet *cutsPair
24)
25{
26 //
27 // -- Define track cuts -------------------------------------------------------------------------
28 //
29
30 // integrated kaon cut
31 AliRsnCutKaonForPhi2010PP *cutStd = new AliRsnCutKaonForPhi2010PP("cutStdPP");
32 // cut set
33 AliRsnCutSet *cutSetStd = new AliRsnCutSet("kaonForPhi", AliRsnTarget::kDaughter);
34 cutSetStd->AddCut(cutStd);
35 cutSetStd->SetCutScheme(cutStd->GetName());
36 // add to task
37 Int_t icut = task->AddTrackCuts(cutSetStd);
38
39 //
40 // -- Values ------------------------------------------------------------------------------------
41 //
42
43 /* invariant mass */ Int_t imID = task->CreateValue(AliRsnMiniValue::kInvMass, kFALSE);
44 /* IM resolution */ Int_t resID = task->CreateValue(AliRsnMiniValue::kInvMassRes, kTRUE);
45 /* transv. momentum */ Int_t ptID = task->CreateValue(AliRsnMiniValue::kPt, kFALSE);
46 /* centrality */ Int_t centID = task->CreateValue(AliRsnMiniValue::kMult, kFALSE);
47
48 //
49 // -- Create all needed outputs -----------------------------------------------------------------
50 //
51
52 // create output object "HIST" "PAIR" or "MIX" or "TRUE"
53 AliRsnMiniOutput *out = task->CreateOutput(name, outType, computationType);
54
55 // cut IDs
56 out->SetCutID(0, icut);
57 out->SetCutID(1, icut);
58
59 // daughter species
60 out->SetDaughter(0, AliRsnDaughter::kKaon);
61 out->SetDaughter(1, AliRsnDaughter::kKaon);
62 out->SetCharge(0, charge1);
63 out->SetCharge(1, charge2);
64
65 // resonance properties
66 out->SetMotherPDG(333);
67 out->SetMotherMass(1.019455);
68
69 // pair cuts
70 out->SetPairCuts(cutsPair);
71
72 // axis X: invmass (or resolution)
73 if (useIM)
74 out->AddAxis(imID, 500, 0.9, 1.4);
75 else
76 out->AddAxis(resID, 200, -0.02, 0.02);
77
78 // axis Y: transverse momentum
79 out->AddAxis(ptID, 100, 0.0, 10.0);
80
81 return kTRUE;
82}