EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
CbmRichRingLight.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file CbmRichRingLight.h
1
/*
2
* CbmRichRingLight.h
3
*
4
* Created on: 09.03.2010
5
* Author: Semen Lebedev
6
*/
7
8
#ifndef CBMRICHRINGLIGHT_H_
9
#define CBMRICHRINGLIGHT_H_
10
11
#include <vector>
12
#include <cmath>
13
14
class
CbmRichHitLight
15
{
16
public
:
17
float
fX
;
18
float
fY
;
19
};
20
21
class
CbmRichRingLight
22
{
23
public
:
24
CbmRichRingLight
(){
25
fHitCollection
.reserve(30);
26
fHitIdCollection
.reserve(30);
27
}
28
29
~CbmRichRingLight
(){
30
fHitCollection
.clear();
31
}
32
33
void
AddHit
(
CbmRichHitLight
pHit,
unsigned
short
id
) {
34
fHitCollection
.push_back(pHit);
35
fHitIdCollection
.push_back(
id
);
36
37
}
38
bool
RemoveHit
(
int
hitId){
39
//Int_t nofHits = fHitCollection.size();
40
std::vector<unsigned short>::iterator
it
;
41
for
(it =
fHitIdCollection
.begin(); it!=
fHitIdCollection
.end(); it++){
42
if
(hitId == *it){
43
fHitIdCollection
.erase(it);
44
return
true
;
45
}
46
}
47
return
false
;
48
}
49
50
int
GetNofHits
()
const
{
return
fHitIdCollection
.size(); }
51
CbmRichHitLight
GetHit
(
int
i) {
return
fHitCollection
[i];}
52
unsigned
short
GetHitId
(
int
i) {
return
fHitIdCollection
[i];}
53
54
void
SetCenterX
(
float
x
) {
fCenterX
=
x
;}
55
void
SetCenterY
(
float
y
) {
fCenterY
=
y
;}
56
void
SetRadius
(
float
r) {
fRadius
= r;}
57
void
SetChi2
(
float
chi2) {
fChi2
= chi2;}
58
void
SetAngle
(
float
angle) {
fAngle
= angle;}
59
void
SetNofHitsOnRing
(
unsigned
short
onring) {
fNofHitsOnRing
= onring;}
61
void
SetSelectionNN
(
float
selectionNN ) {
fSelectionNN
= selectionNN;}
62
void
SetRecFlag
(
short
recFlag){
fRecFlag
= recFlag;}
63
64
float
GetCenterX
()
const
{
return
fCenterX
;}
65
float
GetCenterY
()
const
{
return
fCenterY
;}
66
float
GetRadius
()
const
{
return
fRadius
;}
67
float
GetSelectionNN
()
const
{
return
fSelectionNN
;}
68
float
GetChi2
()
const
{
return
fChi2
;}
69
float
GetNDF
()
const
{
return
(
float
)(
GetNofHits
()-5);}
70
float
GetRadialPosition
()
const
{
71
if
(
fCenterY
> 0.f){
72
return
sqrt(
fCenterX
*
fCenterX
+(
fCenterY
- 110.f)*(
fCenterY
- 110.f));
73
}
else
{
74
return
sqrt(
fCenterX
*
fCenterX
+(
fCenterY
+ 110.f)*(
fCenterY
+ 110.f));
75
};
76
}
77
78
float
GetAngle
()
const
{
return
fAngle
;}
79
unsigned
short
GetNofHitsOnRing
()
const
{
return
fNofHitsOnRing
;}
80
short
GetRecFlag
(){
return
fRecFlag
;}
81
82
private
:
83
std::vector<CbmRichHitLight>
fHitCollection
;
84
std::vector<unsigned short>
fHitIdCollection
;
85
protected
:
86
float
fCenterX
;
87
float
fCenterY
;
88
float
fRadius
;
89
float
fChi2
;
90
float
fAngle
;
91
unsigned
short
fNofHitsOnRing
;
92
short
fRecFlag
;
93
float
fSelectionNN
;
94
};
95
96
#endif
/* CBMRICHRINGLIGHT_H_ */
EicRoot
blob
master
rich
standalone
algorithm
CbmRichRingLight.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:33
using
1.8.2 with
EIC GitHub integration