ROOT logo
//*-- AUTHOR : Ilse Koenig
//*-- Modified : 18/06/99 by Ilse Koenig

//_HADES_CLASS_DESCRIPTION 
///////////////////////////////////////////////////////////////////////////////
//
// HMdcCal2Sim
//
// Data object for a Mdc cell containing distances to the wires for simulated
// events
// This class inherits from the class HMdcCal1 used for real data.
//
// As additional data elements the track numbers of the two hits are stored
// and a status number.
// The track number of the hits can be accessed via the inline functions    
//     void setNTrack1(const Int_t nTrack1) of dist1
//     void setNTrack2(const Int_t nTrack2) of dist2
//     Int_t getNTrack1(void) const         of dist1
//     Int_t getNTrack2(void) const         of dist2
// and the status via the inline functions 
//     void setStatus1(const Int_t flag)    of dist1
//     Int_t getStatus1() const             of dist1
//     void setStatus2(const Int_t flag)    of dist2
//     Int_t getStatus2() const             of dist2
//     void  setTrackList(Int_t* array) array of tracks[5]  can be coppied
//           to TrackList
//     void  getTrackList(Int_t* array) array of tracks[5]  can be filled
//           from TrackList
//     void  setStatusList(Int_t* array) array of status[5] can be coppied
//           to StatusList
//     void  getStatusList(Int_t* array) array of status[5] can be filled
//           from StatusList
//     Int_t getNTracks() returns number of tracks in track list,
//           can be used for loops
//           for(Int_t i=0;i<(HMdcCal1Sim*)cal->getNTracks();i++)
//              { (HMdcCal1Sim*)cal->getTrackFromList(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];}
//
// According to the two different TDC modes the HMdcCal1Sim category is filled.
//
// MODE 1 (two times LEADING EDGE of the TDC signal)
//           nHits ==  -2 for 2 valid hits
//                 ==  -1 for 1 valid hit
//                 ==   0 for a not filled hit (e.g. 1 hit was kicked out by efficiency)
//         status1 ==   1 for a valid first hit
//                 ==   2 for a valid first hit caused by noise
//                 ==  -3 for a not valid hit
//                 ==   0 for REAL data (embedding) or no hit
//         status2 ==   1 for a valid second hit
//                 ==   2 for a valid first hit caused by noise
//                 ==  -3 for a not valid hit
//                 ==   0 for REAL data (embedding) or no hit
//         nTrack1 ==   track number of the first valid hit
//                 ==  -99 if not filled
//         nTrack2 ==   track number of the second valid hit
//                 ==  -99 if not filled
//         dist1   ==   distance from sense wire of irst valid hit
//                 ==  -99 if not filled
//         dist2   ==   distance from sense wire of the second valid hit
//                 ==  -99 if not filled
//     listTrack[5] :   contains the track number of the first 5 hits per cell
//                      == -99 if no hit was filled
//     listStatus[5]:   contains the status flags of the first 5 hits per cell
//                      == -1 if hit was kicked out by cell efficiency cut
//                      == -2 if hit was kicked out by layer efficiency cut
//                      ==  1 if hit is valid
//                      ==  2 if hit is noise
//                      ==  3 if hit is REAL data (embedding)
//                      ==  0 if no hit was filled
//     both lists will be filled even if no vaild hit was found
//
// MODE 2 (LEADING AND TRAILING EDGE of the TDC signal)
//           nHits ==  +2 for 2 valid hits
//                 ==   0 for not filled hit (e.g. 1 hit was kicked out by efficiency)
//         status1 ==   1 for a valid first hit
//                 ==   2 for a valid first hit caused by noise
//                 ==  -3 for a not valid hit
//                 ==   0 for REAL data (embedding) or no hit
//         status2 ==   1 for a valid first hit
//                 ==   2 for a valid first hit caused by noise
//                 ==  -3 for a not valid hit
//                 ==   0 for REAL data (embedding) or no hit
//         nTrack1 ==   track number of first valid hit
//                 ==  -99 if not filled
//         nTrack2 ==   track number of first valid hit
//                 ==  -99 if not filled
//         dist1   ==   distance from sense wire of the first valid hit
//                 ==  -99 if not filled
//         dist2   ==  -99 if not filled
//     listTrack[5] :   contains the track number of the first 5 hits per cell
//                      == -99 if no hit was filled
//     listStatus[5]:   contains the status flags of the first 5 hits per cell
//                      == -1 if hit was kicked out by cell efficiency cut
//                      == -2 if hit was kicked out by layer efficiency cut
//                      ==  1 if hit is valid
//                      ==  2 if hit is noise
//                      ==  3 if hit is REAL data (embedding)
//                      ==  0 if no hit was filled
//     both lists will be filled even if no vaild hit was found
//
////////////////////////////////////////////////////////////////////////////////

#include "hmdccal2sim.h"

ClassImp(HMdcCal2Sim)

