AnalysisBase.cc
Go to the documentation of this file.
3 AnalysisBase::AnalysisBase(std::string inFile, std::string outFol, std::string outPre, double xs, double xserr, std::map<std::string, std::string> branches, std::map<std::string, std::vector<int> > flags) {
11 ignoreElectrons = ignoreElectrons_LooseIsolation = ignoreElectrons_MediumEfficiency = ignoreElectrons_TightEfficiency = ignoreMuons = ignoreMuons_LooseIsolation = ignoreMuons_CombinedPlusEfficiency = ignoreMuons_CombinedEfficiency = ignorePhotons = ignorePhotons_LooseIsolation = ignoreTracks = ignoreTowers = false;
123 // If the events do not have any weights / the wrong weight branch is used, Delphes will save NAN in the corresponding branch
217 for(std::map<std::string, double>::iterator cutflow_iter=cutflowRegions.begin(); cutflow_iter!=cutflowRegions.end(); ++cutflow_iter)
218 *fStreams[cutflowOutput] << cutflow_iter->first << " " << cutflow_iter->second << " " << cutflowRegions2[cutflow_iter->first] << " " << cutflow_iter->second/sumOfWeights << " " << normalize(cutflow_iter->second) << "\n";
223 for(std::map<std::string, double>::iterator signal_iter=signalRegions.begin(); signal_iter!=signalRegions.end(); ++signal_iter)
224 *fStreams[signalOutput] << signal_iter->first << " " << signal_iter->second << " " << signalRegions2[signal_iter->first] << " " << signal_iter->second/sumOfWeights << " " << normalize(signal_iter->second) << "\n";
229 for(std::map<std::string, double>::iterator control_iter=controlRegions.begin(); control_iter!=controlRegions.end(); ++control_iter)
230 *fStreams[controlOutput] << control_iter->first << " " << control_iter->second << " " << controlRegions2[control_iter->first] << " " << control_iter->second/sumOfWeights << " " << normalize(control_iter->second) << "\n";
292 bool result = (std::find(candidate_flags.begin(), candidate_flags.end(), absolute_flag) != candidate_flags.end());
333 double AnalysisBase::mT2(const TLorentzVector & vis1, const TLorentzVector & vis2, double m_inv, const TLorentzVector & invis) {
337 // If no invis is given, use missingET. Note that pmiss[0] is irrelvant, which is why we set it to -1.
361 double AnalysisBase::mCTcorr(const TLorentzVector & v1, const TLorentzVector & v2,const TLorentzVector & vds,const TLorentzVector & invis,const double ecm,const double mxlo)
371 double AnalysisBase::mCTy(const TLorentzVector & v1, const TLorentzVector & v2,const TLorentzVector & vds,const TLorentzVector & invis)
381 double AnalysisBase::mT2_bl(const TLorentzVector & pl_in, const TLorentzVector & pb1_in, const TLorentzVector & pb2_in, const TLorentzVector & invis) {
386 double pl[4] = {pl_in.E(), pl_in.Px(), pl_in.Py(), pl_in.Pz()}; // El, plx, ply, plz, (visible lepton)
387 double pb1[4] = {pb1_in.E(), pb1_in.Px(), pb1_in.Py(), pb1_in.Pz()}; // Eb1, pb1x, pb1y, pb1z (bottom on the same side as the visible lepton)
388 double pb2[4] = {pb2_in.E(), pb2_in.Px(), pb2_in.Py(), pb2_in.Pz()}; // Eb2, pb2x, pb2y, pb2z (other bottom, paired with the invisible W)
390 // If no invis is given, use missingET. Note that pmiss[0] is irrelvant, which is why we set it to -1.
406 // Need to pass jets and energy threshold of jets to be considered for variable (allows different ET to that of baseline jets)
434 std::vector<double> AnalysisBase::razor(const std::vector<TLorentzVector> & finalStateObj, const TLorentzVector & invis) {
483 double MR = sqrt((A+B)*(A+B)-(az+bz)*(az+bz)-(j2T.Dot(j2T)-j1T.Dot(j1T))*(j2T.Dot(j2T)-j1T.Dot(j1T))/(j1T+j2T).Mag2());
489 double MRT = missingET->P4().Et()*(j1.Pt()+j2.Pt()) - missingET->P4().Vect().Dot(j1.Vect()+j2.Vect());
std::vector< std::ofstream * > fStreams Container of output file streams booked via bookFile() Definition: AnalysisBase.h:496 double mT2(const TLorentzVector &vis1, const TLorentzVector &vis2, double m_inv, const TLorentzVector &invis=TLorentzVector(0., 0., 0., 0.)) Evaluates . Definition: AnalysisBase.cc:333 void bookSignalRegions(std::string listOfRegions) Function to book signal regions. Definition: AnalysisBase.cc:56 double alphaT(const std::vector< Jet * > &jets, const double thresh_ET=0.) Evaluates . Definition: AnalysisBase.cc:404 void set_momenta(double *pl0, double *pb10, double *pb20, double *pmiss0) Definition: mt2bl_bisect.cc:78 std::vector< Muon * > muonsCombined Container of 'muonsCombinedPlus' objects that pass 'CB' efficiency. Definition: AnalysisBase.h:107 std::vector< Photon * > photons Container of all truth photons after detector smearing and loose isolation condition. Definition: AnalysisBase.h:110 Definition: DelphesClasses.h:243 Definition: DelphesClasses.h:215 double normalize(double x) Normalises number to luminosity and cross section. Definition: AnalysisBase.h:547 double mT(const TLorentzVector &vis, const TLorentzVector &invis) Evaluates the transverse mass . Definition: AnalysisBase.cc:328 std::vector< Electron * > electronsLoose Container of 'electrons' objects that pass loose isolation condition. Definition: AnalysisBase.h:102 Definition: mt2_bisect.h:17 std::vector< Jet * > jets2 Container of all reconstructed 'second type' jets if defined in analysis settings. Definition: AnalysisBase.h:109 double mctcorr(const double v1[4], const double v2[4], const double vds[4], const double ptm[2], const double ecm=14000.0, const double mxlo=0.0) Definition: mctlib.cc:10 Definition: DelphesClasses.h:343 ~AnalysisBase() Destructor function to free pointers and close opened file streams. Definition: AnalysisBase.cc:44 double mCT(const TLorentzVector &v1, const TLorentzVector &v2) Evaluates normal . Definition: AnalysisBase.cc:353 void bookCutflowRegions(std::string listOfRegions) Function to book cutflow regions. Definition: AnalysisBase.cc:89 double mT2_bl(const TLorentzVector &pl_in, const TLorentzVector &pb1_in, const TLorentzVector &pb2_in, const TLorentzVector &invis=TLorentzVector(0., 0., 0., 0.)) Evaluates . Definition: AnalysisBase.cc:381 std::vector< Electron * > electrons Container of all truth electrons after detector smearing in acceptance range. Definition: AnalysisBase.h:101 std::vector< Electron * > electronsTight Container of 'electronsLoose' objects that pass 'medium' efficiency cut. Definition: AnalysisBase.h:104 void set_momenta(double *pa0, double *pb0, double *pmiss0) Definition: mt2_bisect.cc:61 virtual void analyze() Function containing the event wise analysis code. Definition: AnalysisBase.h:82 void loopOverEvents() Internal function that starts the event loop in main(). Definition: AnalysisBase.cc:107 std::vector< Muon * > muons Container of all truth muons after detector smearing in acceptance range. Definition: AnalysisBase.h:105 Definition: DelphesClasses.h:187 AnalysisBase(std::string inFile, std::string outFol, std::string outPre, double xs, double xserr, std::map< std::string, std::string > branches, std::map< std::string, std::vector< int > > flags) Constructor function to load the Delphes ROOT file. Definition: AnalysisBase.cc:3 bool checkBTag(Jet *candidate, int relative_flag=0, std::string option="") Checks if candidate jet fulfills given b-jet identification. Definition: AnalysisBase.cc:269 int bookFile(std::string name, bool noheader=false) Function to book file streams accessible via fStreams and fNames. Definition: AnalysisBase.cc:235 Definition: mt2bl_bisect.h:12 std::vector< Electron * > electronsMedium Container of 'electronsLoose' objects that pass 'medium' efficiency cut. Definition: AnalysisBase.h:103 std::vector< double > razor(const std::vector< TLorentzVector > &obj, const TLorentzVector &invis=TLorentzVector(0., 0., 0., 0.)) Evaluates razor. Definition: AnalysisBase.cc:434 bool checkTauTag(Jet *candidate, std::string efficiency) Checks if candidate jet fulfills given tau identification cut. Definition: AnalysisBase.cc:258 double mCTcorr(const TLorentzVector &v1, const TLorentzVector &v2, const TLorentzVector &vds, const TLorentzVector &invis, const double ecm=8000.0, const double mxlo=0.0) Evaluates boost corrected . Definition: AnalysisBase.cc:361 Definition: mctlib.h:9 std::vector< Muon * > muonsCombinedPlus Container of objects that pass loose isolation condition and 'CBplusST' efficiency. Definition: AnalysisBase.h:106 void ignore(std::string ignore_what) Does not read out unneeded ROOT information. Definition: AnalysisBase.cc:296 void bookControlRegions(std::string listOfRegions) Function to book control regions. Definition: AnalysisBase.cc:73 double mcy(const double v1[4], const double v2[4], const double vds[4], const double ptm[2]) Definition: mctlib.cc:196 double mCTy(const TLorentzVector &v1, const TLorentzVector &v2, const TLorentzVector &vds, const TLorentzVector &invis) Evaluates transverse. Definition: AnalysisBase.cc:371 Definition: DelphesClasses.h:308 Definition: DelphesClasses.h:269 std::vector< std::string > fNames Container of output file names booked via bookFile() Definition: AnalysisBase.h:497 Generated on Tue Dec 9 2014 17:18:36 for AnalysisBase Documentation by 1.8.6 |