1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 // This class contains the TRD points for the ALICE event display. //
21 // Used to seperately display dEdx and TR photon hits. //
23 ///////////////////////////////////////////////////////////////////////////////
29 #include "AliDetector.h"
31 #include "AliTRDpoints.h"
33 ClassImp(AliTRDpoints)
35 //_____________________________________________________________________________
36 AliTRDpoints::AliTRDpoints():AliPoints()
39 // Default constructor
47 //_____________________________________________________________________________
48 AliTRDpoints::AliTRDpoints(Int_t nhitsE, Int_t nhitsT):AliPoints(nhitsE)
51 // Standard constructor
59 //_____________________________________________________________________________
60 AliTRDpoints::AliTRDpoints(const AliTRDpoints &p):AliPoints(p)
66 ((AliTRDpoints &) p).Copy(*this);
70 //_____________________________________________________________________________
71 AliTRDpoints::~AliTRDpoints()
77 if (fTRpolyMarker) delete fTRpolyMarker;
81 //_____________________________________________________________________________
82 AliTRDpoints &AliTRDpoints::operator=(const AliTRDpoints &p)
85 // Assignment operator
88 if (this != &p) ((AliTRDpoints &) p).Copy(*this);
93 //_____________________________________________________________________________
94 void AliTRDpoints::Copy(TObject &p)
100 ((AliTRDpoints &) p).fNTRpoints = fNTRpoints;
101 for (Int_t i = 0; i < 3*fNTRpoints; i++) {
102 ((AliTRDpoints &) p).fTRpoints[i] = fTRpoints[i];
107 //_____________________________________________________________________________
108 void AliTRDpoints::Draw(Option_t *option)
114 AliPoints::Draw(option);
116 //if (fTRpolyMarker) delete fTRpolyMarker;
118 fTRpolyMarker = new TPolyMarker3D(fNTRpoints,fTRpoints,29);
119 fTRpolyMarker->SetMarkerColor(2);
120 fTRpolyMarker->SetMarkerSize(0.8);
121 fTRpolyMarker->Draw(option);
126 //_____________________________________________________________________________
127 void AliTRDpoints::SetTRpoints(Int_t n, Float_t *coor)
130 // Sets the number and the coordinates of the photon hits
133 if (kNTRpoints >= 3 * n) {
135 for (Int_t i = 0; i < 3*n; i++) {
136 fTRpoints[i] = coor[i];
140 printf("AliTRDpoints::SetTRpoints -- ");
141 printf("Boundary error: %d/%d\n",3*n,kNTRpoints);