19 for (
unsigned int j=0; j<8; j++) {
21 s <<
"edep_in_det_no." << j+1;
24 m_h_E_full_sum_h[j] =
new TH1D(s.str().c_str(), s.str().c_str(), 100, 0, Emax);
29 s <<
"edep_per_layer_det_no." << j+1;
35 s <<
"hit_layer_det_no." << j+1;
36 m_h_hit_layer[j] =
new TH1D(s.str().c_str(), s.str().c_str(), 50, 0, 50);
41 s <<
"hit_fiber_det_no." << j+1;
42 m_h_hit_fiber[j] =
new TH1D(s.str().c_str(), s.str().c_str(), 100, 0, 60);
47 m_tree =
new TTree(
"ALFA",
"ALFA");
56 return StatusCode::SUCCESS;
70 int fiber, plate,
sign, station;
71 double E_fiber_sum[8][10][64][2], E_full_sum[8], E_layer_sum[8][20];
72 for (
int l= 0; l<8; l++) {
74 for (
int i = 0; i < 10; i++) {
75 E_layer_sum[l][i] = 0.;
76 E_layer_sum[l][i+10] = 0.;
77 for (
int j = 0; j < 64; j++) {
78 for (
int k = 0; k < 2; k++) {
79 E_fiber_sum[l][i][j][k] = 0.;
86 const EventContext& ctx{Gaudi::Hive::currentContext()};
89 for (iter = (*col_alfa).begin(); iter != (*col_alfa).end(); ++iter) {
90 station = (*iter).GetStationNumber();
91 plate = (*iter).GetPlateNumber();
92 fiber = (*iter).GetFiberNumber();
93 sign = (*iter).GetSignFiber();
94 E_fiber_sum[station-1][plate-1][fiber-1][(1-
sign)/2] += ((*iter).GetEnergyDeposit());
100 m_energy->push_back((*iter).GetEnergyDeposit());
103 for (
int l=0; l<8; l++){
104 for (
int i=0; i<10; i++){
105 for (
int j=0; j<64; j++){
106 for (
int k=0; k<2; k++){
107 E_full_sum[l] += E_fiber_sum[l][i][j][k];
108 E_layer_sum[l][2*i+k] += E_fiber_sum[l][i][j][k];
109 if (E_fiber_sum[l][i][j][k] > 0.) {
117 for (
int l=0; l<8; l++) {
119 for (
int i = 0; i< 20; i++) {
126 return StatusCode::SUCCESS;
AtlasHitsVector< ALFA_Hit >::const_iterator ALFA_HitConstIter
AtlasHitsVector< ALFA_Hit > ALFA_HitCollection
#define ATH_CHECK
Evaluate an expression and check for errors.
Handle class for reading from StoreGate.
std::array< TH1 *, 8 > m_h_hit_layer
std::array< TH1 *, 8 > m_h_E_full_sum_h
Some variables.
virtual StatusCode execute()
std::array< TH1 *, 8 > m_h_hit_fiber
std::vector< int > * m_fiber
std::vector< int > * m_station
Gaudi::Property< std::string > m_ntupleFileName
std::vector< double > * m_energy
std::vector< int > * m_sign
std::vector< int > * m_plate
SG::ReadHandleKey< ALFA_HitCollection > m_readKey
Gaudi::Property< std::string > m_path
std::array< TH1 *, 8 > m_h_E_layer_sum_h
virtual StatusCode initialize()
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.