]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/macros/mini/ConfigLStarPP.C
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / macros / mini / ConfigLStarPP.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 ConfigLStarPP
12 (  
13    AliRsnMiniAnalysisTask *task, 
14    Bool_t                  isMC, 
15    const char             *suffix,
16    AliRsnCutSet           *cutsPair
17 )
18 {
19    // manage suffix
20    if (strlen(suffix) > 0) suffix = Form("_%s", suffix);
21    
22    // 
23    // -- Define track cuts -------------------------------------------------------------------------
24    //
25    
26    // integrated pion cut
27    AliRsnCutDaughterLStar2010 *cutK = new AliRsnCutDaughterLStar2010("cutKaonForLStar", AliPID::kKaon);
28    // cut set
29    AliRsnCutSet *cutSetK = new AliRsnCutSet("setPionForLStar", AliRsnTarget::kDaughter);
30    cutSetK->AddCut(cutK);
31    cutSetK->SetCutScheme(cutK->GetName());
32    // add to task
33    Int_t icutK = task->AddTrackCuts(cutSetK);
34    
35    // integrated kaon cut
36    AliRsnCutDaughterLStar2010 *cutP = new AliRsnCutDaughterLStar2010("cutProtonForLStar", AliPID::kProton);
37    // cut set
38    AliRsnCutSet *cutSetP = new AliRsnCutSet("setKaonForLStar", AliRsnTarget::kDaughter);
39    cutSetP->AddCut(cutP);
40    cutSetP->SetCutScheme(cutP->GetName());
41    // add to task
42    Int_t icutP = task->AddTrackCuts(cutSetP);
43    
44    //
45    // -- Values ------------------------------------------------------------------------------------
46    //
47    
48    /* invariant mass   */ Int_t imID   = task->CreateValue(AliRsnMiniValue::kInvMass, kFALSE);
49    /* IM resolution    */ Int_t resID  = task->CreateValue(AliRsnMiniValue::kInvMassRes, kTRUE);
50    /* transv. momentum */ Int_t ptID   = task->CreateValue(AliRsnMiniValue::kPt, kFALSE);
51    /* centrality       */ Int_t centID = task->CreateValue(AliRsnMiniValue::kMult, kFALSE);
52    
53    //
54    // -- Create all needed outputs -----------------------------------------------------------------
55    //
56    
57    // use an array for more compact writing, which are different on mixing and charges
58    // [0] = unlike
59    // [1] = mixing
60    // [2] = like ++
61    // [3] = like --
62    Bool_t  use     [10] = { 1       ,  1       ,  1       ,  1       ,  1      ,  1      ,  isMC   ,   isMC   ,  isMC   ,   isMC   };
63    Bool_t  useIM   [10] = { 1       ,  1       ,  1       ,  1       ,  1      ,  1      ,  1      ,   1      ,  0      ,   0      };
64    TString name    [10] = {"Unlike1", "Unlike2", "Mixing1", "Mixing2", "LikePP", "LikeMM", "Trues1",  "Trues2", "Res1"  ,  "Res2"  };
65    TString comp    [10] = {"PAIR"   , "PAIR"   , "MIX"    , "MIX"    , "PAIR"  , "PAIR"  , "TRUE"  ,  "TRUE"  , "TRUE"  ,  "TRUE"  };
66    //TString output  [10] = {"HIST" , "HIST"   , "HIST"   , "HIST"   , "HIST"  , "HIST"  , "HIST"  ,  "HIST"  , "HIST"  ,  "HIST"  };
67    TString output  [10] = {"SPARSE" , "SPARSE" , "SPARSE" , "SPARSE" , "SPARSE", "SPARSE", "SPARSE",  "SPARSE", "SPARSE",  "SPARSE"};
68    Int_t   pdgCode [10] = { 3124    ,  -3124    ,  3124    , -3124    ,  3124   ,  3124   ,  3124   ,  -3124   ,  3124   ,  -3124  };
69    Char_t  charge1 [10] = {'+'      , '-'      , '+'      , '-'      , '+'     , '-'     , '+'     ,  '-'     , '+'     ,  '-'     };
70    Char_t  charge2 [10] = {'-'      , '+'      , '-'      , '+'      , '+'     , '-'     , '-'     ,  '+'     , '-'     ,  '+'     };
71    Int_t   cutID1  [10] = { icutP   ,  icutP   ,  icutP   ,  icutP   ,  icutP  ,  icutP  ,  icutP  ,   icutP  ,  icutP  ,   icutP  };
72    Int_t   cutID2  [10] = { icutK   ,  icutK   ,  icutK   ,  icutK   ,  icutK  ,   icutK ,   icutK ,   icutK  ,  icutK  ,   icutK  };
73    for (Int_t i = 0; i < 10; i++) {
74       if (!use[i]) continue;
75       // create output
76       AliRsnMiniOutput *out = task->CreateOutput(Form("LStar_%s%s", name[i].Data(), suffix), output[i].Data(), comp[i].Data());
77       // selection settings
78       out->SetCutID(0, cutID1[i]);
79       out->SetCutID(1, cutID2[i]);
80       out->SetDaughter(0, AliRsnDaughter::kProton);
81       out->SetDaughter(1, AliRsnDaughter::kKaon);
82       out->SetCharge(0, charge1[i]);
83       out->SetCharge(1, charge2[i]);
84       out->SetMotherPDG(pdgCode[i]);
85       out->SetMotherMass(1.520);
86       // pair cuts
87       out->SetPairCuts(cutsPair);
88       // axis X: invmass (or resolution)
89       if (useIM[i]) 
90          out->AddAxis(imID, 80, 1.4, 1.8);
91       else
92          out->AddAxis(resID, 200, -0.02, 0.02);
93       // axis Y: transverse momentum
94 //S.K. out->AddAxis(ptID, 100, 0.0, 10.0);
95       out->AddAxis(ptID, 100, 0.0, 10.0);
96       //S.K. axis Z: centrality 
97       out->AddAxis(centID, 10, 0.0, 100.0);
98    }
99    
100    return kTRUE;
101 }