]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/macros/mini/ConfigKStarSimple.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / macros / mini / ConfigKStarSimple.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 ConfigKStarSimple
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 pion cut
31 AliRsnCutDaughterKStar2010PP *cutPi = new AliRsnCutDaughterKStar2010PP("cutPionForKStar", AliPID::kPion);
32 // cut set
33 AliRsnCutSet *cutSetPi = new AliRsnCutSet("setPionForKStar", AliRsnTarget::kDaughter);
34 cutSetPi->AddCut(cutPi);
35 cutSetPi->SetCutScheme(cutPi->GetName());
36 // add to task
37 Int_t iCutPi = task->AddTrackCuts(cutSetPi);
38
39 // integrated kaon cut
40 AliRsnCutDaughterKStar2010PP *cutK = new AliRsnCutDaughterKStar2010PP("cutKaonForKStar", AliPID::kKaon);
41 // cut set
42 AliRsnCutSet *cutSetK = new AliRsnCutSet("setKaonForKStar", AliRsnTarget::kDaughter);
43 cutSetK->AddCut(cutK);
44 cutSetK->SetCutScheme(cutK->GetName());
45 // add to task
46 Int_t iCutK = task->AddTrackCuts(cutSetK);
47
48 //
49 // -- Values ------------------------------------------------------------------------------------
50 //
51
52 /* invariant mass */ Int_t imID = task->CreateValue(AliRsnMiniValue::kInvMass, kFALSE);
53 /* IM resolution */ Int_t resID = task->CreateValue(AliRsnMiniValue::kInvMassRes, kTRUE);
54 /* transv. momentum */ Int_t ptID = task->CreateValue(AliRsnMiniValue::kPt, kFALSE);
55 /* centrality */ Int_t centID = task->CreateValue(AliRsnMiniValue::kMult, kFALSE);
56
57 //
58 // -- Create all needed outputs -----------------------------------------------------------------
59 //
60
61 // create output
62 AliRsnMiniOutput *out = task->CreateOutput(name, outType, computationType);
63
64 // selection settings
65 out->SetCutID(0, iCutK);
66 out->SetCutID(1, iCutPi);
67
68 // daughter species
69 out->SetDaughter(0, AliRsnDaughter::kKaon);
70 out->SetDaughter(1, AliRsnDaughter::kPion);
71 out->SetCharge(0, charge1);
72 out->SetCharge(1, charge2);
73
74 // resonance properties
75 out->SetMotherPDG(313);
76 out->SetMotherMass(0.896);
77
78 // pair cuts
79 out->SetPairCuts(cutsPair);
80
81 // axis X: invmass (or resolution)
82 if (useIM)
83 out->AddAxis(imID, 90, 0.6, 1.5);
84 else
85 out->AddAxis(resID, 200, -0.02, 0.02);
86
87 // axis Y: transverse momentum
88 out->AddAxis(ptID, 100, 0.0, 10.0);
89}