Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
eic_sphenix_withmRICH.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file eic_sphenix_withmRICH.C
1 
11 float eta2theta( double eta )
12 {
13  float theta = 2.0 * atan( exp( -1 * eta ) );
14  return theta;
15 }
16 
19 Smear::Detector BuildEicSphenix() {
20 
21  gSystem->Load("libeicsmear");
22 
23  /* CALORIMETER
24  *
25  * Calorimeter resolution usually given as sigma_E/E = const% + stocastic%/Sqrt{E}
26  * EIC Smear needs absolute sigma: sigma_E = Sqrt{const*const*E*E + stoc*stoc*E}
27  *
28  * Genre == 1 (third argument) means only photons and electrons are smeared
29  *
30  * Accept.Charge( kAll ) seems not to be working properly
31  */
32 
33  /* Create "electron-going" (backward) electromagnetic calorimeter (PbWO4)*/
34  Smear::Acceptance::Zone zone_eemc( eta2theta( -1.55 ), eta2theta( -4.00 ) );
35 
36  Smear::Device eemcE(Smear::kE, "sqrt(0.01*0.01*E*E + 0.025*0.025*E)");
37  eemcE.Accept.SetGenre(Smear::kElectromagnetic);
38  eemcE.Accept.AddZone(zone_eemc);
39 
40  /* Create "central rapidity" electromagnetic calorimeter (W-SciFi) */
41  Smear::Acceptance::Zone zone_cemc( eta2theta( 1.24 ), eta2theta( -1.55 ) );
42 
43  Smear::Device cemcE(Smear::kE, "sqrt(0.05*0.05*E*E + 0.16*0.16*E)");
44  cemcE.Accept.SetGenre(Smear::kElectromagnetic);
45  cemcE.Accept.AddZone(zone_cemc);
46 
47  /* Create "hadron-going" (forward) electromagnetic calorimeter (PbScint) */
48  Smear::Acceptance::Zone zone_femc( eta2theta( 4.00 ), eta2theta( 1.24 ) );
49 
50  Smear::Device femcE(Smear::kE, "sqrt(0.02*0.02*E*E + 0.08*0.08*E)");
51  femcE.Accept.SetGenre(Smear::kElectromagnetic);
52  femcE.Accept.AddZone(zone_femc);
53 
54  /* Create "central rapidity" hadron calorimeter (inner+outer) (Fe Scint + Steel Scint) */
55  Smear::Acceptance::Zone zone_chcal( eta2theta( 1.10 ), eta2theta( -1.10 ) );
56 
57  Smear::Device chcalE(Smear::kE, "sqrt(0.12*0.12*E*E + 0.81*0.81*E)");
58  chcalE.Accept.SetGenre(Smear::kHadronic);
59  chcalE.Accept.AddZone(zone_chcal);
60 
61  /* Create "hadron-going" (forward) hadron calorimeter (Fe Scint) */
62  Smear::Acceptance::Zone zone_fhcal( eta2theta( 4.00 ), eta2theta( 1.24 ) );
63 
64  Smear::Device fhcalE(Smear::kE, "sqrt(0.0*0.0*E*E + 0.70*0.70*E)");
65  fhcalE.Accept.SetGenre(Smear::kHadronic);
66  fhcalE.Accept.AddZone(zone_fhcal);
67 
68  /* TRACKING SYSTEM */
69  /* Create our tracking capabilities, by a combination of mometum, theta and phi Devices.
70  * The momentum parametrization (a*p + b) gives sigma_P/P in percent.
71  * So Multiply through by P and divide by 100 to get absolute sigma_P
72  * Theta and Phi parametrizations give absolute sigma in miliradians
73  *
74  * Note: eic-smear only saves smeared parameters for 'smeared' particle, i.e. if you want to
75  * save e.g. the 'true' energy for particles measured with the tracker, you need to smear the
76  * energy with '0' smearing for those particles.
77  */
78 
79  /* Create tracking system. */
80  /* @TODO Below numbers are for tracking with BeAST. We need to get the parametrization for EIC-sPHENIX!!! */
81  Smear::Acceptance::Zone zone_tracking( eta2theta( 4 ), eta2theta( -4.00 ) );
82 
83  Smear::Device trackingMomentum(Smear::kP, "(P*P*(0.0182031 + 0.00921047*pow((-log(tan(theta/2.0))), 2) - 0.00291243*pow((-log(tan(theta/2.0))), 4) + 0.000264353*pow((-log(tan(theta/2.0))), 6)) + P*(0.209681 + 0.275144*pow((-log(tan(theta/2.0))), 2) - 0.0436536*pow((-log(tan(theta/2.0))), 4) + 0.00367412*pow((-log(tan(theta/2.0))), 6)))*0.01");
84  trackingMomentum.Accept.SetCharge(Smear::kCharged);
85  trackingMomentum.Accept.AddZone(zone_tracking);
86 
87  Smear::Device trackingTheta(Smear::kTheta, "((1.0/(1.0*P))*(0.752935 + 0.280370*pow((-log(tan(theta/2.0))), 2) - 0.0359713*pow((-log(tan(theta/2.0))), 4) + 0.00200623*pow((-log(tan(theta/2.0))), 6)) + 0.0282315 - 0.00998623*pow((-log(tan(theta/2.0))), 2) + 0.00117487*pow((-log(tan(theta/2.0))), 4) - 0.0000443918*pow((-log(tan(theta/2.0))), 6))*0.001");
88  trackingTheta.Accept.SetCharge(Smear::kCharged);
89  trackingTheta.Accept.AddZone(zone_tracking);
90 
91  Smear::Device trackingPhi(Smear::kPhi, "((1.0/(1.0*P))*(0.743977 + 0.753393*pow((-log(tan(theta/2.0))), 2) + 0.0634184*pow((-log(tan(theta/2.0))), 4) + 0.0128001*pow((-log(tan(theta/2.0))), 6)) + 0.0308753 + 0.0480770*pow((-log(tan(theta/2.0))), 2) - 0.0129859*pow((-log(tan(theta/2.0))), 4) + 0.00109374*pow((-log(tan(theta/2.0))), 6))*0.001");
92  trackingPhi.Accept.SetCharge(Smear::kCharged);
93  trackingPhi.Accept.AddZone(zone_tracking);
94 
95  /* Create mRICH detector parameterization */
96  Smear::Acceptance::Zone zone_mRICH( eta2theta( 1.85 ), eta2theta( 1.242 ));
97 
98  Smear::ParticleID mRICH("mRICHPIDMatrix.dat");
99  mRICH.Accept.AddZone(zone_mRICH);
100 
101  /* Create a DETECTOR and add the devices
102  */
103  Smear::Detector det;
104 
105  det.AddDevice(eemcE);
106  det.AddDevice(cemcE);
107  det.AddDevice(femcE);
108 
109  det.AddDevice(chcalE);
110  det.AddDevice(fhcalE);
111 
112  det.AddDevice(trackingMomentum);
113  det.AddDevice(trackingTheta);
114  det.AddDevice(trackingPhi);
115 
116  det.AddDevice(mRICH);
117 
118  det.SetEventKinematicsCalculator("NM JB DA"); // The detector will calculate event kinematics from smeared values
119 
120  return det;
121 }