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{};
73 double E_fiber_sum[8][10][64][2]{}, E_full_sum[8]{}, E_layer_sum[8][20]{};
77 for (iter = (*col_alfa).begin(); iter != (*col_alfa).end(); ++iter) {
78 station = (*iter).GetStationNumber();
79 plate = (*iter).GetPlateNumber();
80 fiber = (*iter).GetFiberNumber();
81 sign = (*iter).GetSignFiber();
82 E_fiber_sum[station-1][plate-1][fiber-1][(1-
sign)/2] += ((*iter).GetEnergyDeposit());
88 m_energy->push_back((*iter).GetEnergyDeposit());
91 for (
int l=0; l<8; l++){
92 for (
int i=0; i<10; i++){
93 for (
int j=0; j<64; j++){
94 for (
int k=0; k<2; k++){
95 E_full_sum[l] += E_fiber_sum[l][i][j][k];
96 E_layer_sum[l][2*i+k] += E_fiber_sum[l][i][j][k];
97 if (E_fiber_sum[l][i][j][k] > 0.) {
105 for (
int l=0; l<8; l++) {
107 for (
int i = 0; i< 20; i++) {
114 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.
virtual StatusCode execute(const EventContext &ctx)
Execute method.
std::array< TH1 *, 8 > m_h_hit_layer
std::array< TH1 *, 8 > m_h_E_full_sum_h
Some variables.
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.