ROOT logo
//****************************************************************************
//
// GEANT RICH hit data classes
//
// HGeantRichPhoton, HGeantRichDirect, and HGeantRichMirror
//
// Author: Romain Holzmann (r.holzmann@gsi.de)
// Modified: 1999/10/07 by Witold Przygoda (przygoda@psja1.if.uj.edu.pl)
//
//****************************************************************************

#ifndef HGEANTRICH_H
#define HGEANTRICH_H

using namespace std;
#include <iostream> 
#include <iomanip>
#include "hlinkeddataobject.h"

// ***************************************************************************

class HGeantRichPhoton : public HLinkedDataObject {

// ***************************************************************************

public:

  HGeantRichPhoton();
  HGeantRichPhoton(const HGeantRichPhoton &source);
  ~HGeantRichPhoton();

  void    setTrack(Int_t aTrack) { parentTrack = aTrack; }
  void    setHit(Float_t ax, Float_t ay, Float_t ae);
  void    setAddress(Char_t s) { sector = s; }
  void    setPmtId(Int_t pmtId) {fPmtId = pmtId;}

  virtual Int_t getTrack() { return parentTrack; }
  void    getHit(Float_t &ax, Float_t &ay, Float_t &ae);
  Float_t getEnergy() { return eHit; }
  Float_t getX() { return yHit; /* detector rotation! */ }
  Float_t getY() { return xHit; /* detector rotation! */ }
  Int_t   getSector() { return sector; }
  Int_t   getNLocationIndex() { return 1; }
  Int_t   getLocationIndex(Int_t i); 
  Int_t   getPmtId() {return fPmtId;};
  Bool_t  isNewRich() { return (fPmtId == -1) ? kFALSE:kTRUE; }
private:

  Int_t parentTrack;     // GEANT track number of parent particle
  Float_t xHit;          // x of hit (in mm) in pad plane
  Float_t yHit;          // y of hit (in mm) in pad plane
  Float_t eHit;          // energy of Cherenkov photon (in eV)
  Char_t sector;         // sector number (0...5)
  Int_t fPmtId;          // Id of the PMT which is used for RICH700
  
  ClassDef(HGeantRichPhoton,3) // GEANT RICH data class for photon hits
};

//============================================================================


// ***************************************************************************

class HGeantRichDirect : public HLinkedDataObject {

// ***************************************************************************

public:

  HGeantRichDirect();
  //HGeantRichDirect(const HGeantRichDirect &source);
  ~HGeantRichDirect();

  void    setTrack(Int_t aTrack) { trackNumber = aTrack;}
  void    setTrack(Int_t aTrack, Int_t aID);
  void    setHit(Float_t ax, Float_t ay, Float_t az);
  void    setMomentum(Float_t aMom, Float_t aTheta, Float_t aPhi);
  void    setELoss(Float_t ae, Float_t alen);
  void    setAddress (Char_t s) { sector = s; };
  void    setNumPhot(Int_t num) {numPhot = num;};
  void    setPmtId(Int_t pmtId) {fPmtId = pmtId;}

  void    getTrack(Int_t &aTrack, Int_t &aID);
  virtual Int_t getTrack() {return trackNumber;}
  void    getHit(Float_t &ax, Float_t &ay, Float_t &az);
  void    getMomentum(Float_t &aMom, Float_t &aTheta, Float_t &aPhi);
  void    getELoss(Float_t &ade, Float_t &alen);
  Float_t getX() { return yHit; /* detector rotation! */ }
  Float_t getY() { return xHit; /* detector rotation! */ }
  Float_t getTheta() { return thetaHit; }
  Float_t getPhi() { return phiHit; }
  Float_t getEnergyLoss() { return eLoss; }
  Float_t getTrackLengthInPhotDet() { return trackLength; }
  Int_t   getSector() {return sector;}
  Int_t   getNLocationIndex() { return 1; }
  inline Int_t   getLocationIndex(Int_t i); 
  Int_t   getNumPhot(){return numPhot;}; 
  Int_t   getPmtId() {return fPmtId;};
  Bool_t  isNewRich() { return (fPmtId == -1) ? kFALSE:kTRUE; }

private:

  Int_t trackNumber;     // GEANT track number of particle
  Float_t xHit;          // x of hit (in mm) in pad plane
  Float_t yHit;          // y of hit (in mm) in pad plane
  Float_t zHit;          // z of hit (in mm) in pad plane
  Int_t particleID;      // GEANT particle ID
  Float_t momentum;      // total momentum of particle (in MeV/c)
  Float_t thetaHit;      // theta of incidence (0-180 deg)
  Float_t phiHit;        // azimuthal angle (0-360 deg)
  Float_t eLoss;         // energy loss (in MeV)
  Float_t trackLength;   // track length in gas detector (in mm)
  Char_t sector;         // sector number (0...5)
  Int_t numPhot;         // dummy (not used)
  Int_t fPmtId;          // Id of the PMT which is used for RICH700

