Belle II Software  release-08-01-10
KLMDigitEventInfo.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #pragma once
10 
11 /* Basf2 headers. */
12 #include <framework/datastore/RelationsObject.h>
13 #include <rawdata/dataobjects/RawKLM.h>
14 
15 namespace Belle2 {
25 
26  public:
27 
32  m_TriggerCTime(0),
34  m_triggerUTime(0),
35  m_windowStart(0),
36  m_nRPCHits(0),
37  m_nSciHits(0),
40  m_UserWord(0)
41  {
42  };
43 
49  KLMDigitEventInfo(RawKLM* rawKLM, int entry) :
50  m_TriggerCTime(rawKLM->GetTTCtime(entry)),
52  m_triggerUTime(rawKLM->GetTTUtime(entry)),
53  m_windowStart(rawKLM->GetTrailerChksum(entry)),
54  m_nRPCHits(0),
55  m_nSciHits(0),
58  m_UserWord(0)
59  {
60  }
61 
66  unsigned int getTriggerCTime() const
67  {
68  return m_TriggerCTime;
69  }
70 
75  int getIntTriggerCTime() const
76  {
77  return (int)m_TriggerCTime;
78  }
79 
84  void setTriggerCTime(unsigned int triggerCTime)
85  {
86  m_TriggerCTime = triggerCTime;
87  }
88 
93  long int getTriggerInterval() const
94  {
95  return (long int)m_TriggerCTime - (long int)m_triggerCTimeOfPreviousEvent;
96  }
97 
103  double getTriggerIntervalInUs() const
104  {
105  return ((long int)m_TriggerCTime -
106  (long int)m_triggerCTimeOfPreviousEvent) / 127.216;
107  }
108 
112  void setPreviousEventTriggerCTime(unsigned int triggerCTimeOfPreviousEvent)
113  {
114  m_triggerCTimeOfPreviousEvent = triggerCTimeOfPreviousEvent;
115  }
116 
121  unsigned int getTriggerUTime() const
122  {
123  return m_triggerUTime;
124  }
125 
129  void setTriggerUTime(unsigned int triggerUTime)
130  {
131  m_triggerUTime = triggerUTime;
132  }
133 
138  unsigned int getWindowStart() const
139  {
140  return m_windowStart;
141  }
142 
146  void setWindowStart(unsigned int windowStart)
147  {
148  m_windowStart = windowStart;
149  }
150 
155  int getRPCHits() const
156  {
157  return m_nRPCHits;
158  }
159 
164  {
165  m_nRPCHits++;
166  }
167 
171  void increaseRPCHits(int hits)
172  {
173  m_nRPCHits += hits;
174  }
175 
180  int getSciHits() const
181  {
182  return m_nSciHits;
183  }
184 
189  {
190  m_nSciHits++;
191  }
192 
196  void increaseSciHits(int hits)
197  {
198  m_nSciHits += hits;
199  }
200 
205  int getOutOfRangeHits() const
206  {
207  return m_nOutOfRangeHits;
208  }
209 
214  {
216  }
217 
221  void increaseOutOfRangeHits(int hits)
222  {
223  m_nOutOfRangeHits += hits;
224  }
225 
230  unsigned int getRevo9TriggerWord() const
231  {
232  return m_Revo9TriggerWord;
233  }
234 
239  void setRevo9TriggerWord(unsigned int revo9TriggerWord)
240  {
241  m_Revo9TriggerWord = revo9TriggerWord;
242  }
243 
248  unsigned int getUserWord() const
249  {
250  return m_UserWord;
251  }
252 
257  void setUserWord(unsigned int userWord)
258  {
259  m_UserWord = userWord;
260  }
261 
262  protected:
263 
265  unsigned int m_TriggerCTime;
266 
269 
271  unsigned int m_triggerUTime;
272 
274  unsigned int m_windowStart;
275 
278 
281 
284 
286  unsigned int m_Revo9TriggerWord;
287 
289  unsigned int m_UserWord;
290 
293 
294  };
295 
297 }
Class to store debugging informations from the unpacker (event based).
unsigned int m_windowStart
Window start.
void increaseOutOfRangeHits()
Increase by 1 the number of outOfRange-flagged hits in the event.
int m_nSciHits
Scintillator hits in the event.
unsigned int m_triggerCTimeOfPreviousEvent
Trigger CTime of previous event.
int getRPCHits() const
Returns the number of RPC hits in the event.
KLMDigitEventInfo(RawKLM *rawKLM, int entry)
Constructor.
void increaseOutOfRangeHits(int hits)
Increase by 'hits' the number of outOfRange-flagged hits in the event.
unsigned int getTriggerCTime() const
Get trigger CTIME.
void setTriggerCTime(unsigned int triggerCTime)
Set trigger CTIME.
void increaseSciHits()
Increase by 1 the number of scintillator hits in the event.
void setWindowStart(unsigned int windowStart)
Set window start.
void setTriggerUTime(unsigned int triggerUTime)
Set trigger UTIME.
int getIntTriggerCTime() const
Returns trigger CTIME as int.
int m_nRPCHits
RPC hits in the event.
unsigned int m_triggerUTime
Trigger UTime.
ClassDef(KLMDigitEventInfo, 5)
Class version.
void increaseRPCHits(int hits)
Increase by 'hits' the number of RPC hits in the event.
unsigned int getUserWord() const
Get user word (from DCs).
unsigned int getWindowStart() const
Get window start.
unsigned int m_TriggerCTime
Trigger CTime.
void setUserWord(unsigned int userWord)
Set user word (from DCs).
unsigned int m_UserWord
User word (from DCs)
double getTriggerIntervalInUs() const
Returns trigger interval (triggerCTime - triggerCTimeOfPreviousEvent) in us.
long int getTriggerInterval() const
Returns trigger interval (triggerCTime - triggerCTimeOfPreviousEvent)
unsigned int m_Revo9TriggerWord
Revo9 trigger word (from DCs).
void setRevo9TriggerWord(unsigned int revo9TriggerWord)
Set Revo9 trigger word (from DCs).
int m_nOutOfRangeHits
Out-of-range hits (skipped hits with layer > 14 for BKLM).
void setPreviousEventTriggerCTime(unsigned int triggerCTimeOfPreviousEvent)
Set trigger CTime of previous event.
int getOutOfRangeHits() const
Returns the number of OutOfRange-flagged hits in the event.
int getSciHits() const
Returns the number of scintillator hits in the event.
unsigned int getTriggerUTime() const
Get trigger UTIME.
unsigned int getRevo9TriggerWord() const
Get revo9 trigger word (from DCs).
void increaseSciHits(int hits)
Increase by 'hits' the number of scintillator hits in the event.
void increaseRPCHits()
Increase by 1 the number of RPC hits in the event.
The Raw KLM class Class for RawCOPPER class data taken by KLM.
Definition: RawKLM.h:27
Defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.