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