1 R__LOAD_LIBRARY(libfmt.so)
3 R__LOAD_LIBRARY(libDDG4IO.so)
4 R__LOAD_LIBRARY(libGenDetectors.so)
6 #include "DD4hep/Detector.h"
7 #include "DDG4/Geant4Data.h"
8 #include "DDRec/CellIDPositionConverter.h"
9 #include "DDRec/SurfaceManager.h"
10 #include "DDRec/Surface.h"
11 #include "ROOT/RDataFrame.hxx"
17 #include "npdet/PhotoMultiplierHit.h"
22 using PMHit = npdet::PhotoMultiplierHit;
23 using PMHitRVec = ROOT::VecOps::RVec<npdet::PhotoMultiplierHit*>;
30 double degree = TMath::Pi()/180.0;
35 TChain* t =
new TChain(
"EVENT");
38 ROOT::RDataFrame d0(*t);
39 std::cout << t->GetBranch(
"ForwardRICHHits")->GetClassName() << std::endl;
58 std::vector<double> res;
60 if(h->position.z() < 400) {
61 res.push_back(h->position.x());
67 std::vector<double> res;
69 if(h->position.z() < 400) {
70 res.push_back(h->position.y());
81 .Define(
"nhits", [](
const PMTHitVector& hits) {
return hits.size(); }, {
"ForwardRICHHits"})
82 .Define(
"pmt_x",pmt_x,{
"ForwardRICHHits"})
83 .Define(
"pmt_y",pmt_y,{
"ForwardRICHHits"});
85 auto h1 = d1.Histo1D(
"nhits");
86 auto h1_x = d1.Histo1D(
"pmt_x");
87 auto h2 = d1.Histo2D({
"cerxy",
"cer_xy", 100u, -1000, -1000, 100u, -1000, -1000},
"pmt_x",
"pmt_y");
88 auto graph = d1.Graph(
"nhits",
"nhits");
90 TCanvas* c =
new TCanvas();