Add possibilty to selct reco pass (Elena Botta)
[u/mrichter/AliRoot.git] / ITS / AliITSdEdxSamples.h
CommitLineData
9189f38b 1#ifndef ALIITSDEDXSAMPLES_H
2#define ALIITSDEDXSAMPLES_H
3/* Copyright(c) 2009-2012, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
9189f38b 6///////////////////////////////////////////////////////////////////
7// //
8// Class to store information for PID with ITS //
9// and truncated mean computation methods //
10// Origin: F.Prino, Torino, prino@to.infn.it //
11// //
12///////////////////////////////////////////////////////////////////
13
14#include <TObject.h>
15#include "AliPID.h"
16
17class AliITSPidParams;
18
19class AliITSdEdxSamples : public TObject {
20
21 public:
22 AliITSdEdxSamples();
92329a66 23 AliITSdEdxSamples(Int_t nSamples, Double_t* esamples, Double_t* xsamples, Double_t mom, Int_t specie=0);
24 AliITSdEdxSamples(const AliITSdEdxSamples& source);
9189f38b 25 virtual ~AliITSdEdxSamples(){};
26
92329a66 27 void SetdESamples(Int_t nSamples, Double_t* samples);
28 void SetdxSamples(Int_t nSamples, Double_t* samples);
29 void SetSamplesAndMomenta(Int_t nSamples, Double_t* esamples, Double_t* xsamples, Double_t* mom);
9189f38b 30 void SetMomentum(Double_t mom){
31 fP=mom;
32 }
33 void SetParticleSpecieMC(Int_t specie){
34 fParticleSpecie=specie;
35 }
36
37 Int_t GetNumberOfSamples() const {
38 return fNSamples;
39 }
92329a66 40 Double_t GetdESample(Int_t i) const {
41 if(i<fNSamples) return fdESamples[i];
42 else return 0.;
43 }
44 Double_t GetNehPairs(Int_t i) const {
45 if(i<fNSamples) return fdESamples[i]*1000./3.63;
46 else return 0.;
47 }
48 Double_t GetQfC(Int_t i) const{
49 return GetNehPairs(i)*1.6E-4;
50 }
51 Double_t GetdxSample(Int_t i) const {
52 if(i<fNSamples) return fdxSamples[i];
9189f38b 53 else return 0.;
54 }
92329a66 55 Double_t GetdEdxSample(Int_t i) const { // keV/100um
56 if(i<fNSamples && fdxSamples[i]>0.)
57 return fdESamples[i]/(fdxSamples[i]*100.);
58 else return 0.;
59 }
60
9189f38b 61 Double_t GetMomentum() const {
62 return fP;
63 }
64 Double_t GetMomentumAtSample(Int_t i) const{
65 if(i<fNSamples) return fPAtSample[i];
66 else return 0.;
67 }
68 Int_t GetParticleSpecieMC() const {
69 return fParticleSpecie;
70 }
71
72 Double_t GetTruncatedMean(Double_t frac=0.5, Double_t mindedx=0.) const;
73 Double_t GetWeightedMean(Double_t mindedx=0.) const;
74 void GetConditionalProbabilities(AliITSPidParams* pars, Double_t condprob[AliPID::kSPECIES], Double_t mindedx=0.) const;
75
92329a66 76
9189f38b 77 protected:
92329a66 78 enum{kMaxSamples=10}; // max. n. of layers with dE/dx info
79
9189f38b 80 Int_t fNSamples; // number of samples
92329a66 81 Double_t fdESamples[kMaxSamples]; // dE samples (keV)
82 Double_t fdxSamples[kMaxSamples]; // dx samples (cm)
9189f38b 83 Double_t fP; // track momentum
84 Int_t fParticleSpecie; // MC generated particle
92329a66 85 Double_t fPAtSample[kMaxSamples]; // track momentum at specific samples
9189f38b 86
92329a66 87 ClassDef(AliITSdEdxSamples,2);
9189f38b 88
89};
90#endif