root -l -b -q 'analyze_pipeline.cpp("PATH_TO_ROOT_FILE_OR_PATTERN","OUTPUT_ROOT_FILE","CONFIG_JSON_FILE")'PATH_TO_ROOT_FILE_OR_PATTERN: e.g.samples/HMuTauE_LFV_125.rootorsamples/(to process all ROOT files in the directory)OUTPUT_ROOT_FILE: e.g.out_hist_cfg.rootcontains the histograms after applying the pipeline selectionsCONFIG_JSON_FILE: e.g.pipeline.jsondefines the selection pipeline and parameters
- Implement the new selection class in
selections.cpp(e.g.HToMuTauESelection), following the structure of existing selections. - Add the new selection class declaration in
selection.h. - In
pipeline_config.cpp, add a case in the selection factory function to create an instance of your new selection class when the corresponding name is encountered in the config. - In
pipeline.json, add a new entry in the "selections" list with the name that matches the case you added inpipeline_config.cppand specify any parameters needed for that selection.
- Define the new parameter in
type.h(e.g.double my_new_param;) under theParametersstruct. - In
pipeline_config.cpp, update the code that reads the config file to parse the new parameter and store it in theParametersstruct. - In
pipeline.json, add the new parameter under the "parameters" section with an appropriate value. - (Optional) Add print statements in
analyze_pipeline.cppto verify that the new parameter is being read correctly during execution.
The Meta struct is used to store intermediate information about the event that can be accessed by different selections in the pipeline. For example, it can store the indices of the selected leptons, the flavor of the Z boson leptons, and any kinematic variables that are calculated during the selections.
- Define new variables in the
Metastruct intype.h(e.g.double deltaR_mu_e;). - In your selection class (e.g.
HToMuTauESelection), calculate the desired variable and store it in theMetastruct (e.g.meta.deltaR_mu_e = deltaR_mu_e;). - In subsequent selections in the pipeline, you can access this variable from the
Metastruct (e.g.double deltaR = meta.deltaR_mu_e;).