1#ifndef __APOPTIMIZATION_ANAPROCESSOR_H__
2#define __APOPTIMIZATION_ANAPROCESSOR_H__
15#include "TEfficiency.h"
19#include "TGraphErrors.h"
22#include "TLorentzVector.h"
25#include "TTreeReader.h"
70 virtual void initialize(std::string inFilename, std::string outFilename);
81 std::vector<double>
fitZBkgTail(TH1* h_bkg_vtxz, std::string fitname);
89 void initializeTestCutPDF(std::string cut_name, std::string cut_var, std::string persistent_cuts);
92 std::vector<std::pair<double, double>>
getZoffsetAlpha(TH2F* h_y0_vs_z,
int n_quantiles,
int nbins);
93 double*
getQuantileArray(std::pair<double, double> range,
int n_quantiles,
double initial_cut_frac = -999.9);
95 std::vector<double>
findZcut(TH1* h_bkg_vtxz_cut,
bool fromTailFit,
int iteration = 0);
121 typedef std::map<std::string, std::pair<std::pair<double, double>,
int>>::iterator
130 std::map<std::string, std::pair<std::pair<double, double>,
int>>*
testCutsPtr_{
nullptr};
136 std::map<std::string, std::vector<std::pair<double, double>>>
153 "(" + std::to_string((
int)
zbins_[0]) +
"," + std::to_string(
zbins_[1]) +
"," + std::to_string(
zbins_[2]) +
")";
Class used to encapsulate information about a particle.
Base classes for all user event processing components to extend.
Class used to encapsulate Vertex information.
TreeCutSelector * persistentCutsSelector_
std::string variableHistCfgFilename_
std::string signalVtxMCSelection_
std::map< std::string, TH1F * > testVarPDFs_
virtual void configure(const ParameterSet ¶meters)
description
TH1D * h_pretrig_signal_vtxz_
std::string hit_category_
virtual void initialize(TTree *tree)
description
double * getBinsAndLimits(json histo_cfg, std::string varname)
virtual void finalize()
description
std::map< std::string, std::vector< std::pair< double, double > > > testZoffsetAlpha_
std::map< std::string, std::string > persistentCutStrings_
std::map< std::string, std::pair< std::pair< double, double >, int > >::iterator cut_iter_
std::string getHitCategoryCut()
double getMassResolution(double mass)
std::map< std::string, TH1F * > testVarCDFs_
std::vector< double > fitZBkgTail(TH1 *h_bkg_vtxz, std::string fitname)
void initializeGraphs(std::string cut_name)
std::map< std::string, std::pair< std::pair< double, double >, int > > * persistentCutsPtr_
std::vector< double > findZcut(TH1 *h_bkg_vtxz_cut, bool fromTailFit, int iteration=0)
std::vector< std::pair< double, double > > getZoffsetAlpha(TH2F *h_y0_vs_z, int n_quantiles, int nbins)
std::map< std::string, std::pair< std::pair< double, double >, int > > * testCutsPtr_
double computeDisplacedYield(TH1 *h_chi_eff, double EAp)
double computeTruthSignalShape(double z, double EAp)
ApOptimizationProcessor(const std::string &name, Process &process)
TTree * signal_pretrig_sim_tree_
std::map< std::string, double * > testVarQuantiles_
TreeCutSelector * testCutsSelector_
~ApOptimizationProcessor()
std::map< std::string, double * > testVarQuantilePos_
void determineSignalVertexEfficiencyXi()
virtual bool process(IEvent *event)
description
double * getQuantileArray(std::pair< double, double > range, int n_quantiles, double initial_cut_frac=-999.9)
double computePromptYield()
virtual bool process()
description
void initializeTestCutPDF(std::string cut_name, std::string cut_var, std::string persistent_cuts)
TH1D * h_signal_vtxz_rad_
OptimizationProcessor(const std::string &name, Process &process)