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
SmearWithTof.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file SmearWithTof.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
#include "
piddetectors/TofBarrelSmearer.h
"
15
16
17
//Convert pseudorapidity (eta) to polar angle (theta) in radians.
18
//Make use of TLorentzVector to do eta-to-theta conversion.
19
static
double
etaToTheta
(
const
double
eta
) {
20
TLorentzVector
v
;
21
v.SetPtEtaPhiM(1., eta, 0., 0.);
22
return
v.Theta();
23
}
24
25
//Build Detector
26
Smear::Detector
BuildWithTof
(){
27
28
//Create Devices
29
Smear::Device
energy(
Smear::kE
,
"0"
);
//"0":Perfect Resolution
30
Smear::Device
momentum
(
Smear::kP
,
"0"
);
31
Smear::Device
theta
(
Smear::kTheta
,
"0"
);
32
Smear::Device
phi
(
Smear::kPhi
,
"0"
);
33
34
//Detector Acceptance
35
Smear::Acceptance::Zone
acceptall(
etaToTheta
(15.),
etaToTheta
(-15.));
36
37
energy.
Accept
.
AddZone
(acceptall);
38
momentum.
Accept
.
AddZone
(acceptall);
39
theta.
Accept
.
AddZone
(acceptall);
40
phi.
Accept
.
AddZone
(acceptall);
41
42
Smear::TofBarrelSmearer
tofBarrel
(100, -1.0, 1.0, 10);
43
tofBarrel.
Accept
.
AddZone
( acceptall );
// cuts are done by the detector!
44
tofBarrel.
Accept
.
SetCharge
(
Smear::kCharged
);
45
46
// //PID performance is unparameterised as of now
47
// Smear::PerfectID pid;
48
// pid.Accept.AddZone(acceptall);
49
50
//Create the detector and add devices
51
Smear::Detector
det;
52
det.
AddDevice
(energy);
53
det.
AddDevice
(momentum);
54
det.
AddDevice
(theta);
55
det.
AddDevice
(phi);
56
det.
AddDevice
(tofBarrel);
57
// det.AddDevice(pid);
58
det.
SetEventKinematicsCalculator
(
"NM JB DA"
);
59
60
return
det;
61
62
}
eicsmeardetectors
blob
master
SmearWithTof.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:37
using
1.8.2 with
EIC GitHub integration