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
SmearPerfectDetector.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SmearPerfectDetector.cxx
1
//-----------------------
2
//Simple Detector: perfect resolution
3
//Acceptance from [-15,15] in eta
4
// Original author: Barak Schmookler
5
//-----------------------
6
7
#include "
eicsmear/erhic/VirtualParticle.h
"
8
#include "
eicsmear/smear/Acceptance.h
"
9
#include "
eicsmear/smear/Device.h
"
10
#include "
eicsmear/smear/Detector.h
"
11
#include "
eicsmear/smear/Smearer.h
"
12
#include "
eicsmear/smear/ParticleMCS.h
"
13
#include "
eicsmear/smear/PerfectID.h
"
14
15
16
//Convert pseudorapidity (eta) to polar angle (theta) in radians.
17
//Make use of TLorentzVector to do eta-to-theta conversion.
18
static
double
etaToTheta
(
const
double
eta
) {
19
TLorentzVector
v
;
20
v.SetPtEtaPhiM(1., eta, 0., 0.);
21
return
v.Theta();
22
}
23
24
//Build Detector
25
Smear::Detector
BuildPerfectDetector
(){
26
27
//Create Devices
28
Smear::Device
energy(
Smear::kE
,
"0"
);
//"0":Perfect Resolution
29
Smear::Device
momentum
(
Smear::kP
,
"0"
);
30
Smear::Device
theta
(
Smear::kTheta
,
"0"
);
31
Smear::Device
phi
(
Smear::kPhi
,
"0"
);
32
33
//Detector Acceptance
34
Smear::Acceptance::Zone
acceptall(
etaToTheta
(15.),
etaToTheta
(-15.));
35
36
energy.
Accept
.
AddZone
(acceptall);
37
momentum.
Accept
.
AddZone
(acceptall);
38
theta.
Accept
.
AddZone
(acceptall);
39
phi.
Accept
.
AddZone
(acceptall);
40
41
//PID performance is unparameterised as of now
42
Smear::PerfectID
pid
;
43
pid.
Accept
.
AddZone
(acceptall);
44
45
//Create the detector and add devices
46
Smear::Detector
det;
47
det.
AddDevice
(energy);
48
det.
AddDevice
(momentum);
49
det.
AddDevice
(theta);
50
det.
AddDevice
(phi);
51
det.
AddDevice
(pid);
52
det.
SetEventKinematicsCalculator
(
"NM JB DA"
);
53
54
return
det;
55
56
}
eicsmeardetectors
blob
master
SmearPerfectDetector.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:37
using
1.8.2 with
EIC GitHub integration