Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • le.koch/cbmroot
  • patrick.pfistner_AT_kit.edu/cbmroot
  • lena.rossel_AT_stud.uni-frankfurt.de/cbmroot
  • i.deppner/cbmroot
  • fweig/cbmroot
  • karpushkin_AT_inr.ru/cbmroot
  • v.akishina/cbmroot
  • rishat.sultanov_AT_cern.ch/cbmroot
  • l_fabe01_AT_uni-muenster.de/cbmroot
  • pwg-c2f/cbmroot
  • j.decuveland/cbmroot
  • a.toia/cbmroot
  • i.vassiliev/cbmroot
  • n.herrmann/cbmroot
  • o.lubynets/cbmroot
  • se.gorbunov/cbmroot
  • cornelius.riesen_AT_physik.uni-giessen.de/cbmroot
  • zhangqn17_AT_mails.tsinghua.edu.cn/cbmroot
  • bartosz.sobol/cbmroot
  • ajit.kumar/cbmroot
  • computing/cbmroot
  • a.agarwal_AT_vecc.gov.in/cbmroot
  • osingh/cbmroot
  • wielanek_AT_if.pw.edu.pl/cbmroot
  • malgorzata.karabowicz.stud_AT_pw.edu.pl/cbmroot
  • m.shiroya/cbmroot
  • s.roy/cbmroot
  • p.-a.loizeau/cbmroot
  • a.weber/cbmroot
  • ma.beyer/cbmroot
  • d.klein/cbmroot
  • d.smith/cbmroot
  • mvdsoft/cbmroot
  • d.spicker/cbmroot
  • y.h.leung/cbmroot
  • m.deveaux/cbmroot
  • mkunold/cbmroot
  • h.darwish/cbmroot
  • f_fido01_AT_uni-muenster.de/cbmroot
  • g.kozlov/cbmroot
  • d.emschermann/cbmroot
  • evgeny.lavrik/cbmroot
  • v.friese/cbmroot
  • f.uhlig/cbmroot
  • ebechtel_AT_ikf.uni-frankfurt.de/cbmroot
  • a.senger/cbmroot
  • praisig/cbmroot
  • s.lebedev/cbmroot
  • redelbach_AT_compeng.uni-frankfurt.de/cbmroot
  • p.subramani/cbmroot
  • a_meye37_AT_uni-muenster.de/cbmroot
  • om/cbmroot
  • o.golosov/cbmroot
  • l.chlad/cbmroot
  • a.bercuci/cbmroot
  • d.ramirez/cbmroot
  • v.singhal/cbmroot
  • h.schiller/cbmroot
  • apuntke/cbmroot
  • f.zorn/cbmroot
  • rubio_AT_physi.uni-heidelberg.de/cbmroot
  • p.chudoba/cbmroot
  • apuntke/mcbmroot
  • r.karabowicz/cbmroot
