]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGUD/DIFFRACTIVE/example/AliCDMesonBaseStripped.cxx
- removed old double-gap analysis task by Xian-Guo Lu
[u/mrichter/AliRoot.git] / PWGUD / DIFFRACTIVE / example / AliCDMesonBaseStripped.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15 //
16 // AliCDMesonBaseStripped
17 //
18 //  Author:
19 //  Felix Reidt <Felix.Reidt@cern.ch>
20
21 #include "TH1F.h"
22 #include "TString.h"
23
24 #include "AliCDMesonBaseStripped.h"
25
26
27 //------------------------------------------------------------------------------
28 Int_t AliCDMesonBaseStripped::GetGapBin(TString tag, const Int_t gapcg)
29 {
30         //
31         // retrieve gap topology for a given string
32         //
33
34         tag.ToUpper();
35
36         Bool_t ka = kFALSE, kc = kFALSE;
37
38         if(tag.Contains("V0")){
39                 ka = ka || (gapcg & kBitV0A);
40                 kc = kc || (gapcg & kBitV0C);
41         }
42         if(tag.Contains("FMD")){
43                 ka = ka || (gapcg & kBitFMDA);
44                 kc = kc || (gapcg & kBitFMDC);
45         }
46         if(tag.Contains("SPD")){
47                 ka = ka || (gapcg & kBitSPDA);
48                 kc = kc || (gapcg & kBitSPDC);
49         }
50         if(tag.Contains("TPC")){
51                 ka = ka || (gapcg & kBitTPCA);
52                 kc = kc || (gapcg & kBitTPCC);
53         }
54         if(ka && kc)
55                 return kBinNG;
56         else{
57                 if(!ka && !kc)
58                         return kBinDG;
59                 else if(!kc)
60                         return kBinGC;
61                 else
62                         return kBinGA;
63         }
64 }
65
66
67 //------------------------------------------------------------------------------
68 TH1F* AliCDMesonBaseStripped::GetHistStatsFlow()
69 {
70         //
71         // setup the stats flow histogram
72         //
73
74         TH1F *hist = new TH1F("c00_statsFlow", "",
75                               AliCDMesonBaseStripped::kBinLastValue,
76                               0, AliCDMesonBaseStripped::kBinLastValue);
77         TAxis* axis = hist->GetXaxis();
78         axis->SetBinLabel(AliCDMesonBaseStripped::kBinTotalInput+1, "total Input");
79         axis->SetBinLabel(AliCDMesonBaseStripped::kBinGoodInput+1, "good ESDs");
80         axis->SetBinLabel(AliCDMesonBaseStripped::kBinEventsAfterCuts+1,"after cuts");
81         axis->SetBinLabel(AliCDMesonBaseStripped::kBinEventsWithOutPileUp+1,
82                           "w/o pile up");
83         axis->SetBinLabel(AliCDMesonBaseStripped::kBinv0Gap+1, "with V0 DG gap");
84         axis->SetBinLabel(AliCDMesonBaseStripped::kBinv0fmdGap+1,
85                           "with V0-FMD DG gap");
86         axis->SetBinLabel(AliCDMesonBaseStripped::kBinv0fmdspdGap+1,
87                           "with V0-FMD-SPD DG gap");
88         axis->SetBinLabel(AliCDMesonBaseStripped::kBinv0fmdspdtpcGap+1,
89                           "with V0-FMD-SPD-TPC DG gap");
90         axis->SetBinLabel(AliCDMesonBaseStripped::kBinResidualTracks+1,
91                           "without residual tracks");
92         axis->SetBinLabel(AliCDMesonBaseStripped::kBinResidualTracklets+1,
93                           "without residual tracklets");
94         return hist;
95 }