LCOV - code coverage report
Current view: top level - TOF/TOFsim - AliTOFhit.cxx (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 95 1.1 %
Date: 2016-06-14 17:26:59 Functions: 1 8 12.5 %

          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             : //_________________________________________________________________________
      17             : //  TOF hit  : member variables
      18             : //  fTrack   :
      19             : //  fX       : X coordinate of the hit in the Master Reference Frame (LAB Frame)
      20             : //  fY       : Y coordinate of the hit in the Master Reference Frame (LAB Frame)
      21             : //  fZ       : Z coordinate of the hit in the Master Reference Frame (LAB Frame)
      22             : //  fSector  : Number of the TOF Sector which belongs the hit 
      23             : //  fPlate   : Number of the TOF Plate or Module which belongs the hit 
      24             : //  fStrip   : Number of the TOF Strip which belongs the hit 
      25             : //  fPadx    : Number of the pad in the strip along the x-axis - in the strip reference frame
      26             : //             - where hit is produced 
      27             : //  fPadz    : Number of the pad in the strip along the z-axis - in the strip reference frame
      28             : //             - where hit is produced
      29             : //  fPx      : x-director cosine of the Charged Particle Momentum when hit is
      30             : //             produced - expressed in the Master Reference Frame (LAB Frame) -
      31             : //  fPy      : y-director cosine of the Charged Particle Momentum when hit is
      32             : //             produced - expressed in the Master Reference Frame (LAB Frame) -
      33             : //  fPz      : z-director cosine of the Charged Particle Momentum when hit is
      34             : //             produced - expressed in the Master Reference Frame (LAB Frame) -
      35             : //  fPmom    : Modulus of the Charged Particle Momentum when hit is produced
      36             : //  fTof     : Time of Flight i.e. the time between the charged particle is produced and this
      37             : //             particle produce the hit on the TOF sensible volume (pad)
      38             : //  fDx      : Distance of the hit from the pad edge along x-axis
      39             : //  fDy      : y coordinate of the hit in the pad refernce frame  
      40             : //  fDz      : Distance of the hit from the pad edge along z-axis
      41             : //  fIncA    : Incidence Angle between the Normal to the sensible volume where hit
      42             : //             is produced (pad) and the Momentum Direction of the Charged Particle which
      43             : //             produces the hit
      44             : //  fEdep    : Energy released by charged particle on the sensible TOF volume where hit is
      45             : //             produced
      46             : // For more detailed informations about the meaning of the TOF-hit member
      47             : // variable look at 
      48             : // http://www.bo.infn.it/alice/alice-doc/TOFWEB/variables-hits.html
      49             : //
      50             : //  Getters, setters and member functions  defined here
      51             : //
      52             : //*-- Authors: F. Pierella, A. Seganti, D. Vicinanza
      53             : 
      54             : 
      55             : 
      56             : #include "AliTOFhit.h"
      57             : 
      58          26 : ClassImp(AliTOFhit)
      59             : 
      60             : //____________________________________________________________________________
      61             :   AliTOFhit::AliTOFhit():
      62           0 :   AliHit(),
      63           0 :   fSector(-1),
      64           0 :   fPlate(-1),
      65           0 :   fStrip(-1),
      66           0 :   fPadx(-1),
      67           0 :   fPadz(-1),
      68           0 :   fPx(0),
      69           0 :   fPy(0),
      70           0 :   fPz(0),
      71           0 :   fPmom(0),
      72           0 :   fTof(0),
      73           0 :   fDx(0),
      74           0 :   fDy(0),
      75           0 :   fDz(0),
      76           0 :   fIncA(0),
      77           0 :   fEdep(0)
      78           0 : {
      79           0 : }
      80             : 
      81             : //____________________________________________________________________________
      82             : AliTOFhit::AliTOFhit(const AliTOFhit & hit):
      83           0 :   AliHit(hit),
      84           0 :   fSector(hit.fSector),
      85           0 :   fPlate(hit.fPlate),
      86           0 :   fStrip(hit.fStrip),
      87           0 :   fPadx(hit.fPadx),
      88           0 :   fPadz(hit.fPadz),
      89           0 :   fPx(hit.fPx),
      90           0 :   fPy(hit.fPy),
      91           0 :   fPz(hit.fPz),
      92           0 :   fPmom(hit.fPmom),
      93           0 :   fTof(hit.fTof),
      94           0 :   fDx(hit.fDx),
      95           0 :   fDy(hit.fDy),
      96           0 :   fDz(hit.fDz),
      97           0 :   fIncA(hit.fIncA),
      98           0 :   fEdep(hit.fEdep)
      99           0 : {
     100             :    //
     101             :    // copy ctor for AliTOFhit object
     102             :    //
     103           0 :   fTrack = hit.fTrack;
     104           0 : }
     105             :  
     106             : //______________________________________________________________________________
     107             : AliTOFhit& AliTOFhit::operator = (const AliTOFhit& hit) {
     108             : 
     109           0 :   if (this == &hit)
     110           0 :     return *this;
     111             : 
     112           0 :   TObject::operator=(hit);
     113           0 :   fSector=hit.fSector;
     114           0 :   fPlate=hit.fPlate;
     115           0 :   fStrip=hit.fStrip;
     116           0 :   fPadx=hit.fPadx;
     117           0 :   fPadz=hit.fPadz;
     118           0 :   fPx=hit.fPx;
     119           0 :   fPy=hit.fPy;
     120           0 :   fPz=hit.fPz;
     121           0 :   fPmom=hit.fPmom;
     122           0 :   fTof=hit.fTof;
     123           0 :   fDx=hit.fDx;
     124           0 :   fDy=hit.fDy;
     125           0 :   fDz=hit.fDz;
     126           0 :   fIncA=hit.fIncA;
     127           0 :   fEdep=hit.fEdep;
     128           0 :   fTrack = hit.fTrack;
     129           0 :   return *this;
     130             : 
     131           0 : }
     132             : 
     133             : //______________________________________________________________________________
     134             : AliTOFhit::AliTOFhit(Int_t shunt, Int_t track, Int_t * const vol,
     135             :                      Float_t * const hits) :
     136           0 :   AliHit(shunt, track),
     137           0 :   fSector(-1),
     138           0 :   fPlate(-1),
     139           0 :   fStrip(-1),
     140           0 :   fPadx(-1),
     141           0 :   fPadz(-1),
     142           0 :   fPx(0),
     143           0 :   fPy(0),
     144           0 :   fPz(0),
     145           0 :   fPmom(0),
     146           0 :   fTof(0),
     147           0 :   fDx(0),
     148           0 :   fDy(0),
     149           0 :   fDz(0),
     150           0 :   fIncA(0),
     151           0 :   fEdep(0)
     152           0 : {
     153             : //
     154             : // Constructor of hit object
     155             : //
     156             :   //
     157             :   // Hit Volume
     158             :   // 
     159           0 :   fSector= vol[0];
     160           0 :   fPlate = vol[1];
     161           0 :   fStrip = vol[2];
     162           0 :   fPadx = vol[3];
     163           0 :   fPadz = vol[4];
     164             :   //
     165             :   //Position of the hit
     166           0 :   fX = hits[0];
     167           0 :   fY = hits[1];
     168           0 :   fZ = hits[2];
     169             :   //
     170             :   // Momentum components of the particle in the ALICE frame when hit is produced
     171           0 :   fPx  = hits[3];
     172           0 :   fPy  = hits[4];
     173           0 :   fPz  = hits[5];
     174           0 :   fPmom= hits[6];
     175             :   //
     176             :   // Time Of Flight for the particle that produces hit
     177           0 :   fTof = hits[7];   //TOF[s]
     178             :   //
     179             :   // Other Data
     180           0 :   fDx  = hits[8];   //Distance from the edge along x axis
     181           0 :   fDy  = hits[9];   //Y cohordinate of the hit
     182           0 :   fDz  = hits[10];  //Distance from the edge along z axis
     183           0 :   fIncA= hits[11];  //Incidence angle
     184           0 :   fEdep= hits[12];  //Energy loss in TOF pad
     185           0 : }
     186             : 

Generated by: LCOV version 1.11