LCOV - code coverage report
Current view: top level - T0/T0base - AliT0RecPoint.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 31 57 54.4 %
Date: 2016-06-14 17:26:59 Functions: 5 7 71.4 %

          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             : /* $Id$ */
      17             : /////////////////////////////////////////////////////////////////////////
      18             : //  Class AliT0RecPoint for T0 time and ADC signals
      19             : //  fTimeA  - A side TOF signal
      20             : //  fTimeC  - C side TOF signal
      21             : //  fTimeBestA - TOF first particle on the A side
      22             : //  TimeBestC - TOF first particle on the C side
      23             : //  fTimeAverage = (fTimeBestA + TimeBestLeft ) /2. T0 signal
      24             : //  fVertex - vertex position 
      25             : //
      26             : ///////////////////////////////////////////////////////////////////////
      27             : 
      28             : 
      29             : 
      30             :  
      31             : #include "AliT0RecPoint.h"
      32             : #include "AliLog.h"
      33             : 
      34             : 
      35          20 : ClassImp(AliT0RecPoint)
      36             : 
      37             : //------------------------------------
      38          37 :   AliT0RecPoint::AliT0RecPoint() : TObject(),
      39          37 :                                    fTimeAverage(99999),
      40          37 :                                    fTimeOnlineMean(99999),
      41          37 :                                    fVertexPosition(999999),
      42          37 :                                    fTimeBestA(99999),
      43          37 :                                    fTimeBestC(99999),
      44          37 :                                    fMultC(0),fMultA(0),
      45          37 :                                    fT0clock(9999999),
      46          37 :                                    fT0trig(0),
      47          37 :                                    fPileup(kFALSE),
      48          37 :                                    fSattelite(kFALSE),
      49          37 :                                    fTime1stA(99999),
      50          37 :                                    fTime1stC(99999)
      51             : 
      52             :     
      53             : 
      54         185 : {
      55             :   //ctor
      56        1850 :   for (Int_t i=0; i<24; i++) { 
      57         888 :     fTime[i]=0; fADC[i]=0; fADCLED[i]=0;
      58       10656 :     for(Int_t iHit=0; iHit<5; iHit++) {
      59        4440 :       fTimeFull[i][iHit] = 0;   
      60        4440 :       fOrA[iHit] = 0; 
      61        4440 :       fOrC[iHit] = 0;  
      62        4440 :       fTVDC[iHit] = 0; 
      63             :     }
      64             :   }
      65         370 :   for (Int_t i=0; i<4; i++) ftimeFIT[i]=0; 
      66          74 : }
      67             : //_____________________________________________________________________________
      68             : 
      69           0 : AliT0RecPoint::AliT0RecPoint(const AliT0RecPoint &r):TObject(),
      70           0 :                                                      fTimeAverage(r.fTimeAverage),
      71           0 :                                                      fTimeOnlineMean(r.fTimeOnlineMean),
      72           0 :                                                      fVertexPosition(r.fVertexPosition),
      73           0 :                                                      fTimeBestA(r.fTimeBestA),
      74           0 :                                                      fTimeBestC(r.fTimeBestC),
      75           0 :                                                      fMultC(r.fMultC),
      76           0 :                                                      fMultA(r.fMultA),
      77           0 :                                                      fT0clock(r.fT0clock),
      78           0 :                                                      fT0trig(r.fT0trig),
      79           0 :                                                      fPileup(r.fPileup),
      80           0 :                                                      fSattelite(r.fSattelite),
      81           0 :                                                      fTime1stA(r.fTime1stA),
      82           0 :                                                      fTime1stC(r.fTime1stC)
      83             : 
      84           0 : {
      85             :   //
      86             :   // AliT0RecPoint copy constructor
      87             :   //
      88           0 :   for (Int_t i=0; i<24; i++) {
      89           0 :     fTime[i] = r. fTime[i];
      90           0 :     fADC[i] = r.fADC[i]; 
      91           0 :     fADCLED[i] = r. fADCLED[i];
      92           0 :     for(Int_t iHit=0; iHit<5; iHit++) {
      93           0 :       fTimeFull[i][iHit] = r.fTimeFull[i][iHit];   
      94           0 :       fOrA[iHit] = r.fOrA[iHit]; 
      95           0 :       fOrC[iHit] = r.fOrC[iHit];  
      96           0 :       fTVDC[iHit] = r.fTVDC[iHit]; 
      97             :     }
      98             :   }
      99           0 :   for (Int_t i=0; i<4; i++) r.ftimeFIT[i]; 
     100             :   //  ((AliT0RecPoint &) r).Copy(*this);
     101             : 
     102           0 : }
     103             : //_____________________________________________________________________________
     104             : 
     105             : /*
     106             : //_____________________________________________________________________________
     107             : 
     108             : AliT0RecPoint& AliT0RecPoint:: operator=(const AliT0RecPoint &r)
     109             : {
     110             :   //
     111             :   // assign. operator
     112             :   //
     113             : 
     114             :   if (this == &r)
     115             :     return *this;
     116             :   
     117             :   fTimeAverage = r.fTimeAverage;
     118             :   fTimeOnlineMean = r.fTimeOnlineMean;
     119             :   fVertexPosition = r.fVertexPosition;
     120             :   fTimeBestA =  r.fTimeBestA;
     121             :   fTimeBestC = r.fTimeBestC;
     122             :   fMultC = r.fMultC;
     123             :   fMultA = r.fMultA;
     124             :   fT0clock = r.fT0clock;
     125             :   fT0trig = r.fT0trig;
     126             :   fPileup = r.fPileup;
     127             :   fSattelite = r.fSattelite;
     128             :   fTime1stA = r.fTime1stA;
     129             :   fTime1stC = r.fTime1stC;
     130             :   for (Int_t i=0; i<24; i++) {
     131             :     fTime[i] = r. fTime[i];
     132             :     fADC[i] = r.fADC[i]; 
     133             :     fADCLED[i] = r. fADCLED[i];
     134             :     for(Int_t iHit=0; iHit<5; iHit++) {
     135             :       fTimeFull[i][iHit] = r.fTimeFull[i][iHit];   
     136             :       fOrA[iHit] = r.fOrA[iHit]; 
     137             :       fOrC[iHit] = r.fOrC[iHit];  
     138             :       fTVDC[iHit] = r.fTVDC[iHit]; 
     139             :     }
     140             :   }
     141             :   
     142             :   return *this;
     143             : }
     144             : */
     145             : //_____________________________________________________________________________
     146             : void AliT0RecPoint::SetT0Trig(Bool_t *tr)
     147             : {
     148          16 :   fT0trig=0;
     149          96 :   for (Int_t i=0; i<5; i++) fT0trig = fT0trig | (tr[i]?(1<<i):0);
     150           8 : }
     151             : //_____________________________________________________________________________
     152             : 
     153             : void AliT0RecPoint::PrintTriggerSignals(Int_t trig)
     154             : {
     155          32 :   Bool_t tr[5];
     156         192 :   for (Int_t i=0; i<5; i++) tr[i] = (trig&(1<<i))!=0;
     157             : 
     158          16 :   AliInfo(Form("T0 triggers tvdc %d orA %d orC %d centr %d semicentral %d",tr[0],tr[1],tr[2],tr[3],tr[4]));
     159          16 : }

Generated by: LCOV version 1.11