KaliVeda
Toolkit for HIC analysis
KVSegmentedDetector.cpp
1 #include "KVSegmentedDetector.h"
2 
3 
4 
5 
7 
9 {
10  auto sub = GetSubDetector(i);
11  if (sub) {
12  auto E = sub->GetEnergyLoss();
13  GetSubDetector(i)->SetEnergyLoss(E + e);
14  E = GetEnergyLoss();
15  SetEnergyLoss(E + e);
17  }
18 }
19 
20 
21 
25 
27 {
28  // If opt!="N": clear energy losses & list of hit subdetectors
29  // \sa KVDetector::Clear()
30  KVDetector::Clear(opt);
31  for (auto hit : fHitSubDetectors) {
32  GetSubDetector(hit)->Clear(opt);
33  }
34  if (strncmp(opt, "N", 1)) fHitSubDetectors.clear();
35 }
36 
37 
39 
#define e(i)
const char Option_t
A position-sensitive detector made up of several or many numbered sub-detector segments.
void AddEnergyLossInSubDetector(int i, double e) override
std::vector< int > fHitSubDetectors
KVDetector * GetSubDetector(int i) const
void Clear(Option_t *opt="") override
constexpr Double_t E()
ClassImp(TPyArg)