susy_cfa
b611ccad937ea179f86a1f5663960264616c0a20
|
#include "utilities.hpp"
#include <cmath>
#include <iostream>
#include <string>
#include <stdexcept>
#include "TString.h"
#include "TSystemDirectory.h"
#include "TSystemFile.h"
#include "TSystem.h"
#include "TList.h"
#include "TCollection.h"
#include "TH1D.h"
#include "TTree.h"
#include "TGraph.h"
Go to the source code of this file.
Functions | |
float | cross_section (const TString &file) |
vector< TString > | dirlist (const TString &folder, const TString &inname, const TString &tag) |
bool | eigen2x2 (float matrix[2][2], float &eig1, float &eig2) |
bool | id_big2small (const int_double &left, const int_double &right) |
bool | dd_small2big (const double_double &left, const double_double &right) |
bool | dd_big2small (const double_double &left, const double_double &right) |
long double | DeltaPhi (long double phi1, long double phi2) |
long double | SignedDeltaPhi (long double phi1, long double phi2) |
float | dR (float eta1, float eta2, float phi1, float phi2) |
TString | roundNumber (double num, int decimals, double denom) |
TString | addCommas (double num) |
long double | AddInQuadrature (long double x, long double y) |
long double | GetMass (long double e, long double px, long double py, long double pz) |
long double | GetMT (long double m1, long double pt1, long double phi1, long double m2, long double pt2, long double phi2) |
long double | GetMT (long double pt1, long double phi1, long double pt2, long double phi2) |
bool | Contains (const string &text, const string &pattern) |
vector< string > | Tokenize (const string &input, const string &tokens) |
void | get_count_and_uncertainty (TTree &tree, const string &cut, double &count, double &uncertainty) |
void | AddPoint (TGraph &graph, const double x, const double y) |
string | execute (const string &cmd) |
string | RemoveTrailingNewlines (string str) |
vector< double > | LinearSpacing (size_t npts, double low, double high) |
TString addCommas | ( | double | num | ) |
Definition at line 266 of file utilities.cpp.
Referenced by main().
long double AddInQuadrature | ( | long double | x, |
long double | y | ||
) |
Definition at line 275 of file utilities.cpp.
Referenced by dR(), phys_objects::GetMHT(), phys_objects::GetSphericity(), phys_objects::PassesPVCut(), event_handler_quick::ReduceTree(), and event_handler_full::ReduceTree().
void AddPoint | ( | TGraph & | graph, |
const double | x, | ||
const double | y | ||
) |
Definition at line 330 of file utilities.cpp.
Referenced by MakeROC().
bool Contains | ( | const string & | text, |
const string & | pattern | ||
) |
Definition at line 302 of file utilities.cpp.
Referenced by main(), event_handler_quick::TypeCode(), and event_handler_full::TypeCode().
float cross_section | ( | const TString & | file | ) |
Definition at line 28 of file utilities.cpp.
Referenced by event_handler_quick::ReduceTree(), and event_handler_full::ReduceTree().
bool dd_big2small | ( | const double_double & | left, |
const double_double & | right | ||
) |
Definition at line 221 of file utilities.cpp.
bool dd_small2big | ( | const double_double & | left, |
const double_double & | right | ||
) |
Definition at line 217 of file utilities.cpp.
long double DeltaPhi | ( | long double | phi1, |
long double | phi2 | ||
) |
Definition at line 225 of file utilities.cpp.
References PI.
Referenced by dR(), phys_objects::GetDeltaPhiMETN(), event_handler_full::ReduceTree(), event_handler_quick::ReduceTree(), and phys_objects::SumDeltaPhi().
vector<TString> dirlist | ( | const TString & | folder, |
const TString & | inname, | ||
const TString & | tag | ||
) |
Definition at line 182 of file utilities.cpp.
References data_combine::files.
Referenced by main(), onefile_skim(), and ParseDatasets().
float dR | ( | float | eta1, |
float | eta2, | ||
float | phi1, | ||
float | phi2 | ||
) |
Definition at line 241 of file utilities.cpp.
References AddInQuadrature(), and DeltaPhi().
Referenced by phys_objects::GetMatchedLeptons(), phys_objects::GetTrueElectron(), event_handler_quick::GetTrueLeptons(), event_handler_full::GetTrueLeptons(), phys_objects::GetTrueMuon(), and phys_objects::GetTrueParticle().
bool eigen2x2 | ( | float | matrix[2][2], |
float & | eig1, | ||
float & | eig2 | ||
) |
Definition at line 204 of file utilities.cpp.
string execute | ( | const string & | cmd | ) |
Definition at line 334 of file utilities.cpp.
Referenced by event_handler_quick::ReduceTree(), event_handler_full::ReduceTree(), and Sign().
void get_count_and_uncertainty | ( | TTree & | tree, |
const string & | cut, | ||
double & | count, | ||
double & | uncertainty | ||
) |
Definition at line 320 of file utilities.cpp.
Referenced by DrawROC().
long double GetMass | ( | long double | e, |
long double | px, | ||
long double | py, | ||
long double | pz | ||
) |
Definition at line 286 of file utilities.cpp.
long double GetMT | ( | long double | m1, |
long double | pt1, | ||
long double | phi1, | ||
long double | m2, | ||
long double | pt2, | ||
long double | phi2 | ||
) |
Definition at line 291 of file utilities.cpp.
Referenced by event_handler_quick::GetMinMTWb(), event_handler_full::GetMinMTWb(), phys_objects::IsGoodIsoTrack(), phys_objects::PassPhys14TauID(), event_handler_quick::ReduceTree(), event_handler_full::ReduceTree(), and event_handler_full::WriteTks().
long double GetMT | ( | long double | pt1, |
long double | phi1, | ||
long double | pt2, | ||
long double | phi2 | ||
) |
Definition at line 296 of file utilities.cpp.
bool id_big2small | ( | const int_double & | left, |
const int_double & | right | ||
) |
Definition at line 213 of file utilities.cpp.
vector<double> LinearSpacing | ( | size_t | npts, |
double | low, | ||
double | high | ||
) |
Definition at line 355 of file utilities.cpp.
Referenced by Sign().
string RemoveTrailingNewlines | ( | string | str | ) |
Definition at line 348 of file utilities.cpp.
Referenced by main(), event_handler_full::ReduceTree(), event_handler_quick::ReduceTree(), and Sign().
TString roundNumber | ( | double | num, |
int | decimals, | ||
double | denom | ||
) |
Definition at line 245 of file utilities.cpp.
Referenced by main().
long double SignedDeltaPhi | ( | long double | phi1, |
long double | phi2 | ||
) |
Definition at line 230 of file utilities.cpp.
References PI.
Referenced by phys_objects::SumDeltaPhi().
vector<string> Tokenize | ( | const string & | input, |
const string & | tokens | ||
) |
Definition at line 306 of file utilities.cpp.