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
EicEventAssembler.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file EicEventAssembler.h
1
//
2
// AYK (ayk@bnl.gov), 2014/07/08
3
//
4
// Basically a task filling out EicRcTrack, EicRcVertex, etc
5
// arrays and do all dirty work to collect the necessary info;
6
//
7
8
#include <TClonesArray.h>
9
#include <TBranch.h>
10
11
#include <
FairTask.h
>
12
13
#include <
EicRcEvent.h
>
14
#include <EicDetName.h>
15
#include <
EicEventGenerator.h
>
16
17
#ifndef _EIC_EVENT_ASSEMBLER_
18
#define _EIC_EVENT_ASSEMBLER_
19
20
#define _PND_MC_BRANCH_ "MCTrack"
21
#define _PND_RC_TRACK_BRANCH_ "PidChargedCand"
22
23
#define _EIC_RC_TREE_ "EicRcTree"
24
#define _EIC_RC_BRANCH_ "EicRcEvent"
25
26
enum
CalorimeterType
{
qUndefined
,
qEmCal
,
qHCal
};
27
28
class
EicCalorimeterHub
:
public
TObject
{
29
friend
class
EicEventAssembler
;
30
31
public
:
32
EicCalorimeterHub
(
const
char
*
name
= 0,
CalorimeterType
type =
qUndefined
,
33
double
a = 0.0,
double
b = 0.0):
34
mName
(0),
mType
(type),
mClusters
(0),
mA
(a),
mB
(b) {
35
if
(
name
)
mName
=
new
EicDetName
(
name
);
36
};
37
~EicCalorimeterHub
() {};
38
39
double
EnergyErrorEstimate
(
double
energy) {
40
return
mA
/sqrt(energy) +
mB
;
41
};
42
43
private
:
44
CalorimeterType
mType
;
// either EmCal or HCal
45
46
EicDetName
*
mName
;
// detector name in all spellings
47
48
TClonesArray *
mClusters
;
// input array of reconstructed calorimeter clusters
49
50
Double_t
mA
;
// a/sqrt(E) term in energy resolution formula
51
Double_t
mB
;
// constant term
52
53
ClassDef
(
EicCalorimeterHub
,2)
54
};
55
56
class
EicEventAssembler
:
public
FairTask
{
57
public
:
58
EicEventAssembler
();
59
~EicEventAssembler
() {};
60
61
InitStatus
Init
();
62
63
void
Exec
(Option_t* opt);
64
65
void
FinishTask
();
66
67
// Yes, prefer to have two separate user calls;
68
int
AddEmCal
(
const
char
*
name
);
69
int
AddHCal
(
const
char
*
name
);
70
71
private
:
73
TClonesArray *
mPndMCTracks
, *
mPndPidChargedCand
;
74
75
erhic::EventMC
*
mGeneratorEvent
;
76
ParticleMappingTable
*
mMappingTable
;
77
79
Bool_t
mPersistency
;
80
81
EicRcEvent
*
mEicRcEvent
;
82
TBranch *
mEicRcEventBranch
;
83
84
std::vector<EicCalorimeterHub*>
mCalorimeters
;
// vector of registered calorimeters
85
86
int
AddCalorimeterCore
(
const
char
*
name
,
CalorimeterType
type);
87
88
void
ComposeCalorimeterInformation
();
89
void
PerformPidCalculations
();
90
void
ReAssignMomentumValue
();
91
void
AssignScatteredLepton
();
92
93
ClassDef
(
EicEventAssembler
, 15);
94
};
95
96
#endif
EicRoot
blob
master
eic
event
EicEventAssembler.h
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:35
using
1.8.2 with
EIC GitHub integration