48 auto run = FairRunOnline::Instance();
51 run->GetHttpServer()->Register(
"/Tasks",
this);
52 run->GetHttpServer()->RegisterCommand(
"Reset_Neuland_Reco", Form(
"/Tasks/%s/->ResetHistos()", GetName()));
55 auto ioman = FairRootManager::Instance();
58 throw std::runtime_error(
"R3BNeulandOnlineReconstruction: No FairRootManager");
64 throw std::runtime_error(
"R3BNeulandOnlineReconstruction: No R3BEventHeader");
70 gStyle->SetCanvasPreferGL(kTRUE);
71 gStyle->SetPalette(kViridis);
72 gStyle->SetOptStat(0);
74 auto canvasHits =
new TCanvas(
"canvasHits",
"Neuland Hits", 10, 10, 850, 850);
75 canvasHits->Divide(3, 2);
77 hHitX =
new TH1D(
"hHitX",
"Hit X", 300, -150, 150);
80 hHitY =
new TH1D(
"hHitY",
"Hit Y", 300, -150, 150);
86 hHitT =
new TH1D(
"hHitT",
"Hit T", 100000, -10000, 10000);
87 hHitTadj =
new TH1D(
"hHitTadj",
"Hit Tadj", 100000, -10000, 10000);
92 hHitE =
new TH1D(
"hHitE",
"Hit E", 1000, 0, 100);
96 hHitMult =
new TH1D(
"hHitMult",
"Hit Multiplicity", 100, 0, 100);
101 run->AddObject(canvasHits);
104 auto canvas3D =
new TCanvas(
"canvas3D",
"Neuland 3D Hits & Clusters", 10, 10, 850, 850);
105 canvas3D->Divide(2, 2);
107 hHits3D =
new TH3D(
"hHits3D",
"Hits3D, nHits > 10", 16, 0, 16 * 5, 50, -125, 125, 50, -125, 125);
108 hHits3D->GetXaxis()->SetTitle(
"Z");
109 hHits3D->GetYaxis()->SetTitle(
"X");
110 hHits3D->GetZaxis()->SetTitle(
"Y");
111 auto lofH =
hHits3D->GetListOfFunctions();
116 hClusterSize =
new TH1D(
"hClusterSize",
"Cluster Size", 100, 0, 100);
119 hClusters3D =
new TH3D(
"hClusters3D",
"Hits 3D, nHits > 10", 16, 0, 16 * 5, 50, -125, 125, 50, -125, 125);
128 hClusterMult =
new TH1D(
"hClusterMult",
"Cluster Multiplicity", 50, 0, 50);
133 run->AddObject(canvas3D);
136 auto canvasCalibr =
new TCanvas(
"canvasCalibr",
"canvasCalibr", 10, 10, 850, 850);
137 canvasCalibr->Divide(2, 2);
139 hEtotVSNClusters =
new TH2D(
"hEtotVSNClusters",
"Calibr", 300, 0, 3000, 50, 0, 50);
144 hEtot =
new TH1D(
"hEtot",
"Etot", 300, 0, 3000);
149 run->AddObject(canvasCalibr);
163 const auto nHits = hits.size();
170 for (
const auto& hit : hits)
172 hHitX->Fill(hit->GetPosition().X());
173 hHitY->Fill(hit->GetPosition().Y());
174 hHitZ->Fill(hit->GetPosition().Z());
175 hHitT->Fill(hit->GetT());
177 hHitE->Fill(hit->GetE());
181 const auto nClusters = clusters.size();
183 for (
const auto& cluster : clusters)
188 if (hits.size() > 10)
191 for (
const auto& hit : hits)
194 hit->GetPosition().X(),
195 hit->GetPosition().Y(),
199 for (
const auto& cluster : clusters)
202 cluster->GetPosition().X(),
203 cluster->GetPosition().Y(),
208 const double etot = std::accumulate(clusters.begin(),