]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDrecPoint.cxx
Only one declaration of iDict in MakeDigits()
[u/mrichter/AliRoot.git] / TRD / AliTRDrecPoint.cxx
CommitLineData
f7336fa3 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/*
17$Log$
18*/
19
20///////////////////////////////////////////////////////////////////////////////
21// //
22// TRD reconstructed point //
23// //
24///////////////////////////////////////////////////////////////////////////////
25
26#include "AliTRDgeometry.h"
27#include "AliTRDrecPoint.h"
28#include "AliTRD.h"
29
30ClassImp(AliTRDrecPoint)
31
32//_____________________________________________________________________________
33AliTRDrecPoint::AliTRDrecPoint():AliRecPoint()
34{
35 //
36 // Standard constructor
37 //
38
39 fDetector = 0;
40
41 AliTRD *TRD;
42 if ((gAlice) &&
43 (TRD = ((AliTRD*) gAlice->GetDetector("TRD")))) {
44 fGeom = TRD->GetGeometry();
45 }
46 else {
47 fGeom = NULL;
48 }
49
50}
51
52//_____________________________________________________________________________
53void AliTRDrecPoint::AddDigit(Int_t digit)
54{
55 //
56 // Adds the index of a digit to the digits list
57 //
58
59 // First resize the list
60 // (no clusters with more than 3 digits for the TRD
61 if ((fMulDigit == 0) && (fMaxDigit >= 5)) {
62 fMaxDigit = 5;
63 delete fDigitsList;
64 fDigitsList = new int[fMaxDigit];
65 }
66
67 // Increase the size of the list if necessary
68 if (fMulDigit >= fMaxDigit) {
69 int *tempo = new (int[fMaxDigit*=2]);
70 Int_t index;
71 for (index = 0; index < fMulDigit; index++)
72 tempo[index] = fDigitsList[index];
73 delete fDigitsList;
74 fDigitsList = tempo;
75 }
76
77 fDigitsList[fMulDigit++] = digit;
78
79}
80
81//_____________________________________________________________________________
82void AliTRDrecPoint::SetLocalPosition(TVector3 &pos)
83{
84 //
85 // Sets the position of the point in the local coordinate system
86 // (row,col,time) and calculates the error matrix in the same
87 // system.
88 //
89
90 const Float_t sq12 = 3.464101615;
91
92 // Set the position
93 fLocPos = pos;
94
95 // Set the error matrix
96 // row: pad-size / sqrt(12)
97 // col: not defined yet
98 // time: bin-size / sqrt(12)
99 fLocPosM->operator()(0,0) = ((AliTRDgeometry *) fGeom)->GetRowPadSize()
100 / sq12;
101 fLocPosM->operator()(1,1) = 0.0;
102 fLocPosM->operator()(2,2) = ((AliTRDgeometry *) fGeom)->GetTimeBinSize()
103 / sq12;
104
105}