void HMdcCal2Sim::clear() {
  // clears the object
  HMdcCal2::clear();
  nTrack1=nTrack2=-99;
  status1=0;
  status2=0;
  for(Int_t i=0;i<5;i++)
  {
      listTrack[i]=-99;
      listStatus[i]=0;
  }
}
 hmdccal2sim.cc:1
 hmdccal2sim.cc:2
 hmdccal2sim.cc:3
 hmdccal2sim.cc:4
 hmdccal2sim.cc:5
 hmdccal2sim.cc:6
 hmdccal2sim.cc:7
 hmdccal2sim.cc:8
 hmdccal2sim.cc:9
 hmdccal2sim.cc:10
 hmdccal2sim.cc:11
 hmdccal2sim.cc:12
 hmdccal2sim.cc:13
 hmdccal2sim.cc:14
 hmdccal2sim.cc:15
 hmdccal2sim.cc:16
 hmdccal2sim.cc:17
 hmdccal2sim.cc:18
 hmdccal2sim.cc:19
 hmdccal2sim.cc:20
 hmdccal2sim.cc:21
 hmdccal2sim.cc:22
 hmdccal2sim.cc:23
 hmdccal2sim.cc:24
 hmdccal2sim.cc:25
 hmdccal2sim.cc:26
 hmdccal2sim.cc:27
 hmdccal2sim.cc:28
 hmdccal2sim.cc:29
 hmdccal2sim.cc:30
 hmdccal2sim.cc:31
 hmdccal2sim.cc:32
 hmdccal2sim.cc:33
 hmdccal2sim.cc:34
 hmdccal2sim.cc:35
 hmdccal2sim.cc:36
 hmdccal2sim.cc:37
 hmdccal2sim.cc:38
 hmdccal2sim.cc:39
 hmdccal2sim.cc:40
 hmdccal2sim.cc:41
 hmdccal2sim.cc:42
 hmdccal2sim.cc:43
 hmdccal2sim.cc:44
 hmdccal2sim.cc:45
 hmdccal2sim.cc:46
 hmdccal2sim.cc:47
 hmdccal2sim.cc:48
 hmdccal2sim.cc:49
 hmdccal2sim.cc:50
 hmdccal2sim.cc:51
 hmdccal2sim.cc:52
 hmdccal2sim.cc:53
 hmdccal2sim.cc:54
 hmdccal2sim.cc:55
 hmdccal2sim.cc:56
 hmdccal2sim.cc:57
 hmdccal2sim.cc:58
 hmdccal2sim.cc:59
 hmdccal2sim.cc:60
 hmdccal2sim.cc:61
 hmdccal2sim.cc:62
 hmdccal2sim.cc:63
 hmdccal2sim.cc:64
 hmdccal2sim.cc:65
 hmdccal2sim.cc:66
 hmdccal2sim.cc:67
 hmdccal2sim.cc:68
 hmdccal2sim.cc:69
 hmdccal2sim.cc:70
 hmdccal2sim.cc:71
 hmdccal2sim.cc:72
 hmdccal2sim.cc:73
 hmdccal2sim.cc:74
 hmdccal2sim.cc:75
 hmdccal2sim.cc:76
 hmdccal2sim.cc:77
 hmdccal2sim.cc:78
 hmdccal2sim.cc:79
 hmdccal2sim.cc:80
 hmdccal2sim.cc:81
 hmdccal2sim.cc:82
 hmdccal2sim.cc:83
 hmdccal2sim.cc:84
 hmdccal2sim.cc:85
 hmdccal2sim.cc:86
 hmdccal2sim.cc:87
 hmdccal2sim.cc:88
 hmdccal2sim.cc:89
 hmdccal2sim.cc:90
 hmdccal2sim.cc:91
 hmdccal2sim.cc:92
 hmdccal2sim.cc:93
 hmdccal2sim.cc:94
 hmdccal2sim.cc:95
 hmdccal2sim.cc:96
 hmdccal2sim.cc:97
 hmdccal2sim.cc:98
 hmdccal2sim.cc:99
 hmdccal2sim.cc:100
 hmdccal2sim.cc:101
 hmdccal2sim.cc:102
 hmdccal2sim.cc:103
 hmdccal2sim.cc:104
 hmdccal2sim.cc:105
 hmdccal2sim.cc:106
 hmdccal2sim.cc:107
 hmdccal2sim.cc:108
 hmdccal2sim.cc:109
 hmdccal2sim.cc:110
 hmdccal2sim.cc:111
 hmdccal2sim.cc:112
 hmdccal2sim.cc:113
 hmdccal2sim.cc:114
 hmdccal2sim.cc:115
 hmdccal2sim.cc:116
 hmdccal2sim.cc:117
 hmdccal2sim.cc:118
 hmdccal2sim.cc:119
 hmdccal2sim.cc:120
 hmdccal2sim.cc:121