]>
Commit | Line | Data |
---|---|---|
720a0a16 | 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 | // // | |
44dbae42 | 20 | // Container for PID information // |
720a0a16 | 21 | // // |
22 | // Authors: // | |
23 | // Prashant Shukla <shukla@pi0.physi.uni-heidelberg.de> // | |
24 | // Alex Bercuci <a.bercuci@gsi.de> // | |
25 | // // | |
26 | ////////////////////////////////////////////////////////////////////////// | |
27 | ||
2e32a5ae | 28 | #include <TObjArray.h> |
720a0a16 | 29 | |
30 | #include "AliTRDCalPID.h" | |
720a0a16 | 31 | |
32 | ClassImp(AliTRDCalPID) | |
33 | ||
2e32a5ae | 34 | const Char_t* AliTRDCalPID::fPartName[AliPID::kSPECIES] = { "electron", "muon", "pion", "kaon", "proton"}; |
35 | const Char_t* AliTRDCalPID::fPartSymb[AliPID::kSPECIES] = { "EL", "MU", "PI", "KA", "PR"}; | |
36 | Color_t AliTRDCalPID::fgPartColor[AliPID::kSPECIES] = { kRed, kGreen, kBlue, kYellow, kMagenta}; | |
37 | Float_t AliTRDCalPID::fgTrackMomentum[kNMom] = { 0.6, 0.8, 1.0, 1.5, 2.0 | |
38 | , 3.0, 4.0, 5.0, 6.0, 8.0, 10.0 }; | |
39 | Float_t AliTRDCalPID::fgTrackMomentumBinning[kNMom+1] = { 0.5, 0.7, 0.9, 1.25, 1.75, 2.5 | |
40 | , 3.5, 4.5, 5.5, 7.0, 9.0, 12.0 }; | |
720a0a16 | 41 | |
720a0a16 | 42 | //_________________________________________________________________________ |
43 | AliTRDCalPID::AliTRDCalPID() | |
44 | :TNamed("pid", "PID for TRD") | |
44dbae42 | 45 | ,fModel(0x0) |
720a0a16 | 46 | { |
47 | // | |
48 | // The Default constructor | |
49 | // | |
50 | ||
720a0a16 | 51 | } |
52 | ||
44dbae42 | 53 | //_____________________________________________________________________________ |
720a0a16 | 54 | AliTRDCalPID::AliTRDCalPID(const Text_t *name, const Text_t *title) |
55 | :TNamed(name,title) | |
44dbae42 | 56 | ,fModel(0x0) |
720a0a16 | 57 | { |
58 | // | |
59 | // The main constructor | |
44dbae42 | 60 | // |
720a0a16 | 61 | |
720a0a16 | 62 | } |
63 | ||
64 | //_________________________________________________________________________ | |
65 | AliTRDCalPID::~AliTRDCalPID() | |
66 | { | |
67 | // | |
68 | // Destructor | |
69 | // | |
70 | ||
44dbae42 | 71 | if (fModel) { |
72 | delete fModel; | |
720a0a16 | 73 | } |
720a0a16 | 74 | |
720a0a16 | 75 | } |
5d6dc395 | 76 | |
77 | //_________________________________________________________________________ | |
78 | Int_t AliTRDCalPID::GetPartIndex(Int_t pdg) | |
79 | { | |
2e32a5ae | 80 | // |
81 | // Return the index to a given particle, defined by its PDG code | |
82 | // | |
83 | ||
5d6dc395 | 84 | for(Int_t is=0; is<AliPID::kSPECIES; is++){ |
85 | if(TMath::Abs(pdg) == AliPID::ParticleCode(is)) return is; | |
86 | } | |
87 | return -1; | |
88 | } |