ROOT logo
/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/
/*
Revision 0.02 2005/07/27 A. De Caro
         Implement new ctor AliTOFcluster(Double_t *, Int_t *)
	 for cluster construction from raw data

Revision 0.01 2005/07/25 A. De Caro
         Implement new class statring from
	 class definition inside AliTOFtracker class
	 (originally implemented by S. Arcelli and C. Zampolli)
*/

////////////////////////////////////////////////////////
//                                                    //
//    AliTOFcluster Class                             //
//    Description: class for TOF cluster definition   //
//                                                    //
////////////////////////////////////////////////////////

#include "AliTOFcluster.h"
//#include "AliLog.h"
//#include "AliGeomManager.h"
//#include "TGeoMatrix.h"

ClassImp(AliTOFcluster)

AliTOFcluster::AliTOFcluster():
  AliCluster3D(),
  fIdx(-1),
  fQuality(-100), 
  fR(0),
  fPhi(0),
  fTDC(0),
  fToT(0),
  fADC(0),
  fTdcND(0),
  fTdcRAW(0),
  fStatus(kTRUE),
  fDeltaBC(0),
  fL0L1Latency(0),
  fESDID(-1)
 {
  //
  // default ctor
  //

  Int_t ii;
  for (ii=0; ii<5; ii++) fdetIndex[ii] = -1;
}
//-------------------------------------------------------------------------

AliTOFcluster::AliTOFcluster(UShort_t volId, 
   Float_t x,   Float_t y,   Float_t z,
   Float_t sx2, Float_t sxy, Float_t sxz,
                Float_t sy2, Float_t syz,
                             Float_t sz2,
			     Int_t *lab, Int_t * const ind,
			     Int_t *par, Bool_t status, Int_t idx):
  AliCluster3D(volId,x,y,z,sx2,sxy,sxz,sy2,syz,sz2,lab),
  fIdx(idx),
  fQuality(-100), 
  fR(0),
  fPhi(0),
  fTDC(par[0]),
  fToT(par[1]),
  fADC(par[2]),
  fTdcND(par[3]),
  fTdcRAW(par[4]),
  fStatus(status),
  fDeltaBC(par[5]),
  fL0L1Latency(par[6]),
  fESDID(-1)
 {
  //
  // constructor
  //
   Int_t ii;
   for (ii=0; ii<5; ii++) fdetIndex[ii] = ind[ii];
   
   Float_t xyz[3];
   GetGlobalXYZ(xyz);
   fR   = TMath::Sqrt(xyz[0]*xyz[0] + xyz[1]*xyz[1]);   
   fPhi = TMath::ATan2(xyz[1], xyz[0]);

}
//-------------------------------------------------------------------------

AliTOFcluster::AliTOFcluster(const AliTOFcluster & cluster):
  AliCluster3D(cluster),
  fIdx(cluster.fIdx),
  fQuality(cluster.fQuality), 
  fR(cluster.fR),
  fPhi(cluster.fPhi),
  fTDC(cluster.fTDC),
  fToT(cluster.fToT),
  fADC(cluster.fADC),
  fTdcND(cluster.fTdcND),
  fTdcRAW(cluster.fTdcRAW),
  fStatus(cluster.fStatus),
  fDeltaBC(cluster.fDeltaBC),
  fL0L1Latency(cluster.fL0L1Latency),
  fESDID(-1)
 {
  //
  // copy ctor for AliTOFcluster object
  //

  Int_t ii;
  for (ii=0; ii<5; ii++) fdetIndex[ii] = cluster.fdetIndex[ii];
}
//-------------------------------------------------------------------------

AliTOFcluster & AliTOFcluster::operator = (const AliTOFcluster & cluster)
{

  if (this == &cluster)
    return *this;

  TObject::operator=(cluster);
  fIdx=cluster.fIdx;
  fQuality=cluster.fQuality;
  fR=cluster.fR;
  fPhi=cluster.fPhi;
  fTDC=cluster.fTDC;
  fToT=cluster.fToT;
  fADC=cluster.fADC;
  fTdcND=cluster.fTdcND;
  fTdcRAW=cluster.fTdcRAW;
  fStatus=cluster.fStatus;
  fDeltaBC=cluster.fDeltaBC;
  fL0L1Latency=cluster.fL0L1Latency;
  fESDID = -1;
  for (Int_t ii=0; ii<5; ii++)
    fdetIndex[ii] = cluster.fdetIndex[ii];
  return *this;

}
//-------------------------------------------------------------------------

