Commit 782e3df5 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

[mCBM 2020] Add support for files splitting based on spills at unpacking level

- New macros to determine the spill borders
- Adapt unpack macros input parameters to optionally use spill related data ranges
- Add in unpack_tsa_mcbm the spill border values for run 831
- Add support for optional split file indices from unpack in all macros
- In mcbm_event_ana.C, do not overwrite the unpack parameter file
parent 5f6de5b8
Bool_t build_event_win(UInt_t uRunId = 0,
Int_t nTimeslices = 0,
TString sOutDir = "./data",
TString sInpDir = "./data") {
/// FIXME: Disable clang formatting to keep easy parameters overview
/* clang-format off */
Bool_t build_event_win(UInt_t uRunId = 0,
Int_t nTimeslices = 0,
TString sOutDir = "./data",
TString sInpDir = "./data",
Int_t iUnpFileIndex = -1)
{
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
// ----- In- and output file names ------------------------------------
TString fileName = Form("%s/unp_mcbm_%03u.root", sInpDir.Data(), uRunId);
TString runId = TString::Format("%03u", uRunId);
TString outFile = sOutDir + "/mcbm_events_win_" + runId + ".root";
/// Standardized RUN ID
TString sRunId = TString::Format("%03u", uRunId);
/// Initial pattern
TString inFile = sInpDir + "/unp_mcbm_" + sRunId;
TString outFile = sOutDir + "/mcbm_events_win_" + sRunId;
/// Add index of splitting at unpacking level if needed
if (0 <= iUnpFileIndex) {
inFile += TString::Format("_%02u", iUnpFileIndex);
outFile += TString::Format("_%02u", iUnpFileIndex);
} // if ( 0 <= iUnpFileIndex )
/// Add ROOT file suffix
inFile += ".root";
outFile += ".root";
// ------------------------------------------------------------------------
if (uRunId < 692) return kFALSE;
/*
std::cout << sOutDir << std::endl << sInpDir << std::endl;
std::cout << fileName << std::endl
std::cout << inFile << std::endl
<< outFile << std::endl;
std::cout << uRunId << " " << nTimeslices << std::endl;
......@@ -46,7 +63,7 @@ Bool_t build_event_win(UInt_t uRunId = 0,
FairRunAna* fRun = new FairRunAna();
fRun->SetEventHeaderPersistence(kFALSE);
FairFileSource* inputSource = new FairFileSource(fileName);
FairFileSource* inputSource = new FairFileSource(inFile);
fRun->SetSource(inputSource);
FairRootFileSink* outputSink = new FairRootFileSink(outFile);
......@@ -126,9 +143,7 @@ Bool_t build_event_win(UInt_t uRunId = 0,
eventBuilder->SetTriggerMaxNumber(ECbmModuleId::kPsd, -1);
if (0 < uRunId)
eventBuilder->SetOutFilename(
Form("%s/HistosEvtWin_%03u.root", sOutDir.Data(), uRunId));
if (0 < uRunId) eventBuilder->SetOutFilename(Form("%s/HistosEvtWin_%03u.root", sOutDir.Data(), uRunId));
fRun->AddTask(eventBuilder);
......@@ -142,7 +157,8 @@ Bool_t build_event_win(UInt_t uRunId = 0,
cout << "Starting run" << endl;
if (0 == nTimeslices) {
fRun->Run(0, 0); // run until end of input file
} else {
}
else {
fRun->Run(0, nTimeslices); // process N Timeslices
}
// ------------------------------------------------------------------------
......
#include "build_event_win.C"
/// FIXME: Disable clang formatting around parameters initial value setting
/// due to problem with real file path length
/// FIXME: Disable clang formatting to keep easy parameters overview
/* clang-format off */
Bool_t build_event_win_kronos(UInt_t uRunIdx = 28,
Int_t nTimeslices = 0,
TString sOutDir = "./data",
TString sInpDir = "/lustre/cbm/users/ploizeau/mcbm2020/"
"unp_evt_data_7f229b3f_20201103") {
"unp_evt_data_7f229b3f_20201103",
Int_t iUnpFileIndex = -1)
{
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
......@@ -41,5 +42,5 @@ Bool_t build_event_win_kronos(UInt_t uRunIdx = 28,
if (uRunId < 692 && 0 != uRunId) return kFALSE;
return build_event_win(uRunId, nTimeslices, sOutDir, sInpDir);
return build_event_win(uRunId, nTimeslices, sOutDir, sInpDir, iUnpFileIndex);
}
......@@ -6,12 +6,16 @@
//
// --------------------------------------------------------------------------
Bool_t mcbm_build_and_reco(UInt_t uRunId = 831,
Int_t nTimeslices = 0,
TString sInpDir = "./data",
TString sOutDir = "./data") {
/// FIXME: Disable clang formatting to keep easy parameters overview
/* clang-format off */
Bool_t mcbm_build_and_reco(UInt_t uRunId = 831,
Int_t nTimeslices = 0,
TString sInpDir = "./data",
TString sOutDir = "./data",
Int_t iUnpFileIndex = -1)
{
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
// ========================================================================
// Adjust this part according to your requirements
......@@ -34,11 +38,25 @@ Bool_t mcbm_build_and_reco(UInt_t uRunId = 831,
/// due to problem with real file path length
/* clang-format off */
// ----- In- and output file names ------------------------------------
TString inFile = sInpDir + Form("/unp_mcbm_%03u.root", uRunId);
TString parFileIn = sInpDir + Form("/unp_mcbm_params_%03u.root", uRunId);
TString parFileOut = sOutDir + Form("/reco_mcbm_evt_win_params_%03u.root",
uRunId);
TString outFile = sOutDir + Form("/reco_mcbm_evt_win_%03u.root", uRunId);
/// Standardized RUN ID
TString sRunId = TString::Format("%03u", uRunId);
/// Initial pattern
TString inFile = sInpDir + "/unp_mcbm_" + sRunId;
TString parFileIn = sInpDir + "/unp_mcbm_params_" + sRunId;
TString parFileOut = sOutDir + "/reco_mcbm_evt_win_params_" + sRunId;
TString outFile = sOutDir + "/reco_mcbm_evt_win_" + sRunId;
/// Add index of splitting at unpacking level if needed
if ( 0 <= iUnpFileIndex ) {
inFile += TString::Format( "_%02u", iUnpFileIndex );
// the input par file is not split during unpacking!
parFileOut += TString::Format( "_%02u", iUnpFileIndex );
outFile += TString::Format( "_%02u", iUnpFileIndex );
} // if ( 0 <= iUnpFileIndex )
/// Add ROOT file suffix
inFile += ".root";
parFileIn += ".root";
parFileOut += ".root";
outFile += ".root";
// ------------------------------------------------------------------------
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
......@@ -164,9 +182,7 @@ Bool_t mcbm_build_and_reco(UInt_t uRunId = 831,
eventBuilder->SetTriggerMaxNumber(ECbmModuleId::kPsd, -1);
if (0 < uRunId)
eventBuilder->SetOutFilename(
Form("%sHistosEvtWin_%03u.root", sOutDir.Data(), uRunId));
if (0 < uRunId) eventBuilder->SetOutFilename(Form("%sHistosEvtWin_%03u.root", sOutDir.Data(), uRunId));
run->AddTask(eventBuilder);
// ------------------------------------------------------------------------
......
......@@ -8,14 +8,15 @@
#include "mcbm_build_and_reco.C"
/// FIXME: Disable clang formatting around parameters initial value setting
/// due to problem with real file path length
/// FIXME: Disable clang formatting to keep easy parameters overview
/* clang-format off */
Bool_t mcbm_build_and_reco_kronos(UInt_t uRunIdx = 28,
Int_t nTimeslices = 0,
TString sInpDir = "/lustre/cbm/users/ploizeau/mcbm2020/"
"unp_evt_data_7f229b3f_20201103",
TString sOutDir = "./data") {
TString sOutDir = "./data",
Int_t iUnpFileIndex = -1)
{
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
......@@ -49,5 +50,5 @@ Bool_t mcbm_build_and_reco_kronos(UInt_t uRunIdx = 28,
if (uRunId < 692 && 0 != uRunId) return kFALSE;
return mcbm_build_and_reco(uRunId, nTimeslices, sInpDir, sOutDir);
return mcbm_build_and_reco(uRunId, nTimeslices, sInpDir, sOutDir, iUnpFileIndex);
}
......@@ -6,9 +6,17 @@
//
// --------------------------------------------------------------------------
void mcbm_event_ana(Int_t runId = 831,
Int_t nTimeslices = 1000,
Bool_t bUseEvtWin = kFALSE) {
/// FIXME: Disable clang formatting to keep easy parameters overview
/* clang-format off */
void mcbm_event_ana(UInt_t uRunId = 831,
Int_t nTimeslices = 1000,
Bool_t bUseEvtWin = kFALSE,
TString sInpDir = "./data",
TString sOutDir = "./data",
Int_t iUnpFileIndex = -1)
{
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
// --- Logger settings ----------------------------------------------------
TString logLevel = "WARN";
......@@ -23,16 +31,36 @@ void mcbm_event_ana(Int_t runId = 831,
// ------------------------------------------------------------------------
// ----- In- and output file names ------------------------------------
TString inFile = Form("./data/reco_mcbm_event_%03u.root", runId);
TString trkFile = Form("./data/tracking_mcbm_event_%03u.root", runId);
/// Standardized RUN ID
TString sRunId = TString::Format("%03u", uRunId);
/// Initial pattern
TString inFile = sInpDir + "/reco_mcbm_event_" + sRunId;
TString trkFile = sInpDir + "/tracking_mcbm_event_" + sRunId;
TString parFileIn = sInpDir + "/unp_mcbm_params_" + sRunId;
TString parFileOut = sOutDir + "/mcbm_event_ana_params_" + sRunId;
TString geoFile = paramDir + "mcbm_beam_2020_03.geo.root";
TString outFile = sOutDir + "/mcbm_event_ana__" + sRunId;
/// Initial pattern if using event builder with time window
if (bUseEvtWin) {
inFile = Form("./data/reco_mcbm_evt_win_%03u.root", runId);
trkFile = Form("./data/tracking_mcbm_evt_win_%03u.root", runId);
} // if (bUseEvtWin)
TString parFile = Form("./data/unp_mcbm_params_%i.root", runId);
TString geoFile = paramDir + "mcbm_beam_2020_03.geo.root";
TString outFile = Form("./data/ana_mcbm_%i.root", runId);
inFile = sInpDir + "/reco_mcbm_evt_win_" + sRunId;
trkFile = sInpDir + "/tracking_mcbm_evt_win_" + sRunId;
parFileOut = sOutDir + "/mcbm_event_ana_evt_win_params_" + sRunId;
outFile = sOutDir + "/mcbm_event_ana_evt_win_" + sRunId;
} // if( bUseEvtWin )
/// Add index of splitting at unpacking level if needed
if (0 <= iUnpFileIndex) {
inFile += TString::Format("_%02u", iUnpFileIndex);
trkFile += TString::Format("_%02u", iUnpFileIndex);
// the input par file is from unpacking and not split during it!
parFileOut += TString::Format("_%02u", iUnpFileIndex);
outFile += TString::Format("_%02u", iUnpFileIndex);
} // if ( 0 <= iUnpFileIndex )
/// Add ROOT file suffix
inFile += ".root";
trkFile += ".root";
parFileIn += ".root";
parFileOut += ".root";
outFile += ".root";
// ------------------------------------------------------------------------
// ----- Parameter files as input to the runtime database -------------
......@@ -399,10 +427,12 @@ void mcbm_event_ana(Int_t runId = 831,
FairRuntimeDb* rtdb = run->GetRuntimeDb();
FairParRootFileIo* parIo1 = new FairParRootFileIo();
FairParAsciiFileIo* parIo2 = new FairParAsciiFileIo();
parIo1->open(parFile.Data(), "UPDATE");
FairParRootFileIo* parIo3 = new FairParRootFileIo();
parIo1->open(parFileIn.Data(), "READ");
parIo2->open(parFileList, "in");
rtdb->setFirstInput(parIo1);
rtdb->setSecondInput(parIo2);
parIo3->open(parFileOut.Data(), "RECREATE");
// ------------------------------------------------------------------------
......@@ -410,7 +440,7 @@ void mcbm_event_ana(Int_t runId = 831,
std::cout << std::endl;
std::cout << "-I- " << myName << ": Initialise run" << std::endl;
run->Init();
rtdb->setOutput(parIo1);
rtdb->setOutput(parIo3);
rtdb->saveOutput();
rtdb->print();
// ------------------------------------------------------------------------
......@@ -431,7 +461,7 @@ void mcbm_event_ana(Int_t runId = 831,
std::cout << std::endl << std::endl;
std::cout << "Macro finished successfully." << std::endl;
std::cout << "Output file is " << outFile << std::endl;
std::cout << "Parameter file is " << parFile << std::endl;
std::cout << "Parameter file is " << parFileOut << std::endl;
std::cout << "Real time " << rtime << " s, CPU time " << ctime << " s"
<< std::endl;
std::cout << std::endl;
......
......@@ -6,10 +6,16 @@
//
// --------------------------------------------------------------------------
Bool_t mcbm_event_reco(UInt_t uRunId = 831,
Int_t nTimeslices = 0,
TString sInpDir = "./data",
TString sOutDir = "./data") {
/// FIXME: Disable clang formatting to keep easy parameters overview
/* clang-format off */
Bool_t mcbm_event_reco(UInt_t uRunId = 831,
Int_t nTimeslices = 0,
TString sInpDir = "./data",
TString sOutDir = "./data",
Int_t iUnpFileIndex = -1)
{
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
// --- Logger settings ----------------------------------------------------
TString logLevel = "INFO";
......@@ -28,11 +34,25 @@ Bool_t mcbm_event_reco(UInt_t uRunId = 831,
/// due to problem with real file path length
/* clang-format off */
// ----- In- and output file names ------------------------------------
TString inFile = sInpDir + Form("/unp_mcbm_%03u.root", uRunId);
TString parFileIn = sInpDir + Form("/unp_mcbm_params_%03u.root", uRunId);
TString parFileOut = sOutDir + Form("/reco_mcbm_event_params_%03u.root",
uRunId);
TString outFile = sOutDir + Form("/reco_mcbm_event_%03u.root", uRunId);
/// Standardized RUN ID
TString sRunId = TString::Format("%03u", uRunId);
/// Initial pattern
TString inFile = sInpDir + "/unp_mcbm_" + sRunId;
TString parFileIn = sInpDir + "/unp_mcbm_params_" + sRunId;
TString parFileOut = sOutDir + "/reco_mcbm_event_params_" + sRunId;
TString outFile = sOutDir + "/reco_mcbm_event_" + sRunId;
/// Add index of splitting at unpacking level if needed
if ( 0 <= iUnpFileIndex ) {
inFile += TString::Format( "_%02u", iUnpFileIndex );
// the input par file is not split during unpacking!
parFileOut += TString::Format( "_%02u", iUnpFileIndex );
outFile += TString::Format( "_%02u", iUnpFileIndex );
} // if ( 0 <= iUnpFileIndex )
/// Add ROOT file suffix
inFile += ".root";
parFileIn += ".root";
parFileOut += ".root";
outFile += ".root";
// ------------------------------------------------------------------------
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
......
......@@ -8,14 +8,15 @@
#include "mcbm_event_reco.C"
/// FIXME: Disable clang formatting around parameters initial value setting
/// due to problem with real file path length
/// FIXME: Disable clang formatting to keep easy parameters overview
/* clang-format off */
Bool_t mcbm_event_reco_kronos(UInt_t uRunIdx = 28,
Int_t nTimeslices = 0,
TString sInpDir = "/lustre/cbm/users/ploizeau/mcbm2020/"
"unp_evt_data_7f229b3f_20201103",
TString sOutDir = "./data") {
TString sOutDir = "./data",
Int_t iUnpFileIndex = -1)
{
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
......@@ -49,5 +50,5 @@ Bool_t mcbm_event_reco_kronos(UInt_t uRunIdx = 28,
if (uRunId < 692 && 0 != uRunId) return kFALSE;
return mcbm_event_reco(uRunId, nTimeslices, sInpDir, sOutDir);
return mcbm_event_reco(uRunId, nTimeslices, sInpDir, sOutDir, iUnpFileIndex);
}
......@@ -5,10 +5,16 @@
//
// --------------------------------------------------------------------------
Bool_t mcbm_reco(UInt_t uRunId = 831,
Int_t nTimeslices = 0,
TString sInpDir = "./data",
TString sOutDir = "./data") {
/// FIXME: Disable clang formatting to keep easy parameters overview
/* clang-format off */
Bool_t mcbm_reco(UInt_t uRunId = 831,
Int_t nTimeslices = 0,
TString sInpDir = "./data",
TString sOutDir = "./data",
Int_t iUnpFileIndex = -1)
{
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
// --- Logger settings ----------------------------------------------------
TString logLevel = "INFO";
......@@ -25,10 +31,25 @@ Bool_t mcbm_reco(UInt_t uRunId = 831,
// ----- In- and output file names ------------------------------------
TString inFile = sInpDir + Form("/unp_mcbm_%03u.root", uRunId);
TString parFileIn = sInpDir + Form("/unp_mcbm_params_%03u.root", uRunId);
TString parFileOut = sOutDir + Form("/reco_mcbm_params_%03u.root", uRunId);
TString outFile = sOutDir + Form("/reco_mcbm_%03u.root", uRunId);
/// Standardized RUN ID
TString sRunId = TString::Format("%03u", uRunId);
/// Initial pattern
TString inFile = sInpDir + "/unp_mcbm_" + sRunId;
TString parFileIn = sInpDir + "/unp_mcbm_params_" + sRunId;
TString parFileOut = sOutDir + "/reco_mcbm_params_" + sRunId;
TString outFile = sOutDir + "/reco_mcbm_" + sRunId;
/// Add index of splitting at unpacking level if needed
if (0 <= iUnpFileIndex) {
inFile += TString::Format("_%02u", iUnpFileIndex);
// the input par file is not split during unpacking!
parFileOut += TString::Format("_%02u", iUnpFileIndex);
outFile += TString::Format("_%02u", iUnpFileIndex);
} // if ( 0 <= uUnpFileIndex )
/// Add ROOT file suffix
inFile += ".root";
parFileIn += ".root";
parFileOut += ".root";
outFile += ".root";
// ------------------------------------------------------------------------
/*
......
......@@ -7,11 +7,18 @@
#include "mcbm_reco.C"
/// FIXME: Disable clang formatting to keep easy parameters overview
/* clang-format off */
Bool_t mcbm_reco_kronos(UInt_t uRunIdx = 28,
Int_t nTimeslices = 0,
TString sInpDir = "/lustre/cbm/users/ploizeau/mcbm2020/"
"unp_evt_data_7f229b3f_20201103",
TString sOutDir = "./data") {
TString sOutDir = "./data",
Int_t iUnpFileIndex = -1)
{
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
UInt_t uRunId = 0;
if (99999 != uRunIdx) {
......@@ -42,5 +49,5 @@ Bool_t mcbm_reco_kronos(UInt_t uRunIdx = 28,
if (uRunId < 692 && 0 != uRunId) return kFALSE;
return mcbm_reco(uRunId, nTimeslices, sInpDir, sOutDir);
return mcbm_reco(uRunId, nTimeslices, sInpDir, sOutDir, iUnpFileIndex);
}
......@@ -5,14 +5,20 @@
//
// --------------------------------------------------------------------------
Bool_t mcbm_tof_tracking(UInt_t uRunId = 831,
Bool_t bEventWin = kFALSE,
Int_t iTrackMode = 2,
Int_t iCalOpt = 0,
Int_t nTimeslices = 0,
TString sInpDir = "./data",
TString sOutDir = "./data",
TString cCalId = "831.50.3.0") {
/// FIXME: Disable clang formatting to keep easy parameters overview
/* clang-format off */
Bool_t mcbm_tof_tracking(UInt_t uRunId = 831,
Bool_t bEventWin = kFALSE,
Int_t iTrackMode = 2,
Int_t iCalOpt = 0,
Int_t nTimeslices = 0,
TString sInpDir = "./data",
TString sOutDir = "./data",
TString cCalId = "831.50.3.0",
Int_t iUnpFileIndex = -1)
{
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
// --- Logger settings ----------------------------------------------------
TString logLevel = "INFO";
......@@ -21,7 +27,7 @@ Bool_t mcbm_tof_tracking(UInt_t uRunId = 831,
// ----- Environment --------------------------------------------------
TString myName = "mcbm_tof_tracking"; // this macro's name for screen outp
TString myName = "mcbm_tof_tracking"; // this macro's name for screen outp
TString srcDir = gSystem->Getenv("VMCWORKDIR"); // top source directory
TString paramDir = srcDir + "/macro/beamtime/mcbm2020/";
TString parDir = srcDir + "/parameters";
......@@ -31,20 +37,32 @@ Bool_t mcbm_tof_tracking(UInt_t uRunId = 831,
/// due to problem with real file path length
/* clang-format off */
// ----- In- and output file names ------------------------------------
TString inFile = sInpDir + Form("/reco_mcbm_event_%03u.root", uRunId);
TString parFileIn = sInpDir + Form("/reco_mcbm_event_params_%03u.root",
uRunId);
TString parFileOut = sOutDir + Form("/tracking_mcbm_event_params_%03u.root",
uRunId);
TString outFile = sOutDir + Form("/tracking_mcbm_event_%03u.root", uRunId);
/// Standardized RUN ID
TString sRunId = TString::Format("%03u", uRunId);
/// Initial pattern
TString inFile = sInpDir + "/reco_mcbm_event_" + sRunId;
TString parFileIn = sInpDir + "/reco_mcbm_event_params_" + sRunId;
TString parFileOut = sOutDir + "/tracking_mcbm_event_params_" + sRunId;
TString outFile = sOutDir + "/tracking_mcbm_event_" + sRunId;
/// Initial pattern if using event builder with time window
if (bEventWin) {
inFile = sInpDir + Form("/reco_mcbm_evt_win_%03u.root", uRunId);
parFileIn = sInpDir + Form("/reco_mcbm_evt_win_params_%03u.root",
uRunId);
parFileOut = sOutDir + Form("/tracking_mcbm_evt_win_params_%03u.root",
uRunId);
outFile = sOutDir + Form("/tracking_mcbm_evt_win_%03u.root", uRunId);
inFile = sInpDir + "/reco_mcbm_evt_win_" + sRunId;
parFileIn = sInpDir + "/reco_mcbm_evt_win_params_" + sRunId;
parFileOut = sOutDir + "/tracking_mcbm_evt_win_params_" + sRunId;
outFile = sOutDir + "/tracking_mcbm_evt_win_" + sRunId;
} // if( bEventWin )
/// Add index of splitting at unpacking level if needed
if ( 0 <= iUnpFileIndex ) {
inFile += TString::Format( "_%02u", iUnpFileIndex );
parFileIn += TString::Format( "_%02u", iUnpFileIndex );
parFileOut += TString::Format( "_%02u", iUnpFileIndex );
outFile += TString::Format( "_%02u", iUnpFileIndex );
} // if ( 0 <= iUnpFileIndex )
/// Add ROOT file suffix
inFile += ".root";
parFileIn += ".root";
parFileOut += ".root";
outFile += ".root";
// ------------------------------------------------------------------------
/// FIXME: Re-enable clang formatting after parameters initial values setting
/* clang-format on */
......@@ -63,9 +81,8 @@ Bool_t mcbm_tof_tracking(UInt_t uRunId = 831,
// --- Load the geometry setup ----
// This is currently only required by the TRD (parameters)
std::string geoSetupTag = "mcbm_beam_2020_03";
TString geoFile =
paramDir + geoSetupTag.data() + ".geo.root"; // Created in sim. run
CbmSetup* geoSetup = CbmSetup::Instance();
TString geoFile = paramDir + geoSetupTag.data() + ".geo.root"; // Created in sim. run
CbmSetup* geoSetup = CbmSetup::Instance();
geoSetup->LoadSetup(geoSetupTag.data());
TList* parFileList = new TList();
// ------------------------------------------------------------------------
......@@ -101,49 +118,41 @@ Bool_t mcbm_tof_tracking(UInt_t uRunId = 831,
// ----- Track reconstruction ------------------------------------------
switch (iTrackMode) {
case 2: {
Int_t iGenCor = 1;
Double_t dScalFac = 1.;
Double_t dChi2Lim2 = 3.5;
TString cTrkFile =
parDir + "/tof/" + Form("%s_tofFindTracks.hst.root", cCalId.Data());
Int_t iGenCor = 1;
Double_t dScalFac = 1.;
Double_t dChi2Lim2 = 3.5;
TString cTrkFile = parDir + "/tof/" + Form("%s_tofFindTracks.hst.root", cCalId.Data());
Int_t iTrackingSetup = 1;
CbmTofTrackFinder* tofTrackFinder = new CbmTofTrackFinderNN();
tofTrackFinder->SetMaxTofTimeDifference(0.2); // in ns/cm
tofTrackFinder->SetTxLIM(0.3); // max slope dx/dz
tofTrackFinder->SetTyLIM(0.3); // max dev from mean slope dy/dz
tofTrackFinder->SetTyMean(0.); // mean slope dy/dz
tofTrackFinder->SetTyLIM(0.3); // max dev from mean slope dy/dz
tofTrackFinder->SetTyMean(0.); // mean slope dy/dz
CbmTofTrackFitter* tofTrackFitter = new CbmTofTrackFitterKF(0, 211);
TFitter* MyFit = new TFitter(1); // initialize Minuit
tofTrackFinder->SetFitter(tofTrackFitter);
CbmTofFindTracks* tofFindTracks =
new CbmTofFindTracks("TOF Track Finder");
CbmTofFindTracks* tofFindTracks = new CbmTofFindTracks("TOF Track Finder");
tofFindTracks->UseFinder(tofTrackFinder);
tofFindTracks->UseFitter(tofTrackFitter);
tofFindTracks->SetCalOpt(iCalOpt);
// 1 - update offsets, 2 - update walk, 0 - bypass
tofFindTracks->SetCorMode(
iGenCor); // valid options: 0,1,2,3,4,5,6, 10 - 19
tofFindTracks->SetTtTarg(
0.065); // target value for Mar2020 triple stack -> betapeak ~ 0.95
tofFindTracks->SetCorMode(iGenCor); // valid options: 0,1,2,3,4,5,6, 10 - 19
tofFindTracks->SetTtTarg(0.065); // target value for Mar2020 triple stack -> betapeak ~ 0.95
//tofFindTracks->SetTtTarg(0.041); // target value for inverse velocity, > 0.033 ns/cm!
//tofFindTracks->SetTtTarg(0.035); // target value for inverse velocity, > 0.033 ns/cm!
tofFindTracks->SetCalParFileName(
cTrkFile); // Tracker parameter value file name
tofFindTracks->SetBeamCounter(5, 0, 0); // default beam counter
tofFindTracks->SetStationMaxHMul(
30); // Max Hit Multiplicity in any used station
tofFindTracks->SetT0MAX(dScalFac); // in ns
tofFindTracks->SetSIGT(0.08); // default in ns
tofFindTracks->SetSIGX(0.3); // default in cm
tofFindTracks->SetSIGY(0.45); // default in cm
tofFindTracks->SetSIGZ(0.05); // default in cm
tofFindTracks->SetUseSigCalib(
kFALSE); // ignore resolutions in CalPar file
tofTrackFinder->SetSIGLIM(dChi2Lim2
* 2.); // matching window in multiples of chi2
tofFindTracks->SetCalParFileName(cTrkFile); // Tracker parameter value file name
tofFindTracks->SetBeamCounter(5, 0, 0); // default beam counter
tofFindTracks->SetStationMaxHMul(30); // Max Hit Multiplicity in any used station