Belle II Software  release-08-01-10
KLMHit2d.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 /* KLM headers. */
12 #include <klm/dataobjects/bklm/BKLMHit1d.h>
13 #include <klm/dataobjects/KLMElementNumbers.h>
14 
15 /* Basf2 headers. */
16 #include <framework/datastore/RelationsObject.h>
17 
18 /* ROOT headers. */
19 #include <Math/Vector3D.h>
20 
21 /* CLHEP headers. */
22 #include <CLHEP/Vector/ThreeVector.h>
23 
24 namespace Belle2 {
33  class KLMHit2d : public RelationsObject {
34 
35  public:
36 
40  KLMHit2d();
41 
47  explicit KLMHit2d(KLMDigit* digit1, KLMDigit* digit2);
48 
64  KLMHit2d(const BKLMHit1d* hitPhi, const BKLMHit1d* hitZ,
65  const CLHEP::Hep3Vector& globalPos, double time);
66 
71  {
72  }
73 
78  int getSubdetector() const
79  {
80  return m_Subdetector;
81  }
82 
87  void setSubdetector(int subdetector)
88  {
89  m_Subdetector = subdetector;
90  }
91 
96  int getSection() const
97  {
98  return m_Section;
99  }
100 
105  void setSection(int section)
106  {
107  m_Section = section;
108  }
109 
114  int getSector() const
115  {
116  return m_Sector;
117  }
118 
123  void setSector(int sector)
124  {
125  m_Sector = sector;
126  }
127 
132  int getLayer() const
133  {
134  return m_Layer;
135  }
136 
141  void setLayer(int layer)
142  {
143  m_Layer = layer;
144  }
145 
150  void setXStripMin(int strip)
151  {
152  m_Strip[0] = strip;
153  }
154 
159  void setXStripMax(int strip)
160  {
161  m_LastStrip[0] = strip;
162  }
163 
168  void setYStripMin(int strip)
169  {
170  m_Strip[1] = strip;
171  }
172 
177  void setYStripMax(int strip)
178  {
179  m_LastStrip[1] = strip;
180  }
181 
185  bool inRPC() const
186  {
189  }
190 
194  int getZStripMin() const
195  {
197  }
198 
202  int getZStripMax() const
203  {
205  }
206 
210  double getZStripAve() const
211  {
212  return 0.5 * (getZStripMin() + getZStripMax());
213  }
214 
218  int getPhiStripMin() const
219  {
221  }
222 
226  int getPhiStripMax() const
227  {
229  }
230 
234  double getPhiStripAve() const
235  {
236  return 0.5 * (getPhiStripMin() + getPhiStripMax());
237  }
238 
242  int getXStripMin() const
243  {
244  return m_Strip[0];
245  }
246 
250  int getXStripMax() const
251  {
252  return m_LastStrip[0];
253  }
254 
258  int getYStripMin() const
259  {
260  return m_Strip[1];
261  }
262 
266  int getYStripMax() const
267  {
268  return m_LastStrip[1];
269  }
270 
277  void setPosition(float x, float y, float z)
278  {
279  m_GlobalX = x;
280  m_GlobalY = y;
281  m_GlobalZ = z;
282  }
283 
288  //void setPosition(const ROOT::Math::XYZVector& pos);
289 
294  float getPositionX() const
295  {
296  return m_GlobalX;
297  }
298 
303  float getPositionY() const
304  {
305  return m_GlobalY;
306  }
307 
312  float getPositionZ() const
313  {
314  return m_GlobalZ;
315  }
316 
321  ROOT::Math::XYZVector getPosition() const
322  {
323  return ROOT::Math::XYZVector(m_GlobalX, m_GlobalY, m_GlobalZ);
324  }
325 
330  float getTime() const
331  {
332  return m_Time;
333  }
334 
339  void setTime(float time)
340  {
341  m_Time = time;
342  }
343 
348  void setMCTime(float t)
349  {
350  m_MCTime = t;
351  }
352 
357  float getMCTime() const
358  {
359  return m_MCTime;
360  }
361 
366  float getEnergyDeposit() const
367  {
368  return m_EnergyDeposit;
369  }
370 
375  void setEnergyDeposit(float energyDeposit)
376  {
377  m_EnergyDeposit = energyDeposit;
378  }
379 
384  float getChiSq() const
385  {
386  return m_ChiSq;
387  }
388 
393  void setChiSq(float chisq)
394  {
395  m_ChiSq = chisq;
396  }
397 
401  bool isOutOfTime() const
402  {
403  return m_IsOutOfTime;
404  }
405 
409  void isOutOfTime(bool outOfTime)
410  {
411  m_IsOutOfTime = outOfTime;
412  }
413 
418  bool isOnTrack() const
419  {
420  return m_IsOnTrack;
421  }
422 
426  void isOnTrack(bool onTrack)
427  {
428  m_IsOnTrack = onTrack;
429  }
430 
435  bool isOnStaTrack() const
436  {
437  return m_IsOnStaTrack;
438  }
439 
443  void isOnStaTrack(bool onStaTrack)
444  {
445  m_IsOnStaTrack = onStaTrack;
446  }
447 
448  private:
449 
451  int m_Subdetector = 0;
452 
454  int m_Section = 0;
455 
457  int m_Sector = 0;
458 
460  int m_Layer = 0;
461 
464 
467 
469  float m_GlobalX = 0.0;
470 
472  float m_GlobalY = 0.0;
473 
475  float m_GlobalZ = 0.0;
476 
478  float m_Time = 0.0;
479 
481  float m_MCTime = 0.0;
482 
484  float m_EnergyDeposit = 0.0;
485 
486  /* From EKLMHit2d. */
487 
489  float m_ChiSq = 0.0;
490 
491  /* From BKLMHit2d. */
492 
494  bool m_IsOutOfTime = false;
495 
497  bool m_IsOnTrack = false;
498 
500  bool m_IsOnStaTrack = false;
501 
504 
505  };
506 
508 }
@ c_FirstRPCLayer
First RPC layer.
Store one reconstructed BKLM 1D hit as a ROOT object.
Definition: BKLMHit1d.h:30
KLM digit (class representing a digitized hit in RPCs or scintillators).
Definition: KLMDigit.h:29
static constexpr int getMaximalPlaneNumber()
Get maximal plane number.
KLM 2d hit.
Definition: KLMHit2d.h:33
void setEnergyDeposit(float energyDeposit)
Set energy deposit.
Definition: KLMHit2d.h:375
bool inRPC() const
Determine whether this 2D hit is in RPC or scintillator.
Definition: KLMHit2d.h:185
float m_ChiSq
Chi^2 of the hit.
Definition: KLMHit2d.h:489
int m_LastStrip[KLMElementNumbers::getMaximalPlaneNumber()]
Number of last strip in each plane.
Definition: KLMHit2d.h:466
int getSubdetector() const
Get subdetector number.
Definition: KLMHit2d.h:78
int m_Strip[KLMElementNumbers::getMaximalPlaneNumber()]
Number of strip in each plane.
Definition: KLMHit2d.h:463
void isOutOfTime(bool outOfTime)
Set whether this 2D hit is outside the trigger-coincidence window.
Definition: KLMHit2d.h:409
int getYStripMin() const
Get first strip number for EKLM hit in the y-measuring plane.
Definition: KLMHit2d.h:258
int getLayer() const
Get layer number.
Definition: KLMHit2d.h:132
float m_GlobalY
Global position Y coordinate.
Definition: KLMHit2d.h:472
float getChiSq() const
Get Chi^2 of the crossing point.
Definition: KLMHit2d.h:384
double getZStripAve() const
Get average strip number for z plane.
Definition: KLMHit2d.h:210
double getPhiStripAve() const
Get average strip number for phi plane.
Definition: KLMHit2d.h:234
void setSection(int section)
Set section number.
Definition: KLMHit2d.h:105
float m_Time
Time of the hit.
Definition: KLMHit2d.h:478
float getTime() const
Get hit time.
Definition: KLMHit2d.h:330
void setChiSq(float chisq)
Set Chi^2 of the crossing point.
Definition: KLMHit2d.h:393
int getZStripMax() const
Get last strip number for z plane.
Definition: KLMHit2d.h:202
int m_Section
Number of section.
Definition: KLMHit2d.h:454
int getSection() const
Get section number.
Definition: KLMHit2d.h:96
float getPositionZ() const
Get hit global position z coordinate.
Definition: KLMHit2d.h:312
ClassDef(Belle2::KLMHit2d, 1)
Class version.
float m_MCTime
MC time.
Definition: KLMHit2d.h:481
void isOnStaTrack(bool onStaTrack)
Set whether this 2D hit is associated with a BKLM stand-alone track.
Definition: KLMHit2d.h:443
void setXStripMin(int strip)
Set first strip number for EKLM hit in the x-measuring plane.
Definition: KLMHit2d.h:150
float m_EnergyDeposit
Energy deposition.
Definition: KLMHit2d.h:484
bool isOnStaTrack() const
Determine whether this 2D hit is associated with a BKLM stand-alone track.
Definition: KLMHit2d.h:435
int getSector() const
Get sector number.
Definition: KLMHit2d.h:114
KLMHit2d()
Constructor.
Definition: KLMHit2d.cc:17
float getPositionX() const
Set hit global position.
Definition: KLMHit2d.h:294
float m_GlobalZ
Global position Z coordinate.
Definition: KLMHit2d.h:475
int getPhiStripMin() const
Get strip number for phi plane.
Definition: KLMHit2d.h:218
void setTime(float time)
Set hit time.
Definition: KLMHit2d.h:339
void setYStripMin(int strip)
Set first strip number for EKLM hit in the y-measuring plane.
Definition: KLMHit2d.h:168
void setSubdetector(int subdetector)
Set subdetector number.
Definition: KLMHit2d.h:87
int m_Sector
Number of sector.
Definition: KLMHit2d.h:457
float getMCTime() const
Get MC time.
Definition: KLMHit2d.h:357
bool isOnTrack() const
Determine whether this 2D hit is associated with a muid-extrapolated track.
Definition: KLMHit2d.h:418
void setSector(int sector)
Set sector number.
Definition: KLMHit2d.h:123
int getZStripMin() const
Get strip number for z plane.
Definition: KLMHit2d.h:194
int getXStripMax() const
Get last strip number for EKLM hit in the x-measuring plane.
Definition: KLMHit2d.h:250
int m_Layer
Number of layer.
Definition: KLMHit2d.h:460
ROOT::Math::XYZVector getPosition() const
Get hit global position.
Definition: KLMHit2d.h:321
bool m_IsOutOfTime
Whether this 2D hit is outside the trigger-coincidence window.
Definition: KLMHit2d.h:494
int getPhiStripMax() const
Get last strip number for phi plane.
Definition: KLMHit2d.h:226
float getPositionY() const
Get hit global position y coordinate.
Definition: KLMHit2d.h:303
void setMCTime(float t)
Set MC time.
Definition: KLMHit2d.h:348
int m_Subdetector
Number of subdetector.
Definition: KLMHit2d.h:451
bool m_IsOnTrack
Whether this 2D hit is associated with a muid-extrapolated track.
Definition: KLMHit2d.h:497
float getEnergyDeposit() const
Get energy deposit.
Definition: KLMHit2d.h:366
void setXStripMax(int strip)
Set last strip number for EKLM hit in the x-measuring plane.
Definition: KLMHit2d.h:159
float m_GlobalX
Global position X coordinate.
Definition: KLMHit2d.h:469
bool m_IsOnStaTrack
Wether this 2D hit is associated with a BKLM stand-alone track.
Definition: KLMHit2d.h:500
int getYStripMax() const
Get last strip number for EKLM hit in the y-measuring plane.
Definition: KLMHit2d.h:266
void isOnTrack(bool onTrack)
Set whether this 2D hit is associated with a muid-extrapolated track.
Definition: KLMHit2d.h:426
bool isOutOfTime() const
Determine whether this 2D hit is outside the trigger-coincidence window.
Definition: KLMHit2d.h:401
void setYStripMax(int strip)
Set last strip number for EKLM hit in y-measuring plane.
Definition: KLMHit2d.h:177
int getXStripMin() const
Get first strip number for EKLM hit in the x-measuring plane.
Definition: KLMHit2d.h:242
void setLayer(int layer)
Set layer number.
Definition: KLMHit2d.h:141
~KLMHit2d()
Destructor.
Definition: KLMHit2d.h:70
void setPosition(float x, float y, float z)
Set hit global position.
Definition: KLMHit2d.h:277
Defines interface for accessing relations of objects in StoreArray.
Abstract base class for different kinds of events.