]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/macros/mini/ConfigPhi.C
Classes for 'mini' subpackage for RSN analysis framework
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / macros / mini / ConfigPhi.C
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 //
11 Bool_t ConfigPhi(AliRsnMiniAnalysisTask *task, Bool_t isMC, const char *suffix)
12 {
13    // 
14    // -- Define track cuts -------------------------------------------------------------------------
15    //
16    
17    // integrated kaon cut
18    AliRsnCutKaonForPhi2010PP *cutStd = new AliRsnCutKaonForPhi2010PP("cutStd");
19    // cut set
20    AliRsnCutSet *cutSetStd = new AliRsnCutSet("kaonForPhi", AliRsnTarget::kDaughter);
21    cutSetStd->AddCut(cutStd);
22    cutSetStd->SetCutScheme(cutStd->GetName());
23    // add to task
24    Int_t iCutStd = task->AddTrackCuts(cutSetStd);
25    
26    //
27    // -- Values ------------------------------------------------------------------------------------
28    //
29    
30    // invariant mass
31    Int_t imID = task->CreateValue(AliRsnMiniValue::kInvMass, kFALSE);
32    
33    // transverse momentum
34    Int_t ptID = task->CreateValue(AliRsnMiniValue::kPt, kFALSE);
35    
36    //
37    // -- Pair cuts ---------------------------------------------------------------------------------
38    //
39    
40    AliRsnCutMiniPair *cutY = new AliRsnCutMiniPair("cutRapidity", AliRsnCutMiniPair::kRapidityRange);
41    cutY->SetRangeD(-0.5, 0.5);
42    
43    AliRsnCutSet *cutsPair = new AliRsnCutSet("pairCuts", AliRsnTarget::kMother);
44    cutsPair->AddCut(cutY);
45    cutsPair->SetCutScheme(cutY->GetName());
46    
47    //
48    // -- Create all needed outputs -----------------------------------------------------------------
49    //
50    
51    // use an array for more compact writing, which are different on mixing and charges
52    // [0] = unlike
53    // [1] = mixing
54    // [2] = like ++
55    // [3] = like --
56    Bool_t  use     [5] = { 1      ,  1      ,  1      ,  1      ,  1        };
57    TString name    [5] = {"Unlike", "Mixing", "LikePP", "LikeMM", "Trues"   };
58    TString comp    [5] = {"PAIR"  , "MIX"   , "PAIR"  , "PAIR"  , "TRUE"    };
59    TString output  [5] = {"HIST"  , "HIST"  , "HIST"  , "HIST"  , "HIST"    };
60    Char_t  charge1 [5] = {'+'     , '+'     , '+'     , '-'     , '+'       };
61    Char_t  charge2 [5] = {'-'     , '-'     , '+'     , '-'     , '-'       };
62    Int_t   cutID   [5] = { iCutStd,  iCutStd,  iCutStd,  iCutStd,  iCutStd  };
63    
64    for (Int_t i = 0; i < 5; i++) {
65       if (!use[i]) continue;
66       // create output
67       AliRsnMiniOutput *out = task->CreateOutput(Form("phi_%s_%s", name[i].Data(), suffix), output[i].Data(), comp[i].Data());
68       // selection settings
69       out->SetCutID(0, cutID[i]);
70       out->SetCutID(1, cutID[i]);
71       out->SetDaughter(0, AliRsnDaughter::kKaon);
72       out->SetDaughter(1, AliRsnDaughter::kKaon);
73       out->SetCharge(0, charge1[i]);
74       out->SetCharge(1, charge2[i]);
75       out->SetMotherPDG(333);
76       out->SetMotherMass(1.019455);
77       // pair cuts
78       out->SetPairCuts(cutsPair);
79       // binnings
80       out->AddAxis(imID, 500, 0.9,  1.4);
81       out->AddAxis(ptID, 200, 0.0, 10.0);
82    }
83    
84    return kTRUE;
85 }