]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/UPGRADE/AliITSlayerUpgrade.cxx
fix for coding conventions
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSlayerUpgrade.cxx
CommitLineData
1d9af2d5 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/* $Id$ */
17
18#include <Riostream.h>
19#include <TMath.h>
20#include <AliITSlayerUpgrade.h>
21#include <AliITStrackerMI.h>
22
23AliITSlayerUpgrade::AliITSlayerUpgrade():
24 fPhiOffset(0.),
25 fZOffset(0.),
26 fNsel(0),
27 fN(0)
28{ //--------------------------------------------------------------------
29 //default AliITSlayerUpgrade constructor
30 //--------------------------------------------------------------------
31}
32//___________________________________________________________________________
33AliITSlayerUpgrade::AliITSlayerUpgrade(Double_t p,Double_t z):
34 fPhiOffset(p),
35 fZOffset(z),
36 fNsel(0),
37 fN(0)
38{
39 //--------------------------------------------------------------------
40 //main AliITSlayerUpgrade constructor
41 //--------------------------------------------------------------------
42
43 for (Int_t i=0; i<AliITSRecoParam::fgkMaxClusterPerLayer; i++) fClusters[i]=0;
44
45}
46
47AliITSlayerUpgrade::~AliITSlayerUpgrade() {
48 //--------------------------------------------------------------------
49 // AliITSlayerUpgrade destructor
50 //--------------------------------------------------------------------
1d9af2d5 51ResetClusters();
52
53}
54void AliITSlayerUpgrade::ResetClusters() {
55 //--------------------------------------------------------------------
56 // This function removes loaded clusters
57 //--------------------------------------------------------------------
1d9af2d5 58
59for (Int_t i=0; i<fN; i++) delete fClusters[i];
60 fN=0;
1d9af2d5 61return;
62}
63
64
65Int_t AliITSlayerUpgrade::InsertCluster(AliITSRecPoint *c) {
66//--------------------------------------------------------------------
67 // This function inserts a cluster to this layer in increasing
68 // order of the cluster's fZ
69 //--------------------------------------------------------------------
70fClusters[fN]=c;
71 fN++;
72 return 0;
73}
74
75//-----------------------------------------------------------------------
76const AliITSRecPoint *AliITSlayerUpgrade::GetNextCluster(Int_t &ci){
77 //--------------------------------------------------------------------
78 // This function returns clusters within the "window"
79 //--------------------------------------------------------------------
80 AliITSRecPoint *c=0;
81 ci=-1;
82 if (fNsel) {
83 fNsel--;
84 ci=fIndex[fNsel];
85 c=fClusters[ci];
86 }
87 return c;
88}
89//_____________________________________________________________________
90 Int_t AliITSlayerUpgrade::GetNumberOfClusters() const {
91 Int_t n=0;
92 n=fN;
93return n;
94}
95