ROOT logo
//*-- Author : Manuel Sanchez, Santiago
//*-- Modified : 22/11/2000 by Romain Holzmann
//*-- Copyright : GSI, Darmstadt
//
//***************************************************************************
//
//  HGeantTof
// 
//  GEANT TOF hit data
//
//  This class stores the GEANT hits in the TOF and TOFINO detector,
//  per sector,  module and cell, with the TOFINO paddles being handled
//  as modules 22-25 and cell=0.
//
//****************************************************************************
//
// Inline functions:
//
//  inline void setAddress(Char_t s, Char_t m, Char_t c)
//                                        set sector, module, and cell numbers
//  inline void setTrack(Int_t track)     set GEANT track number
//  inline Int_t getTrack()               return GEANT track number
//  inline Char_t getSector(void)         return sector number
//  inline Char_t getModule(void)         return module number
//  inline Char_t getCell(void)           return cell number
//
#include "hgeanttof.h"

#include "TBuffer.h"

ClassImp(HGeantTof)

HGeantTof::HGeantTof(void) {
  // Default constructor.
  trackNumber = 0;
  trackLength = 0.0;
  eHit = 0.0;
  xHit = 0.0;
  yHit = 0.0;
  tofHit = 0.0;
  momHit = 0.0;
  sector = -1;
  module = -1;
  cell = -1;
}
/*
HGeantTof::HGeantTof(HGeantTof &aTof) {
  // Copy constructor.
  trackNumber = aTof.trackNumber;
  trackLength = aTof.trackLength;
  eHit = aTof.eHit;
  xHit = aTof.xHit;
  yHit = aTof.yHit;
  tofHit = aTof.tofHit;
  momHit = aTof.momHit;
  sector = aTof.sector;
  module = aTof.module;
  cell = aTof.cell;
}
*/
HGeantTof::~HGeantTof(void) {
  // Destructor.
}

void HGeantTof::setHit(Float_t ae, Float_t ax, Float_t ay, Float_t atof,
                       Float_t amom, Float_t alen) {
  // Set hit data (energy loss, y,x in module system, time of flight, momentum and track length).
  eHit = ae;
  xHit = ax;
  yHit = ay;
  tofHit = atof;
  momHit = amom;
  trackLength = alen;
}

void HGeantTof::getHit(Float_t& ae, Float_t& ax,  Float_t& ay, Float_t& atof,
                       Float_t& amom, Float_t& alen) {
  // Retrieve hit data (energy loss, y,x in module system, time of flight, momentum and track length).
  ae = eHit;
  ax = xHit;
  ay = yHit;
  atof = tofHit;
  amom = momHit;
  alen = trackLength;
}

