]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALTrackSegment.cxx
Transition to NewIO
[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)
61{
62 // Copy ctor
63
64 ( (AliEMCALTrackSegment &)ts ).Copy(*this) ;
65}
66
67
68//____________________________________________________________________________
69void AliEMCALTrackSegment::Copy(TObject & obj)
70{
71 // Copy of a track segment into another track segment
72
73 TObject::Copy(obj) ;
74 ( (AliEMCALTrackSegment &)obj ).fPRERecPoint = fPRERecPoint ;
88cb7938 75 ( (AliEMCALTrackSegment &)obj ).fECARecPoint = fECARecPoint ;
76 ( (AliEMCALTrackSegment &)obj ).fHCARecPoint = fHCARecPoint ;
5502f2ea 77 ( (AliEMCALTrackSegment &)obj ).fIndexInList = fIndexInList ;
78}
79
80//____________________________________________________________________________
81void AliEMCALTrackSegment::Print(Option_t * opt) const
82{
83 // Print all information on this track Segment
84
85
86 Info("Print", "TrackSegment information:") ;
87 printf("--------AliEMCALTrackSegment-------- \n");
88 printf("Stored at position %d\n", fIndexInList) ;
89 if (fPRERecPoint)
90 printf("PRE RecPoint # %d\n", fPRERecPoint) ;
88cb7938 91 if (fECARecPoint)
92 printf("EC RecPoint # %d\n", fECARecPoint) ;
93 if (fHCARecPoint)
94 printf("HC RecPoint # %d\n", fHCARecPoint) ;
5502f2ea 95
96 printf("------------------------------------ \n") ;
97
98}
99
100//____________________________________________________________________________
101void AliEMCALTrackSegment::SetPRERecPoint(AliEMCALRecPoint * pre)
102{
103 // gives an id from its position in the list
104 if( pre )
105 fPRERecPoint = pre->GetIndexInList() ;
106 else
107 fPRERecPoint = -1 ;
108}
109
110//____________________________________________________________________________
88cb7938 111void AliEMCALTrackSegment::SetHCARecPoint(AliEMCALRecPoint * hca)
5502f2ea 112{
113 // gives an id from its position in the list
88cb7938 114 if( hca )
115 fHCARecPoint = hca->GetIndexInList() ;
5502f2ea 116 else
88cb7938 117 fHCARecPoint = -1 ;
5502f2ea 118}