]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PHOS/AliPHOSTrackSegment.cxx
Bugfix in the LUTs. Actually due to a bug in the RCU firmware the FEC index is not...
[u/mrichter/AliRoot.git] / PHOS / AliPHOSTrackSegment.cxx
CommitLineData
d15a28e7 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 **************************************************************************/
b2a60966 15/* $Id$ */
702ab87e 16
17/* History of cvs commits:
18 *
19 * $Log$
20 */
21
d15a28e7 22//_________________________________________________________________________
b2a60966 23// Track segment in PHOS
24// Can be : 1 EmcRecPoint
fbf5cb06 25// 1 EmcRecPoint + 1 CPV
26// 1 EmcRecPoint + 1 CPV + 1 charged track
b2a60966 27//
28//*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
d15a28e7 29
30// --- ROOT system ---
31
d15a28e7 32
33// --- Standard library ---
34
d15a28e7 35// --- AliRoot header files ---
e957fea8 36#include "AliPHOSEmcRecPoint.h"
d15a28e7 37#include "AliPHOSTrackSegment.h"
fbf5cb06 38#include "AliESDtrack.h"
d15a28e7 39
40ClassImp(AliPHOSTrackSegment)
41
42//____________________________________________________________________________
88714635 43AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc ,
fbf5cb06 44 AliPHOSRecPoint * cpvrp1)
b2a60966 45{
46 // ctor
47
d15a28e7 48 if( emc )
83974468 49 fEmcRecPoint = emc->GetIndexInList() ;
50 else
51 fEmcRecPoint = -1 ;
d15a28e7 52
fbf5cb06 53 if( cpvrp1 )
54 fCpvRecPoint = cpvrp1->GetIndexInList() ;
83974468 55 else
fbf5cb06 56 fCpvRecPoint = -1 ;
d15a28e7 57
fbf5cb06 58 fTrack = -1 ;
59
60 fIndexInList = -1 ;
61}
62
63//____________________________________________________________________________
64AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc ,
65 AliPHOSRecPoint * cpvrp1,
66 Int_t track)
67{
68 // ctor
69
70 if( emc )
71 fEmcRecPoint = emc->GetIndexInList() ;
72 else
73 fEmcRecPoint = -1 ;
74
75 if( cpvrp1 )
76 fCpvRecPoint = cpvrp1->GetIndexInList() ;
77 else
78 fCpvRecPoint = -1 ;
79
80 fTrack = track ;
d15a28e7 81
83974468 82 fIndexInList = -1 ;
d15a28e7 83}
84
6ad0bfa0 85//____________________________________________________________________________
86AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts)
a8c47ab6 87 : TObject(ts)
6ad0bfa0 88{
b2a60966 89 // Copy ctor
90
c198e326 91 ( (AliPHOSTrackSegment &)ts ).Copy(*this) ;
6ad0bfa0 92}
93
d15a28e7 94
6ad0bfa0 95//____________________________________________________________________________
702ab87e 96void AliPHOSTrackSegment::Copy(TObject & obj) const
6ad0bfa0 97{
b2a60966 98 // Copy of a track segment into another track segment
99
6ad0bfa0 100 TObject::Copy(obj) ;
83974468 101 ( (AliPHOSTrackSegment &)obj ).fEmcRecPoint = fEmcRecPoint ;
fbf5cb06 102 ( (AliPHOSTrackSegment &)obj ).fCpvRecPoint = fCpvRecPoint ;
83974468 103 ( (AliPHOSTrackSegment &)obj ).fIndexInList = fIndexInList ;
fbf5cb06 104 ( (AliPHOSTrackSegment &)obj ).fTrack = fTrack ;
105}
106
d15a28e7 107
108//____________________________________________________________________________
702ab87e 109void AliPHOSTrackSegment::Print(const Option_t *) const
d15a28e7 110{
b2a60966 111 // Print all information on this track Segment
112
d15a28e7 113
fbf5cb06 114 Info("Print", "");
115 printf("Stored at position %d\n", fIndexInList) ;
116 printf(" Emc RecPoint # %d\n", fEmcRecPoint) ;
117 if(fCpvRecPoint >= 0)
118 printf(" CPV RecPoint # %d\n", fCpvRecPoint) ;
2731cd1e 119 else
fbf5cb06 120 printf(" No CPV RecPoint\n");
121 if (fTrack >= 0)
122 printf(" Charged track # %d\n", fTrack) ;
123 else
124 printf(" No Charged track\n");
d15a28e7 125}
fbf5cb06 126
28c3a259 127//____________________________________________________________________________
fbf5cb06 128void AliPHOSTrackSegment::SetCpvRecPoint(AliPHOSRecPoint * cpvRecPoint)
28c3a259 129{
2f04ed65 130 // gives an id from its position in the list
fbf5cb06 131 if( cpvRecPoint )
132 fCpvRecPoint = cpvRecPoint->GetIndexInList() ;
28c3a259 133 else
fbf5cb06 134 fCpvRecPoint = -1 ;
28c3a259 135}
d15a28e7 136