LCOV - code coverage report
Current view: top level - TOF/TOFrec - AliTOFcluster.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 41 78 52.6 %
Date: 2016-06-14 17:26:59 Functions: 8 11 72.7 %

          Line data    Source code
       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             : Revision 0.02 2005/07/27 A. De Caro
      17             :          Implement new ctor AliTOFcluster(Double_t *, Int_t *)
      18             :          for cluster construction from raw data
      19             : 
      20             : Revision 0.01 2005/07/25 A. De Caro
      21             :          Implement new class statring from
      22             :          class definition inside AliTOFtracker class
      23             :          (originally implemented by S. Arcelli and C. Zampolli)
      24             : */
      25             : 
      26             : ////////////////////////////////////////////////////////
      27             : //                                                    //
      28             : //    AliTOFcluster Class                             //
      29             : //    Description: class for TOF cluster definition   //
      30             : //                                                    //
      31             : ////////////////////////////////////////////////////////
      32             : 
      33             : #include "AliTOFcluster.h"
      34             : //#include "AliLog.h"
      35             : //#include "AliGeomManager.h"
      36             : //#include "TGeoMatrix.h"
      37             : 
      38          26 : ClassImp(AliTOFcluster)
      39             : 
      40             : AliTOFcluster::AliTOFcluster():
      41          66 :   AliCluster3D(),
      42          66 :   fIdx(-1),
      43          66 :   fQuality(-100), 
      44          66 :   fR(0),
      45          66 :   fPhi(0),
      46          66 :   fTDC(0),
      47          66 :   fToT(0),
      48          66 :   fADC(0),
      49          66 :   fTdcND(0),
      50          66 :   fTdcRAW(0),
      51          66 :   fStatus(kTRUE),
      52          66 :   fDeltaBC(0),
      53          66 :   fL0L1Latency(0),
      54          66 :   fESDID(-1)
      55         330 :  {
      56             :   //
      57             :   // default ctor
      58             :   //
      59             : 
      60             :   Int_t ii;
      61         792 :   for (ii=0; ii<5; ii++) fdetIndex[ii] = -1;
      62         132 : }
      63             : //-------------------------------------------------------------------------
      64             : 
      65             : AliTOFcluster::AliTOFcluster(UShort_t volId, 
      66             :    Float_t x,   Float_t y,   Float_t z,
      67             :    Float_t sx2, Float_t sxy, Float_t sxz,
      68             :                 Float_t sy2, Float_t syz,
      69             :                              Float_t sz2,
      70             :                              Int_t *lab, Int_t * const ind,
      71             :                              Int_t *par, Bool_t status, Int_t idx):
      72         400 :   AliCluster3D(volId,x,y,z,sx2,sxy,sxz,sy2,syz,sz2,lab),
      73         400 :   fIdx(idx),
      74         400 :   fQuality(-100), 
      75         400 :   fR(0),
      76         400 :   fPhi(0),
      77         400 :   fTDC(par[0]),
      78         400 :   fToT(par[1]),
      79         400 :   fADC(par[2]),
      80         400 :   fTdcND(par[3]),
      81         400 :   fTdcRAW(par[4]),
      82         400 :   fStatus(status),
      83         400 :   fDeltaBC(par[5]),
      84         400 :   fL0L1Latency(par[6]),
      85         400 :   fESDID(-1)
      86        1200 :  {
      87             :   //
      88             :   // constructor
      89             :   //
      90             :    Int_t ii;
      91        4800 :    for (ii=0; ii<5; ii++) fdetIndex[ii] = ind[ii];
      92             :    
      93         400 :    Float_t xyz[3];
      94         400 :    GetGlobalXYZ(xyz);
      95         400 :    fR   = TMath::Sqrt(xyz[0]*xyz[0] + xyz[1]*xyz[1]);   
      96         800 :    fPhi = TMath::ATan2(xyz[1], xyz[0]);
      97             : 
      98         800 : }
      99             : //-------------------------------------------------------------------------
     100             : 
     101             : AliTOFcluster::AliTOFcluster(const AliTOFcluster & cluster):
     102           0 :   AliCluster3D(cluster),
     103           0 :   fIdx(cluster.fIdx),
     104           0 :   fQuality(cluster.fQuality), 
     105           0 :   fR(cluster.fR),
     106           0 :   fPhi(cluster.fPhi),
     107           0 :   fTDC(cluster.fTDC),
     108           0 :   fToT(cluster.fToT),
     109           0 :   fADC(cluster.fADC),
     110           0 :   fTdcND(cluster.fTdcND),
     111           0 :   fTdcRAW(cluster.fTdcRAW),
     112           0 :   fStatus(cluster.fStatus),
     113           0 :   fDeltaBC(cluster.fDeltaBC),
     114           0 :   fL0L1Latency(cluster.fL0L1Latency),
     115           0 :   fESDID(-1)
     116           0 :  {
     117             :   //
     118             :   // copy ctor for AliTOFcluster object
     119             :   //
     120             : 
     121             :   Int_t ii;
     122           0 :   for (ii=0; ii<5; ii++) fdetIndex[ii] = cluster.fdetIndex[ii];
     123           0 : }
     124             : //-------------------------------------------------------------------------
     125             : 
     126             : AliTOFcluster & AliTOFcluster::operator = (const AliTOFcluster & cluster)
     127             : {
     128             : 
     129           0 :   if (this == &cluster)
     130           0 :     return *this;
     131             : 
     132           0 :   TObject::operator=(cluster);
     133           0 :   fIdx=cluster.fIdx;
     134           0 :   fQuality=cluster.fQuality;
     135           0 :   fR=cluster.fR;
     136           0 :   fPhi=cluster.fPhi;
     137           0 :   fTDC=cluster.fTDC;
     138           0 :   fToT=cluster.fToT;
     139           0 :   fADC=cluster.fADC;
     140           0 :   fTdcND=cluster.fTdcND;
     141           0 :   fTdcRAW=cluster.fTdcRAW;
     142           0 :   fStatus=cluster.fStatus;
     143           0 :   fDeltaBC=cluster.fDeltaBC;
     144           0 :   fL0L1Latency=cluster.fL0L1Latency;
     145           0 :   fESDID = -1;
     146           0 :   for (Int_t ii=0; ii<5; ii++)
     147           0 :     fdetIndex[ii] = cluster.fdetIndex[ii];
     148           0 :   return *this;
     149             : 
     150           0 : }
     151             : //-------------------------------------------------------------------------
     152             : 
     153        1320 : AliTOFcluster::~AliTOFcluster() {
     154             : 
     155             :   //
     156             :   // dtor
     157             :   //
     158             : 
     159        1320 : }
     160             : 
     161             : 

Generated by: LCOV version 1.11