Skip to content
Snippets Groups Projects
Commit 8f280fbe authored by Tom Polakovic's avatar Tom Polakovic
Browse files

Merge branch 'Polakovic-master-patch-79387' into 'master'

Polakovic master patch 79387

See merge request EIC/benchmarks!9
parents 3a8d460e 914cd1b6
No related branches found
No related tags found
No related merge requests found
image: eicweb.phy.anl.gov:4567/eic/npdet/npdet:latest image: eicweb.phy.anl.gov:4567/eic/npdet/npdet:latest
p
default: default:
artifacts: artifacts:
...@@ -107,7 +108,7 @@ track_test_1_dummy_test: ...@@ -107,7 +108,7 @@ track_test_1_dummy_test:
- bash trackers/dummy_test.sh - bash trackers/dummy_test.sh
allow_failure: true allow_failure: true
roman_pot_benchmark: roman_pot_nhits:
stage: benchmarks stage: benchmarks
tags: tags:
- sodium - sodium
...@@ -115,6 +116,14 @@ roman_pot_benchmark: ...@@ -115,6 +116,14 @@ roman_pot_benchmark:
- root -b -q trackers/simple_tracking.cxx+ - root -b -q trackers/simple_tracking.cxx+
allow_failure: true allow_failure: true
roman_pot_eta:
stage: benchmarks
tags:
- sodium
script:
- root -b -q trackers/roman_pot_hit_eta.cxx+
allow_failure: true
zdc_benchmark: zdc_benchmark:
stage: benchmarks stage: benchmarks
tags: tags:
......
//R__LOAD_LIBRARY(libfmt.so)
//#include "fmt/core.h"
R__LOAD_LIBRARY(libDDG4IO.so)
//
//#include "DD4hep/Detector.h"
#include "DDG4/Geant4Data.h"
//#include "DDRec/CellIDPositionConverter.h"
//#include "DDRec/SurfaceManager.h"
//#include "DDRec/Surface.h"
#include "ROOT/RDataFrame.hxx"
//
//#include "lcio2/MCParticleData.h"
//#include "lcio2/ReconstructedParticleData.h"
//#include "Math/Vector3D.h"
//#include "Math/Vector4D.h"
//#include "Math/VectorUtil.h"
#include "TCanvas.h"
//#include "TLegend.h"
//#include "TMath.h"
//#include "TRandom3.h"
//#include "TFile.h"
//#include "TH1F.h"
//#include "TH1D.h"
//#include "TTree.h"
#include "TChain.h"
//#include "TF1.h"
#include <random>
//#include "lcio2/TrackerRawDataData.h"
//#include "lcio2/TrackerRawData.h"
void roman_pot_hit_eta(const char* fname = "./sim_output/roman_pot_out.root"){
ROOT::EnableImplicitMT(); // Tell ROOT you want to go parallel
double degree = TMath::Pi()/180.0;
TChain* t = new TChain("EVENT");
t->Add(fname);
ROOT::RDataFrame d0(*t);
auto hits_eta = [&](const std::vector<dd4hep::sim::Geant4Tracker::Hit*>& hits){
std::vector<double> result;
for (const auto& h: hits){
result.push_back(h->momentum.eta());
}
return result;
};
auto d1 = d0.Define("hits_eta", hits_eta, {"ForwardRomanPotHits"});
auto h1 = d1.Histo1D(TH1D("h1", "hits_eta", 300, 0,20), "hits_eta");
auto n1 = h1->GetMean();
std::cout << "Pseudorapidity of hits: " << n1 << std::endl;
TCanvas* c = new TCanvas();
h1->DrawClone();
if (n1 < 5) {
std::quick_exit(1);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment