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 */
8 ///////////////////////////////////////////////////////////////////
10 // Class to store information for PID with ITS //
11 // and truncated mean computation methods //
12 // Origin: F.Prino, Torino, prino@to.infn.it //
14 ///////////////////////////////////////////////////////////////////
19 class AliITSPidParams;
21 class AliITSdEdxSamples : public TObject {
25 AliITSdEdxSamples(Int_t nSamples, Double_t* samples, Double_t mom, Int_t specie=0);
26 virtual ~AliITSdEdxSamples(){};
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){
33 void SetParticleSpecieMC(Int_t specie){
34 fParticleSpecie=specie;
37 Int_t GetNumberOfSamples() const {
40 Double_t GetdEdxSample(Int_t i) const {
41 if(i<fNSamples) return fdEdxSamples[i];
44 Double_t GetMomentum() const {
47 Double_t GetMomentumAtSample(Int_t i) const{
48 if(i<fNSamples) return fPAtSample[i];
51 Int_t GetParticleSpecieMC() const {
52 return fParticleSpecie;
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;
60 static const UShort_t fgkMaxSamples=10; // max. n. of layers with dE/dx info
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
68 ClassDef(AliITSdEdxSamples,1);