]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALTrackSegment.cxx
corrected histogram details
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALTrackSegment.cxx
CommitLineData
5502f2ea 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/* $Id$ */
16//_________________________________________________________________________
17// Track segment in EMCAL
18// Can be : 1 EmcRecPoint
19// 1 EmcRecPoint + 1 PPSD
20// 1 EmcRecPoint + 1 PPSD + 1 PPSD
21//
22//*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
23// Adapted from PHOS by Y. Schutz (SUBATECH)
24
25// --- ROOT system ---
26
27
28// --- Standard library ---
29
30// --- AliRoot header files ---
31
32#include "AliEMCALTrackSegment.h"
33
34ClassImp(AliEMCALTrackSegment)
35
36//____________________________________________________________________________
88cb7938 37AliEMCALTrackSegment::AliEMCALTrackSegment( AliEMCALTowerRecPoint * eca, AliEMCALTowerRecPoint * pre, AliEMCALTowerRecPoint * hca)
5502f2ea 38{
39 // ctor
40
41 if( pre )
42 fPRERecPoint = pre->GetIndexInList() ;
43 else
44 fPRERecPoint = -1 ;
45
88cb7938 46 if( eca )
47 fECARecPoint = eca->GetIndexInList() ;
5502f2ea 48 else
88cb7938 49 fECARecPoint = -1 ;
5502f2ea 50
88cb7938 51 if( hca )
52 fHCARecPoint = hca->GetIndexInList() ;
5502f2ea 53 else
88cb7938 54 fHCARecPoint = -1 ;
5502f2ea 55
56 fIndexInList = -1 ;
57}
58
59//____________________________________________________________________________
60AliEMCALTrackSegment::AliEMCALTrackSegment( const AliEMCALTrackSegment & ts)
9e5d2067 61 : TObject(ts)
5502f2ea 62{
63 // Copy ctor
64
65 ( (AliEMCALTrackSegment &)ts ).Copy(*this) ;
66}
67
68
69//____________________________________________________________________________
70void AliEMCALTrackSegment::Copy(TObject & obj)
71{
72 // Copy of a track segment into another track segment
73
74 TObject::Copy(obj) ;
75 ( (AliEMCALTrackSegment &)obj ).fPRERecPoint = fPRERecPoint ;
88cb7938 76 ( (AliEMCALTrackSegment &)obj ).fECARecPoint = fECARecPoint ;
77 ( (AliEMCALTrackSegment &)obj ).fHCARecPoint = fHCARecPoint ;
5502f2ea 78 ( (AliEMCALTrackSegment &)obj ).fIndexInList = fIndexInList ;
79}
80
81//____________________________________________________________________________
9e5d2067 82void AliEMCALTrackSegment::Print(Option_t *) const
5502f2ea 83{
84 // Print all information on this track Segment
85
86
87 Info("Print", "TrackSegment information:") ;
88 printf("--------AliEMCALTrackSegment-------- \n");
89 printf("Stored at position %d\n", fIndexInList) ;
90 if (fPRERecPoint)
91 printf("PRE RecPoint # %d\n", fPRERecPoint) ;
88cb7938 92 if (fECARecPoint)
93 printf("EC RecPoint # %d\n", fECARecPoint) ;
94 if (fHCARecPoint)
95 printf("HC RecPoint # %d\n", fHCARecPoint) ;
5502f2ea 96
97 printf("------------------------------------ \n") ;
98
99}
100
101//____________________________________________________________________________
102void AliEMCALTrackSegment::SetPRERecPoint(AliEMCALRecPoint * pre)
103{
104 // gives an id from its position in the list
105 if( pre )
106 fPRERecPoint = pre->GetIndexInList() ;
107 else
108 fPRERecPoint = -1 ;
109}
110
111//____________________________________________________________________________
88cb7938 112void AliEMCALTrackSegment::SetHCARecPoint(AliEMCALRecPoint * hca)
5502f2ea 113{
114 // gives an id from its position in the list
88cb7938 115 if( hca )
116 fHCARecPoint = hca->GetIndexInList() ;
5502f2ea 117 else
88cb7938 118 fHCARecPoint = -1 ;
5502f2ea 119}