Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-28 07:03:54

0001 #ifndef NPDET_TOOLS_SETTINGS_H
0002 #define NPDET_TOOLS_SETTINGS_H
0003 
0004 #include <map>
0005 #include <string>
0006 #include "TGeoManager.h"
0007 
0008 class TGeoNode;
0009 
0010 using std::string;
0011 
0012 enum class mode { none, help, list, part };
0013 
0014 struct settings {
0015   using string   = std::string;
0016   using part_map = std::map<string,int>;
0017   bool            help              = false;
0018   bool            success           = false;
0019   string          infile            = "";
0020   string          outfile           = "detector_geometry";
0021   string          part_name         = "";
0022   int             part_level        = -1;
0023   mode            selected          = mode::list;
0024   bool            level_set         = false;
0025   int             global_level      = 1;
0026   bool            list_all          = false;
0027   int             color             = 1;
0028   double          alpha             = 1;
0029   // TGeoManager has two sets of units: kRootUnits (cm) and kG4Units (mm)
0030   double          tgeo_length_unit_in_mm  = (TGeoManager::GetDefaultUnits() == TGeoManager::kRootUnits)? 10.:1.;
0031   std::map<std::string, int>    part_name_levels;
0032   std::map<std::string, int>    part_name_colors;
0033   std::map<std::string, double> part_name_alphas;
0034 };
0035 
0036 void print_daughter_nodes(TGeoNode* node, int print_depth) ;
0037 void run_list_mode(const settings& s);
0038 
0039 #endif