void HGeantTof::Streamer(TBuffer &R__b) {

   // Stream an object of class HGeantTof.

   if (R__b.IsReading()) {
      Version_t R__v = R__b.ReadVersion();
      HLinkedDataObject::Streamer(R__b);
      R__b >> trackNumber;
      if ( R__v <= 2 )  trackLength = 0.;
      else              R__b >> trackLength;
      R__b >> eHit;
      R__b >> xHit;
      R__b >> yHit;
      R__b >> tofHit;
      if ( R__v <= 2 )  momHit = 0.;
      else              R__b >> momHit;
      R__b >> sector;
      R__b >> module;
      R__b >> cell;
   } else {
      R__b.WriteVersion(HGeantTof::IsA());
      HLinkedDataObject::Streamer(R__b);
      R__b << trackNumber;
      R__b << trackLength;
      R__b << eHit;
      R__b << xHit;
      R__b << yHit;
      R__b << tofHit;
      R__b << momHit;
      R__b << sector;
      R__b << module;
      R__b << cell;
   }
} 






 hgeanttof.cc:1
 hgeanttof.cc:2
 hgeanttof.cc:3
 hgeanttof.cc:4
 hgeanttof.cc:5
 hgeanttof.cc:6
 hgeanttof.cc:7
 hgeanttof.cc:8
 hgeanttof.cc:9
 hgeanttof.cc:10
 hgeanttof.cc:11
 hgeanttof.cc:12
 hgeanttof.cc:13
 hgeanttof.cc:14
 hgeanttof.cc:15
 hgeanttof.cc:16
 hgeanttof.cc:17
 hgeanttof.cc:18
 hgeanttof.cc:19
 hgeanttof.cc:20
 hgeanttof.cc:21
 hgeanttof.cc:22
 hgeanttof.cc:23
 hgeanttof.cc:24
 hgeanttof.cc:25
 hgeanttof.cc:26
 hgeanttof.cc:27
 hgeanttof.cc:28
 hgeanttof.cc:29
 hgeanttof.cc:30
 hgeanttof.cc:31
 hgeanttof.cc:32
 hgeanttof.cc:33
 hgeanttof.cc:34
 hgeanttof.cc:35
 hgeanttof.cc:36
 hgeanttof.cc:37
 hgeanttof.cc:38
 hgeanttof.cc:39
 hgeanttof.cc:40
 hgeanttof.cc:41
 hgeanttof.cc:42
 hgeanttof.cc:43
 hgeanttof.cc:44
 hgeanttof.cc:45
 hgeanttof.cc:46
 hgeanttof.cc:47
 hgeanttof.cc:48
 hgeanttof.cc:49
 hgeanttof.cc:50
 hgeanttof.cc:51
 hgeanttof.cc:52
 hgeanttof.cc:53
 hgeanttof.cc:54
 hgeanttof.cc:55
 hgeanttof.cc:56
 hgeanttof.cc:57
 hgeanttof.cc:58
 hgeanttof.cc:59
 hgeanttof.cc:60
 hgeanttof.cc:61
 hgeanttof.cc:62
 hgeanttof.cc:63
 hgeanttof.cc:64
 hgeanttof.cc:65
 hgeanttof.cc:66
 hgeanttof.cc:67
 hgeanttof.cc:68
 hgeanttof.cc:69
 hgeanttof.cc:70
 hgeanttof.cc:71
 hgeanttof.cc:72
 hgeanttof.cc:73
 hgeanttof.cc:74
 hgeanttof.cc:75
 hgeanttof.cc:76
 hgeanttof.cc:77
 hgeanttof.cc:78
 hgeanttof.cc:79
 hgeanttof.cc:80
 hgeanttof.cc:81
 hgeanttof.cc:82
 hgeanttof.cc:83
 hgeanttof.cc:84
 hgeanttof.cc:85
 hgeanttof.cc:86
 hgeanttof.cc:87
 hgeanttof.cc:88
 hgeanttof.cc:89
 hgeanttof.cc:90
 hgeanttof.cc:91
 hgeanttof.cc:92
 hgeanttof.cc:93
 hgeanttof.cc:94
 hgeanttof.cc:95
 hgeanttof.cc:96
 hgeanttof.cc:97
 hgeanttof.cc:98
 hgeanttof.cc:99
 hgeanttof.cc:100
 hgeanttof.cc:101
 hgeanttof.cc:102
 hgeanttof.cc:103
 hgeanttof.cc:104
 hgeanttof.cc:105
 hgeanttof.cc:106
 hgeanttof.cc:107
 hgeanttof.cc:108
 hgeanttof.cc:109
 hgeanttof.cc:110
 hgeanttof.cc:111
 hgeanttof.cc:112
 hgeanttof.cc:113
 hgeanttof.cc:114
 hgeanttof.cc:115
 hgeanttof.cc:116
 hgeanttof.cc:117
 hgeanttof.cc:118
 hgeanttof.cc:119
 hgeanttof.cc:120
 hgeanttof.cc:121
 hgeanttof.cc:122
 hgeanttof.cc:123
 hgeanttof.cc:124
 hgeanttof.cc:125
 hgeanttof.cc:126