2525#include "MathUtils/Cartesian3D.h"
2626#include "SimulationDataFormat/MCCompLabel.h"
2727#include "SimulationDataFormat/MCTruthContainer.h"
28+ #include "DetectorsCommonDataFormats/NameConf.h"
2829
2930#endif
3031
31- void CheckTopologies (std ::string clusfile = "o2clus_its.root" , std ::string hitfile = "o2sim_HitsITS.root" , std ::string inputGeom = "o2sim_geometry.root " )
32+ void CheckTopologies (std ::string clusfile = "o2clus_its.root" , std ::string hitfile = "o2sim_HitsITS.root" , std ::string inputGeom = "" )
3233{
3334 using namespace o2 ::base ;
3435 using namespace o2 ::its ;
@@ -37,7 +38,6 @@ void CheckTopologies(std::string clusfile = "o2clus_its.root", std::string hitfi
3738 using o2 ::itsmft ::ClusterTopology ;
3839 using o2 ::itsmft ::CompClusterExt ;
3940 using o2 ::itsmft ::Hit ;
40-
4141 std ::ofstream output_check ("check_topologies.txt" );
4242
4343 // Geometry
@@ -146,11 +146,14 @@ void CheckTopologies(std::string clusfile = "o2clus_its.root", std::string hitfi
146146 completeDictionary .accountTopology (topology , dx , dz );
147147 }
148148 }
149+
150+ auto dID = o2 ::detectors ::DetID ::ITS ;
151+
149152 completeDictionary .setThreshold (0.0001 );
150153 completeDictionary .groupRareTopologies ();
151- completeDictionary .printDictionaryBinary ("complete_dictionary .bin" );
152- completeDictionary .printDictionary ("complete_dictionary .txt" );
153- completeDictionary .saveDictionaryRoot ("complete_dictionary .root" );
154+ completeDictionary .printDictionaryBinary (o2 :: base :: NameConf :: getDictionaryFileName ( dID , "" , " .bin") );
155+ completeDictionary .printDictionary (o2 :: base :: NameConf :: getDictionaryFileName ( dID , "" , " .txt") );
156+ completeDictionary .saveDictionaryRoot (o2 :: base :: NameConf :: getDictionaryFileName ( dID , "" , " .root") );
154157
155158 TFile histogramOutput ("histograms.root" , "recreate" );
156159 TCanvas * cComplete = new TCanvas ("cComplete" , "Distribution of all the topologies" );
@@ -171,14 +174,14 @@ void CheckTopologies(std::string clusfile = "o2clus_its.root", std::string hitfi
171174 if (clusLabArr ) {
172175 noiseDictionary .setThreshold (0.0001 );
173176 noiseDictionary .groupRareTopologies ();
174- noiseDictionary .printDictionaryBinary ("noise_dictionary .bin" );
175- noiseDictionary .printDictionary ("noise_dictionary .txt" );
176- noiseDictionary .saveDictionaryRoot ("noise_dictionary .root" );
177+ noiseDictionary .printDictionaryBinary (o2 :: base :: NameConf :: getDictionaryFileName ( dID , "noise" , " .bin") );
178+ noiseDictionary .printDictionary (o2 :: base :: NameConf :: getDictionaryFileName ( dID , "noise" , " .txt") );
179+ noiseDictionary .saveDictionaryRoot (o2 :: base :: NameConf :: getDictionaryFileName ( dID , "noise" , " .root") );
177180 signalDictionary .setThreshold (0.0001 );
178181 signalDictionary .groupRareTopologies ();
179- signalDictionary .printDictionaryBinary ("signal_dictionary .bin" );
180- signalDictionary .printDictionary ("signal_dictionary .txt" );
181- signalDictionary .saveDictionaryRoot ("signal_dictionary .root" );
182+ signalDictionary .printDictionaryBinary (o2 :: base :: NameConf :: getDictionaryFileName ( dID , "signal" , " .bin") );
183+ signalDictionary .printDictionary (o2 :: base :: NameConf :: getDictionaryFileName ( dID , "signal" , " .txt") );
184+ signalDictionary .saveDictionaryRoot (o2 :: base :: NameConf :: getDictionaryFileName ( dID , "signal" , " .root") );
182185
183186 cNoise = new TCanvas ("cNoise" , "Distribution of noise topologies" );
184187 cNoise -> cd ();
0 commit comments