1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 /// \class AliTPCclusterInfo
17 /// \brief Implementation of the TPC cluster debug information
19 /// Additional cluster information to monitor clustering performance
20 /// and to extract a features of detector response
21 /// Information attached to the default cluster
22 /// ONLY in DEBUG MODE
24 /// \author Marian Ivanov Marian.Ivanov@cern.ch
26 #include "AliTPCclusterInfo.h"
30 ClassImp(AliTPCclusterInfo)
34 AliTPCclusterInfo::AliTPCclusterInfo():
41 // default constructor
43 for (Int_t i=0; i<25;i++){
48 AliTPCclusterInfo::AliTPCclusterInfo(const AliTPCclusterInfo & info):
51 fNTimeBins(info.fNTimeBins),
57 // AliInfo("Copy constructor\n");
58 for (Int_t i=0; i<25;i++){
59 fMatrix[i] = info.fMatrix[i];
62 fGraph = new Float_t[fNBins];
63 for (Int_t i=0;i<fNBins; i++){
64 fGraph[i] = info.fGraph[i];
70 AliTPCclusterInfo::AliTPCclusterInfo(Bool_t extend):
76 /// allocate dummy graph - neccessary for IO part to use automatic branching
78 for (Int_t i=0; i<25;i++){
83 fGraph = new Float_t[1];
88 AliTPCclusterInfo::AliTPCclusterInfo(Float_t *matrix, Int_t nbins, Float_t* graph):
94 /// constructor of the info
96 for (Int_t i=0;i<25;i++){
101 Int_t center = 5+5+2;
102 for (Int_t i=-2; i<=2;i++) if (matrix[center+i]>0) fNTimeBins++;
103 for (Int_t i=-2; i<=2;i++) if (matrix[center+i*5]>0) fNPads++;
107 fGraph = new Float_t[fNBins];
108 for (Int_t i=0;i<fNBins; i++){
109 fGraph[i] = graph[i];
114 AliTPCclusterInfo& AliTPCclusterInfo::operator=(const AliTPCclusterInfo& info){
115 /// assignment operator
117 if (this == &info) return (*this);
118 for (Int_t i=0; i<25;i++){
119 fMatrix[i] = info.fMatrix[i];
122 if (fGraph) delete []fGraph;
123 fGraph = new Float_t[fNBins];
124 for (Int_t i=0;i<fNBins; i++){
125 fGraph[i] = info.fGraph[i];
132 UChar_t AliTPCclusterInfo::GetNPads(Float_t threshold) const {
136 Int_t center = 5+5+2;
137 for (Int_t i=-2; i<=2;i++) if (fMatrix[center+i*5]>threshold) nPads++;
141 UChar_t AliTPCclusterInfo::GetNTimeBins(Float_t threshold) const {
145 Int_t center = 5+5+2;
146 for (Int_t i=-2; i<=2;i++) if (fMatrix[center+i]>threshold) nTimeBins++;
153 AliTPCclusterInfo::~AliTPCclusterInfo(){
156 if (fGraph) delete [] fGraph;