]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/Cal/AliTRDCalPID.cxx
100faecb6d20072b0bd2c427955029bf4b321767
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalPID.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 /* $Id$ */
17
18 //////////////////////////////////////////////////////////////////////////
19 //                                                                      //
20 // Container for PID information                                        //
21 //                                                                      //
22 // Authors:                                                             //
23 //   Prashant Shukla <shukla@pi0.physi.uni-heidelberg.de>               //
24 //   Alex Bercuci <a.bercuci@gsi.de>                                    //
25 //                                                                      //
26 //////////////////////////////////////////////////////////////////////////
27
28 #include <TH1F.h>
29 #include <TH2F.h>
30 #include <TFile.h>
31 #include <TROOT.h>
32
33 #include "AliLog.h"
34 #include "AliESD.h"
35 #include "AliESDtrack.h"
36
37 #include "AliTRDCalPID.h"
38 #include "AliTRDcalibDB.h"
39
40 ClassImp(AliTRDCalPID)
41
42 const Char_t* AliTRDCalPID::fPartName[AliPID::kSPECIES] = { "electron", "muon", "pion", "kaon", "proton"};
43 const Char_t* AliTRDCalPID::fPartSymb[AliPID::kSPECIES] = { "EL", "MU", "PI", "KA", "PR"};
44 Color_t AliTRDCalPID::fPartColor[AliPID::kSPECIES] = { kRed, kGreen, kBlue, kYellow, kMagenta};
45 Float_t AliTRDCalPID::fTrackMomentum[kNMom]       = {  
46     0.6,  0.8,  1.0,  1.5,  2.0
47    ,3.0,  4.0,  5.0,  6.0,  8.0, 10.0};
48 Float_t AliTRDCalPID::fTrackMomentumBinning[kNMom+1]       = {  
49     0.5,  0.7,  0.9,  1.25, 1.75, 2.5,  
50     3.5,  4.5,  5.5,  7.0,  9.0, 12.0};
51
52 //_________________________________________________________________________
53 AliTRDCalPID::AliTRDCalPID()
54   :TNamed("pid", "PID for TRD")
55   ,fModel(0x0)
56 {
57   //
58   //  The Default constructor
59   //
60
61 }
62
63 //_____________________________________________________________________________
64 AliTRDCalPID::AliTRDCalPID(const Text_t *name, const Text_t *title) 
65   :TNamed(name,title)
66   ,fModel(0x0)
67 {
68   //
69   //  The main constructor
70   //  
71
72 }
73
74 //_________________________________________________________________________
75 AliTRDCalPID::~AliTRDCalPID()
76 {
77   //
78   // Destructor
79   //
80   
81   if (fModel) {
82     delete fModel;
83   }
84
85 }
86
87 //_________________________________________________________________________
88 Int_t AliTRDCalPID::GetPartIndex(Int_t pdg)
89 {
90   for(Int_t is=0; is<AliPID::kSPECIES; is++){
91     if(TMath::Abs(pdg) == AliPID::ParticleCode(is)) return is;
92   }
93   return -1;
94 }