  ClassDef(HGeantRichDirect,3) // GEANT RICH hit data class for direct hits
};

//----------------------------------------------------------------------------
inline Int_t HGeantRichDirect::getLocationIndex(Int_t i) {
  switch (i) {
    case 0 : return sector;
  }
  return -1;
}
//============================================================================



//=========================================================================
// ***************************************************************************

class HGeantRichMirror : public HLinkedDataObject {

// ***************************************************************************

public:

  HGeantRichMirror();
//  HGeantRichMirror(const HGeantRichMirror &source);
  ~HGeantRichMirror();

  void    setTrack(Int_t aTrack) { trackNumber = aTrack;}
  void    setTrack(Int_t aTrack, Int_t aID);
  void    setHit(Float_t ax, Float_t ay, Float_t az);
  void    setAddress (Char_t s) { sector = s; }
  void    setNumPhot(Int_t num) { numPhot = num; }
  void    setXRing(Float_t xCoor) {xRing = xCoor;}
  void    setYRing(Float_t yCoor) {yRing = yCoor;}
  void    setXYring(const Float_t ax, const Float_t ay);

  void    getTrack(Int_t &aTrack, Int_t &aID);
  virtual Int_t getTrack() {return trackNumber;}
  void    getHit(Float_t &ax, Float_t &ay, Float_t &az);
  Float_t getX() { return yLep; /* detector rotation! */ }
  Float_t getY() { return xLep; /* detector rotation! */ }

  Float_t getXRing(){return xRing;}
  Float_t getYRing(){return yRing;}      
  Int_t   getSector() {return sector;}
  Int_t   getNLocationIndex() { return 1; }
  inline Int_t   getLocationIndex(Int_t i); 
  Int_t   getNumPhot(){return numPhot;}; 

private:

  Int_t numPhot;       // nb of photons reflected by mirror for lepton hit on mirror
  Int_t trackNumber;   // GEANT track number of particle
  Float_t xRing;       // x position of ring (in mm) in pad plane
  Float_t yRing;       // y position of ring (in mm) in pad plane
  Float_t xLep;        // x of hit (in mm) on mirror
  Float_t yLep;        // y of hit (in mm) on mirror
  Float_t zLep;        // z of hit (in mm) on mirror
  Int_t lepID;         // GEANT particle ID
  Char_t sector;       // sector number (0...5)

  ClassDef(HGeantRichMirror,2) // Geant RICH hit data class for mirror hits
};

//----------------------------------------------------------------------------
inline Int_t HGeantRichMirror::getLocationIndex(Int_t i) {
  switch (i) {
    case 0 : return sector;
  }
  return -1;
}
//============================================================================

//==========================================================================

