]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/AliTRDpoints.cxx
Field conversion factor added.
[u/mrichter/AliRoot.git] / TRD / AliTRDpoints.cxx
CommitLineData
46d29e70 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$
b9d0a01d 18Revision 1.3.12.2 2002/07/24 10:09:31 alibrary
19Updating VirtualMC
20
21Revision 1.3.12.1 2002/06/10 15:28:58 hristov
22Merged with v3-08-02
23
24Revision 1.4 2002/03/28 14:59:07 cblume
25Coding conventions
26
27Revision 1.4 2002/03/28 14:59:07 cblume
28Coding conventions
29
0a29d0f1 30Revision 1.3 2000/10/15 23:40:01 cblume
31Remove AliTRDconst
32
0e9c2ad5 33Revision 1.2 2000/10/06 16:49:46 cblume
34Made Getters const
35
46d29e70 36Revision 1.1.2.1 2000/09/18 13:44:21 cblume
37New class AliTRDpoints to display the TR photon hits
38
39*/
40
41///////////////////////////////////////////////////////////////////////////////
42// //
0a29d0f1 43// This class contains the TRD points for the ALICE event display. //
44// Used to seperately display dEdx and TR photon hits. //
46d29e70 45// //
46///////////////////////////////////////////////////////////////////////////////
47
0e9c2ad5 48#include <TPad.h>
49#include <TView.h>
50
46d29e70 51#include "AliRun.h"
52#include "AliDetector.h"
0e9c2ad5 53
54#include "AliTRDpoints.h"
46d29e70 55
56ClassImp(AliTRDpoints)
57
58//_____________________________________________________________________________
59AliTRDpoints::AliTRDpoints():AliPoints()
60{
61 //
62 // Default constructor
63 //
64
65 fNTRpoints = 0;
66 fTRpolyMarker = 0;
67
68}
69
70//_____________________________________________________________________________
71AliTRDpoints::AliTRDpoints(Int_t nhitsE, Int_t nhitsT):AliPoints(nhitsE)
72{
73 //
74 // Standard constructor
75 //
76
77 fNTRpoints = nhitsT;
78 fTRpolyMarker = 0;
79
80}
81
82//_____________________________________________________________________________
83AliTRDpoints::AliTRDpoints(const AliTRDpoints &p)
84{
85 //
86 // Copy contructor
87 //
88
89 ((AliTRDpoints &) p).Copy(*this);
90
91}
92
93//_____________________________________________________________________________
94AliTRDpoints::~AliTRDpoints()
95{
96 //
97 // Default destructor
98 //
99
100 if (fTRpolyMarker) delete fTRpolyMarker;
101
102}
103
104//_____________________________________________________________________________
105AliTRDpoints &AliTRDpoints::operator=(const AliTRDpoints &p)
106{
107 //
108 // Assignment operator
109 //
110
111 if (this != &p) ((AliTRDpoints &) p).Copy(*this);
112 return *this;
113
114}
115
116//_____________________________________________________________________________
117void AliTRDpoints::Copy(TObject &p)
118{
119 //
120 // Copy function
121 //
122
123 ((AliTRDpoints &) p).fNTRpoints = fNTRpoints;
124 for (Int_t i = 0; i < 3*fNTRpoints; i++) {
125 ((AliTRDpoints &) p).fTRpoints[i] = fTRpoints[i];
126 }
127
128}
129
130//_____________________________________________________________________________
131void AliTRDpoints::Draw(Option_t *option)
132{
133 //
134 // Draws a TRD point
135 //
136
137 AliPoints::Draw(option);
138
139 //if (fTRpolyMarker) delete fTRpolyMarker;
140 if (fNTRpoints) {
141 fTRpolyMarker = new TPolyMarker3D(fNTRpoints,fTRpoints,29);
142 fTRpolyMarker->SetMarkerColor(2);
143 fTRpolyMarker->SetMarkerSize(0.8);
144 fTRpolyMarker->Draw(option);
145 }
146
147}
148
149//_____________________________________________________________________________
150void AliTRDpoints::SetTRpoints(Int_t n, Float_t *coor)
151{
152 //
153 // Sets the number and the coordinates of the photon hits
154 //
155
156 if (kNTRpoints >= 3 * n) {
157 fNTRpoints = n;
158 for (Int_t i = 0; i < 3*n; i++) {
159 fTRpoints[i] = coor[i];
160 }
161 }
162 else {
163 printf("AliTRDpoints::SetTRpoints -- ");
164 printf("Boundary error: %d/%d\n",3*n,kNTRpoints);
165 }
166
167}