Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-18 09:22:18

0001 #ifndef MACRO_G4TRKRVARIABLES_C
0002 #define MACRO_G4TRKRVARIABLES_C
0003 
0004 #include <g4intt/PHG4InttDefs.h>
0005 
0006 #include <g4mvtx/PHG4MvtxDefs.h>
0007 
0008 namespace Enable
0009 {
0010   bool MVTX = false;
0011   bool MVTX_OVERLAPCHECK = false;
0012 
0013   bool MVTX_CELL = false;
0014   bool MVTX_CLUSTER = false;
0015   bool MVTX_QA = false;
0016   bool MVTX_SUPPORT = false;
0017   bool MVTX_APPLYMISALIGNMENT = true;
0018   bool MVTX_STREAMING = true;
0019   
0020   int MVTX_VERBOSITY = 0;
0021 
0022   bool INTT = false;
0023   bool INTT_ABSORBER = false;
0024   bool INTT_OVERLAPCHECK = false;
0025   bool INTT_CELL = false;
0026   bool INTT_CLUSTER = false;
0027   bool INTT_QA = false;
0028   bool INTT_SUPPORT = false;
0029   bool INTT_USEG4SURVEYGEOM = true;
0030   int INTT_VERBOSITY = 0;
0031 
0032   bool TPC = false;
0033   bool TPC_ABSORBER = false;
0034   bool TPC_OVERLAPCHECK = false;
0035   bool TPC_CELL = false;
0036   bool TPC_CLUSTER = false;
0037   bool TPC_QA = false;
0038 
0039   bool TPC_ENDCAP = true;
0040 
0041   int TPC_VERBOSITY = 0;
0042 
0043   bool MICROMEGAS_OVERLAPCHECK = false;
0044   bool MICROMEGAS_CELL = false;
0045   bool MICROMEGAS_CLUSTER = false;
0046   bool MICROMEGAS_QA = false;
0047   bool MICROMEGAS_SUPPORT = false;
0048   int MICROMEGAS_VERBOSITY = 0;
0049 
0050   bool TRACKING_TRACK = false;
0051   bool TRACKING_EVAL = false;
0052   bool TRACK_MATCHING = false;
0053   bool TRACK_MATCHING_TREE = false;
0054   bool TRACK_MATCHING_TREE_CLUSTERS = false;
0055   // 0=no output TTree file, 1=output for tracks only, 2=tracks+clusters
0056   int TRACKING_VERBOSITY = 0;
0057   bool TRACKING_QA = false;
0058   bool TRACKING_DIAGNOSTICS = false;
0059 }  // namespace Enable
0060 
0061 namespace G4MVTX
0062 {
0063   int n_maps_layer = 3;        // must be 0-3, setting it to zero removes Mvtx completely, n < 3 gives the first n layers
0064   double radius_offset = 0.7;  // clearance around radius
0065 }  // namespace G4MVTX
0066 
0067 namespace G4MVTXAlignment
0068 {
0069   std::string alignment_path = std::string(getenv("CALIBRATIONROOT")) + "/Tracking/MVTX/alignment";
0070   double z_offset[] = {0.0, 0.0, 200.0};
0071 }  // namespace G4MVTXAlignment
0072 
0073 namespace G4INTT
0074 {
0075   int n_intt_layer = 4;           // must be 4 or 0, setting to zero removes INTT completely
0076   double intt_radius_max = 140.;  // including stagger radius (mm)
0077   int laddertype[4] = {PHG4InttDefs::SEGMENTATION_PHI,
0078                        PHG4InttDefs::SEGMENTATION_PHI,
0079                        PHG4InttDefs::SEGMENTATION_PHI,
0080                        PHG4InttDefs::SEGMENTATION_PHI};
0081   int nladder[4] = {12, 12, 16, 16};
0082   //! default to survey geometry
0083   double sensor_radius[4] = {7.453, 8.046, 9.934, 10.569};
0084 
0085   enum enu_InttDeadMapType  // Dead map options for INTT
0086   {
0087     kInttNoDeadMap = 0,  // All channel in Intt is alive
0088     kInttDeadMap = 1,    // with dead channel
0089   };
0090   // enu_InttDeadMapType InttDeadMapOption = kInttNoDeadMap;  // Choose Intt deadmap here
0091   enu_InttDeadMapType InttDeadMapOption = kInttDeadMap;  // Choose Intt deadmap here
0092 
0093 }  // namespace G4INTT
0094 
0095 namespace G4TPC
0096 {
0097   int n_tpc_layer_inner = 16;
0098 
0099   int tpc_layer_rphi_count_inner = 1128;  // 94 * 12
0100 
0101   int n_tpc_layer_mid = 16;
0102   int n_tpc_layer_outer = 16;
0103   int n_gas_layer = n_tpc_layer_inner + n_tpc_layer_mid + n_tpc_layer_outer;
0104   double tpc_outer_radius = 77. + 2.;
0105 
0106   // use simple clusterizer
0107   bool USE_SIMPLE_CLUSTERIZER = false;
0108 
0109   // distortions in simulation
0110   // set how to interpret the magnitude of phi distortions in simulation
0111   bool DISTORTIONS_USE_PHI_AS_RADIANS = true;
0112 
0113   // apply static distortions in simulations
0114   bool ENABLE_STATIC_DISTORTIONS = false;
0115 
0116   std::string static_distortion_filename = "TPC_STATIC_DISTORTION";
0117 
0118   // apply time-ordered distortion fluctuations in simulation
0119   bool ENABLE_TIME_ORDERED_DISTORTIONS = false;
0120   std::string time_ordered_distortion_filename = "TPC_TIMEORDERED_DISTORTION";
0121 
0122   // allow distortions to remove electrons that
0123   bool ENABLE_REACHES_READOUT = true;
0124 
0125   // module edge distortion corrections
0126   bool ENABLE_MODULE_EDGE_CORRECTIONS = false;
0127   std::string module_edge_correction_filename;
0128 
0129   // static distortion corrections
0130   bool ENABLE_STATIC_CORRECTIONS = false;
0131   std::string static_correction_filename = std::string(getenv("CALIBRATIONROOT")) + "/distortion_maps/static_only_inverted_10-new.root";
0132   bool USE_PHI_AS_RAD_STATIC_CORRECTIONS = false;
0133 
0134   // average distortion corrections
0135   bool ENABLE_AVERAGE_CORRECTIONS = false;
0136   std::string average_correction_filename;
0137   bool USE_PHI_AS_RAD_AVERAGE_CORRECTIONS = false;
0138   bool average_correction_interpolate = true;
0139   
0140   // enable central membrane g4hits generation
0141   bool ENABLE_CENTRAL_MEMBRANE_HITS = false;
0142 
0143   // enable diffuse laser clustering
0144   bool ENABLE_CENTRAL_MEMBRANE_CLUSTERING = true;
0145   bool LaserClusteringSequential = false;
0146   bool laserClusterFitting = false;
0147   float laser_adc_threshold = 100.0;
0148 
0149   bool REJECT_LASER_EVENTS = false;
0150   std::string laser_event_debug_filename;
0151   std::string LaminationOutputName;
0152   std::string LaminationQAName;
0153 
0154   // enable direct laser g4hits generation
0155   bool ENABLE_DIRECT_LASER_HITS = false;
0156 
0157   // save histograms
0158   bool DIRECT_LASER_SAVEHISTOGRAMS = false;
0159 
0160   // do cluster <-> hit association
0161   bool DO_HIT_ASSOCIATION = true;
0162 
0163   // space charge calibration output file
0164   std::string DIRECT_LASER_ROOTOUTPUT_FILENAME = "TpcSpaceChargeMatrices.root";
0165   std::string DIRECT_LASER_HISTOGRAMOUTPUT_FILENAME = "TpcDirectLaserReconstruction.root";
0166 
0167   std::string TPC_GAS_MIXTURE = "ArCF4Isobutane";
0168   // drift velocity is set here for all relevant modules
0169   //  double tpc_drift_velocity_reco now set in GlobalVariables.C
0170   double tpc_drift_velocity_sim = 0.007550;  // cm/ns   // this is the ArCF4Isobutane version of the gas
0171   double tpc_added_smear_long = 0.0;
0172   double tpc_added_smear_trans = 0.0;
0173 
0174   double NeCF4_drift_velocity = 0.008;
0175   double NeCF4_diffusion_long = 0.012;
0176   double NeCF4_diffusion_trans = 0.004;
0177   double NeCF4_Ne_frac = 0.5;
0178   double NeCF4_Ar_frac = 0.0;
0179   double NeCF4_CF4_frac = 0.5;
0180   double NeCF4_N2_frac = 0.0;
0181   double NeCF4_isobutane_frac = 0.0;
0182 
0183   double ArCF4_drift_velocity = 0.008;
0184   double ArCF4_diffusion_long = 0.012;
0185   double ArCF4_diffusion_trans = 0.004;
0186   double ArCF4_Ne_frac = 0.0;
0187   double ArCF4_Ar_frac = 0.6;
0188   double ArCF4_CF4_frac = 0.4;
0189   double ArCF4_N2_frac = 0.0;
0190   double ArCF4_isobutane_frac = 0.0;
0191 
0192   double ArCF4N2_drift_velocity = 0.006965;
0193   double ArCF4N2_diffusion_long = 0.013613;
0194   double ArCF4N2_diffusion_trans = 0.005487;
0195   double ArCF4N2_Ne_frac = 0.0;
0196   double ArCF4N2_Ar_frac = 0.65;
0197   double ArCF4N2_CF4_frac = 0.25;
0198   double ArCF4N2_N2_frac = 0.10;
0199   double ArCF4N2_isobutane_frac = 0.00;
0200 
0201   double ArCF4Isobutane_drift_velocity = 0.00755;
0202   double ArCF4Isobutane_diffusion_long = 0.014596;
0203   double ArCF4Isobutane_diffusion_trans = 0.005313;
0204   double ArCF4Isobutane_Ne_frac = 0.0;
0205   double ArCF4Isobutane_Ar_frac = 0.75;
0206   double ArCF4Isobutane_CF4_frac = 0.20;
0207   double ArCF4Isobutane_N2_frac = 0.00;
0208   double ArCF4Isobutane_isobutane_frac = 0.05;
0209 
0210   double maxDriftLength = 102.325;  // new value, CM face to top of GEM stack
0211   double CM_halfwidth = 0.28;  // cm
0212   double sampa_tzero_bias = -65.0; // ns, set for simulations/reco matching with new sampa response
0213   bool apply_tpc_tzero_correction = false;  // true to apply small correction to TPC time zero in alignment transforms
0214   
0215 }  // namespace G4TPC
0216 
0217 namespace G4TRACKING
0218 {
0219   // Space Charge calibration flag
0220   bool SC_CALIBMODE = false;  // this is anded with G4TPC::ENABLE_DISTORTIONS in TrackingInit()
0221   bool SC_USE_MICROMEGAS = true;
0222   double SC_COLLISIONRATE = 50e3;                                      // leave at 50 KHz for now, scaling of distortion map not implemented yet
0223   std::string SC_ROOTOUTPUT_FILENAME = "TpcSpaceChargeMatrices.root";  // space charge calibration output file
0224 
0225   // Vertexing
0226   bool g4eval_use_initial_vertex = true;  // if true, g4eval uses initial vertices in SvtxVertexMap, not final vertices in SvtxVertexMapRefit
0227 
0228   // Truth seeding options for diagnostics (can use any or all)
0229   bool use_truth_silicon_seeding = false;     // if true runs truth silicon seeding instead of acts silicon seeding
0230   bool use_truth_tpc_seeding = false;         // if true runs truth silicon seeding instead of reco TPC seeding
0231   bool use_truth_si_matching = false;         // if true, associates silicon clusters using best truth track match to TPC seed tracks - for diagnostics only
0232                                               // Full truth track seeding
0233   bool use_full_truth_track_seeding = false;  // makes track seeds using truth info, used for both Acts and Genfit
0234   bool use_truth_vertexing = false;           // if true runs truth vertexing, if false runs PHSimpleVertexFinder
0235 
0236   // genfit track fitter
0237   bool use_genfit_track_fitter = false;
0238 
0239   // Runs a converter from TrackSeed object to SvtxTrack object to enable
0240   // use of the various evaluation tools already available
0241   bool convert_seeds_to_svtxtracks = false;
0242 
0243   // Runs a second pass of seeding to pick up missed seeds in the first pass
0244   bool iterative_seeding = false;
0245 
0246   // Flag to run commissioning seeding workflow with tuned parameters for
0247   // misaligned + distorted tracks
0248   bool use_alignment = false;
0249   bool filter_conversion_electrons = false;
0250 
0251 }  // namespace G4TRACKING
0252 
0253 #endif