64 results
Show changes
Commits on Source (4)
void pl_Eff_XY(Int_t iDut = 910,
Double_t dEffMin = 0.5,
Double_t dEffMax = 1.,
Double_t dThr = 0.01,
TString sysinfo = "") {
void pl_Eff_XY_1(Int_t iDut = 910,
Double_t dEffMin = 0.5,
Double_t dEffMax = 1.,
Double_t dThr = 0.01,
TString sysinfo = "") {
gROOT->LoadMacro("pl_Datime.C");
// TCanvas *can = new TCanvas("can22","can22");
// can->Divide(2,2);
......
......@@ -4,6 +4,7 @@ GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_digi.C)
GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_reco_event.C)
GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_hadron_analysis.C)
GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_check_overlaps.C)
GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_qa.C)
#GENERATE_ROOT_TEST_SCRIPT(${CBMROOT_SOURCE_DIR}/macro/mcbm/mcbm_check_materials.C)
Set(MACRO_DIR ${CMAKE_CURRENT_BINARY_DIR})
......@@ -65,6 +66,18 @@ ForEach(setup IN LISTS cbm_setup)
Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "300")
Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed;All ok")
set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED ${fixture_digi_tb})
Set(fixture_qa_event_mc fixture_qa_event_mc_${testname})
set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_qa_event_mc})
Set(testname mcbm_qa_event_mc_${setup})
Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/mcbm/mcbm_qa.sh ${NumEvents} \"data/${setup}_test\" \"${setup}\")
Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "300")
Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed;All ok")
Set_Tests_Properties(${testname} PROPERTIES FAIL_REGULAR_EXPRESSION "ERROR")
Set_Tests_Properties(${testname} PROPERTIES FAIL_REGULAR_EXPRESSION "FATAL")
Set_Tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED ${fixture_qa_event_mc})
Set(fixture_overlap fixture_overlap_${testname})
set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_overlap})
#Set(testname mcbm_reco_${setup})
#Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/mcbm/mcbm_reco.sh ${NumEvents} ${BeamAngle} \"${setup}\")
......@@ -74,12 +87,11 @@ ForEach(setup IN LISTS cbm_setup)
#Set(_FileName_Dependency data/mcbm_mc_${setup}_ok)
#Set_Tests_Properties(${testname} PROPERTIES REQUIRED_FILES ${_FileName_Dependency})
Set(testname mcbm_overlap_${setup})
Add_Test(${testname} ${CBMROOT_BINARY_DIR}/macro/mcbm/mcbm_check_overlaps.sh \"data/${setup}_test\")
Set_Tests_Properties(${testname} PROPERTIES TIMEOUT "600")
Set_Tests_Properties(${testname} PROPERTIES PASS_REGULAR_EXPRESSION "Test Passed;All ok")
set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED ${fixture_digi_event})
set_tests_properties(${testname} PROPERTIES FIXTURES_REQUIRED ${fixture_overlap})
Set(fixture_mcbm_overlap fixture_mcbm_overlap_${testname})
set_tests_properties(${testname} PROPERTIES FIXTURES_SETUP ${fixture_mcbm_overlap})
......
// --------------------------------------------------------------------------
//
// Macro for simulation & reconstruction QA
//
// The following naming conventions are assumed:
// Raw data file: [dataset].event.raw.root
// Transport file: [dataset].tra.root
// Parameter file: [dataset].par.root
// Reconstruction file: [dataset].rec.root
//
// S. Gorbunov 28/09/2020
//
// --------------------------------------------------------------------------
// Includes needed for IDE
#if !defined(__CLING__)
#include <FairFileSource.h>
#include <FairMonitor.h>
#include <FairParAsciiFileIo.h>
#include <FairParRootFileIo.h>
#include <FairRootFileSink.h>
#include <FairRunAna.h>
#include <FairRuntimeDb.h>
#include <FairSystemInfo.h>
#include "CbmDefs.h"
#include "CbmMCDataManager.h"
#include "CbmMuchTransportQa.h"
#include "CbmSetup.h"
#include <TStopwatch.h>
#endif
void mcbm_qa(Int_t nEvents = 0,
TString dataset = "data/mcbm_beam_2020_03_test",
TString setup = "mcbm_beam_2020_03") {
// ========================================================================
// Adjust this part according to your requirements
// ----- Logger settings ----------------------------------------------
FairLogger::GetLogger()->SetLogScreenLevel("INFO");
FairLogger::GetLogger()->SetLogVerbosityLevel("LOW");
// ------------------------------------------------------------------------
// ----- Environment --------------------------------------------------
TString myName = "mcbm_qa"; // this macro's name for screen output
TString srcDir = gSystem->Getenv("VMCWORKDIR"); // top source directory
// ------------------------------------------------------------------------
// ----- In- and output file names ------------------------------------
TString rawFile = dataset + ".event.raw.root";
TString traFile = dataset + ".tra.root";
TString parFile = dataset + ".par.root";
TString recFile = dataset + ".rec.root";
TString sinkFile = dataset + ".qa.root";
// ------------------------------------------------------------------------
// ----- Load the geometry setup -------------------------------------
std::cout << std::endl;
std::cout << "-I- " << myName << ": Loading setup " << setup << std::endl;
CbmSetup::Instance()->LoadSetup(setup);
// You can modify the pre-defined setup by using
// CbmSetup::Instance()->RemoveModule(ESystemId) or
// CbmSetup::Instance()->SetModule(ESystemId, const char*, Bool_t) or
// CbmSetup::Instance()->SetActive(ESystemId, Bool_t)
// See the class documentation of CbmSetup.
// ------------------------------------------------------------------------
// ----- Parameter files as input to the runtime database -------------
std::cout << std::endl;
std::cout << "-I- " << myName << ": Defining parameter files " << std::endl;
TList* parFileList = new TList();
TString geoTag;
// - MUCH digitisation parameters
if (CbmSetup::Instance()->GetGeoTag(ECbmModuleId::kMuch, geoTag)) {
bool mcbmFlag = geoTag.Contains("mcbm", TString::kIgnoreCase);
TString parFile = srcDir + "/parameters/much/much_";
parFile += (mcbmFlag) ? geoTag : geoTag(0, 4);
parFile += "_digi_sector.root";
{ // init geometry from the file
TFile* f = new TFile(parFile, "R");
TObjArray* stations = (TObjArray*) f->Get("stations");
CbmMuchGeoScheme::Instance()->Init(stations, mcbmFlag);
}
}
// - TRD digitisation parameters
if (CbmSetup::Instance()->GetGeoTag(ECbmModuleId::kTrd, geoTag)) {
const Char_t* npar[4] = {"asic", "digi", "gas", "gain"};
TObjString* trdParFile(NULL);
for (Int_t i(0); i < 4; i++) {
trdParFile = new TObjString(srcDir + "/parameters/trd/trd_" + geoTag + "."
+ npar[i] + ".par");
parFileList->Add(trdParFile);
std::cout << "-I- " << myName << ": Using parameter file "
<< trdParFile->GetString() << std::endl;
}
}
// - TOF digitisation parameters
if (CbmSetup::Instance()->GetGeoTag(ECbmModuleId::kTof, geoTag)) {
TObjString* tofFile =
new TObjString(srcDir + "/parameters/tof/tof_" + geoTag + ".digi.par");
parFileList->Add(tofFile);
std::cout << "-I- " << myName << ": Using parameter file "
<< tofFile->GetString() << std::endl;
TObjString* tofBdfFile =
new TObjString(srcDir + "/parameters/tof/tof_" + geoTag + ".digibdf.par");
parFileList->Add(tofBdfFile);
std::cout << "-I- " << myName << ": Using parameter file "
<< tofBdfFile->GetString() << std::endl;
}
// ------------------------------------------------------------------------
// In general, the following parts need not be touched
// ========================================================================
// ----- Timer --------------------------------------------------------
TStopwatch timer;
timer.Start();
// ------------------------------------------------------------------------
// ---- Debug option -------------------------------------------------
gDebug = 0;
// ------------------------------------------------------------------------
// ----- FairRunAna ---------------------------------------------------
FairFileSource* inputSource = new FairFileSource(rawFile);
inputSource->AddFriend(traFile);
inputSource->AddFriend(recFile);
FairRunAna* run = new FairRunAna();
run->SetSource(inputSource);
run->SetGenerateRunInfo(kFALSE);
FairRootFileSink* sink = new FairRootFileSink(sinkFile);
run->SetSink(sink);
TString monitorFile {sinkFile};
monitorFile.ReplaceAll("qa", "qa.monitor");
FairMonitor::GetMonitor()->EnableMonitor(kTRUE, monitorFile);
// ------------------------------------------------------------------------
// ----- MCDataManager (legacy mode) -----------------------------------
CbmMCDataManager* mcManager = new CbmMCDataManager("MCDataManager", 1);
mcManager->AddFile(traFile);
run->AddTask(mcManager);
// ------------------------------------------------------------------------
// ----- MUCH QA ---------------------------------
if (CbmSetup::Instance()->IsActive(ECbmModuleId::kMuch)) {
run->AddTask(new CbmMuchTransportQa());
run->AddTask(new CbmMuchDigitizerQa());
}
// ------------------------------------------------------------------------
// ----- Parameter database --------------------------------------------
std::cout << std::endl << std::endl;
std::cout << "-I- " << myName << ": Set runtime DB" << std::endl;
FairRuntimeDb* rtdb = run->GetRuntimeDb();
FairParRootFileIo* parIo1 = new FairParRootFileIo();
parIo1->open(parFile.Data(), "in");
rtdb->setFirstInput(parIo1);
if (!parFileList->IsEmpty()) {
FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo();
parIo2->open(parFileList, "in");
rtdb->setSecondInput(parIo2);
}
rtdb->print();
// ------------------------------------------------------------------------
// ----- Run initialisation -------------------------------------------
std::cout << std::endl;
std::cout << "-I- " << myName << ": Initialise run" << std::endl;
run->Init();
// ----- Start run ----------------------------------------------------
std::cout << std::endl << std::endl;
std::cout << "-I- " << myName << ": Starting run" << std::endl;
run->Run(0, nEvents);
// ------------------------------------------------------------------------
// ----- Finish -------------------------------------------------------
timer.Stop();
FairMonitor::GetMonitor()->Print();
Double_t rtime = timer.RealTime();
Double_t ctime = timer.CpuTime();
std::cout << std::endl << std::endl;
std::cout << "Macro finished successfully." << std::endl;
std::cout << "Output file is " << sinkFile << std::endl;
std::cout << "Parameter file is " << parFile << std::endl;
std::cout << "Real time " << rtime << " s, CPU time " << ctime << " s"
<< std::endl;
std::cout << std::endl;
std::cout << " Test passed" << std::endl;
std::cout << " All ok " << std::endl;
// ------------------------------------------------------------------------
// ----- Resource monitoring ------------------------------------------
// Extract the maximal used memory an add is as Dart measurement
// This line is filtered by CTest and the value send to CDash
FairSystemInfo sysInfo;
Float_t maxMemory = sysInfo.GetMaxMemory();
std::cout << "<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
std::cout << maxMemory;
std::cout << "</DartMeasurement>" << std::endl;
Float_t cpuUsage = ctime / rtime;
std::cout << "<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
std::cout << cpuUsage;
std::cout << "</DartMeasurement>" << std::endl;
// ------------------------------------------------------------------------
// ----- Function needed for CTest runtime dependency -----------------
RemoveGeoManager();
// ------------------------------------------------------------------------
}
......@@ -39,7 +39,6 @@ void run_qa(Int_t nEvents = 0,
// Adjust this part according to your requirements
// ----- Logger settings ----------------------------------------------
FairLogger::GetLogger()->SetLogScreenLevel("INFO");
FairLogger::GetLogger()->SetLogVerbosityLevel("LOW");
// ------------------------------------------------------------------------
......@@ -55,7 +54,6 @@ void run_qa(Int_t nEvents = 0,
TString parFile = dataset + ".par.root";
TString recFile = dataset + ".rec.root";
TString sinkFile = dataset + ".qa.root";
// ------------------------------------------------------------------------
// ----- Load the geometry setup -------------------------------------
......@@ -129,11 +127,11 @@ void run_qa(Int_t nEvents = 0,
// ------------------------------------------------------------------------
// ----- FairRunAna ---------------------------------------------------
FairRunAna* run = new FairRunAna();
FairFileSource* inputSource = new FairFileSource(rawFile);
inputSource->AddFriend(traFile);
inputSource->AddFriend(recFile);
FairRunAna* run = new FairRunAna();
run->SetSource(inputSource);
run->SetGenerateRunInfo(kFALSE);
......@@ -141,7 +139,6 @@ void run_qa(Int_t nEvents = 0,
run->SetSink(sink);
TString monitorFile {sinkFile};
monitorFile.ReplaceAll("qa", "qa.monitor");
FairMonitor::GetMonitor()->EnableMonitor(kTRUE, monitorFile);
// ------------------------------------------------------------------------
......@@ -152,31 +149,27 @@ void run_qa(Int_t nEvents = 0,
run->AddTask(mcManager);
// ------------------------------------------------------------------------
// ----- MUCH hit finder QA ---------------------------------
// ----- MUCH QA ---------------------------------
if (CbmSetup::Instance()->IsActive(ECbmModuleId::kMuch)) {
run->AddTask(new CbmMuchTransportQa());
run->AddTask(new CbmMuchDigitizerQa());
}
// ------------------------------------------------------------------------
// ----- Parameter database --------------------------------------------
{
std::cout << std::endl << std::endl;
std::cout << "-I- " << myName << ": Set runtime DB" << std::endl;
FairRuntimeDb* rtdb = run->GetRuntimeDb();
FairParRootFileIo* parIo1 = new FairParRootFileIo();
parIo1->open(parFile.Data(), "in");
rtdb->setFirstInput(parIo1);
if (!parFileList->IsEmpty()) {
FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo();
parIo2->open(parFileList, "in");
rtdb->setSecondInput(parIo2);
}
rtdb->print();
std::cout << std::endl << std::endl;
std::cout << "-I- " << myName << ": Set runtime DB" << std::endl;
FairRuntimeDb* rtdb = run->GetRuntimeDb();
FairParRootFileIo* parIo1 = new FairParRootFileIo();
parIo1->open(parFile.Data(), "in");
rtdb->setFirstInput(parIo1);
if (!parFileList->IsEmpty()) {
FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo();
parIo2->open(parFileList, "in");
rtdb->setSecondInput(parIo2);
}
rtdb->print();
// ------------------------------------------------------------------------
// ----- Run initialisation -------------------------------------------
std::cout << std::endl;
......@@ -189,8 +182,6 @@ void run_qa(Int_t nEvents = 0,
run->Run(0, nEvents);
// ------------------------------------------------------------------------
//std::cout<< "Test failed" << std::endl;
// ----- Finish -------------------------------------------------------
timer.Stop();
......@@ -208,7 +199,6 @@ void run_qa(Int_t nEvents = 0,
std::cout << " All ok " << std::endl;
// ------------------------------------------------------------------------
// ----- Resource monitoring ------------------------------------------
// Extract the maximal used memory an add is as Dart measurement
// This line is filtered by CTest and the value send to CDash
......
......@@ -65,7 +65,6 @@ private:
CbmMuchDigitizerQa& operator=(const CbmMuchDigitizerQa&);
TFolder* histFolder;
void InitCounters();
void InitCanvases();
void InitChargeHistos();
void InitLengthHistos();
......@@ -76,10 +75,8 @@ private:
void FillTotalPadsHistos();
void DrawCanvases();
void PrintCounters();
void OutputNvsS();
void UpdateParticleCounters(Int_t stId, Int_t pdgCode, Int_t motherId);
void FillChargePerPoint();
void FillDigitizerPerformancePlots();
......@@ -150,20 +147,6 @@ private:
Int_t fnPadSizesX = 0;
Int_t fnPadSizesY = 0;
Int_t* fNall = nullptr; // number of all tracks at the first station
Int_t* fNpr = nullptr; // number of protons at the first station
Int_t* fNpi = nullptr; // number of pions at the first station
Int_t* fNel = nullptr; // number of electrons at the first station
Int_t* fNmu = nullptr; // number of muons at the first station
Int_t* fNka = nullptr; // number of kaons at the first station
Int_t* fNprimary = nullptr; // number of primary tracks at the first station
Int_t* fNsecondary =
nullptr; // number of secondary tracks at the first station
Int_t fPointsTotal = 0;
Int_t fPointsUnderCounted = 0;
Int_t fPointsOverCounted = 0;
Double_t fPadMinLx = 0.;
Double_t fPadMinLy = 0.;
Double_t fPadMaxLx = 0.;
......