61 {
62
63 int fiber{}, plate{},
sign{}, station{};
64
65
66 constexpr int station_max{8};
67 constexpr int plate_max{10};
68 constexpr int fiber_max{64};
69
70
71 using FiberArr = A<A<A<A<double,2>, fiber_max>, plate_max>,station_max>;
72 auto pE_fiber_sum = std::make_unique<FiberArr>();
73 auto & E_fiber_sum = *pE_fiber_sum;
74 double E_full_sum[station_max]{};
75 double E_layer_sum[station_max][20]{};
76
77
79 CHECK( evtStore()->
retrieve(coll_handle,
"ALFA_HitCollection") );
80
81
82 for (const ALFA_Hit& hit : *coll_handle) {
83
84 station = hit.GetStationNumber();
85 plate = hit.GetPlateNumber();
86 fiber = hit.GetFiberNumber();
87 sign = hit.GetSignFiber();
88 if (plate==100) {
89
90 m_E_gvs->Fill(station,(hit.GetEnergyDeposit()));
91 continue;
92 }
93 E_fiber_sum[station-1][plate-1][fiber-1][(1-
sign)/2] += (hit.GetEnergyDeposit());
94 }
95
96 for (
int l = 0;
l < station_max;
l++ ) {
97 for (
int i = 0;
i < plate_max;
i++ ){
98 for ( int j = 0; j < fiber_max; j++ ) {
99 for (
int k = 0;
k < 2;
k++ ) {
100 E_full_sum[
l] += E_fiber_sum[
l][
i][j][
k];
101 E_layer_sum[
l][2*
i+
k] += E_fiber_sum[
l][
i][j][
k];
102 if (E_fiber_sum[l][i][j][k] > 0.) {
104 }
105 }
106 }
107 }
108 }
109
110 for (
int l = 0;
l < station_max;
l++ ) {
112 for (
int i = 0;
i < 2*plate_max;
i++ ) {
114 }
115 }
116
117 return StatusCode::SUCCESS;
118}
AtlasHitsVector< ALFA_Hit > ALFA_HitCollection
#define CHECK(...)
Evaluate an expression and check for errors.
l
Printing final latex table to .tex output file.