New class for ITS dE/dx samples
[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
6/* $Id$ */
7
8///////////////////////////////////////////////////////////////////
9// //
10// Class to store information for PID with ITS //
11// and truncated mean computation methods //
12// Origin: F.Prino, Torino, prino@to.infn.it //
13// //
14///////////////////////////////////////////////////////////////////
15
16#include <TObject.h>
17#include "AliPID.h"
18
19class AliITSPidParams;
20
21class AliITSdEdxSamples : public TObject {
22
23 public:
24 AliITSdEdxSamples();
25 AliITSdEdxSamples(Int_t nSamples, Double_t* samples, Double_t mom, Int_t specie=0);
26 virtual ~AliITSdEdxSamples(){};
27
28 void SetSamples(Int_t nSamples, Double_t* samples);
29 void SetSamplesAndMomenta(Int_t nSamples, Double_t* samples, Double_t* mom);
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 }
40 Double_t GetdEdxSample(Int_t i) const {
41 if(i<fNSamples) return fdEdxSamples[i];
42 else return 0.;
43 }
44 Double_t GetMomentum() const {
45 return fP;
46 }
47 Double_t GetMomentumAtSample(Int_t i) const{
48 if(i<fNSamples) return fPAtSample[i];
49 else return 0.;
50 }
51 Int_t GetParticleSpecieMC() const {
52 return fParticleSpecie;
53 }
54
55 Double_t GetTruncatedMean(Double_t frac=0.5, Double_t mindedx=0.) const;
56 Double_t GetWeightedMean(Double_t mindedx=0.) const;
57 void GetConditionalProbabilities(AliITSPidParams* pars, Double_t condprob[AliPID::kSPECIES], Double_t mindedx=0.) const;
58
59 protected:
60 static const UShort_t fgkMaxSamples=10; // max. n. of layers with dE/dx info
61
62 Int_t fNSamples; // number of samples
63 Double_t fdEdxSamples[fgkMaxSamples]; // dE/dx samples
64 Double_t fP; // track momentum
65 Int_t fParticleSpecie; // MC generated particle
66 Double_t fPAtSample[fgkMaxSamples]; // track momentum at specific samples
67
68 ClassDef(AliITSdEdxSamples,1);
69
70};
71#endif