In order to use the new TPC dEdx information within the common pid classes the new...
[u/mrichter/AliRoot.git] / STEER / STEERBase / AliTPCdEdxInfo.cxx
CommitLineData
40b4e5ea 1#include "AliTPCdEdxInfo.h"
2
3//##################################################################
4//
5// Simple class to store TPC dE/dx info for different pad regions.
6//
7// Origin: Marian Ivanov, Alexander Kalweit
8//
9//##################################################################
10
11
12
13ClassImp(AliTPCdEdxInfo)
14
15AliTPCdEdxInfo::AliTPCdEdxInfo():
16 TObject(),
17 fTPCsignalRegion(),
18 fTPCsignalNRegion(),
19 fTPCsignalNRowRegion()
20{
21 // Default constructor
22 for (Int_t i=0;i<3; i++){
23 fTPCsignalRegion[i]=0;
24 fTPCsignalNRegion[i]=0;
25 fTPCsignalNRowRegion[i]=0;
26 }
27 fTPCsignalRegion[3]=0;
28
29}
30
31
32AliTPCdEdxInfo::AliTPCdEdxInfo(const AliTPCdEdxInfo& source):
33 TObject(),
34 fTPCsignalRegion(),
35 fTPCsignalNRegion(),
36 fTPCsignalNRowRegion()
37{
38 //
39 // copy constructor
40 //
41 Double32_t signal[4]; Char_t ncl[3]; Char_t nrows[3];
42 source.GetTPCSignalRegionInfo(signal, ncl, nrows);
43 for (Int_t i=0;i<3; i++){
44 fTPCsignalRegion[i]=signal[i];
45 fTPCsignalNRegion[i]=ncl[i];
46 fTPCsignalNRowRegion[i]=nrows[i];
47 }
48 fTPCsignalRegion[3]=signal[3];
49
50}
51
52
53
54void AliTPCdEdxInfo::GetTPCSignalRegionInfo(Double32_t signal[4], Char_t ncl[3], Char_t nrows[3]) const {
55 //
56 // Get the TPC dEdx variables per region
57 //
58 // Double32_t fTPCsignalRegion[4]; // TPC dEdx signal in 4 different regions - 0 - IROC, 1- OROC medium, 2 - OROC long, 3- OROC all, (default truncation used)
59 // Char_t fTPCsignalNRegion[3]; // number of clusters above threshold used in the dEdx calculation
60 // Char_t fTPCsignalNRowRegion[3]; // number of crosed rows used in the dEdx calculation - signal below threshold included
61 //
62 for (Int_t i=0; i<3; i++){
63 signal[i]=fTPCsignalRegion[i];
64 ncl[i]=fTPCsignalNRegion[i];
65 nrows[i]=fTPCsignalNRowRegion[i];
66 }
67 signal[3]=fTPCsignalRegion[3];
68 return;
69}
70
71
72void AliTPCdEdxInfo::SetTPCSignalRegionInfo(Double32_t signal[4], Char_t ncl[3], Char_t nrows[3]){
73 //
74 // Set the TPC dEdx variables per region
75 //
76 // Double32_t fTPCsignalRegion[4]; // TPC dEdx signal in 4 different regions - 0 - IROC, 1- OROC medium, 2 - OROC long, 3- OROC all, (default truncation used)
77 // Char_t fTPCsignalNRegion[3]; // number of clusters above threshold used in the dEdx calculation
78 // Char_t fTPCsignalNRowRegion[3]; // number of crosed rows used in the dEdx calculation - signal below threshold included
79 //
80 for (Int_t i=0;i<3; i++){
81 fTPCsignalRegion[i]=signal[i];
82 fTPCsignalNRegion[i]=ncl[i];
83 fTPCsignalNRowRegion[i]=nrows[i];
84 }
85 fTPCsignalRegion[3]=signal[3];
86 return;
87}