Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-12-05 02:48:10

0001 #ifndef AnalysisConfig_h
0002 #define AnalysisConfig_h
0003 
0004 #include "TString.h"
0005 #include "rooutil.h"
0006 #include "Trktree.h"
0007 #include "ModuleConnectionMap.h"
0008 
0009 class AnalysisConfig {
0010 public:
0011   // Analysis run mode
0012   int mode;
0013 
0014   int streams;
0015 
0016   // TString that holds the input option provided
0017   TString input_raw_string;
0018 
0019   // TString that holds the input file list (comma separated)
0020   TString input_file_list_tstring;
0021 
0022   // TString that holds the name of the TTree to open for each input files
0023   TString input_tree_name;
0024 
0025   // Output TFile
0026   TFile* output_tfile;
0027 
0028   // Number of events to loop over
0029   int n_events;
0030 
0031   // specific event_index to process
0032   int specific_event_index;
0033 
0034   // run efficiency study
0035   bool run_eff_study;
0036 
0037   // run inefficiency study
0038   bool run_ineff_study;
0039 
0040   // run inefficiency study
0041   int mode_write_ineff_study_debug_ntuple;  // 0 = MDs, 1 = SGs, 2 = TLs, 3 = TCs
0042 
0043   // run MTV study
0044   bool run_mtv_study;
0045 
0046   // pt binning options
0047   int ptbound_mode;
0048 
0049   // pt cut
0050   float ptCut;
0051 
0052   // pdg id of the particles to compute efficincies on
0053   int pdg_id;
0054 
0055   // nmatch threshold of the hits to compute matching for MTV-like plots
0056   int nmatch_threshold;
0057 
0058   // verbose of the particles to compute efficincies on
0059   int verbose;
0060 
0061   // to print module connection info
0062   bool print_conn;
0063 
0064   // to print module boundary info
0065   bool print_boundary;
0066 
0067   // to print centroid
0068   bool print_centroid;
0069 
0070   // Debug boolean
0071   bool debug;
0072 
0073   // TChain that holds the input TTree's
0074   TChain* events_tchain;
0075 
0076   // Jobs to split (if this number is positive, then we will skip certain number of events)
0077   // If there are N events, and was asked to split 2 ways, then depending on job_index, it will run over first half or latter half
0078   int nsplit_jobs;
0079 
0080   // Job index (assuming nsplit_jobs is set, the job_index determine where to loop over)
0081   int job_index;
0082 
0083   // Custom Looper object to facilitate looping over many files
0084   RooUtil::Looper<Trktree> looper;
0085 
0086   // Custom Cutflow framework
0087   RooUtil::Cutflow cutflow;
0088 
0089   // Custom Histograms object compatible with RooUtil::Cutflow framework
0090   RooUtil::Histograms histograms;
0091 
0092   // TTree output for studies
0093   TTree* output_ttree;
0094 
0095   // TTreeX to facilitate writing output to ttree
0096   RooUtil::TTreeX* tx;
0097 
0098   // Boolean to control whether to write ntuple or not
0099   bool write_lst_ntuple;
0100 
0101   // Module boundaries related info
0102   std::map<int, std::array<float, 6>> moduleBoundaries;
0103   std::map<int, std::vector<std::vector<float>>> moduleSimHits;
0104   std::map<int, int> modulePopulation;
0105 
0106   lst::ModuleConnectionMap moduleConnectiongMapLoose;
0107 
0108   // Boolean to trigger whether to run cut_value_ntupling
0109   bool do_cut_value_ntuple;
0110 
0111   // Boolean to trigger whether to write ntuple or not
0112   bool do_write_ntuple;
0113 
0114   // Boolean to write lower level objects
0115   bool do_lower_level;
0116 
0117   // Boolean to write gnn ntuple
0118   bool gnn_ntuple;
0119 
0120   // String to hold the MAKETARGET setting from compile
0121   std::string compilation_target;
0122 
0123   // Path to the TrackLooper code directory
0124   TString track_looper_dir_path;
0125 
0126   // Path to the TrackLooper code directory
0127   TString full_cmd_line;
0128 
0129   // Boolean to allow pLS triplets to be included in the TCs
0130   bool tc_pls_triplets;
0131 
0132   // Boolean to disable pLS duplicate cleaning
0133   bool no_pls_dupclean;
0134 };
0135 
0136 extern AnalysisConfig ana;
0137 
0138 #endif