#endif  // HGEANTRICH_H














 hgeantrich.h:1
 hgeantrich.h:2
 hgeantrich.h:3
 hgeantrich.h:4
 hgeantrich.h:5
 hgeantrich.h:6
 hgeantrich.h:7
 hgeantrich.h:8
 hgeantrich.h:9
 hgeantrich.h:10
 hgeantrich.h:11
 hgeantrich.h:12
 hgeantrich.h:13
 hgeantrich.h:14
 hgeantrich.h:15
 hgeantrich.h:16
 hgeantrich.h:17
 hgeantrich.h:18
 hgeantrich.h:19
 hgeantrich.h:20
 hgeantrich.h:21
 hgeantrich.h:22
 hgeantrich.h:23
 hgeantrich.h:24
 hgeantrich.h:25
 hgeantrich.h:26
 hgeantrich.h:27
 hgeantrich.h:28
 hgeantrich.h:29
 hgeantrich.h:30
 hgeantrich.h:31
 hgeantrich.h:32
 hgeantrich.h:33
 hgeantrich.h:34
 hgeantrich.h:35
 hgeantrich.h:36
 hgeantrich.h:37
 hgeantrich.h:38
 hgeantrich.h:39
 hgeantrich.h:40
 hgeantrich.h:41
 hgeantrich.h:42
 hgeantrich.h:43
 hgeantrich.h:44
 hgeantrich.h:45
 hgeantrich.h:46
 hgeantrich.h:47
 hgeantrich.h:48
 hgeantrich.h:49
 hgeantrich.h:50
 hgeantrich.h:51
 hgeantrich.h:52
 hgeantrich.h:53
 hgeantrich.h:54
 hgeantrich.h:55
 hgeantrich.h:56
 hgeantrich.h:57
 hgeantrich.h:58
 hgeantrich.h:59
 hgeantrich.h:60
 hgeantrich.h:61
 hgeantrich.h:62
 hgeantrich.h:63
 hgeantrich.h:64
 hgeantrich.h:65
 hgeantrich.h:66
 hgeantrich.h:67
 hgeantrich.h:68
 hgeantrich.h:69
 hgeantrich.h:70
 hgeantrich.h:71
 hgeantrich.h:72
 hgeantrich.h:73
 hgeantrich.h:74
 hgeantrich.h:75
 hgeantrich.h:76
 hgeantrich.h:77
 hgeantrich.h:78
 hgeantrich.h:79
 hgeantrich.h:80
 hgeantrich.h:81
 hgeantrich.h:82
 hgeantrich.h:83
 hgeantrich.h:84
 hgeantrich.h:85
 hgeantrich.h:86
 hgeantrich.h:87
 hgeantrich.h:88
 hgeantrich.h:89
 hgeantrich.h:90
 hgeantrich.h:91
 hgeantrich.h:92
 hgeantrich.h:93
 hgeantrich.h:94
 hgeantrich.h:95
 hgeantrich.h:96
 hgeantrich.h:97
 hgeantrich.h:98
 hgeantrich.h:99
 hgeantrich.h:100
 hgeantrich.h:101
 hgeantrich.h:102
 hgeantrich.h:103
 hgeantrich.h:104
 hgeantrich.h:105
 hgeantrich.h:106
 hgeantrich.h:107
 hgeantrich.h:108
 hgeantrich.h:109
 hgeantrich.h:110
 hgeantrich.h:111
 hgeantrich.h:112
 hgeantrich.h:113
 hgeantrich.h:114
 hgeantrich.h:115
 hgeantrich.h:116
 hgeantrich.h:117
 hgeantrich.h:118
 hgeantrich.h:119
 hgeantrich.h:120
 hgeantrich.h:121
 hgeantrich.h:122
 hgeantrich.h:123
 hgeantrich.h:124
 hgeantrich.h:125
 hgeantrich.h:126
 hgeantrich.h:127
 hgeantrich.h:128
 hgeantrich.h:129
 hgeantrich.h:130
 hgeantrich.h:131
 hgeantrich.h:132
 hgeantrich.h:133
 hgeantrich.h:134
 hgeantrich.h:135
 hgeantrich.h:136
 hgeantrich.h:137
 hgeantrich.h:138
 hgeantrich.h:139
 hgeantrich.h:140
 hgeantrich.h:141
 hgeantrich.h:142
 hgeantrich.h:143
 hgeantrich.h:144
 hgeantrich.h:145
 hgeantrich.h:146
 hgeantrich.h:147
 hgeantrich.h:148
 hgeantrich.h:149
 hgeantrich.h:150
 hgeantrich.h:151
 hgeantrich.h:152
 hgeantrich.h:153
 hgeantrich.h:154
 hgeantrich.h:155
 hgeantrich.h:156
 hgeantrich.h:157
 hgeantrich.h:158
 hgeantrich.h:159
 hgeantrich.h:160
 hgeantrich.h:161
 hgeantrich.h:162
 hgeantrich.h:163
 hgeantrich.h:164
 hgeantrich.h:165
 hgeantrich.h:166
 hgeantrich.h:167
 hgeantrich.h:168
 hgeantrich.h:169
 hgeantrich.h:170
 hgeantrich.h:171
 hgeantrich.h:172
 hgeantrich.h:173
 hgeantrich.h:174
 hgeantrich.h:175
 hgeantrich.h:176
 hgeantrich.h:177
 hgeantrich.h:178
 hgeantrich.h:179
 hgeantrich.h:180
 hgeantrich.h:181
 hgeantrich.h:182
 hgeantrich.h:183
 hgeantrich.h:184
 hgeantrich.h:185
 hgeantrich.h:186
 hgeantrich.h:187
 hgeantrich.h:188
 hgeantrich.h:189
 hgeantrich.h:190
 hgeantrich.h:191
 hgeantrich.h:192
 hgeantrich.h:193
 hgeantrich.h:194
 hgeantrich.h:195
 hgeantrich.h:196
 hgeantrich.h:197
 hgeantrich.h:198
 hgeantrich.h:199
 hgeantrich.h:200
 hgeantrich.h:201
 hgeantrich.h:202
 hgeantrich.h:203
 hgeantrich.h:204
 hgeantrich.h:205
 hgeantrich.h:206