-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed some local paths and generalised
- Loading branch information
Showing
3 changed files
with
23 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,40 @@ | ||
#include "LOWQ2Benchmarks.h" | ||
#include <cstdlib> | ||
|
||
void RunLOWQ2(std::string inputFileName="Brems_input.root", std::string outputFileName="plots/LOWQ2BremsRecon3.root", | ||
double eventCrossSection=0, std::string compactName="/opt/detector/epic-nightly/share/epic/epic.xml") { | ||
void RunLOWQ2( std::string inputFileName = "Brems_input.root", | ||
std::string outputFileName = "plots/LOWQ2QRRecon3.root", | ||
std::string compactName = "/opt/detector/epic-nightly/share/epic/epic.xml", | ||
bool inputIsTimeBased = false, // true if the event sample is time-based, false if it is event-based | ||
double timeWindow = 10.15*1e-9, //[s] | ||
double eventCrossSection = 0.0551, // [mb] | ||
double luminosity = 1e34, // [cm^-2 s^-1] | ||
) { | ||
|
||
//Set implicit multi-threading | ||
ROOT::EnableImplicitMT(); | ||
|
||
// Output script running conditions | ||
std::cout << "Running LOWQ2 benchmarks with the following parameters:" << std::endl; | ||
std::cout << " - input file: " << inputFileName << std::endl; | ||
std::cout << " - output file: " << outputFileName << std::endl; | ||
std::cout << " - xml file: " << compactName << std::endl; | ||
std::cout << " - input is time-based: " << inputIsTimeBased << std::endl; | ||
std::cout << " - time window: " << timeWindow << " s" << std::endl; | ||
std::cout << " - event cross section: " << eventCrossSection << " mb" << std::endl; | ||
std::cout << " - luminosity: " << luminosity << " cm^-2 s^-1" << std::endl; | ||
|
||
dd4hep::Detector& detector = dd4hep::Detector::getInstance(); | ||
detector.fromCompact(compactName); | ||
|
||
double luminosity = 1e34; // [cm^-2 s^-1] | ||
double eBeamEnergy = 18.0; // [GeV] | ||
double pBeamEnergy = 275.0; // [GeV] | ||
double eventCrossSectionQR = 0.0551; // [mb] | ||
double eventCrossSectionBrems = 171.3; // [mb] | ||
double bunchSpacing = 10.15*1e-9; // [s] | ||
|
||
double eventRateQR = luminosity * eventCrossSectionQR * 1e-27; // [Hz] | ||
double eventRateBrems = luminosity * eventCrossSectionBrems * 1e-27; // [Hz] | ||
double bunchRate = 1.0 / bunchSpacing; // [Hz] | ||
// eventCrossSectionBrems = 171.3; [mb] | ||
// eventCrossSectionQR = 0.0551; [mb] | ||
|
||
double eventRate = luminosity * eventCrossSection * 1e-27; // [Hz] | ||
|
||
//LOWQ2Benchmarks("/scratch/EIC/ReconOut/QR_new.root","plots/LOWQ2QRRecon2.root",detector,eventRateQR); | ||
LOWQ2Benchmarks("/scratch/EIC/ReconOut/Brems_new.root","plots/LOWQ2BremsRecon2.root",detector,eventRateBrems); | ||
LOWQ2Benchmarks("/scratch/EIC/ReconOut/Brems_new.root","plots/LOWQ2BremsRecon3.root",detector,bunchRate); | ||
//LOWQ2Benchmarks(inputFileName,outputFileName,detector,eventRate); | ||
if(inputIsTimeBased){ | ||
eventRate = 1.0 / timeWindow; // [Hz] | ||
} | ||
|
||
LOWQ2Benchmarks(inputFileName,outputFileName,detector,eventRate); | ||
|
||
} |