Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EMCalTrk.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EMCalTrk.C
1 // $Id: $
2 
11 #include "EMCalTrk.h"
12 #include <cmath>
13 
14 using namespace std;
15 
17 
19 {
20  Reset();
21 }
22 
24 {
25  // TODO Auto-generated destructor stub
26 }
27 
28 void
30 {
31 
32  for (int ieta = 0; ieta < Max_N_Tower; ++ieta)
33  {
34  for (int iphi = 0; iphi < Max_N_Tower; ++iphi)
35  {
36  cemc_ieta[ieta][iphi] = -9999;
37  cemc_iphi[ieta][iphi] = -9999;
38  hcalin_ieta[ieta][iphi] = -9999;
39  hcalin_iphi[ieta][iphi] = -9999;
40  cemc_energy[ieta][iphi] = -0;
41  hcalin_energy[ieta][iphi] = -0;
42  cemc_radius[ieta][iphi] = 9999;
43  hcalin_radius[ieta][iphi] = 9999;
44  }
45  }
46 
47  trackID = -1;
48  charge = -999;
49  quality = NAN;
50  chisq = NAN;
51  ndf = NAN;
52  nhits = NAN;
53  layers = 0;
54 
55  dca2d = NAN;
56  dca2dsigma = NAN;
57  px = NAN;
58  py = NAN;
59  pz = NAN;
60  pcax = NAN;
61  pcay = NAN;
62  pcaz = NAN;
63 
64  presdphi = NAN;
65  presdeta = NAN;
66  prese3x3 = NAN;
67  prese = NAN;
68 
69  cemcdphi = NAN;
70  cemcdeta = NAN;
71  cemce3x3 = NAN;
72  cemce = NAN;
73 
74  hcalindphi = NAN;
75  hcalindeta = NAN;
76  hcaline3x3 = NAN;
77  hcaline = NAN;
78 
79  hcaloutdphi = NAN;
80  hcaloutdeta = NAN;
81  hcaloute3x3 = NAN;
82  hcaloute = NAN;
83 
84  gtrackID = -1;
85  gflavor = -1;
86  ng4hits = -1;
87  gpx = NAN;
88  gpy = NAN;
89  gpz = NAN;
90  gvx = NAN;
91  gvy = NAN;
92  gvz = NAN;
93  gfpx = NAN;
94  gfpy = NAN;
95  gfpz = NAN;
96  gfx = NAN;
97  gfy = NAN;
98  gfz = NAN;
99  gembed = -1;
100 
101  nfromtruth = -1;
102 
103  ll_ep_e = NAN;
104  ll_ep_h = NAN;
105 
106  ll_edep_e = NAN;
107  ll_edep_h = NAN;
108 
109  ll_shape_e = NAN;
110  ll_shape_h = NAN;
111 
112  cemc_sum_energy = 0;
113  cemc_sum_n_tower = 0;
114  hcalin_sum_energy = 0;
115  hcalin_sum_n_tower = 0;
116 
117 }
118 
119 void
120 EMCalTrk::Clear(Option_t *option)
121 {
122  PHObject::Clear(option);
123 
124  Reset();
125 }
126 
128 double
130 {
131  const double p2 = px * px + py * py + pz * pz;
132  return cemc_sum_energy / sqrt(p2);
133 }