ROOT logo
#ifndef HMDCCAL2SIM_H
#define HMDCCAL2SIM_H

#include "hmdccal2.h"

class HMdcCal2Sim : public HMdcCal2 {
protected:
  Int_t nTrack1;   // number of Track for first hit
  Int_t nTrack2;   // number of Track for second hit
  Int_t status1;    // status of the cell (positive if ok, negative if it should not be used)
  Int_t status2;    // status of the cell (positive if ok, negative if it should not be used)
  Int_t listTrack [5]; // list of 5 tracknumbers (GEANT) for tracks
  Int_t listStatus[5]; // list of status for 5 tracks

public:
    HMdcCal2Sim(void) {clear();}
  ~HMdcCal2Sim(void) {}
  void clear(void);
  void setNTrack1(const Int_t n) {nTrack1=n;}
  void setNTrack2(const Int_t n) {nTrack2=n;}
  void setStatus1(const Int_t f) { status1=f; }
  void setStatus2(const Int_t f) { status2=f; }
  void setTrackList(Int_t* array)
  {
   for(Int_t i=0;i<5;i++)
   {
       if(array[i]!=0 && array[i]>=0)
       {
	   listTrack[i]=array[i];
       }
       else
       {
	   listTrack[i]=-99;
       }
   }
  };
  void getTrackList(Int_t* array)
  {
   for(Int_t i=0;i<5;i++)
     {
	 array[i]=listTrack[i];
     }
  };
  void setStatusList(Int_t* array)
  {
   for(Int_t i=0;i<5;i++)
     {
	 listStatus[i]=array[i];
     }
  };
  void getStatusList(Int_t* array)
  {
   for(Int_t i=0;i<5;i++)
     {
	 array[i]=listStatus[i];
     }
  };
  Int_t getNTracks()
  {
      Int_t i=0;
      while(listTrack[i]!=-99 && i<5)
      {
	  i++;
      }
      return i;
  };
  Int_t* getStatusList(){return (Int_t*)listStatus;}
  Int_t* getTrackList() {return (Int_t*)listTrack;}

  Int_t getTrackFromList(Int_t element) {return listTrack [element];}
  Int_t getStatusFromList(Int_t element){return listStatus[element];}

  Int_t getNTrack1(void) const {return nTrack1;}
  Int_t getNTrack2(void) const {return nTrack2;}
  Int_t getStatus1() const {return status1;}
  Int_t getStatus2() const {return status2;}
  Int_t getStatus() const {return status1;} // will be removed later

  ClassDef(HMdcCal2Sim,1) // simulated cal2 hit on a MDC
};

#endif  /* HMDCCAL2SIM_H */

 hmdccal2sim.h:1
 hmdccal2sim.h:2
 hmdccal2sim.h:3
 hmdccal2sim.h:4
 hmdccal2sim.h:5
 hmdccal2sim.h:6
 hmdccal2sim.h:7
 hmdccal2sim.h:8
 hmdccal2sim.h:9
 hmdccal2sim.h:10
 hmdccal2sim.h:11
 hmdccal2sim.h:12
 hmdccal2sim.h:13
 hmdccal2sim.h:14
 hmdccal2sim.h:15
 hmdccal2sim.h:16
 hmdccal2sim.h:17
 hmdccal2sim.h:18
 hmdccal2sim.h:19
 hmdccal2sim.h:20
 hmdccal2sim.h:21
 hmdccal2sim.h:22
 hmdccal2sim.h:23
 hmdccal2sim.h:24
 hmdccal2sim.h:25
 hmdccal2sim.h:26
 hmdccal2sim.h:27
 hmdccal2sim.h:28
 hmdccal2sim.h:29
 hmdccal2sim.h:30
 hmdccal2sim.h:31
 hmdccal2sim.h:32
 hmdccal2sim.h:33
 hmdccal2sim.h:34
 hmdccal2sim.h:35
 hmdccal2sim.h:36
 hmdccal2sim.h:37
 hmdccal2sim.h:38
 hmdccal2sim.h:39
 hmdccal2sim.h:40
 hmdccal2sim.h:41
 hmdccal2sim.h:42
 hmdccal2sim.h:43
 hmdccal2sim.h:44
 hmdccal2sim.h:45
 hmdccal2sim.h:46
 hmdccal2sim.h:47
 hmdccal2sim.h:48
 hmdccal2sim.h:49
 hmdccal2sim.h:50
 hmdccal2sim.h:51
 hmdccal2sim.h:52
 hmdccal2sim.h:53
 hmdccal2sim.h:54
 hmdccal2sim.h:55
 hmdccal2sim.h:56
 hmdccal2sim.h:57
 hmdccal2sim.h:58
 hmdccal2sim.h:59
 hmdccal2sim.h:60
 hmdccal2sim.h:61
 hmdccal2sim.h:62
 hmdccal2sim.h:63
 hmdccal2sim.h:64
 hmdccal2sim.h:65
 hmdccal2sim.h:66
 hmdccal2sim.h:67
 hmdccal2sim.h:68
 hmdccal2sim.h:69
 hmdccal2sim.h:70
 hmdccal2sim.h:71
 hmdccal2sim.h:72
 hmdccal2sim.h:73
 hmdccal2sim.h:74
 hmdccal2sim.h:75
 hmdccal2sim.h:76
 hmdccal2sim.h:77
 hmdccal2sim.h:78
 hmdccal2sim.h:79
 hmdccal2sim.h:80
 hmdccal2sim.h:81
 hmdccal2sim.h:82
 hmdccal2sim.h:83