6 #include <FairLogger.h>
8 #include <Math/Point2D.h>
9 #include <Math/Point3D.h>
10 #include <Math/Point3Dfwd.h>
38 LOG(ERROR) <<
"Pedestal should be subtracted to use this class!";
43 Double_t floatADC[512] = {0};
44 Double_t dummy[512] = {0};
49 Int_t endInterval = 0;
53 std::map<Int_t, Int_t> interval;
55 for (Int_t iTb = 0; iTb <
fNumTbs; iTb++)
56 floatADC[iTb] = adc[iTb];
58 for (Int_t ij = 20; ij < 500; ij++) {
59 if (floatADC[ij] > max) {
68 for (Int_t iTb = 0; iTb <
fNumTbs; iTb++) {
77 if (
final - initial > divider)
78 size =
final - initial;
79 interval.insert(std::pair<Int_t, Int_t>(initial,
final));
82 if (
final - initial > divider)
83 size =
final - initial;
84 interval.insert(std::pair<Int_t, Int_t>(initial,
final));
93 if ((pos.X() < -9000 || pos.Y() < -9000) && pad->
GetPadNum() != -1)
94 std::cout <<
" AtPSAFull::Analysis Warning! Wrong Coordinates for Pad : " << pad->
GetPadNum() << std::endl;
96 auto hit = std::make_unique<AtHit>(PadNum,
XYZPoint(pos.X(), pos.Y(), zPos), charge);
97 hit->SetTimeStamp(maxTime);
98 hits.push_back(std::move(hit));
101 auto ite = interval.begin();
103 while (ite != interval.end()) {
104 final = (ite->second);
105 initial = (ite->first);
106 Int_t reducedPoints = (
final - initial) / divider;
107 for (Int_t points = 0; points < reducedPoints + 1; points++) {
108 Int_t initInterval = initial + points * divider;
109 if (points == reducedPoints)
112 endInterval = initial + ((points + 1) * divider) - 1;
116 if ((pos.X() < -9000 || pos.Y() < -9000) && pad->
GetPadNum() != -1)
117 std::cout <<
" AtPSAFull::Analysis Warning! Wrong Coordinates for Pad : " << pad->
GetPadNum()
120 for (Int_t iIn = initInterval; iIn < endInterval; iIn++)
121 charge += floatADC[iIn] / divider;
123 auto hit = std::make_unique<AtHit>(PadNum,
XYZPoint(pos.X(), pos.Y(), zPos), charge);
124 hit->SetTimeStamp(initInterval);
126 hits.push_back(std::move(hit));