]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALTrackSegment.cxx
added a debug information
[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//____________________________________________________________________________
37AliEMCALTrackSegment::AliEMCALTrackSegment( AliEMCALTowerRecPoint * ec, AliEMCALTowerRecPoint * pre, AliEMCALTowerRecPoint * hc)
38{
39 // ctor
40
41 if( pre )
42 fPRERecPoint = pre->GetIndexInList() ;
43 else
44 fPRERecPoint = -1 ;
45
46 if( ec )
47 fECRecPoint = ec->GetIndexInList() ;
48 else
49 fECRecPoint = -1 ;
50
51 if( hc )
52 fHCRecPoint = hc->GetIndexInList() ;
53 else
54 fHCRecPoint = -1 ;
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 ;
75 ( (AliEMCALTrackSegment &)obj ).fECRecPoint = fECRecPoint ;
76 ( (AliEMCALTrackSegment &)obj ).fHCRecPoint = fHCRecPoint ;
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) ;
91 if (fECRecPoint)
92 printf("EC RecPoint # %d\n", fECRecPoint) ;
93 if (fHCRecPoint)
94 printf("HC RecPoint # %d\n", fHCRecPoint) ;
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//____________________________________________________________________________
111void AliEMCALTrackSegment::SetHCRecPoint(AliEMCALRecPoint * hc)
112{
113 // gives an id from its position in the list
114 if( hc )
115 fHCRecPoint = hc->GetIndexInList() ;
116 else
117 fHCRecPoint = -1 ;
118}