]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSClusterFinder.cxx
74bac6d19f0f15c6e259db5d057fea6cc61dfda4
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinder.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 #include "AliITSClusterFinder.h"
17 #include "AliRun.h"
18 #include "AliITS.h"
19
20 //----------------------------------------------------------
21
22 //----------------------------------------------------------
23
24 ClassImp(AliITSClusterFinder)
25
26 AliITSClusterFinder::AliITSClusterFinder
27 (AliITSsegmentation *seg, AliITSresponse *response, TClonesArray *digits)   
28 {
29   // cluster finder
30     fSegmentation=seg;
31     fResponse=response;
32     fMap = 0;
33     
34     fDigits=digits;
35     fNdigits = fDigits->GetEntriesFast();
36
37     fNRawClusters=0;
38
39     SetNperMax();
40     SetClusterSize();
41     SetDeclusterFlag();
42
43     fNPeaks=-1;
44 }
45
46 //----------------------------------------------------------
47 AliITSClusterFinder::AliITSClusterFinder()
48 {
49   // constructor
50     fResponse=0;
51     
52     fDigits=0;
53     fNdigits = 0;
54
55     fNRawClusters=0;
56     fMap = 0;
57
58
59     SetNperMax();
60     SetClusterSize();
61     SetDeclusterFlag();
62
63     fNPeaks=-1;
64 }
65  
66 //__________________________________________________________________________
67 AliITSClusterFinder::AliITSClusterFinder(const AliITSClusterFinder &source){
68   //     Copy Constructor 
69   if(&source == this) return;
70   this->fDigits = source.fDigits;
71   this->fNdigits = source.fNdigits;
72   this->fResponse = source.fResponse;
73   this->fSegmentation = source.fSegmentation;
74   this->fNRawClusters = source.fNRawClusters;
75   this->fMap = source.fMap;
76   this->fNperMax = source.fNperMax;
77   this->fDeclusterFlag = source.fDeclusterFlag;
78   this->fClusterSize = source.fClusterSize;
79   this->fNPeaks = source.fNPeaks;
80   return;
81 }
82
83 //_________________________________________________________________________
84 AliITSClusterFinder& 
85   AliITSClusterFinder::operator=(const AliITSClusterFinder &source) {
86   //    Assignment operator
87   if(&source == this) return *this;
88   this->fDigits = source.fDigits;
89   this->fNdigits = source.fNdigits;
90   this->fResponse = source.fResponse;
91   this->fSegmentation = source.fSegmentation;
92   this->fNRawClusters = source.fNRawClusters;
93   this->fMap = source.fMap;
94   this->fNperMax = source.fNperMax;
95   this->fDeclusterFlag = source.fDeclusterFlag;
96   this->fClusterSize = source.fClusterSize;
97   this->fNPeaks = source.fNPeaks;
98   return *this;
99 }
100
101 //----------------------------------------------------------
102 void AliITSClusterFinder::AddCluster(Int_t branch, AliITSRawCluster *c)
103 {
104   //
105   // Add a raw cluster copy to the list
106   //
107     AliITS *iTS=(AliITS*)gAlice->GetModule("ITS");
108     iTS->AddCluster(branch,c); 
109     fNRawClusters++;
110 }
111
112
113
114
115