]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/v0/AliITSRecPointU.cxx
Code reordering : old MC ITS Upgrade code has been moved into the version 0 folder.
[u/mrichter/AliRoot.git] / ITS / UPGRADE / v0 / AliITSRecPointU.cxx
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
16
17 /////////////////////////////////////////////////////////////////////////////////
18 // This class sets the local coordinates via a specific setter. Needed because //
19 // the AliGeomManager class can not be used for the upgrade code at this stage //
20 /////////////////////////////////////////////////////////////////////////////////
21
22 #include <AliITSRecPointU.h>
23 ClassImp(AliITSRecPointU)
24 //_____________________________________________________________
25 AliITSRecPointU::AliITSRecPointU():
26     AliITSRecPoint(),
27     fModule(0),
28     fNTracksIdMC(0)
29 {
30  //
31  // Default constructor
32  // 
33  for(Int_t i=0; i<kMaxLab ; i++) {
34     fTrackIdMC[i]=-3;
35  }
36 }
37 //_____________________________________________________________
38 AliITSRecPointU::AliITSRecPointU(const AliITSRecPointU& pt):
39     AliITSRecPoint(pt),
40     fModule(pt.fModule),
41     fNTracksIdMC(pt.fNTracksIdMC)
42 {
43   //
44   // Copy constructor
45   //
46   for(Int_t i=0; i<kMaxLab ; i++) {
47     fTrackIdMC[i]=pt.fTrackIdMC[i];
48   }
49 }
50 //______________________________________________________________________
51 AliITSRecPointU& AliITSRecPointU::operator=(const AliITSRecPointU& source)
52 {
53   //
54   // Assignment operator (as in AliITSRecPoint)
55   //
56
57   this->~AliITSRecPointU();
58   new(this) AliITSRecPointU(source);
59   return *this;
60
61 }
62
63 //______________________________________________________________________________
64 void AliITSRecPointU::AddTrackID(Int_t tid) { 
65   // 
66   // Add an MC label (track ID) to the "expanded list"
67   //
68   if (fNTracksIdMC==kMaxLab) {
69     AliWarning("Max. numbers of labels reached!"); 
70   } else {
71     fTrackIdMC[fNTracksIdMC]=tid; 
72     fNTracksIdMC++;
73   } 
74 }
75
76 //______________________________________________________________________________
77 void AliITSRecPointU::Print(Option_t* /*option*/) const
78 {
79   // Print cluster information.
80   
81   printf("AliITSRecPointU pos=(%.4f, %.4f, %.4f), s_y2=%f, s_z2=%f, s_yz=%f, vol=%hu\n",
82          GetX(), GetY(), GetZ(), GetSigmaY2(), GetSigmaZ2(), GetSigmaYZ(), GetVolumeId());
83   printf("      MC Track Ids =(");
84   if (kMaxLab<=fNTracksIdMC) {
85     for (Int_t i=0; i<kMaxLab; i++) { printf("%d,",fTrackIdMC[i]); }
86   } else {
87     for (Int_t i=0; i<fNTracksIdMC; i++) { printf("%d,",fTrackIdMC[i]); }
88   }  
89   printf(")\n");
90   Float_t g[3];
91   if (GetGlobalXYZ(g))
92     printf("    global_pos=(%.4f, %.4f, %.4f)\n", g[0], g[1], g[2]);
93   
94 }
95
96