AliTOFcluster::~AliTOFcluster() {

  //
  // dtor
  //

}


 AliTOFcluster.cxx:1
 AliTOFcluster.cxx:2
 AliTOFcluster.cxx:3
 AliTOFcluster.cxx:4
 AliTOFcluster.cxx:5
 AliTOFcluster.cxx:6
 AliTOFcluster.cxx:7
 AliTOFcluster.cxx:8
 AliTOFcluster.cxx:9
 AliTOFcluster.cxx:10
 AliTOFcluster.cxx:11
 AliTOFcluster.cxx:12
 AliTOFcluster.cxx:13
 AliTOFcluster.cxx:14
 AliTOFcluster.cxx:15
 AliTOFcluster.cxx:16
 AliTOFcluster.cxx:17
 AliTOFcluster.cxx:18
 AliTOFcluster.cxx:19
 AliTOFcluster.cxx:20
 AliTOFcluster.cxx:21
 AliTOFcluster.cxx:22
 AliTOFcluster.cxx:23
 AliTOFcluster.cxx:24
 AliTOFcluster.cxx:25
 AliTOFcluster.cxx:26
 AliTOFcluster.cxx:27
 AliTOFcluster.cxx:28
 AliTOFcluster.cxx:29
 AliTOFcluster.cxx:30
 AliTOFcluster.cxx:31
 AliTOFcluster.cxx:32
 AliTOFcluster.cxx:33
 AliTOFcluster.cxx:34
 AliTOFcluster.cxx:35
 AliTOFcluster.cxx:36
 AliTOFcluster.cxx:37
 AliTOFcluster.cxx:38
 AliTOFcluster.cxx:39
 AliTOFcluster.cxx:40
 AliTOFcluster.cxx:41
 AliTOFcluster.cxx:42
 AliTOFcluster.cxx:43
 AliTOFcluster.cxx:44
 AliTOFcluster.cxx:45
 AliTOFcluster.cxx:46
 AliTOFcluster.cxx:47
 AliTOFcluster.cxx:48
 AliTOFcluster.cxx:49
 AliTOFcluster.cxx:50
 AliTOFcluster.cxx:51
 AliTOFcluster.cxx:52
 AliTOFcluster.cxx:53
 AliTOFcluster.cxx:54
 AliTOFcluster.cxx:55
 AliTOFcluster.cxx:56
 AliTOFcluster.cxx:57
 AliTOFcluster.cxx:58
 AliTOFcluster.cxx:59
 AliTOFcluster.cxx:60
 AliTOFcluster.cxx:61
 AliTOFcluster.cxx:62
 AliTOFcluster.cxx:63
 AliTOFcluster.cxx:64
 AliTOFcluster.cxx:65
 AliTOFcluster.cxx:66
 AliTOFcluster.cxx:67
 AliTOFcluster.cxx:68
 AliTOFcluster.cxx:69
 AliTOFcluster.cxx:70
 AliTOFcluster.cxx:71
 AliTOFcluster.cxx:72
 AliTOFcluster.cxx:73
 AliTOFcluster.cxx:74
 AliTOFcluster.cxx:75
 AliTOFcluster.cxx:76
 AliTOFcluster.cxx:77
 AliTOFcluster.cxx:78
 AliTOFcluster.cxx:79
 AliTOFcluster.cxx:80
 AliTOFcluster.cxx:81
 AliTOFcluster.cxx:82
 AliTOFcluster.cxx:83
 AliTOFcluster.cxx:84
 AliTOFcluster.cxx:85
 AliTOFcluster.cxx:86
 AliTOFcluster.cxx:87
 AliTOFcluster.cxx:88
 AliTOFcluster.cxx:89
 AliTOFcluster.cxx:90
 AliTOFcluster.cxx:91
 AliTOFcluster.cxx:92
 AliTOFcluster.cxx:93
 AliTOFcluster.cxx:94
 AliTOFcluster.cxx:95
 AliTOFcluster.cxx:96
 AliTOFcluster.cxx:97
 AliTOFcluster.cxx:98
 AliTOFcluster.cxx:99
 AliTOFcluster.cxx:100
 AliTOFcluster.cxx:101
 AliTOFcluster.cxx:102
 AliTOFcluster.cxx:103
 AliTOFcluster.cxx:104
 AliTOFcluster.cxx:105
 AliTOFcluster.cxx:106
 AliTOFcluster.cxx:107
 AliTOFcluster.cxx:108
 AliTOFcluster.cxx:109
 AliTOFcluster.cxx:110
 AliTOFcluster.cxx:111
 AliTOFcluster.cxx:112
 AliTOFcluster.cxx:113
 AliTOFcluster.cxx:114
 AliTOFcluster.cxx:115
 AliTOFcluster.cxx:116
 AliTOFcluster.cxx:117
 AliTOFcluster.cxx:118
 AliTOFcluster.cxx:119
 AliTOFcluster.cxx:120
 AliTOFcluster.cxx:121
 AliTOFcluster.cxx:122
 AliTOFcluster.cxx:123
 AliTOFcluster.cxx:124
 AliTOFcluster.cxx:125
 AliTOFcluster.cxx:126
 AliTOFcluster.cxx:127
 AliTOFcluster.cxx:128
 AliTOFcluster.cxx:129
 AliTOFcluster.cxx:130
 AliTOFcluster.cxx:131
 AliTOFcluster.cxx:132
 AliTOFcluster.cxx:133
 AliTOFcluster.cxx:134
 AliTOFcluster.cxx:135
 AliTOFcluster.cxx:136
 AliTOFcluster.cxx:137
 AliTOFcluster.cxx:138
 AliTOFcluster.cxx:139
 AliTOFcluster.cxx:140
 AliTOFcluster.cxx:141
 AliTOFcluster.cxx:142
 AliTOFcluster.cxx:143
 AliTOFcluster.cxx:144
 AliTOFcluster.cxx:145
 AliTOFcluster.cxx:146
 AliTOFcluster.cxx:147
 AliTOFcluster.cxx:148
 AliTOFcluster.cxx:149
 AliTOFcluster.cxx:150
 AliTOFcluster.cxx:151
 AliTOFcluster.cxx:152
 AliTOFcluster.cxx:153
 AliTOFcluster.cxx:154
 AliTOFcluster.cxx:155
 AliTOFcluster.cxx:156
 AliTOFcluster.cxx:157
 AliTOFcluster.cxx:158
 AliTOFcluster.cxx:159
 AliTOFcluster.cxx:160
 AliTOFcluster.cxx:161