Skip to content

Instantly share code, notes, and snippets.

@YanzhaoW
Last active March 11, 2026 10:47
Show Gist options
  • Select an option

  • Save YanzhaoW/bb2e132fd4ea8a3dcfa3c5d612a4fbf9 to your computer and use it in GitHub Desktop.

Select an option

Save YanzhaoW/bb2e132fd4ea8a3dcfa3c5d612a4fbf9 to your computer and use it in GitHub Desktop.
NeuLAND macros
void digitization() // Function name must be exactly the same as the filename (without extension part)
{
TStopwatch timer;
timer.Start();
FairLogger::GetLogger()->SetLogScreenLevel("info"); // change the log level to "debug", "info", "warn", "error"
FairRunAna run;
run.SetSource(new FairFileSource("test.simu.root")); // Here specify the full path to the input simulated data.
run.SetSink(new FairRootFileSink("test.digi.root")); // Here specify the full path to the output digitized data.
auto io = new FairParRootFileIo();
io->open("test.para.root"); // Here specify the full path to the input parameter file
run.GetRuntimeDb()->setFirstInput(io);
run.AddTask(new R3BNeulandDigitizer(R3BNeulandDigitizer::Options::neulandTamex));
// run.AddTask(new R3BNeulandClusterFinder());
// run.AddTask(new R3BNeulandPrimaryInteractionFinder());
// run.AddTask(new R3BNeulandPrimaryClusterFinder());
run.Init();
run.Run(0, 0);
timer.Stop();
cout << "Macro finished successfully." << endl;
cout << "Real time: " << timer.RealTime() << "s, CPU time: " << timer.CpuTime() << "s" << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment