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