R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
testNeulandReconstruction.C
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3 * Copyright (C) 2019-2025 Members of R3B Collaboration *
4 * *
5 * This software is distributed under the terms of the *
6 * GNU General Public Licence (GPL) version 3, *
7 * copied verbatim in the file "LICENSE". *
8 * *
9 * In applying this license GSI does not waive the privileges and immunities *
10 * granted to it by virtue of its status as an Intergovernmental Organization *
11 * or submit itself to any jurisdiction. *
12 ******************************************************************************/
13
15{
16 TStopwatch timer;
17 timer.Start();
18
19 FairLogger::GetLogger()->SetLogScreenLevel("debug");
20
21 FairRunAna run;
22 run.SetSource(new FairFileSource("test.digi.root"));
23 run.SetSink(new FairRootFileSink("test.reco.root"));
24
25 auto io = new FairParRootFileIo();
26 io->open("test.neul.root");
27 run.GetRuntimeDb()->setFirstInput(io);
28
29 // Perfect Reco
30 run.AddTask(new R3BNeulandMultiplicityCheat("NeulandPrimaryHits", "NeulandMultiplicityCheat"));
31 run.AddTask(new R3BNeulandNeutronsCheat("NeulandMultiplicityCheat", "NeulandPrimaryHits", "NeulandNeutronsCheat"));
32
33 // Calorimetric Reco
34 run.AddTask(new R3BNeulandMultiplicityCalorimetric("NeulandClusters", "NeulandMultiplicityCalorimetric"));
35 run.AddTask(new R3BNeulandNeutronsRValue(
36 600, "NeulandMultiplicityCalorimetric", "NeulandClusters", "NeulandNeutronsCalorimetric"));
37
38 // Bayes Multiplicity
39 run.AddTask(new R3BNeulandMultiplicityBayes("NeulandClusters", "NeulandMultiplicityBayes"));
40 run.AddTask(
41 new R3BNeulandNeutronsRValue(600, "NeulandMultiplicityBayes", "NeulandClusters", "NeulandNeutronsBayes"));
42
43 run.Init();
44 run.Run(0, 0);
45
46 timer.Stop();
47 cout << "Macro finished successfully." << endl;
48 cout << "Real time: " << timer.RealTime() << "s, CPU time: " << timer.CpuTime() << "s" << endl;
49}
void testNeulandReconstruction()