EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SmeareSTAR_0_0.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SmeareSTAR_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 
21 
27 static double etaToTheta(double eta) {
28  return 2. * std::atan(std::exp(-eta));
29 }
30 
34 static Smear::Acceptance::Zone zoneEta(double etamin, double etamax) {
35  // First two arguments to Zone constructor are (theta-min, theta-max)
36  // Note that eta-min --> theta-max and eta-max --> theta-min
37  return Smear::Acceptance::Zone(etaToTheta(etamax), etaToTheta(etamin));
38 }
39 
51  // Recall that the parameterisations passed to Smear::Device objects
52  // give sigma(X) *not* sigma(X) / X
53  // Electromagnetic calorimeter in the electron (east) direction, -4 < eta < -2
54  // From Zhangbu's talk: sigma(E) / E = 2% / sqrt(E) \oplus 0.75%
55  Smear::Device eastEcal("E", "0.02 * sqrt(E) + 0.0075 * E",
57  eastEcal.Accept.AddZone(zoneEta(-4., -2.));
58  // Tracking in the electron (east) direction, -2 < eta < -1
59  // From Zhangbu's talk: sigma(p)/p = 1/(pT/pZ-1/6) x (0.45%pT \oplus 0.3%)
60  // \oplus (pZ/pT)x(0.2%/p/beta)
61  // beta = p/E so 0.2%/p/beta = 0.2%E/p^2
62  Smear::Device eastTracking("P",
63  "P/(pT/pZ-1/6)*(0.0045*pT+0.003)+pZ/pT*0.002*E/P");
64  eastTracking.Accept.AddZone(zoneEta(-2., -1.));
65  eastTracking.Accept.SetCharge(Smear::kCharged);
66  // Electromagnetic calorimeter in the barrel region, -1 < eta < 1
67  // From Zhangbu's talk: sigma(E)/E = 14%/sqrt(E) \oplus 2%
68  Smear::Device barrelEcal("E", "0.14*sqrt(E)+0.02*E", Smear::kElectromagnetic);
69  barrelEcal.Accept.AddZone(zoneEta(-1., 1.));
70  // Tracking in the barrel region, -1 < eta < 1
71  // From Zhangbu's talk: sigma(p)/p = 0.45%pT \oplus 0.3% \oplus 0.2%/p/beta
72  Smear::Device barrelTracking("P", "0.0045*pT*P+0.003*P+0.002*E/P");
73  barrelTracking.Accept.AddZone(zoneEta(-1., 1.));
74  barrelTracking.Accept.SetCharge(Smear::kCharged);
75  // Tracking in hadron (west) direction, 1 < eta < 1.7
76  // From Zhangbu's talk: as for east tracking, except 1/4 instead of 1/6
77  Smear::Device westTracking("P",
78  "P/(pT/pZ-1/4)*(0.0045*pT+0.003)+pZ/pT*0.002*E/P");
79  westTracking.Accept.SetCharge(Smear::kCharged);
80  westTracking.Accept.AddZone(zoneEta(1., 1.7));
81  // Electromagnetic calorimeter in the hadron (west) direction, 1 < eta < 2
82  // From Zhangbu's talk: sigma(E)/E = 16%/sqrt(E) \oplus 2%
83  Smear::Device westEcal("E", "0.16*sqrt(E)+0.02*E", Smear::kElectromagnetic);
84  westEcal.Accept.AddZone(zoneEta(1., 2.));
85  // Electromagnetic calorimeter in the far-hadron (west) direction
86  // 2.5 < eta < 5
87  // From Zhangbu's talk: sigma(E)/E = 12%/sqrt(E) \oplus 1.4%
88  Smear::Device westEcal2("E", "0.12*sqrt(E)+0.014*E", Smear::kElectromagnetic);
89  westEcal2.Accept.AddZone(zoneEta(2.5, 5.));
90  // Hadronic calorimeter in the far-hadron (west) direction, 2.5 < eta < 5
91  // From Zhangbu's talk: sigma(E)/E = 38%/sqrt(E) \oplus 3%
92  Smear::Device westHcal("E", "0.38*sqrt(E)+0.03*E", Smear::kHadronic);
93  westHcal.Accept.AddZone(zoneEta(2.5, 5));
94  // Assume perfect theta and phi performance i.e. momentum resolution
95  // dominates over angular resolution
96  Smear::Device theta("theta", "0");
97  Smear::Device phi("phi", "0");
98  // PID performance is unparameterised as of now
100  // Combine the devices into a detector.
101  Smear::Detector estar;
102  estar.AddDevice(eastEcal);
103  estar.AddDevice(barrelEcal);
104  estar.AddDevice(westEcal);
105  estar.AddDevice(westEcal2);
106  estar.AddDevice(eastTracking);
107  estar.AddDevice(barrelTracking);
108  estar.AddDevice(westTracking);
109  estar.AddDevice(westHcal);
110  estar.AddDevice(theta);
111  estar.AddDevice(phi);
112  estar.AddDevice(pid);
113  estar.SetEventKinematicsCalculator("NM JB DA");
114  return estar;
115 }