Skip to content
Snippets Groups Projects
Commit 1fc2d1e1 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau
Browse files

[Evt dis] fixes to mcbm track display macro with L1 + TOF

- Add Howto at beginning pointing to N. Herrman files on lustre
- set the alignment file to be in the data folder by default instead of the root one
- exclude Much from CA if disabled/missing
- add gitignore in macro/beamtime/mcbm2022 with in/out files of evt display
- new clang format on evt display macro
- add commands to tune L1 cuts per detector
parent 0ab38775
No related branches found
No related tags found
1 merge request!1481Separation of TofTracklets from TofTracks + TS base event display for TofTracking
*.hst.root
L1material.root
TofBadChannels.txt
rec/
...@@ -9,6 +9,16 @@ ...@@ -9,6 +9,16 @@
// //
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
/**
** HOWTO:
** 1) Create the subfolder "rec/<RUN ID>"
** 2) Copy from nh lustre folder the digievent and param files for <RUN ID>.4.0000 into the data subfolder
** 3) Copy from nh lustre folder the ini_Clusterizer.C and ini_trks.C macros in the current macro folder
** 4) Copy from nh lustre folder mcbm_beam_2022_05_23_nickel.geo.root into "macro/mcbm/data"
** 5) Copy from nh lustre folder AlignmentMatrices_mcbm_beam_2022_05_23_nickel.root into the data subfolder
** 6) Change the log level at l.259 of reco/L1/CbmL1.cxx from "fatal" to "warn" and recompile
**/
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -18,9 +28,9 @@ ...@@ -18,9 +28,9 @@
Bool_t mcbm_digievent_display(UInt_t uRunId = 2391, Bool_t mcbm_digievent_display(UInt_t uRunId = 2391,
Int_t nTimeslices = 10, Int_t nTimeslices = 10,
Int_t iFirstTimeslice = 0, Int_t iFirstTimeslice = 0,
Int_t iACut = 0, Int_t iACut = 0,
TString cFId = "4.0000", TString cFId = "4.0000",
TString sInpDir = "./data/", TString sInpDir = "./data/",
TString sOutDir = "./rec/", TString sOutDir = "./rec/",
Int_t iUnpFileIndex = -1) Int_t iUnpFileIndex = -1)
{ {
...@@ -188,7 +198,9 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391, ...@@ -188,7 +198,9 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391,
// ----- FairRunAna --------------------------------------------------- // ----- FairRunAna ---------------------------------------------------
FairRunAna* run = new FairRunAna(); FairRunAna* run = new FairRunAna();
FairFileSource* inputSource; FairFileSource* inputSource;
if (iUnpFileIndex == -1) { inputSource = new FairFileSource(inFile + ".root"); } if (iUnpFileIndex == -1) {
inputSource = new FairFileSource(inFile + ".root");
}
else { else {
inputSource = new FairFileSource(inFile + "-0.root"); inputSource = new FairFileSource(inFile + "-0.root");
for (int i = 1; i < iUnpFileIndex; i++) { for (int i = 1; i < iUnpFileIndex; i++) {
...@@ -202,7 +214,7 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391, ...@@ -202,7 +214,7 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391,
run->SetGeomFile(geoFile); run->SetGeomFile(geoFile);
// Define output file for FairMonitor histograms // Define output file for FairMonitor histograms
TString monitorFile {outFile}; TString monitorFile{outFile};
monitorFile.ReplaceAll("dis", "dis.monitor"); monitorFile.ReplaceAll("dis", "dis.monitor");
FairMonitor::GetMonitor()->EnableMonitor(kTRUE, monitorFile); FairMonitor::GetMonitor()->EnableMonitor(kTRUE, monitorFile);
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
...@@ -221,14 +233,14 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391, ...@@ -221,14 +233,14 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391,
// (Fairsoft Apr21p2 or newer is needed) // (Fairsoft Apr21p2 or newer is needed)
TString alignmentMatrixFileName = "AlignmentMatrices_" + geoSetupTag + ".root"; TString alignmentMatrixFileName = "data/AlignmentMatrices_" + geoSetupTag + ".root";
if (alignmentMatrixFileName.Length() != 0) { if (alignmentMatrixFileName.Length() != 0) {
std::cout << "-I- " << myName << ": Applying alignment for file " << alignmentMatrixFileName << std::endl; std::cout << "-I- " << myName << ": Applying alignment for file " << alignmentMatrixFileName << std::endl;
// Define the basic structure which needs to be filled with information // Define the basic structure which needs to be filled with information
// This structure is stored in the output file and later passed to the // This structure is stored in the output file and later passed to the
// FairRoot framework to do the (miss)alignment // FairRoot framework to do the (miss)alignment
std::map<std::string, TGeoHMatrix>* matrices {nullptr}; std::map<std::string, TGeoHMatrix>* matrices{nullptr};
// read matrices from disk // read matrices from disk
LOG(info) << "Filename: " << alignmentMatrixFileName; LOG(info) << "Filename: " << alignmentMatrixFileName;
...@@ -242,7 +254,9 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391, ...@@ -242,7 +254,9 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391,
exit(1); exit(1);
} }
if (matrices) { run->AddAlignmentMatrices(*matrices); } if (matrices) {
run->AddAlignmentMatrices(*matrices);
}
else { else {
LOG(error) << "Alignment required but no matrices found." LOG(error) << "Alignment required but no matrices found."
<< "\n Exiting"; << "\n Exiting";
...@@ -480,6 +494,17 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391, ...@@ -480,6 +494,17 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391,
run->AddTask(kalman); run->AddTask(kalman);
CbmL1* l1 = new CbmL1(); CbmL1* l1 = new CbmL1();
l1->SetMcbmMode(); l1->SetMcbmMode();
if (!geoSetup->IsActive(ECbmModuleId::kMuch)) {
// Disable tracking with MUCH stations if not present or disabled in setup
l1->DisableTrackingStation(cbm::algo::ca::EDetectorID::kMuch, 0);
l1->DisableTrackingStation(cbm::algo::ca::EDetectorID::kMuch, 1);
l1->DisableTrackingStation(cbm::algo::ca::EDetectorID::kMuch, 2);
}
// l1->SetMisalignmentSts(.2, .2, 10.);
// l1->SetMisalignmentTrd(2., 2., 10.);
// l1->SetMisalignmentTof(.2, .2, 10.);
run->AddTask(l1); run->AddTask(l1);
CbmL1GlobalTrackFinder* globalTrackFinder = new CbmL1GlobalTrackFinder(); CbmL1GlobalTrackFinder* globalTrackFinder = new CbmL1GlobalTrackFinder();
...@@ -493,7 +518,9 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391, ...@@ -493,7 +518,9 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391,
// e.g for RICH: // e.g for RICH:
CbmRichMCbmQaReal* qaTask = new CbmRichMCbmQaReal(); CbmRichMCbmQaReal* qaTask = new CbmRichMCbmQaReal();
Int_t taskId = 1; Int_t taskId = 1;
if (taskId < 0) { qaTask->SetOutputDir(Form("result_run%d", uRunId)); } if (taskId < 0) {
qaTask->SetOutputDir(Form("result_run%d", uRunId));
}
else { else {
qaTask->SetOutputDir(Form("result_run%d_%05d", uRunId, taskId)); qaTask->SetOutputDir(Form("result_run%d_%05d", uRunId, taskId));
} }
...@@ -527,7 +554,7 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391, ...@@ -527,7 +554,7 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391,
tofExtendTracks->SetCutStationMaxHitMul(100.); tofExtendTracks->SetCutStationMaxHitMul(100.);
tofExtendTracks->SetNTrkTofMax(50); tofExtendTracks->SetNTrkTofMax(50);
//run->AddTask(tofExtendTracks); //run->AddTask(tofExtendTracks);
/*
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Hadron analysis, lambda search // Hadron analysis, lambda search
// //
...@@ -1253,7 +1280,7 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391, ...@@ -1253,7 +1280,7 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391,
break; break;
default: std::cout << "-I- " << myName << ": Analysis cuts not available! Stop here." << std::endl; return kFALSE; default: std::cout << "-I- " << myName << ": Analysis cuts not available! Stop here." << std::endl; return kFALSE;
} }
*/
//run->AddTask(HadronAna); // causes crash due to global track vertex fit //run->AddTask(HadronAna); // causes crash due to global track vertex fit
// ----- Parameter database -------------------------------------------- // ----- Parameter database --------------------------------------------
...@@ -1280,7 +1307,7 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391, ...@@ -1280,7 +1307,7 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391,
fMan->SetXMLConfig(sXmlGeoConfig); fMan->SetXMLConfig(sXmlGeoConfig);
fMan->SetDisplayMcbm(false); fMan->SetDisplayMcbm(false);
// ---------------------------------------------------------------------------------------------------------------- // // ---------------------------------------------------------------------------------------------------------------- //
/* /*
CbmEvDisTracks* Tracks = new CbmEvDisTracks("TofTracks", 1, kFALSE, CbmEvDisTracks* Tracks = new CbmEvDisTracks("TofTracks", 1, kFALSE,
kTRUE); //name, verbosity, RnrChildren points, RnrChildren track kTRUE); //name, verbosity, RnrChildren points, RnrChildren track
fMan->AddTask(Tracks); fMan->AddTask(Tracks);
...@@ -1297,7 +1324,7 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391, ...@@ -1297,7 +1324,7 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391,
*/ */
/* /*
CbmPixelHitSetDraw* TrdHits = new CbmPixelHitSetDraw("TrdHit", kYellow, kOpenSquare); CbmPixelHitSetDraw* TrdHits = new CbmPixelHitSetDraw("TrdHit", kYellow, kOpenSquare);
fMan->AddTask(TrdHits); fMan->AddTask(TrdHits);
CbmPixelHitSetDraw* RichHits = new CbmPixelHitSetDraw("RichHit", kGreen, kOpenSquare); CbmPixelHitSetDraw* RichHits = new CbmPixelHitSetDraw("RichHit", kGreen, kOpenSquare);
fMan->AddTask(RichHits); fMan->AddTask(RichHits);
...@@ -1353,7 +1380,7 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391, ...@@ -1353,7 +1380,7 @@ Bool_t mcbm_digievent_display(UInt_t uRunId = 2391,
// ----- Function needed for CTest runtime dependency ----------------- // ----- Function needed for CTest runtime dependency -----------------
RemoveGeoManager(); // RemoveGeoManager();
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
//gSystem->Exec(Form("./RmLocalCopy.sh %s %s", sInpDir.Data(), cFileName.Data() )); //gSystem->Exec(Form("./RmLocalCopy.sh %s %s", sInpDir.Data(), cFileName.Data() ));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment