EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SmearZEUS_0_0.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SmearZEUS_0_0.cxx
1 
12 #include "eicsmear/smear/Device.h"
14 #include "eicsmear/smear/Smearer.h"
17 #include <eicsmear/smear/Smear.h>
19 #include "Math/Vector4D.h"
20 
25 inline double etaToTheta(const double eta) {
26  TLorentzVector v;
27  v.SetPtEtaPhiM(1., eta, 0., 0.);
28  return v.Theta();
29 }
30 
34 inline double degreesToRadians(double degrees) {
35  return degrees / 180. * TMath::Pi();
36 }
37 
46  // The central calorimeter, providing both electromagnetic and hadronic
47  // calorimetry, but with different resolutions.
48  // Note that this excludes the forward calorimeter.
49  Smear::Device emCal(Smear::kE, "0.18*sqrt(E)", Smear::kElectromagnetic);
50  Smear::Device hCal(Smear::kE, "0.35*sqrt(E)", Smear::kHadronic);
51  // Calorimeter acceptance is +/- 4 in pseudorapidity.
52  // Note that 4 is before -4 as eta-max corresponds to theta-min.
54  emCal.Accept.AddZone(cal);
55  hCal.Accept.AddZone(cal);
56  // ZEUS tracking acceptance covers 15 to 164 degrees in polar angle.
57  // This is approximately +/- 2 in pseudorapidity.
58  // Define with two volumes, for momentum and theta.
59  Smear::Device theta(Smear::kTheta, "0.0005*P + 0.003");
60  Smear::Device momentum(Smear::kP, "0.0085*P + 0.0025*P*P");
62  degreesToRadians(164.));
63  theta.Accept.AddZone(tracking);
64  momentum.Accept.AddZone(tracking);
65  // The acceptance of the Roman pots is a complicated function of
66  // angle and momentum, and not easy to define using the available
67  // Acceptance implementation. For completeness the parameterisations
68  // are included below in case they are of use, and users wish to
69  // define their own acceptance some way.
70  // Smear::Device romanTran(Smear::kPt, "0.005");
71  // Smear::Device romanLong(Smear::kPz, "0.005 * pZ");
72  // There is no parameterisation for phi, so add a dummy device:
74  // Add all the devices to the detector.
75  Smear::Detector zeus;
76  zeus.AddDevice(emCal);
77  zeus.AddDevice(hCal);
78  zeus.AddDevice(theta);
79  zeus.AddDevice(momentum);
80  zeus.AddDevice(phi);
81  // zeus.AddDevice(romanTran);
82  // zeus.AddDevice(romanLong);
83  zeus.SetEventKinematicsCalculator("NM JB DA");
84  return zeus;
85 }