HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hmdccal2sim.cc
Go to the documentation of this file.
1 //*-- AUTHOR : Ilse Koenig
2 //*-- Modified : 18/06/99 by Ilse Koenig
3 
4 //_HADES_CLASS_DESCRIPTION
5 ///////////////////////////////////////////////////////////////////////////////
6 //
7 // HMdcCal2Sim
8 //
9 // Data object for a Mdc cell containing distances to the wires for simulated
10 // events
11 // This class inherits from the class HMdcCal1 used for real data.
12 //
13 // As additional data elements the track numbers of the two hits are stored
14 // and a status number.
15 // The track number of the hits can be accessed via the inline functions
16 // void setNTrack1(const Int_t nTrack1) of dist1
17 // void setNTrack2(const Int_t nTrack2) of dist2
18 // Int_t getNTrack1(void) const of dist1
19 // Int_t getNTrack2(void) const of dist2
20 // and the status via the inline functions
21 // void setStatus1(const Int_t flag) of dist1
22 // Int_t getStatus1() const of dist1
23 // void setStatus2(const Int_t flag) of dist2
24 // Int_t getStatus2() const of dist2
25 // void setTrackList(Int_t* array) array of tracks[5] can be coppied
26 // to TrackList
27 // void getTrackList(Int_t* array) array of tracks[5] can be filled
28 // from TrackList
29 // void setStatusList(Int_t* array) array of status[5] can be coppied
30 // to StatusList
31 // void getStatusList(Int_t* array) array of status[5] can be filled
32 // from StatusList
33 // Int_t getNTracks() returns number of tracks in track list,
34 // can be used for loops
35 // for(Int_t i=0;i<(HMdcCal1Sim*)cal->getNTracks();i++)
36 // { (HMdcCal1Sim*)cal->getTrackFromList(i);}
37 // Int_t* getStatusList(){return (Int_t*)listStatus;}
38 // Int_t* getTrackList() {return (Int_t*)listTrack;}
39 // Int_t getTrackFromList (Int_t element){return listTrack [element];}
40 // Int_t getStatusFromList(Int_t element){return listStatus[element];}
41 //
42 // According to the two different TDC modes the HMdcCal1Sim category is filled.
43 //
44 // MODE 1 (two times LEADING EDGE of the TDC signal)
45 // nHits == -2 for 2 valid hits
46 // == -1 for 1 valid hit
47 // == 0 for a not filled hit (e.g. 1 hit was kicked out by efficiency)
48 // status1 == 1 for a valid first hit
49 // == 2 for a valid first hit caused by noise
50 // == -3 for a not valid hit
51 // == 0 for REAL data (embedding) or no hit
52 // status2 == 1 for a valid second hit
53 // == 2 for a valid first hit caused by noise
54 // == -3 for a not valid hit
55 // == 0 for REAL data (embedding) or no hit
56 // nTrack1 == track number of the first valid hit
57 // == -99 if not filled
58 // nTrack2 == track number of the second valid hit
59 // == -99 if not filled
60 // dist1 == distance from sense wire of irst valid hit
61 // == -99 if not filled
62 // dist2 == distance from sense wire of the second valid hit
63 // == -99 if not filled
64 // listTrack[5] : contains the track number of the first 5 hits per cell
65 // == -99 if no hit was filled
66 // listStatus[5]: contains the status flags of the first 5 hits per cell
67 // == -1 if hit was kicked out by cell efficiency cut
68 // == -2 if hit was kicked out by layer efficiency cut
69 // == 1 if hit is valid
70 // == 2 if hit is noise
71 // == 3 if hit is REAL data (embedding)
72 // == 0 if no hit was filled
73 // both lists will be filled even if no vaild hit was found
74 //
75 // MODE 2 (LEADING AND TRAILING EDGE of the TDC signal)
76 // nHits == +2 for 2 valid hits
77 // == 0 for not filled hit (e.g. 1 hit was kicked out by efficiency)
78 // status1 == 1 for a valid first hit
79 // == 2 for a valid first hit caused by noise
80 // == -3 for a not valid hit
81 // == 0 for REAL data (embedding) or no hit
82 // status2 == 1 for a valid first hit
83 // == 2 for a valid first hit caused by noise
84 // == -3 for a not valid hit
85 // == 0 for REAL data (embedding) or no hit
86 // nTrack1 == track number of first valid hit
87 // == -99 if not filled
88 // nTrack2 == track number of first valid hit
89 // == -99 if not filled
90 // dist1 == distance from sense wire of the first valid hit
91 // == -99 if not filled
92 // dist2 == -99 if not filled
93 // listTrack[5] : contains the track number of the first 5 hits per cell
94 // == -99 if no hit was filled
95 // listStatus[5]: contains the status flags of the first 5 hits per cell
96 // == -1 if hit was kicked out by cell efficiency cut
97 // == -2 if hit was kicked out by layer efficiency cut
98 // == 1 if hit is valid
99 // == 2 if hit is noise
100 // == 3 if hit is REAL data (embedding)
101 // == 0 if no hit was filled
102 // both lists will be filled even if no vaild hit was found
103 //
104 ////////////////////////////////////////////////////////////////////////////////
105 
106 #include "hmdccal2sim.h"
107 
109 
110 void HMdcCal2Sim::clear() {
111  // clears the object
112  HMdcCal2::clear();
113  nTrack1=nTrack2=-99;
114  status1=0;
115  status2=0;
116  for(Int_t i=0;i<5;i++)
117  {
118  listTrack[i]=-99;
119  listStatus[i]=0;
120  }
121 }
ClassImp(HMdcCal2Sim) void HMdcCal2Sim
Definition: hmdccal2sim.cc:108
void clear()
Definition: hmdccal2.h:20