Last active
March 11, 2026 10:47
-
-
Save YanzhaoW/bb2e132fd4ea8a3dcfa3c5d612a4fbf9 to your computer and use it in GitHub Desktop.
NeuLAND macros
This file contains hidden or 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
| 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