diff --git a/.gitignore b/.gitignore index 1a38d62..099fffa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,19 @@ __init__.py *.pyc +Information/** +NtupleMakerOutput/ +Ntupler_localgrid +BTagHistosPtEta/ +LocalGridSubmission/SubmitScripts/**/** +NtupleAnalyzer +myOutput/** +config/*analyzer* +*.txt +config/*.xml +config/*.root +MVA*/* +Ntupler +Ntupler_an +Ntupler_mwt +Trigger.* +*.root diff --git a/EquiLumiCalculator.py b/EquiLumiCalculator.py new file mode 100755 index 0000000..af3342e --- /dev/null +++ b/EquiLumiCalculator.py @@ -0,0 +1,48 @@ +#!/usr/bin/python + +from glob import glob +from ROOT import TChain +import xml.etree.cElementTree as ET +import os + +# get filenames from the xml!!! +tree = ET.ElementTree(file='config/Run2TriLepton_samples_extra.xml') + +root = tree.getroot() +datasets = root.find('datasets') + +topTrees = [] +xsections = [] + +# loop over the datasets to be added and fill the "topTrees" vector +for d in datasets: + if d.attrib['add'] == '1': + topTrees.append(d.attrib['filenames']) + xsections.append(float(d.attrib['xsection'])) + + +# loop over the "topTrees" vector +for n_sample in range(0,len(topTrees)): + + path = topTrees[n_sample] + print path + files = glob(path) + root_files = [] + for f in files: +# root_files.append('dcap://maite.iihe.ac.be' + f) + root_files.append(f) + #print root_files + chain = TChain('eventTree') + for rf in root_files: + chain.Add(rf) + print 'added files' + nEntries = chain.GetEntries(); + print "\n" + print topTrees[n_sample], " contains ", nEntries, " events!" + if (xsections[n_sample] != 1): + print " xsections is " , xsections[n_sample] + print "Eqlumi is N/xsect --->" , nEntries , "/" , xsections[n_sample] , " = " , nEntries/xsections[n_sample] + print "***************************" + print "****End of sample *********" + print "***************************" + print "\n" diff --git a/FinalAn.cc b/FinalAn.cc new file mode 100644 index 0000000..66961a8 --- /dev/null +++ b/FinalAn.cc @@ -0,0 +1,2782 @@ +////////////////////////////////////////////////////////////////////////////// +//// Analysis code for search for FCNC tZq //// +////////////////////////////////////////////////////////////////////////////// + + +#define _USE_MATH_DEFINES +#include "TStyle.h" +#include "TPaveText.h" +#include "TTree.h" +#include "TNtuple.h" +#include "TNtuple.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include "TRandom3.h" +#include "TRandom.h" +#include "TProfile.h" +#include +#include +#include + +//user code + +#include "TopTreeProducer/interface/TRootRun.h" +#include "TopTreeProducer/interface/TRootEvent.h" +#include "TopTreeAnalysisBase/Selection/interface/Run2Selection.h" + +#include "TopTreeAnalysisBase/Content/interface/AnalysisEnvironment.h" +#include "TopTreeAnalysisBase/Content/interface/Dataset.h" +#include "TopTreeAnalysisBase/Tools/interface/JetTools.h" +#include "TopTreeAnalysisBase/Tools/interface/PlottingTools.h" +#include "TopTreeAnalysisBase/Tools/interface/TTreeLoader.h" +#include "TopTreeAnalysisBase/Tools/interface/AnalysisEnvironmentLoader.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/JetCorrectorParameters.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/JetCorrectionUncertainty.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MakeBinning.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MEzCalculator.h" +#include "TopTreeAnalysisBase/MCInformation/interface/LumiReWeighting.h" +#include "TopTreeAnalysisBase/MCInformation/interface/JetPartonMatching.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MEzCalculator.h" +#include "TopTreeAnalysisBase/Tools/interface/LeptonTools.h" +#include "TopTreeAnalysisBase/Tools/interface/SourceDate.h" +#include "TopTreeAnalysisBase/Tools/interface/Trigger.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/TTreeObservables.h" + +//This header file is taken directly from the BTV wiki. It contains +// to correctly apply an event level Btag SF. It is not yet on CVS +// as I hope to merge the functionality into BTagWeigtTools.h + +//#include "TopTreeAnalysisBase/Tools/interface/BTagSFUtil.h" +#include "TopTreeAnalysisBase/Tools/interface/BTagWeightTools.h" +#include "TopTreeAnalysisBase/Tools/interface/BTagCalibrationStandalone.h" + +#include "TopTreeAnalysisBase/Tools/interface/JetCombiner.h" +#include "TopTreeAnalysisBase/Tools/interface/MVATrainer.h" +#include "TopTreeAnalysisBase/Tools/interface/MVAComputer.h" + + + + +using namespace std; +using namespace TopTree; +using namespace reweight; + + +/// TH1F +map histo1D; +map histo2D; +//Initializing CSVv2 b-tag WP +float workingpointvalue_Loose = -1; +float workingpointvalue_Medium = -1; +float workingpointvalue_Tight = -1; + + +//What you want to do +bool synchex = false; +bool Assigned = false; + + +// home made functions +int FCNCjetCalculator(std::vector Jets, TLorentzVector recoZ ,int index, int verb); +int FCNCjetCalculatorTagger(std::vector Jets, int index, int verb); +int SMjetCalculator(std::vector Jets,int verb); +double MEtz(bool mu, bool el, TLorentzVector Wlep, double MetPx, double MetPy); +float EffectiveAreaRho(TRootElectron *el, float _rho) ; +float EffectiveArea(TRootElectron *el) ; +float relPfIsoEl(TRootElectron *el, float _rho); +float IsoDBeta(TRootMuon *mu); +vector LeptonAssigner(std::vector electrons,std::vector muons); +TLorentzVector MetzCalculator(TLorentzVector leptW, TLorentzVector v_met); +vector< pair > JetPartonPair_charm; +vector< pair > JetPartonPair_bottom; +vector< pair > JetPartonPair_electron; +vector< pair > JetPartonPair_muon; +vector< pair > JetPartonPair_Welectron; +vector< pair > JetPartonPair_Wmuon; +// administration functions +string ConvertIntToString(int Number, bool pad); +string MakeTimeStamp(); + + +// members +// bool stop_program; +double M_W = 80.4; +double M_mu = 0.10566; // 105.66 MeV/c^2 +double M_el = 0.000510999; // 0.510998910 Mev/c^2 +int nMatched_charm = 0; +int nNonMatched_charm = 0; +int nMatched_charm_tag = 0; +int nNonMatched_charm_tag = 0; +int nMatched_bottom = 0; +int nNonMatched_bottom = 0; +int nMatched_Zelec = 0; +int nNonMatched_Zelec = 0; +int nMatched_Zmu = 0; +int nNonMatched_Zmu = 0; +int nMatched_Welec = 0; +int nNonMatched_Welec = 0; +int nMatched_Wmu = 0; +int nNonMatched_Wmu = 0; +int nTagEqMass = 0; +int nTagNotEqMass = 0; +bool matching = false; +bool elecbool = false; +bool mubool = false; +vector muIndices; +vector elecIndices; +vector WmuIndices; +vector WelecIndices; + + +int main (int argc, char *argv[]) +{ + + string dateString = MakeTimeStamp(); + cout << "***********************************" << endl; + cout << "*** Beginning of program: tZq FCNC ***" << endl; + cout << "***********************************" << endl; + cout << "Current time: " << dateString << endl; + + clock_t start = clock(); + + + + /////////////////////////// + /// Configuration /// + ////////////////////////// + int verbose = 1; // 0 = cout alll + bool eventSelected = false; + bool baseSelected = false; + int nbTrig = 0; + int nbBaseline = 0; + int nbGPV = 0; + int nbSelectedEvents = 0; + int nbEvents = 0; + double dataLumi = 0; //pb + bool runHLT = true; + bool applyJetLeptonCleaning = true; + bool fillBtagHisto = false; + bool printTrigger = false; + bool printLeptonSF = false; + bool applyJER = false; + bool applyJES = false; + bool applyNegWeightCorrection = false; + bool applyPU = false; + bool applyLeptonSF = false; + bool btagShape = true; + string xmlFileName = ""; + int maxMCParticles = -1; + + ////////////////////////////////////////////// + /// Set up everything for local submission //// + /////////////////////////////////////////////// + // check the arguments passed + if(verbose == 0) + { + cout << " The list of arguments are: " << endl; + for (int n_arg=1; n_arg vecfileNames; + for(int args = 11; args < argc-7; args++) + { + vecfileNames.push_back(argv[args]); + } + + if (verbose==0) + { + cout << "The list of file to run over will be printed..." << endl; + for ( int nfiles = 0; nfiles < vecfileNames.size(); nfiles++) + { + cout << "file number " << nfiles << " is " << vecfileNames[nfiles] << endl; + } + } + /// define channels + // + + cout << " --> Using the all channel <-- " << endl; + xmlFileName = "config/Run2TriLepton.xml" ; + dataLumi = 2700; //pb + + + cout << "---Dataset accepted from command line---" << endl; + cout << "Dataset Name: " << dName << endl; + cout << "Dataset Title: " << dTitle << endl; + cout << "Dataset color: " << color << endl; + cout << "Dataset ls: " << ls << endl; + cout << "Dataset lw: " << lw << endl; + cout << "Dataset normf: " << normf << endl; + cout << "Dataset EqLumi: " << EqLumi << endl; + cout << "Dataset xSect: " << xSect << endl; + cout << "Dataset File Name: " << vecfileNames[0] << endl; + cout << "Beginning Event: " << startEvent << endl; + cout << "Ending Event: " << endEvent << endl; + cout << "JobNum: " << JobNum << endl; + bool isData= false; + if(dName.find("Data")!=string::npos || dName.find("data")!=string::npos || dName.find("DATA")!=string::npos){ + isData = true; + cout << "running on data !!!!" << endl; + cout << "luminosity is " << dataLumi << endl; + } + cout << "----------------------------------------" << endl; + + + ///////////////////////////////// + // Set up AnalysisEnvironment + ///////////////////////////////// + + AnalysisEnvironment anaEnv; + cout<<" - Creating environment ..."< datasets; + Dataset* theDataset = new Dataset(dName, dTitle, true, color, ls, lw, normf, xSect, vecfileNames); + theDataset->SetEquivalentLuminosity(EqLumi); + datasets.push_back(theDataset); + int ndatasets = datasets.size() - 1 ; + + //////////////////////////// + /// Initialise trigger /// + //////////////////////////// + + if(verbose == 0) cout << "Initializing trigger" << endl; + Trigger* trigger_mumu = new Trigger(1, 0, 0, 1,0); // mu , el, single, double, tri + Trigger* trigger_ee = new Trigger(0, 1, 0, 1,0); + Trigger* trigger_emu = new Trigger(1, 1, 0, 1,0) ; + Trigger* trigger_mumumu = new Trigger(1, 0, 0, 0,1); + Trigger* trigger_eee = new Trigger(0, 1, 0, 0,1); + Trigger* trigger_emumu_mumue = new Trigger(1, 1, 0, 0,1) ; + Trigger* trigger_mu = new Trigger(1, 0, 1, 0,0); + Trigger* trigger_e = new Trigger(0, 1, 1, 0,0); + + + //////////////////////// + // intialize Calibrations // + /////////////////////// + BTagCalibration *btagcalib; + BTagCalibrationReader *btagreader; + BTagWeightTools *btwt; + BTagCalibrationReader * reader_csvv2; + // for pu + LumiReWeighting LumiWeights; + + // JER / JEC + vector vCorrParam; + string pathCalJEC = "../TopTreeAnalysisBase/Calibrations/JECFiles/"; + + + /////////////////////////////// + // Set up Output ROOT file /// + ////////////////////////////// + stringstream ss; + ss << JobNum; + string strJobNum = ss.str(); + string histo_dir = "NtupleMakerOutput/TriLepton_histos"; + string histo_dir_date = histo_dir+"/TriLepton_histos_" + dateString +"/"; + mkdir(histo_dir.c_str(),0777); + mkdir(histo_dir_date.c_str(),0777); + + string rootFileName (histo_dir_date+"/FCNC_3L_"+dName+".root"); + if (strJobNum != "0") + { + if(verbose == 0) cout << "strJobNum is " << strJobNum << endl; + rootFileName = histo_dir_date+"/FCNC_3L_"+dName + "_"+strJobNum+".root"; + } + cout << "Histofile: " << rootFileName << endl; + TFile *fout = new TFile (rootFileName.c_str(), "RECREATE"); + + /////////////////////////// + /// Global variables //// + ////////////////////////// + TRootEvent* event = 0; + // TRootRun *runInfos = new TRootRun(); + + ///////////////////////////// + /// Object ID /// + ///////////////////////////// + // electron + float el_pt_cut =20.; // 42 + float el_eta_cut = 2.5; + float el_iso_cone = 0.3; + // reliso cut fabs(eta supercluster) <= 1.479 --> 0.107587 // (fabs(eta supercluster) > 1.479 && fabs(eta supercluster) < 2.5) --> 0.113254 + // muon + float mu_pt_cut = 20.; // 40 + float mu_eta_cut = 2.4; + float mu_iso_cut = 0.15; + //jets + float jet_pt_cut = 30.; + float jet_eta_cut = 2.4; + + // convert into string + + std::ostringstream el_pt_cut_strs, el_eta_cut_strs, mu_pt_cut_strs, mu_eta_cut_strs, mu_iso_cut_strs, jet_pt_cut_strs, jet_eta_cut_strs; + std::string el_pt_cut_str, el_eta_cut_str, mu_pt_cut_str, mu_eta_cut_str, mu_iso_cut_str, jet_pt_cut_str, jet_eta_cut_str; + el_pt_cut_strs << el_pt_cut; + el_eta_cut_strs << el_eta_cut; + mu_pt_cut_strs << mu_pt_cut; + mu_eta_cut_strs << mu_eta_cut; + mu_iso_cut_strs << mu_iso_cut; + jet_pt_cut_strs << jet_pt_cut; + jet_eta_cut_strs << jet_eta_cut; + el_pt_cut_str = el_pt_cut_strs.str(); + el_eta_cut_str = el_eta_cut_strs.str(); + mu_pt_cut_str = mu_pt_cut_strs.str(); + mu_eta_cut_str = mu_eta_cut_strs.str(); + mu_iso_cut_str = mu_iso_cut_strs.str(); + jet_pt_cut_str = jet_pt_cut_strs.str(); + jet_eta_cut_str = jet_eta_cut_strs.str(); + + + + + //////////////////////////////////////////////////////////////////// + ////////////////// 1D plots ////////////////////////////// + //////////////////////////////////////////////////////////////////// + histo1D["NbOfVertices"] = new TH1F("NbOfVertices", "Nb. of vertices", 60, 0, 60); + histo1D["cutFlow"] = new TH1F( "cutFlow", "cutFlow", 15, -0.5, 14.5); + histo1D["weightIndex"] = new TH1F("weightIndex", "weightIndex", 5, -2.5,2.5); // 0: None; 1: scale_variation 1; 2: Central scale variation 1 + histo1D["nloweight"] = new TH1F("nloweight", "nloweight", 200, -2.0, 2.0); + histo1D["init_nPVs_before"] = new TH1F("init_nPVs_before", "init_nPVs_before", 41,-0.5,40.5); + histo1D["init_nPVs_after"] = new TH1F("init_nPVs_after", "init_nPVs_after", 41,-0.5,40.5); + + histo1D["nbMuons"] = new TH1F("nbMuons","nbMuons",10,-0.5,9.5); + histo1D["nbElectrons"] = new TH1F("nbElectrons","nbElectrons",10,-0.5,9.5); + histo1D["nbJets"] = new TH1F("nbJets","nbJets",10,-0.5,9.5); + + + + ///////////////////////////////// + /// Matching + /////////////////////////////// + vector mcParticlesTLV_charm, mcParticlesTLV_bottom, selectedJetsTLV, selectedMuonsTLV, selectedElectronsTLV, mcParticlesTLV_electrons, mcParticlesTLV_muons, mcParticlesTLV_Welectrons, mcParticlesTLV_Wmuons; + // TLorentzVector cQuark, anticQuark; + + + + + ///////////////////////////////// + // Loop on datasets // + ///////////////////////////////// + cout << " - Loop over datasets ... " << datasets.size () << " datasets !" << endl; + bool nlo = false; + for (unsigned int d = 0; d < datasets.size(); d++) + { + cout<<"Load Dataset"<Name(); + float normfactor = datasets[d]->NormFactor(); + cout <<"found sample " << daName.c_str() << " with equivalent lumi "<< theDataset->EquivalentLumi() < depending on JES up/Down andother reader is needed + + + } + + LumiWeights = LumiReWeighting("../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_MC_RunIIFall15DR76-Asympt25ns.root", "../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_2015Data76X_25ns-Run246908-260627Cert.root", "pileup", "pileup"); + + //MuonSFWeight (const string &sfFile, const string &dataOverMC, const bool &extendRange, const bool &debug, const bool &printWarning) + + MuonSFWeight* muonSFWeightID_T = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonID_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_TightIDandIPCut_DEN_genTracks_PAR_pt_spliteta_bin1/abseta_pt_ratio",true, printLeptonSF,printLeptonSF); + MuonSFWeight* muonSFWeightID_M = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonID_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_MediumID_DEN_genTracks_PAR_pt_spliteta_bin1/abseta_pt_ratio",true, printLeptonSF, printLeptonSF); + MuonSFWeight* muonSFWeightID_L = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonID_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_LooseID_DEN_genTracks_PAR_pt_spliteta_bin1/abseta_pt_ratio", true, printLeptonSF, printLeptonSF); + MuonSFWeight* muonSFWeightIso_TT = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_TightRelIso_DEN_TightID_PAR_pt_spliteta_bin1/abseta_pt_ratio",true, printLeptonSF,printLeptonSF); // Tight RelIso, Tight ID + MuonSFWeight* muonSFWeightIso_TM = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_TightRelIso_DEN_MediumID_PAR_pt_spliteta_bin1/abseta_pt_ratio", true,printLeptonSF, printLeptonSF); // Tight RelIso, Medium ID + MuonSFWeight* muonSFWeightIso_LT = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_LooseRelIso_DEN_TightID_PAR_pt_spliteta_bin1/abseta_pt_ratio", true,printLeptonSF, printLeptonSF); // Loose RelIso, Tight ID + MuonSFWeight* muonSFWeightIso_LM = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_LooseRelIso_DEN_MediumID_PAR_pt_spliteta_bin1/abseta_pt_ratio", true,printLeptonSF, printLeptonSF); // Loose RelIso, Medium ID + + + + + string electronFile= "CutBasedID_TightWP_76X_18Feb.txt_SF2D.root"; + string electronRecoFile = "eleRECO.txt.egamma_SF2D.root"; + string elecHistName = "EGamma_SF2D"; + ElectronSFWeight* electronSFWeight = new ElectronSFWeight (CaliPath+"LeptonSF/"+electronFile,elecHistName, true,printLeptonSF, printLeptonSF); // (... , ... , debug, print warning) i + ElectronSFWeight* electronSFWeightReco = new ElectronSFWeight(CaliPath+"LeptonSF/"+electronRecoFile,elecHistName, true,printLeptonSF, printLeptonSF); + + vCorrParam.clear(); + if (isData) + { + JetCorrectorParameters *L1JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L1FastJet_AK4PFchs.txt"); + vCorrParam.push_back(*L1JetCorPar); + JetCorrectorParameters *L2JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L2Relative_AK4PFchs.txt"); + vCorrParam.push_back(*L2JetCorPar); + JetCorrectorParameters *L3JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L3Absolute_AK4PFchs.txt"); + vCorrParam.push_back(*L3JetCorPar); + JetCorrectorParameters *L2L3ResJetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L2L3Residual_AK4PFchs.txt"); + vCorrParam.push_back(*L2L3ResJetCorPar); + } + else + { + JetCorrectorParameters *L1JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_MC_L1FastJet_AK4PFchs.txt"); + vCorrParam.push_back(*L1JetCorPar); + JetCorrectorParameters *L2JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_MC_L2Relative_AK4PFchs.txt"); + vCorrParam.push_back(*L2JetCorPar); + JetCorrectorParameters *L3JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_MC_L3Absolute_AK4PFchs.txt"); + vCorrParam.push_back(*L3JetCorPar); + } + JetCorrectionUncertainty *jecUnc = new JetCorrectionUncertainty(pathCalJEC+"Fall15_25nsV2_MC_Uncertainty_AK4PFchs.txt"); + + JetTools *jetTools = new JetTools(vCorrParam, jecUnc, true); //true means redo also L1 + + //////////////////////////////////////////////////////////// + // Setup Date string and nTuple for output + /////////////////////////////////////////////////////////// + + string channel_dir = "NtupleMakerOutput/Ntuples"; + string date_dir = channel_dir+"/Ntuples_" + dateString +"/"; + mkdir(channel_dir.c_str(),0777); + mkdir(date_dir.c_str(),0777); + + + string Ntupname = date_dir +"FCNC_3L_" + dName + "_"+ strJobNum + ".root"; + + TFile * tupfile = new TFile(Ntupname.c_str(),"RECREATE"); + tupfile->cd(); + TTree* myTree = new TTree("tree","tree"); + TTree* baselineTree = new TTree("baselinetree","baselinetree"); + TTree* globalTree = new TTree("globaltree","globaltree"); + /////////////////////////// + /// output tree + /////////////////////////// + // event related variables + Int_t run_num; + float i_channel; + Long64_t evt_num; + Int_t lumi_num; + Int_t nvtx; + Int_t npu; + Int_t PassedMETFilter; + Int_t PassedGoodPV; + Double_t cutstep[10]; + Int_t nCuts; + Double_t puSF; + Double_t btagSF; + Double_t MuonIDSF[10]; + Double_t MuonIsoSF[10]; + Double_t MuonTrigSFv2[10]; + Double_t MuonTrigSFv3[10]; + Double_t ElectronSF[10]; + Int_t nofPosWeights; + Int_t nofNegWeights; + Int_t sumW; + Int_t nEv; + Double_t nloWeight; // for amc@nlo samples + Int_t JERon; + Int_t JESon; + Double_t WPb_L; + Double_t WPb_M; + Double_t WPb_T; + Int_t PassedMET; + Int_t channelInt; + + Double_t pt_electron_1; + Double_t pt_electron_2; + Double_t pt_electron_3; + Double_t pt_muon_1; + Double_t pt_muon_2; + Double_t pt_muon_3; + Double_t pt_jet_1; + Double_t pt_jet_2; + Double_t pt_jet_3; + + + Int_t nLeptons; + // variables for electrons + Int_t nElectrons; + Double_t pt_electron[10]; + Double_t phi_electron[10]; + Double_t eta_electron[10]; + Double_t eta_superCluster_electron[10]; + Double_t E_electron[10]; + Double_t d0_electron[10]; + Double_t d0BeamSpot_electron[10]; + Double_t chargedHadronIso_electron[10]; + Double_t neutralHadronIso_electron[10]; + Double_t photonIso_electron[10]; + Double_t pfIso_electron[10]; + Int_t charge_electron[10]; + + Double_t sigmaIEtaIEta_electron[10]; + Double_t deltaEtaIn_electron[10]; + Double_t deltaPhiIn_electron[10]; + Double_t hadronicOverEm_electron[10]; + Int_t missingHits_electron[10]; + Bool_t passConversion_electron[10]; + Bool_t isId_electron[10]; + Bool_t isIso_electron[10]; + + Bool_t isEBEEGap[10]; + + //variable for muons + Int_t nMuons; + Double_t pt_muon[10]; + Double_t phi_muon[10]; + Double_t eta_muon[10]; + Double_t E_muon[10]; + Double_t d0_muon[10]; + Double_t d0BeamSpot_muon[10]; + Double_t chargedHadronIso_muon[10]; + Double_t neutralHadronIso_muon[10]; + Double_t photonIso_muon[10]; + Double_t relIso_muon[10]; + Bool_t isId_muon[10]; + Bool_t isIso_muon[10]; + Double_t pfIso_muon[10]; + Int_t charge_muon[10]; + + //variable for jets + Int_t nJets; + Int_t nJets_CSVL; + Int_t nJets_CSVM; + Int_t nJets_CSVT; + Double_t pt_jet[20]; + Double_t px_jet[20]; + Double_t py_jet[20]; + Double_t pz_jet[20]; + Double_t phi_jet[20]; + Double_t eta_jet[20]; + Double_t E_jet[20]; + Int_t charge_jet[20]; + Double_t bdisc_jet[20]; + Double_t cdiscCvsL_jet[20]; + Double_t cdiscCvsL_jet_1; + Double_t cdiscCvsB_jet_1; + Double_t cdiscCvsB_jet[20]; + + + // variables for Zboson + Double_t Zboson_M; + Double_t Zboson_Px; + Double_t Zboson_Py; + Double_t Zboson_Pz; + Double_t Zboson_Energy; + + // met + Double_t met_Pt; + Double_t met_Ptbf; + Double_t met_Px; + Double_t met_Py; + Double_t met_Pz; + Double_t met_Phi; + Double_t met_Eta; + + Double_t mWt; + Double_t FCNCtop_M; + Double_t SMtop_M; + Double_t cjet_Pt; + Double_t mlb; + Double_t dRWlepc; + Double_t dRZb; + Double_t dRZc; + Double_t dRWlepb; + Double_t dRSMFCNCtop; + Double_t dPhiSMFCNCtop; + Double_t dPhiWlepb; + Double_t dPhiWlepc; + Double_t dPhiZb; + Double_t dPhiZc; + + Double_t FCNCtop_M_tagger; + Double_t cjet_Pt_tagger; + Double_t dRWlepc_tagger; + + Double_t dRZc_tagger; + + Double_t dRSMFCNCtop_tagger; + Double_t dPhiSMFCNCtop_tagger; + + Double_t dPhiWlepc_tagger; + + Double_t dPhiZc_tagger; + + // mcparicles + Int_t nMCParticles; + Int_t mc_status[200]; + Int_t mc_pdgId[200]; + Int_t mc_mother[200]; + Int_t mc_granny[200]; + Double_t mc_pt[200]; + Double_t mc_phi[200]; + Double_t mc_eta[200]; + Double_t mc_E[200]; + Double_t mc_M[200]; + + + if(dName.find("NP_overlay_FCNC_TT")!=string::npos || dName.find("tZq")!=string::npos ) + { + globalTree->Branch("nMatched_charm",&nMatched_charm,"nMatched_charm/I"); + globalTree->Branch("nNonMatched_charm",&nNonMatched_charm,"nNonMatched_charm/I"); + globalTree->Branch("nMatched_Zelec",&nMatched_Zelec,"nMatched_Zelec/I"); + globalTree->Branch("nNonMatched_Zelec",&nNonMatched_Zelec,"nNonMatched_Zelec/I"); + globalTree->Branch("nMatched_Zmu",&nMatched_Zmu,"nMatched_Zmu/I"); + globalTree->Branch("nNonMatched_Zmu",&nNonMatched_Zmu,"nNonMatched_Zmu/I"); + globalTree->Branch("nMatched_Welec",&nMatched_Welec,"nMatched_Welec/I"); + globalTree->Branch("nNonMatched_Welec",&nNonMatched_Welec,"nNonMatched_Welec/I"); + globalTree->Branch("nMatched_Wmu",&nMatched_Wmu,"nMatched_Wmu/I"); + globalTree->Branch("nNonMatched_Wmu",&nNonMatched_Wmu,"nNonMatched_Wmu/I"); + globalTree->Branch("nMatched_charm_tag",&nMatched_charm_tag,"nMatched_charm_tag/I"); + globalTree->Branch("nNonMatched_charm_tag",&nNonMatched_charm_tag,"nNonMatched_charm_tag/I"); + globalTree->Branch("nMatched_bottom",&nMatched_bottom,"nMatched_bottom/I"); + globalTree->Branch("nNonMatched_bottom",&nNonMatched_bottom,"nNonMatched_bottom/I"); + globalTree->Branch("nTagEqMass",&nTagEqMass,"nTagEqMass/I"); + globalTree->Branch("nTagNotEqMass", &nTagNotEqMass, "nTagNotEqMass/I"); + + myTree->Branch("nMCParticles",&nMCParticles,"nMCParticles/I"); + myTree->Branch("mc_status",&mc_status,"mc_status[nMCParticles]/I"); + myTree->Branch("mc_pdgId",&mc_pdgId,"mc_pdgId[nMCParticles]/I"); + myTree->Branch("mc_mother",&mc_mother,"mc_mother[nMCParticles]/I"); + myTree->Branch("mc_granny",&mc_granny,"mc_granny[nMCParticles]/I"); + myTree->Branch("mc_pt",&mc_pt,"mc_pt[nMCParticles]/D"); + myTree->Branch("mc_phi",&mc_phi,"mc_phi[nMCParticles]/D"); + myTree->Branch("mc_eta",&mc_eta,"mc_eta[nMCParticles]/D"); + myTree->Branch("mc_E",&mc_E,"mc_E[nMCParticles]/D"); + myTree->Branch("mc_M",&mc_M,"mc_M[nMCParticles]/D"); + + baselineTree->Branch("nMCParticles",&nMCParticles,"nMCParticles/I"); + baselineTree->Branch("mc_status",&mc_status,"mc_status[nMCParticles]/I"); + baselineTree->Branch("mc_pdgId",&mc_pdgId,"mc_pdgId[nMCParticles]/I"); + baselineTree->Branch("mc_mother",&mc_mother,"mc_mother[nMCParticles]/I"); + baselineTree->Branch("mc_granny",&mc_granny,"mc_granny[nMCParticles]/I"); + baselineTree->Branch("mc_pt",&mc_pt,"mc_pt[nMCParticles]/D"); + baselineTree->Branch("mc_phi",&mc_phi,"mc_phi[nMCParticles]/D"); + baselineTree->Branch("mc_eta",&mc_eta,"mc_eta[nMCParticles]/D"); + baselineTree->Branch("mc_E",&mc_E,"mc_E[nMCParticles]/D"); + baselineTree->Branch("mc_M",&mc_M,"mc_M[nMCParticles]/D"); + } + + + + + // global data set variables + Int_t nofEventsHLTv2; + Int_t nofEventsHLTv3; + int nTrigg; + int n3lep; + int nVetoMu; + int nVetoEl; + int nOS; + int nZmass; + int nJet; + int nBJet; + int nMWT; + int nSMtop; + int nMET; + globalTree->Branch("nofEventsHLTv2",&nofEventsHLTv2,"nofEventsHLTv2/I"); + globalTree->Branch("nofEventsHLTv3",&nofEventsHLTv3,"nofEventsHLTv3/I"); + globalTree->Branch("nofPosWeights",&nofPosWeights,"nofPosWeights/I"); + globalTree->Branch("nofNegWeights",&nofNegWeights,"nofNegWeights/I"); + globalTree->Branch("nEv" , &nEv, "nEv/I"); + globalTree->Branch("sumW", &sumW, "sumW/I"); + globalTree->Branch("nCuts",&nCuts, "nCuts/I"); + globalTree->Branch("cutstep",&cutstep,"cutstep[nCuts]/D"); + globalTree->Branch("JERon",&JERon,"JERon/I"); + globalTree->Branch("JESon", &JESon, "JESon/I"); + globalTree->Branch("WPb_L", &WPb_L, "WPb_L/D"); + globalTree->Branch("WPb_M", &WPb_M, "WPb_M/D"); + globalTree->Branch("WPb_T", &WPb_T, "WPb_T/D"); + + globalTree->Branch("nTrigg", &nTrigg, "nTrigg/I"); + globalTree->Branch("n3lep", &n3lep, "n3lep/I"); + globalTree->Branch("nVetoMu", &nVetoMu, "nVetoMu/I"); + globalTree->Branch("nVetoEl", &nVetoEl, "nVetoEl/I"); + globalTree->Branch("nOS", &nOS, "nOS/I"); + globalTree->Branch("nZmass",&nZmass, "nZmass/I"); + globalTree->Branch("nJet", &nJet, "nJet/I"); + globalTree->Branch("nBJet",&nBJet, "nBJet/I"); + globalTree->Branch("nMWT", &nMWT, "nMWT/I"); + globalTree->Branch("nSMtop",&nSMtop, "nSMtop/I"); + globalTree->Branch("nMET",&nMET, "nMET/I"); + + + + + + // event related variables + myTree->Branch("channelInt", &channelInt, "channelInt/I"); + baselineTree->Branch("channelInt", &channelInt, "channelInt/I"); + myTree->Branch("nloWeight",&nloWeight,"nloWeight/D"); + myTree->Branch("run_num",&run_num,"run_num/I"); + myTree->Branch("evt_num",&evt_num,"evt_num/L"); + myTree->Branch("lumi_num",&lumi_num,"lumi_num/I"); + myTree->Branch("nvtx",&nvtx,"nvtx/I"); + myTree->Branch("npu",&npu,"npu/I"); + myTree->Branch("puSF",&puSF,"puSF/D"); + myTree->Branch("btagSF",&btagSF,"btagSF/D"); + myTree->Branch("nLeptons",&nLeptons, "nLeptons/I");// + myTree->Branch("PassedMETFilter", &PassedMETFilter,"PassedMETFilter/I"); + myTree->Branch("PassedGoodPV", &PassedGoodPV,"PassedGoodPV/I"); + + baselineTree->Branch("PassedMETFilter", &PassedMETFilter,"PassedMETFilter/I"); + baselineTree->Branch("PassedGoodPV", &PassedGoodPV,"PassedGoodPV/I"); + baselineTree->Branch("nloWeight",&nloWeight,"nloWeight/D"); + baselineTree->Branch("run_num",&run_num,"run_num/I"); + baselineTree->Branch("evt_num",&evt_num,"evt_num/I"); + baselineTree->Branch("lumi_num",&lumi_num,"lumi_num/I"); + baselineTree->Branch("nvtx",&nvtx,"nvtx/I"); + baselineTree->Branch("npu",&npu,"npu/I"); + baselineTree->Branch("puSF",&puSF,"puSF/D"); + baselineTree->Branch("btagSF",&btagSF,"btagSF/D"); + baselineTree->Branch("nLeptons",&nLeptons, "nLeptons/I");// + // electrons + myTree->Branch("nElectrons",&nElectrons, "nElectrons/I");// + myTree->Branch("ElectronSF",&ElectronSF,"ElectronSF[nElectrons]/D"); + myTree->Branch("pt_electron",pt_electron,"pt_electron[nElectrons]/D"); + myTree->Branch("phi_electron",phi_electron,"phi_electron[nElectrons]/D"); + myTree->Branch("eta_electron",eta_electron,"eta_electron[nElectrons]/D"); + myTree->Branch("eta_superCluster_electron",eta_superCluster_electron,"eta_superCluster_electron[nElectrons]/D"); + myTree->Branch("E_electron",E_electron,"E_electron[nElectrons]/D"); + myTree->Branch("chargedHadronIso_electron",chargedHadronIso_electron,"chargedHadronIso_electron[nElectrons]/D"); + myTree->Branch("neutralHadronIso_electron",neutralHadronIso_electron,"neutralHadronIso_electron[nElectrons]/D"); + myTree->Branch("photonIso_electron",photonIso_electron,"photonIso_electron[nElectrons]/D"); + myTree->Branch("pfIso_electron",pfIso_electron,"pfIso_electron[nElectrons]/D"); + myTree->Branch("charge_electron",charge_electron,"charge_electron[nElectrons]/I"); + myTree->Branch("d0_electron",d0_electron,"d0_electron[nElectrons]/D"); + myTree->Branch("d0BeamSpot_electron",d0BeamSpot_electron,"d0BeamSpot_electron[nElectrons]/D"); + myTree->Branch("sigmaIEtaIEta_electron",sigmaIEtaIEta_electron,"sigmaIEtaIEta_electron[nElectrons]/D"); + myTree->Branch("deltaEtaIn_electron",deltaEtaIn_electron,"deltaEtaIn_electron[nElectrons]/D"); + myTree->Branch("deltaPhiIn_electron",deltaPhiIn_electron,"deltaPhiIn_electron[nElectrons]/D"); + myTree->Branch("hadronicOverEm_electron",hadronicOverEm_electron,"hadronicOverEm_electron[nElectrons]/D"); + myTree->Branch("missingHits_electron",missingHits_electron,"missingHits_electron[nElectrons]/I"); + myTree->Branch("passConversion_electron",passConversion_electron,"passConversion_electron[nElectrons]/O)"); + myTree->Branch("isId_electron",isId_electron,"isId_electron[nElectrons]/O)"); + myTree->Branch("isIso_electron",isIso_electron,"isIso_electron[nElectrons]/O)"); + myTree->Branch("isEBEEGap",isEBEEGap,"isEBEEGap[nElectrons]/O)"); + myTree->Branch("pt_electron_1",&pt_electron_1,"pt_electron_1/D"); + myTree->Branch("pt_electron_2",&pt_electron_2,"pt_electron_2/D"); + myTree->Branch("pt_electron_3",&pt_electron_3,"pt_electron_3/D"); + + + baselineTree->Branch("nElectrons",&nElectrons, "nElectrons/I");// + baselineTree->Branch("ElectronSF",&ElectronSF,"ElectronSF[nElectrons]/D"); + baselineTree->Branch("pt_electron",pt_electron,"pt_electron[nElectrons]/D"); + baselineTree->Branch("phi_electron",phi_electron,"phi_electron[nElectrons]/D"); + baselineTree->Branch("eta_electron",eta_electron,"eta_electron[nElectrons]/D"); + baselineTree->Branch("eta_superCluster_electron",eta_superCluster_electron,"eta_superCluster_electron[nElectrons]/D"); + baselineTree->Branch("E_electron",E_electron,"E_electron[nElectrons]/D"); + baselineTree->Branch("chargedHadronIso_electron",chargedHadronIso_electron,"chargedHadronIso_electron[nElectrons]/D"); + baselineTree->Branch("neutralHadronIso_electron",neutralHadronIso_electron,"neutralHadronIso_electron[nElectrons]/D"); + baselineTree->Branch("photonIso_electron",photonIso_electron,"photonIso_electron[nElectrons]/D"); + baselineTree->Branch("pfIso_electron",pfIso_electron,"pfIso_electron[nElectrons]/D"); + baselineTree->Branch("charge_electron",charge_electron,"charge_electron[nElectrons]/I"); + baselineTree->Branch("d0_electron",d0_electron,"d0_electron[nElectrons]/D"); + baselineTree->Branch("d0BeamSpot_electron",d0BeamSpot_electron,"d0BeamSpot_electron[nElectrons]/D"); + baselineTree->Branch("sigmaIEtaIEta_electron",sigmaIEtaIEta_electron,"sigmaIEtaIEta_electron[nElectrons]/D"); + baselineTree->Branch("deltaEtaIn_electron",deltaEtaIn_electron,"deltaEtaIn_electron[nElectrons]/D"); + baselineTree->Branch("deltaPhiIn_electron",deltaPhiIn_electron,"deltaPhiIn_electron[nElectrons]/D"); + baselineTree->Branch("hadronicOverEm_electron",hadronicOverEm_electron,"hadronicOverEm_electron[nElectrons]/D"); + baselineTree->Branch("missingHits_electron",missingHits_electron,"missingHits_electron[nElectrons]/I"); + baselineTree->Branch("passConversion_electron",passConversion_electron,"passConversion_electron[nElectrons]/O)"); + baselineTree->Branch("isId_electron",isId_electron,"isId_electron[nElectrons]/O)"); + baselineTree->Branch("isIso_electron",isIso_electron,"isIso_electron[nElectrons]/O)"); + baselineTree->Branch("isEBEEGap",isEBEEGap,"isEBEEGap[nElectrons]/O)"); + baselineTree->Branch("pt_electron_1",&pt_electron_1,"pt_electron_1/D"); + baselineTree->Branch("pt_electron_2",&pt_electron_2,"pt_electron_2/D"); + baselineTree->Branch("pt_electron_3",&pt_electron_3,"pt_electron_3/D"); + + // muons + myTree->Branch("nMuons",&nMuons, "nMuons/I"); + myTree->Branch("MuonIDSF",&MuonIDSF,"MuonIDSF[nMuons]/D"); + myTree->Branch("MuonIsoSF",&MuonIsoSF, "MuonIsoSF[nMuons]/D"); + myTree->Branch("MuonTrigSFv2",&MuonTrigSFv2,"MuonTrigSFv2[nMuons]/D"); + myTree->Branch("MuonTrigSFv3",&MuonTrigSFv3,"MuonTrigSFv3[nMuons]/D"); + myTree->Branch("pt_muon",pt_muon,"pt_muon[nMuons]/D"); + myTree->Branch("phi_muon",phi_muon,"phi_muon[nMuons]/D"); + myTree->Branch("eta_muon",eta_muon,"eta_muon[nMuons]/D"); + myTree->Branch("E_muon",E_muon,"E_muon[nMuons]/D"); + myTree->Branch("chargedHadronIso_muon",chargedHadronIso_muon,"chargedHadronIso_muon[nMuons]/D"); + myTree->Branch("neutralHadronIso_muon",neutralHadronIso_muon,"neutralHadronIso_muon[nMuons]/D"); + myTree->Branch("photonIso_muon",photonIso_muon,"photonIso_muon[nMuons]/D"); + myTree->Branch("isId_muon",isId_muon,"isId_muon[nMuons]/O"); + myTree->Branch("isIso_muon",isIso_muon,"isIso_muon[nMuons]/O"); + myTree->Branch("pfIso_muon",pfIso_muon,"pfIso_muon[nMuons]/D"); + myTree->Branch("charge_muon",charge_muon,"charge_muon[nMuons]/I"); + myTree->Branch("d0_muon",d0_muon,"d0_muon[nMuons]/D"); + myTree->Branch("d0BeamSpot_muon",d0BeamSpot_muon,"d0BeamSpot_muon[nMuons]/D"); + myTree->Branch("pt_muon_1",&pt_muon_1,"pt_muon_1/D"); + myTree->Branch("pt_muon_2",&pt_muon_2,"pt_muon_2/D"); + myTree->Branch("pt_muon_3",&pt_muon_3,"pt_muon_3/D"); + + baselineTree->Branch("nMuons",&nMuons, "nMuons/I"); + baselineTree->Branch("MuonIDSF",&MuonIDSF,"MuonIDSF[nMuons]/D"); + baselineTree->Branch("MuonIsoSF",&MuonIsoSF, "MuonIsoSF[nMuons]/D"); + baselineTree->Branch("MuonTrigSFv2",&MuonTrigSFv2,"MuonTrigSFv2[nMuons]/D"); + baselineTree->Branch("MuonTrigSFv3",&MuonTrigSFv3,"MuonTrigSFv3[nMuons]/D"); + baselineTree->Branch("pt_muon",pt_muon,"pt_muon[nMuons]/D"); + baselineTree->Branch("phi_muon",phi_muon,"phi_muon[nMuons]/D"); + baselineTree->Branch("eta_muon",eta_muon,"eta_muon[nMuons]/D"); + baselineTree->Branch("E_muon",E_muon,"E_muon[nMuons]/D"); + baselineTree->Branch("chargedHadronIso_muon",chargedHadronIso_muon,"chargedHadronIso_muon[nMuons]/D"); + baselineTree->Branch("neutralHadronIso_muon",neutralHadronIso_muon,"neutralHadronIso_muon[nMuons]/D"); + baselineTree->Branch("photonIso_muon",photonIso_muon,"photonIso_muon[nMuons]/D"); + baselineTree->Branch("isId_muon",isId_muon,"isId_muon[nMuons]/O"); + baselineTree->Branch("isIso_muon",isIso_muon,"isIso_muon[nMuons]/O"); + baselineTree->Branch("pfIso_muon",pfIso_muon,"pfIso_muon[nMuons]/D"); + baselineTree->Branch("charge_muon",charge_muon,"charge_muon[nMuons]/I"); + baselineTree->Branch("d0_muon",d0_muon,"d0_muon[nMuons]/D"); + baselineTree->Branch("d0BeamSpot_muon",d0BeamSpot_muon,"d0BeamSpot_muon[nMuons]/D"); + baselineTree->Branch("pt_muon_1",&pt_muon_1,"pt_muon_1/D"); + baselineTree->Branch("pt_muon_2",&pt_muon_2,"pt_muon_2/D"); + baselineTree->Branch("pt_muon_3",&pt_muon_3,"pt_muon_3/D"); + + // jets + myTree->Branch("nJets",&nJets,"nJets/I"); + myTree->Branch("nJets_CSVL",&nJets_CSVL,"nJets_CSVL/I"); + myTree->Branch("nJets_CSVM",&nJets_CSVM,"nJets_CSVM/I"); + myTree->Branch("nJets_CSVT",&nJets_CSVT,"nJets_CSVT/I"); + myTree->Branch("pt_jet",pt_jet,"pt_jet[nJets]/D"); + myTree->Branch("px_jet",px_jet,"px_jet[nJets]/D"); + myTree->Branch("py_jet",py_jet,"py_jet[nJets]/D"); + myTree->Branch("pz_jet",pz_jet,"pz_jet[nJets]/D"); + myTree->Branch("phi_jet",phi_jet,"phi_jet[nJets]/D"); + myTree->Branch("eta_jet",eta_jet,"eta_jet[nJets]/D"); + myTree->Branch("E_jet",E_jet,"E_jet[nJets]/D"); + myTree->Branch("charge_jet",charge_jet,"charge_jet[nJets]/I"); + myTree->Branch("bdisc_jet",bdisc_jet,"bdisc_jet[nJets]/D"); + myTree->Branch("cdiscCvsL_jet",cdiscCvsL_jet,"cdiscCvsL_jet[nJets]/D"); + myTree->Branch("cdiscCvsB_jet",cdiscCvsB_jet,"cdiscCvsB_jet[nJets]/D"); + myTree->Branch("cdiscCvsL_jet_1",&cdiscCvsL_jet_1,"cdiscCvsL_jet_1/D"); + myTree->Branch("cdiscCvsB_jet_1",&cdiscCvsB_jet_1,"cdiscCvsB_jet_1/D"); + myTree->Branch("pt_jet_1",&pt_jet_1,"pt_jet_1/D"); + myTree->Branch("pt_jet_2",&pt_jet_2,"pt_jet_2/D"); + myTree->Branch("pt_jet_3",&pt_jet_3,"pt_jet_3/D"); + + baselineTree->Branch("nJets",&nJets,"nJets/I"); + baselineTree->Branch("cdiscCvsL_jet_1",&cdiscCvsL_jet_1,"cdiscCvsL_jet_1/D"); + baselineTree->Branch("cdiscCvsB_jet_1",&cdiscCvsB_jet_1,"cdiscCvsB_jet_1/D"); + baselineTree->Branch("nJets_CSVL",&nJets_CSVL,"nJets_CSVL/I"); + baselineTree->Branch("nJets_CSVM",&nJets_CSVM,"nJets_CSVM/I"); + baselineTree->Branch("nJets_CSVT",&nJets_CSVT,"nJets_CSVT/I"); + baselineTree->Branch("pt_jet",pt_jet,"pt_jet[nJets]/D"); + baselineTree->Branch("phi_jet",phi_jet,"phi_jet[nJets]/D"); + baselineTree->Branch("eta_jet",eta_jet,"eta_jet[nJets]/D"); + baselineTree->Branch("E_jet",E_jet,"E_jet[nJets]/D"); + baselineTree->Branch("charge_jet",charge_jet,"charge_jet[nJets]/I"); + baselineTree->Branch("bdisc_jet",bdisc_jet,"bdisc_jet[nJets]/D"); + baselineTree->Branch("cdiscCvsL_jet",cdiscCvsL_jet,"cdiscCvsL_jet[nJets]/D"); + baselineTree->Branch("cdiscCvsB_jet",cdiscCvsB_jet,"cdiscCvsB_jet[nJets]/D"); + baselineTree->Branch("pt_jet_1",&pt_jet_1,"pt_jet_1/D"); + baselineTree->Branch("pt_jet_2",&pt_jet_2,"pt_jet_2/D"); + baselineTree->Branch("pt_jet_3",&pt_jet_3,"pt_jet_3/D"); + + // Zboson + myTree->Branch("Zboson_M",&Zboson_M,"Zboson_M/D"); + baselineTree->Branch("Zboson_M",&Zboson_M,"Zboson_M/D"); + myTree->Branch("mWt",&mWt,"mWt/D"); + baselineTree->Branch("mWt",&mWt,"mWt/D"); + myTree->Branch("FCNCtop_M",&FCNCtop_M,"FCNCtop_M/D"); + myTree->Branch("FCNCtop_tagger",&FCNCtop_M_tagger,"FCNCtop_M_tagger/D"); + baselineTree->Branch("FCNCtop_tagger",&FCNCtop_M_tagger,"FCNCtop_M_tagger/D"); + myTree->Branch("SMtop_M",&SMtop_M, "SMtop_M/D"); + baselineTree->Branch("SMtop_M",&SMtop_M, "SMtop_M/D"); + myTree->Branch("Zboson_Px",&Zboson_Px,"Zboson_Px/D"); + myTree->Branch("Zboson_Py",&Zboson_Py,"Zboson_Py/D"); + myTree->Branch("Zboson_Pz",&Zboson_Pz,"Zboson_Pz/D"); + myTree->Branch("Zboson_Energy",&Zboson_Energy,"Zboson_Energy/D"); + myTree->Branch("cjet_Pt",&cjet_Pt,"cjet_Pt/D"); + baselineTree->Branch("cjet_Pt",&cjet_Pt,"cjet_Pt/D"); + myTree->Branch("cjet_Pt_tagger",&cjet_Pt_tagger,"cjet_Pt_tagger/D"); + baselineTree->Branch("cjet_Pt_tagger",&cjet_Pt_tagger,"cjet_Pt_tagger/D"); + myTree->Branch("mlb",&mlb,"mlb/D"); + baselineTree->Branch("mlb",&mlb,"mlb/D"); + myTree->Branch("dRSMFCNCtop",&dRSMFCNCtop,"dRSMFCNCtop/D"); + myTree->Branch("dRSMFCNCtop_tagger",&dRSMFCNCtop_tagger,"dRSMFCNCtop_tagger/D"); + baselineTree->Branch("dRSMFCNCtop_tagger",&dRSMFCNCtop_tagger,"dRSMFCNCtop_tagger/D"); + myTree->Branch("dRWlepb",&dRWlepb,"dRWlepb/D"); + myTree->Branch("dRWlepc",&dRWlepc,"dRWlepc/D"); + myTree->Branch("dRWlepc_tagger",&dRWlepc_tagger,"dRWlepc_tagger/D"); + baselineTree->Branch("dRWlepc_tagger",&dRWlepc_tagger,"dRWlepc_tagger/D"); + myTree->Branch("dRZb",&dRZb,"dRZb/D"); + myTree->Branch("dRZc",&dRZc,"dRZc/D"); + myTree->Branch("dRZc_tagger",&dRZc_tagger,"dRZc_tagger/D"); + baselineTree->Branch("dRZc_tagger",&dRZc_tagger,"dRZc_tagger/D"); + myTree->Branch("dPhiSMFCNCtop",&dPhiSMFCNCtop,"dPhiSMFCNCtop/D"); + myTree->Branch("dPhiSMFCNCtop_tagger",&dPhiSMFCNCtop_tagger,"dPhiSMFCNCtop_tagger/D"); + baselineTree->Branch("dPhiSMFCNCtop_tagger",&dPhiSMFCNCtop_tagger,"dPhiSMFCNCtop_tagger/D"); + myTree->Branch("dPhiWlepb",&dPhiWlepb,"dPhiWlepb/D"); + myTree->Branch("dPhiWlepc",&dPhiWlepc,"dPhiWlepc/D"); + baselineTree->Branch("dPhiWlepc_tagger",&dPhiWlepc_tagger,"dPhiWlepc_tagger/D"); + myTree->Branch("dPhiWlepc_tagger",&dPhiWlepc_tagger,"dPhiWlepc_tagger/D"); + myTree->Branch("dPhiZb",&dPhiZb,"dPhiZb/D"); + myTree->Branch("dPhiZc",&dPhiZc,"dPhiZc/D"); + myTree->Branch("dPhiZc_tagger",&dPhiZc_tagger,"dPhiZc_tagger/D"); + baselineTree->Branch("dPhiZc_tagger",&dPhiZc_tagger,"dPhiZc_tagger/D"); + baselineTree->Branch("dRSMFCNCtop",&dRSMFCNCtop,"dRSMFCNCtop/D"); + baselineTree->Branch("dRWlepb",&dRWlepb,"dRWlepb/D"); + baselineTree->Branch("dRWlepc",&dRWlepc,"dRWlepc/D"); + baselineTree->Branch("dRZb",&dRZb,"dRZb/D"); + baselineTree->Branch("dRZc",&dRZc,"dRZc/D"); + baselineTree->Branch("dPhiSMFCNCtop",&dPhiSMFCNCtop,"dPhiSMFCNCtop/D"); + baselineTree->Branch("dPhiWlepb",&dPhiWlepb,"dPhiWlepb/D"); + baselineTree->Branch("dPhiWlepc",&dPhiWlepc,"dPhiWlepc/D"); + baselineTree->Branch("dPhiZb",&dPhiZb,"dPhiZb/D"); + baselineTree->Branch("dPhiZc",&dPhiZc,"dPhiZc/D"); + + // met + myTree->Branch("met_Pt", &met_Pt, "met_Pt/D"); + myTree->Branch("met_Ptbf", &met_Ptbf, "met_Ptbf/D"); + myTree->Branch("met_Eta", &met_Eta,"met_Eta/D"); + myTree->Branch("met_Phi", &met_Phi, "met_Phi/D"); + myTree->Branch("met_Px", &met_Px, "met_Px/D"); + myTree->Branch("met_Py", &met_Py, "met_Py/D"); + myTree->Branch("met_Pz", &met_Pz, "met_Pz/D"); + + baselineTree->Branch("met_Pt", &met_Pt, "met_Pt/D"); + baselineTree->Branch("met_Ptbf", &met_Ptbf, "met_Ptbf/D"); + baselineTree->Branch("met_Px", &met_Px, "met_Px/D"); + baselineTree->Branch("met_Py", &met_Py, "met_Py/D"); + baselineTree->Branch("met_Pz", &met_Pz, "met_Pz/D"); + baselineTree->Branch("met_Eta", &met_Eta,"met_Eta/D"); + baselineTree->Branch("met_Phi", &met_Phi, "met_Phi/D"); + + + + ///////////////////////// + //// Corrections/trigger /// + /////////////////////////// + + /// book triggers + trigger_mumu->bookTriggers(isData); + trigger_ee->bookTriggers(isData); + trigger_emu->bookTriggers(isData); + trigger_mumumu->bookTriggers(isData); + trigger_eee->bookTriggers(isData); + trigger_emumu_mumue->bookTriggers(isData); + trigger_mu->bookTriggers(isData); + trigger_e->bookTriggers(isData); + + + + ////////////////////////////////////////////////// + // Pre-event loop definitions + ///////////////////////////////////////////////// + + int itrigger = -1, previousRun = -1, start = 0; + int currentRun; + int iFile = -1; + unsigned int ending = datasets[d]->NofEvtsToRunOver(); + cout <<"Number of events = "<< ending < ending) + end_d = ending; + else + end_d = endEvent; + + int nEvents = end_d - event_start; + cout <<"Will run over "<< (end_d - event_start) << " events..."< vertex; + vector < TRootMuon* > init_muons; + vector < TRootElectron* > init_electrons; + vector < TRootJet* > init_jets; + vector < TRootJet* > init_jets_corrected; + vector < TRootGenJet* > genjets; + vector < TRootMET* > mets; + vector selectedElectrons; + vector selectedLooseElectrons; + vector selectedJets; + vector PreselectedJets; + vector selectedMuons; + vector selectedLooseMuons; + vector selectedCSVLBJets; + vector selectedCSVMBJets; + vector selectedCSVTBJets; + vector selectedCSVLLJets; + vector selectedCSVMLJets; + vector selectedCSVTLJets; + vector mcParticles; + vector selectednonCSVLJets; + + TLorentzVector Zboson; + TLorentzVector Zlep0; + TLorentzVector Zlep1; + TLorentzVector Wlep; + TLorentzVector SMbjet; + TLorentzVector cjet; + TLorentzVector cjet_tagger; + TLorentzVector SMtop; + TLorentzVector FCNCtop; + TLorentzVector FCNCtop_tagger; + vector AssignedLeptons; + ////////////////////////////////////// + // Begin Event Loop + ////////////////////////////////////// + nbEvents = 0; + nofEventsHLTv2 = 0; + nofEventsHLTv3 = 0; + nofPosWeights = 0; + nofNegWeights = 0; + float eventweight = 1; + bool continueFlow ; + nbSelectedEvents = 0; + int nbEvents_0 = 0; + int nbEvents_test = 0; + int nbEvents_1 = 0; + int nbEvents_1m = 0; + int nbEvents_2m = 0; + int nbEvents_2 = 0; + int nbEvents_3 = 0; + int nbEvents_4 = 0; + int nbEvents_5 = 0; + int nbEvents_6 = 0; + int nbEvents_7 = 0; + int nbEvents_8 = 0; + int nbEvents_9 = 0; + bool debug = false; + vector selections; + std::ostringstream selectionsnb; + bool passedMET = false; + bool HBHEnoise = false; + bool HBHEIso = false; + bool CSCTight = false; + bool EcalDead = false; + bool eeBad = false; + bool lep3 = false; + TLorentzVector metTLV; + TLorentzVector metTLVbf; + string TriggBits; + float pt_lept1; + float pt_lept2; + float pt_lept3; + float iso_lept1; + float iso_lept2; + float iso_lept3; + bool id_lept1 = 1; + bool id_lept2 = 1; + bool id_lept3 = 1; + float leading_jet_btagDiscr; + float leading_jetPt; + float met; + nMatched_bottom = 0; + nNonMatched_bottom = 0; + nMatched_charm = 0; + nNonMatched_charm = 0; + nMatched_charm_tag = 0; + nNonMatched_charm_tag = 0; + nNonMatched_Zmu = 0; + nNonMatched_Zelec = 0; + nMatched_Zmu = 0; + nMatched_Zelec = 0; + nNonMatched_Wmu = 0; + nNonMatched_Welec = 0; + nMatched_Wmu = 0; + nMatched_Welec = 0; + nTagEqMass = 0; + nTagNotEqMass = 0; + for (unsigned int ievt = event_start; ievt < end_d; ievt++) + { + elecbool = false; + mubool = false; + muIndices.clear(); + elecIndices.clear(); + WmuIndices.clear(); + WelecIndices.clear(); + eventSelected = false; + baseSelected = false; + continueFlow = true; + lep3 = false; + AssignedLeptons.clear(); + leading_jetPt = 0.; + met = 0.; + leading_jet_btagDiscr = 0.; + TriggBits = ""; + pt_lept1 = pt_lept2 = pt_lept3 = 0. ; + metTLV.Clear(); + metTLVbf.Clear(); + metTLV.SetPxPyPzE(0,0,0,0); + selections.clear(); + bool lepsel = false; + selectionsnb.clear(); + selectionsnb.str(std::string()); + mcParticles.clear(); + /// mcparticles + nMCParticles = -1; + for (Int_t i = 0; i < 200; i++) + { + mc_status[i] = -1; + mc_pdgId[i] = 0; + mc_mother[i] = 0; + mc_granny[i] = 0; + mc_pt[i] = 0.; + mc_phi[i] = 0.; + mc_eta[i] = 0.; + mc_E[i] = 0.; + mc_M[i] = 0.; + } + nCuts = 0; + passedMET = false; + HBHEnoise = false; + HBHEIso = false; + CSCTight = false; + EcalDead = false; + eeBad = false; + eventweight = 1; + if(verbose == 0 ) cout << "new event " << ievt << endl; + double ievt_d = ievt; + debug = false; + if (verbose == 0 ) debug = true; + currentfrac = ievt_d/end_d; + if (debug)cout << endl << endl << "Starting a new event loop!"<eventTree()->LoadTree(ievt); + string currentFilename = datasets[d]->eventTree()->GetFile()->GetName(); + int currentRun = event->runId(); + run_num = event->runId(); + evt_num = event->eventId(); + HBHEnoise = event->getHBHENoiseFilter(); + HBHEIso = event->getHBHENoiseIsoFilter(); + CSCTight = event->getCSCTightHalo2015Filter(); + EcalDead = event->getEcalDeadCellTriggerPrimitiveFilter(); + eeBad = event->getEEBadScFilter(); + + lumi_num=event->lumiBlockId(); + nvtx = vertex.size(); + npu = (int) event->nTruePU(); + + ///////////////////////////////////// + // fix negative weights for amc@nlo/// + ///////////////////////////////////// + if(debug) cout << "amc fixing" << endl; + double hasNegWeight = false; + double mc_baseweight = 1; + if((!isData && dName.find("NP")==string::npos) && (event->getWeight(1001) != -9999.)) + { + mc_baseweight = event->getWeight(1001)/abs(event->originalXWGTUP()); + //mc_scaleupweight = event->getWeight(1005)/abs(event->originalXWGTUP()); + //mc_scaledownweight = event->getWeight(1009)/abs(event->originalXWGTUP()); + if(mc_baseweight >= 0) + { + nofPosWeights++; + histo1D["weightIndex"]->Fill(1.,1.); + + } + else + { + if(nlo) hasNegWeight = true; + nofNegWeights++; + histo1D["weightIndex"]->Fill(-1.,1.); + } + } + if( (!isData && dName.find("NP")==string::npos) && (event->getWeight(1) != -9999. )) + { + mc_baseweight = event->getWeight(1)/abs(event->originalXWGTUP()); + //mc_scaleupweight = event->getWeight(5)/abs(event->originalXWGTUP()); + //mc_scaledownweight = event->getWeight(9)/abs(event->originalXWGTUP()); + if(mc_baseweight >= 0) + { + nofPosWeights++; + histo1D["weightIndex"]->Fill(2.,1.); + + } + else + { + if(nlo) hasNegWeight = true; + nofNegWeights++; + histo1D["weightIndex"]->Fill(-2.,1.); + } + + + } + if((!isData && dName.find("FCNC")==string::npos)) + { + if ( event->getWeight(1001) == -9999. && event->getWeight(1) == -9999. ) + { + cout << "WARNING: No weight found for event " << ievt << " in dataset " << dName << endl; + cout << " Event Id: " << event->eventId() << " Run Id: " << event->runId() << " Lumi block Id: " << event->lumiBlockId() << endl; + cout << " Weight type is different from 'scale_variation' (1001) or 'Central scale variation' (1)." << endl; + } + if ( event->getWeight(1001) != -9999. && event->getWeight(1) != -9999. ) + { + cout << "WARNING: Two weight types found for event " << ievt << " in dataset " << dName << endl; + cout << " Event Id: " << event->eventId() << " Run Id: " << event->runId() << " Lumi block Id: " << event->lumiBlockId() << endl; + cout << " Check which weight type should be used when." << endl; + } + + nloWeight = mc_baseweight; + histo1D["nloweight"]->Fill(mc_baseweight, 1.); + sumWeights += mc_baseweight; + + + } + /////////////////////////////////////////// + // Trigger + /////////////////////////////////////////// + + bool trigged = false; + bool trigged_mumu = false; + bool trigged_ee = false; + bool trigged_emu = false; + bool trigged_mumumu = false; + bool trigged_eee = false; + bool trigged_emumu_mumue = false; + bool trigged_mu = false; + bool trigged_e = false; + bool filechanged = false; + bool runchanged = false; + + if(runHLT) + { + trigger_mumu->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_mumu = trigger_mumu->checkIfFired(); + trigger_ee->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_ee = trigger_ee->checkIfFired(); + trigger_emu->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_emu = trigger_emu->checkIfFired(); + trigger_mumumu->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_mumumu = trigger_mumumu->checkIfFired(); + trigger_eee->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_eee = trigger_eee->checkIfFired(); + trigger_emumu_mumue->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_emumu_mumue = trigger_emumu_mumue->checkIfFired(); + trigger_mu->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_mu = trigger_mu->checkIfFired(); + trigger_e->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_e = trigger_e->checkIfFired(); + + + bool emdataset = dName.find("MuonEG")!=string::npos; + bool mmdataset = dName.find("DoubleM")!=string::npos; + bool eedataset = dName.find("DoubleE")!=string::npos; + bool mdataset = dName.find("SingleM")!=string::npos; + bool edataset = dName.find("SingleE")!=string::npos; + + bool EM = false; + bool MM = false; + bool EE = false; + bool E = false; + bool M = false; + int result_trigger = 0; + + + if(isData){ + EM = (trigged_emumu_mumue|| trigged_emu); + MM = (trigged_mumu || trigged_mumumu ) ; + EE = (trigged_ee || trigged_eee ); + M = ( trigged_mu ); + E = (trigged_e); + } + else{ + EM = (trigged_emumu_mumue|| trigged_emu); + MM = (trigged_mumu || trigged_mumumu ) ; + EE = (trigged_ee || trigged_eee ); + M = ( trigged_mu ); + E = (trigged_e); + } + if ( EM && (emdataset) ) result_trigger = 1; + if ( MM && !EM && (mmdataset) ) result_trigger = 1; + if ( EE && !EM && !MM && (eedataset) ) result_trigger = 1; + if ( M && !EM && !MM && !EE && (mdataset ) ) result_trigger = 1; + if ( E && !EM && !MM && !EE && !M && (edataset ) ) result_trigger = 1; + + if ( EM && !isData ) result_trigger = 1; + if ( MM && !EM && !isData ) result_trigger = 1; + if ( EE && !EM && !MM && !isData ) result_trigger = 1; + if ( M && !EM && !MM && !EE && !isData ) result_trigger = 1; + if ( E && !EM && !MM && !EE && !M && !isData ) result_trigger = 1; + + + + + trigged = result_trigger; + if(dName.find("NP")!=string::npos) trigged = true; + + + } + else if(!runHLT && previousFilename != currentFilename) + { + filechanged = true; + previousFilename = currentFilename; + iFile++; + cout << "File changed!!! => iFile = " << iFile << endl; + trigged = true; + + } + else if(!runHLT) + { + trigged = true; + } + + if(verbose == 0) cout << "Apply trigger? " << runHLT << " trigged? " << trigged << endl; + + //////////////////////////// + ///// JES - JER smearing //// + ////////////////////////// + JERon = 0; + if(applyJER && !isData) + { + jetTools->correctJetJER(init_jets_corrected, genjets, mets[0], "nominal", false); + JERon = 1; + } + JESon = 0; + if(applyJES && !isData) + { + jetTools->correctJets(init_jets_corrected,event->fixedGridRhoFastjetAll() ,false); + JESon = 1; + } + + /////////////////////////////////////////////////////////// + // Event selection + /////////////////////////////////////////////////////////// + + // Declare selection instance + Run2Selection selection(init_jets_corrected, init_muons, init_electrons, mets,event->fixedGridRhoFastjetAll()); + PreselectedJets.clear(); + PreselectedJets = selection.GetSelectedJets(jet_pt_cut,jet_eta_cut, true, "Loose"); + selectedMuons.clear(); + selectedLooseMuons.clear(); + selectedMuons = selection.GetSelectedMuons(mu_pt_cut, mu_eta_cut, mu_iso_cut, "Tight", "Spring15"); + selectedLooseMuons = selection.GetSelectedMuons(mu_pt_cut, mu_eta_cut,0.2, "Loose", "Spring15"); + // pt, eta, iso // run normally + selectedElectrons.clear(); + selectedLooseElectrons.clear(); + selectedElectrons = selection.GetSelectedElectrons(el_pt_cut, el_eta_cut, "Tight","Spring15_25ns",true);// pt, eta + selectedLooseElectrons = selection.GetSelectedElectrons(el_pt_cut, el_eta_cut, "Veto","Spring15_25ns",true);// pt, eta + /// For MC Information + mcParticles.clear(); + if(!isData) treeLoader.LoadMCEvent(ievt, 0, mcParticles, false); + if(!isData) sort(mcParticles.begin(),mcParticles.end(),HighestPt()); + if (dName.find("NP_overlay_FCNC_TT")!=string::npos || dName.find("tZq")!=string::npos ) + { + nMCParticles = mcParticles.size(); + if (nMCParticles > maxMCParticles) maxMCParticles = nMCParticles; + for (Int_t iMC = 0; iMC < nMCParticles; iMC++) + { + mc_status[iMC] = mcParticles[iMC]->status(); + mc_pdgId[iMC] = mcParticles[iMC]->type(); + mc_mother[iMC] = mcParticles[iMC]->motherType(); + mc_granny[iMC] = mcParticles[iMC]->grannyType(); + mc_pt[iMC] = mcParticles[iMC]->Pt(); + mc_phi[iMC] = mcParticles[iMC]->Phi(); + mc_eta[iMC] = mcParticles[iMC]->Eta(); + mc_E[iMC] = mcParticles[iMC]->E(); + mc_M[iMC] = mcParticles[iMC]->M(); + } + } + // void TTreeLoader::LoadMCEvent(int, TopTree::TRootNPGenEvent*, std::vector&, bool) + if (verbose==0) cout <<"Number of Muons, Electrons, Jets ===> " << endl << selectedMuons.size() <<" " << selectedElectrons.size()<<" "<< PreselectedJets.size() << endl; + selectedJets.clear(); + if(applyJetLeptonCleaning){ + bool PushBack = true; + for(int iJ = 0; iJ < PreselectedJets.size() ; iJ++) + { + PushBack = true; + for(int iM = 0; iM < selectedMuons.size(); iM++){ + if( PreselectedJets[iJ]->DeltaR(*selectedMuons[iM]) < 0.4) { + PushBack = false; + break; + } + } + if(!PushBack) continue; + for(int iE = 0; iE < selectedElectrons.size(); iE++){ + if( PreselectedJets[iJ]->DeltaR(*selectedElectrons[iE]) < 0.3) { + PushBack = false; + break; + } + } + if(PushBack) selectedJets.push_back(PreselectedJets[iJ]); + } + } + else if(!applyJetLeptonCleaning) selectedJets = PreselectedJets; + if(debug) cout << evt_num << " init " << init_jets_corrected.size() << " sel " << selectedJets.size() << " bf cleaning " << PreselectedJets.size() << endl; + + //////////////////////////////////////////////// + // Pre cut operations + //////////////////////////////////////////////// + // Apply primary vertex selection + bool isGoodPV = selection.isPVSelected(vertex, 4, 24., 2); + // Met filters + if(HBHEnoise && HBHEIso && CSCTight && EcalDead && eeBad && isGoodPV) passedMET = true; + PassedMETFilter = passedMET; + + ////////////////////////////////////// + // B jet selection //// + /////////////////////////////////////// + + selectedCSVLBJets.clear(); + selectedCSVMBJets.clear(); + selectedCSVTBJets.clear(); + selectedCSVLLJets.clear(); + selectedCSVMLJets.clear(); + selectedCSVTLJets.clear(); + selectednonCSVLJets.clear(); + for(unsigned int iJ = 0; iJ < selectedJets.size(); iJ++) + { + if(selectedJets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() > workingpointvalue_Loose) selectedCSVLBJets.push_back(selectedJets[iJ]); + else selectedCSVLLJets.push_back(selectedJets[iJ]); + if(selectedJets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() > workingpointvalue_Medium) selectedCSVMBJets.push_back(selectedJets[iJ]); + else selectedCSVMLJets.push_back(selectedJets[iJ]); + if(selectedJets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() > workingpointvalue_Tight) selectedCSVTBJets.push_back(selectedJets[iJ]); + else selectedCSVTLJets.push_back(selectedJets[iJ]); + + } + WPb_L = workingpointvalue_Loose; + WPb_M = workingpointvalue_Medium; + WPb_T = workingpointvalue_Tight; + + //////////////////////////////////// + // Event Weights /// + /////////////////////////////////// + float btagWeight = 1.; + float bTagEff = 1.; + if( fillBtagHisto && !isData && !btagShape) + { + btwt->FillMCEfficiencyHistos(selectedJets); + + } + else if( !fillBtagHisto && !isData && !btagShape) + { + btagWeight = btwt->getMCEventWeight(selectedJets,false); + + } + else if( !isData && btagShape) + { + for(int intJet = 0; intJet < selectedJets.size(); intJet++) + { + float jetpt = selectedJets[intJet]->Pt(); + if(jetpt > 1000.) jetpt = 999.; + float jeteta = selectedJets[intJet]->Eta(); + float jetdisc = selectedJets[intJet]->btag_combinedInclusiveSecondaryVertexV2BJetTags(); + BTagEntry::JetFlavor jflav; + int jetpartonflav = std::abs(selectedJets[intJet]->partonFlavour()); + if(debug) cout<<"parton flavour: "<eval(jflav, jeteta, jetpt, jetdisc); + btagWeight *= bTagEff; + + } + + } + float PUweight = 1; + if(!isData) + { + PUweight = LumiWeights.ITweight((int)event->nTruePU()); + + + } + + + /////////////////////////////// + //// Matching + ////////////////////////////// + if(dName.find("NP_overlay_FCNC_TT")!=string::npos || dName.find("tZq")!=string::npos) matching = true; + //cout << "matching " << matching << endl; + + if(matching){ + //cout << "in matching" << endl; + int pdgID_charm = 4; + int pdgID_bottom = 5; + int pdgId_Z = 23; + int pdgId_top = 6; + int pdgId_W = 24; + int pdgID_electron = 11; + int pdgID_muon = 13; + vector mcParticlesMatching_; + + + if(dName.find("NP_overlay_FCNC_TT")!=string::npos || dName.find("tZq")!=string::npos){ + mcParticlesTLV_charm.clear(); selectedJetsTLV.clear(); + mcParticlesTLV_bottom.clear(); + selectedElectronsTLV.clear(); + selectedMuonsTLV.clear(); + mcParticlesTLV_electrons.clear(); + mcParticlesTLV_muons.clear(); + mcParticlesTLV_Welectrons.clear(); + mcParticlesTLV_Wmuons.clear(); + + for (unsigned int i = 0; i < mcParticles.size(); i++) + { + if(verbose>3) cout << setw(3) << right << i << " Status: " << setw(2) << mcParticles[i]->status() << " pdgId: " << setw(3) << mcParticles[i]->type() << " Mother: " << setw(4) << mcParticles[i]->motherType() << " Granny: " << setw(4) << mcParticles[i]->grannyType() << " Pt: " << setw(7) << left << mcParticles[i]->Pt() << " Eta: " << mcParticles[i]->Eta() << endl; + + if ( (mcParticles[i]->status() > 1 && mcParticles[i]->status() <= 20) || mcParticles[i]->status() >= 30 ) continue; /// Final state particle or particle from hardest process + + + + if ( fabs(mcParticles[i]->type()) == pdgID_charm && fabs(mcParticles[i]->motherType()) == pdgId_top){ + mcParticlesTLV_charm.push_back(*mcParticles[i]); + //mcParticlesMatching_.push_back(mcParticles[i]); + + } + if ( fabs(mcParticles[i]->type()) == pdgID_bottom && fabs(mcParticles[i]->motherType()) == pdgId_top){ + mcParticlesTLV_bottom.push_back(*mcParticles[i]); + //mcParticlesMatching_.push_back(mcParticles[i]); + + } + + if(fabs(mcParticles[i]->type()) == pdgID_electron && fabs(mcParticles[i]->motherType()) == pdgId_Z){ + mcParticlesTLV_electrons.push_back(*mcParticles[i]); + } + if(fabs(mcParticles[i]->type()) == pdgID_muon && fabs(mcParticles[i]->motherType()) == pdgId_Z){ + mcParticlesTLV_muons.push_back(*mcParticles[i]); + } + if(fabs(mcParticles[i]->type()) == pdgID_electron && fabs(mcParticles[i]->motherType()) == pdgId_W){ + mcParticlesTLV_Welectrons.push_back(*mcParticles[i]); + } + if(fabs(mcParticles[i]->type()) == pdgID_muon && fabs(mcParticles[i]->motherType()) == pdgId_W){ + mcParticlesTLV_Wmuons.push_back(*mcParticles[i]); + } + + + } + } + + + + // take all the selectedJets_ to study the radiation stuff, selectedJets_ are already ordened in decreasing Pt() + for (unsigned int i = 0; i < selectedJets.size(); i++) + { + selectedJetsTLV.push_back(*selectedJets[i]); + } + for (unsigned int i = 0; i < selectedMuons.size(); i++) + { + selectedMuonsTLV.push_back(*selectedMuons[i]); + } + for (unsigned int i = 0; i < selectedElectrons.size(); i++) + { + selectedElectronsTLV.push_back(*selectedElectrons[i]); + } + + //cout << "selectedJetsTLV.size() = " << selectedJetsTLV.size() << endl; + + JetPartonMatching matching_charm = JetPartonMatching(mcParticlesTLV_charm, selectedJetsTLV, 2, true, true, 0.3); // partons, jets, choose algorithm, use maxDist, use dR, set maxDist=0.3 + JetPartonMatching matching_bottom = JetPartonMatching(mcParticlesTLV_bottom, selectedJetsTLV, 2, true, true, 0.3); + JetPartonMatching matching_elec = JetPartonMatching(mcParticlesTLV_electrons, selectedElectronsTLV, 2, true, true, 0.3); + JetPartonMatching matching_muon = JetPartonMatching(mcParticlesTLV_muons, selectedMuonsTLV,2, true, true, 0.3); + JetPartonMatching matching_Welec = JetPartonMatching(mcParticlesTLV_Welectrons, selectedElectronsTLV, 2, true, true, 0.3); + JetPartonMatching matching_Wmuon = JetPartonMatching(mcParticlesTLV_Wmuons, selectedMuonsTLV,2, true, true, 0.3); + + if (matching_charm.getNumberOfAvailableCombinations() != 1) + cerr << "matching_charm.getNumberOfAvailableCombinations() = " << matching_charm.getNumberOfAvailableCombinations() << " . This should be equal to 1 !!!" << endl; + if (matching_bottom.getNumberOfAvailableCombinations() != 1) + cerr << "matching_bottom.getNumberOfAvailableCombinations() = " << matching_bottom.getNumberOfAvailableCombinations() << " . This should be equal to 1 !!!" << endl; + + + JetPartonPair_bottom.clear(); // First one is jet number, second one is mcParticle number + JetPartonPair_charm.clear(); + JetPartonPair_electron.clear(); + JetPartonPair_muon.clear(); + JetPartonPair_Welectron.clear(); + JetPartonPair_Wmuon.clear(); + //cout << "mcParticlesTLV.size() " << mcParticlesTLV.size() << endl; + + for (unsigned int i = 0; i < mcParticlesTLV_charm.size(); i++) + { + + int matchedJetNumber_charm = matching_charm.getMatchForParton(i, 0); + if (matchedJetNumber_charm > -1){ + JetPartonPair_charm.push_back( pair (matchedJetNumber_charm, i) ); + //cout << "Matched Jet number " << matchedJetNumber << endl; + } + } + for (unsigned int i = 0; i < mcParticlesTLV_bottom.size(); i++) + { + + int matchedJetNumber_bottom = matching_bottom.getMatchForParton(i, 0); + if (matchedJetNumber_bottom > -1){ + JetPartonPair_bottom.push_back( pair (matchedJetNumber_bottom, i) ); + //cout << "Matched Jet number " << matchedJetNumber << endl; + } + } + for (unsigned int i = 0; i < mcParticlesTLV_electrons.size(); i++) + { + + int matchedNumber = matching_elec.getMatchForParton(i, 0); + if (matchedNumber > -1){ + JetPartonPair_electron.push_back( pair (matchedNumber, i) ); + + } + } + + for (unsigned int i = 0; i < mcParticlesTLV_muons.size(); i++) + { + + int matchedNumber = matching_muon.getMatchForParton(i, 0); + if (matchedNumber > -1){ + JetPartonPair_muon.push_back( pair (matchedNumber, i) ); + + } + } + + for (unsigned int i = 0; i < mcParticlesTLV_Welectrons.size(); i++) + { + + int matchedNumber = matching_Welec.getMatchForParton(i, 0); + if (matchedNumber > -1){ + JetPartonPair_Welectron.push_back( pair (matchedNumber, i) ); + + } + } + + for (unsigned int i = 0; i < mcParticlesTLV_Wmuons.size(); i++) + { + + int matchedNumber = matching_Wmuon.getMatchForParton(i, 0); + if (matchedNumber > -1){ + JetPartonPair_Wmuon.push_back( pair (matchedNumber, i) ); + + } + } + + + } // end matching + + //////////////////////////////////// + // Determine eventweight /// + ///////////////////////////////// + + histo1D["init_nPVs_before"]->Fill(vertex.size(), eventweight); + if(applyPU && !isData) eventweight *= PUweight; + histo1D["init_nPVs_after"]->Fill(vertex.size(), eventweight); + + ////////////////////////////////////////////////////// + // Applying baseline selection + ////////////////////////////////////////////////////// + continueFlow = true; + nbEvents++; + eventweight = 1.; + if(trigged){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(0., eventweight); + nCuts++; + nbEvents_0++; + } + } + else{ + selections.push_back(0); + continueFlow = false; + } + + // to be ok with triggers + if(dName.find("DoubleEG")!=string::npos && selectedElectrons.size() < 2) { continueFlow = false; } + else if(dName.find("DoubleEG")!=string::npos) { nbEvents_test++ ;} + if(dName.find("DoubleMu")!=string::npos && selectedMuons.size() < 2) { continueFlow = false; } + else if(dName.find("DoubleMu")!=string::npos) { nbEvents_test++ ;} + if(dName.find("MuonEG")!=string::npos && (selectedElectrons.size() < 1 || selectedMuons.size() < 1)) { continueFlow = false; } + else if(dName.find("MuonEG")!=string::npos){ nbEvents_test++ ;} + + if(((selectedMuons.size() + selectedElectrons.size()) != 3)){ + selections.push_back(0); + continueFlow = false; + } + else if( ((selectedMuons.size() + selectedElectrons.size()) == 3)){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(1., eventweight); + nCuts++; + nbEvents_1++; + } + lep3 = true; + if(selectedMuons.size() == 3) {channelInt = 0; i_channel = 0;} + else if(selectedElectrons.size() == 3) {channelInt = 3; i_channel = 3;} + else if(selectedElectrons.size() == 2 && selectedMuons.size() == 1) {channelInt = 2; i_channel = 2; } + else if(selectedMuons.size() == 2 && selectedElectrons.size() == 1){channelInt = 1; i_channel = 1; } + else cout << "ERROR no channel selected" << endl; + } + + //cout << "LOOKING AT CHANNEL " << channelInt << endl; + + if(selectedMuons.size() == selectedLooseMuons.size() && continueFlow) nbEvents_1m++; + else continueFlow = false; + if(selectedLooseElectrons.size() == selectedElectrons.size() && continueFlow) nbEvents_2m++; + else continueFlow = false; + + if((selectedMuons.size() != selectedLooseMuons.size()) || (selectedLooseElectrons.size() != selectedElectrons.size())){ + selections.push_back(0); + continueFlow = false; + } + else { + selections.push_back(1); + if(continueFlow) { + lepsel = true; + histo1D["cutFlow"]->Fill(2., eventweight); + } + } + + double met_px = mets[0]->Px(); + double met_py = mets[0]->Py(); + met_Pt = sqrt(met_px*met_px + met_py*met_py); + met = met_Pt; + met_Phi = mets[0]->Phi(); + met_Eta = mets[0]->Eta(); + + puSF = PUweight; + if(!isData) btagSF = btagWeight; + if(isData) btagSF = 1.; + + Zlep0.Clear(); + Zlep1.Clear(); + Wlep.Clear(); + Wlep.SetPxPyPzE(0,0,0,0); + + // check sign + + if(lep3){ + //cout << "assigning leptons " << endl; + AssignedLeptons = LeptonAssigner(selectedElectrons, selectedMuons); + + if(Assigned){ + + Zlep0.SetPxPyPzE(AssignedLeptons[0].Px(), AssignedLeptons[0].Py(), AssignedLeptons[0].Pz(), AssignedLeptons[0].Energy()); + Zlep1.SetPxPyPzE(AssignedLeptons[1].Px(), AssignedLeptons[1].Py(), AssignedLeptons[1].Pz(), AssignedLeptons[1].Energy()); + Wlep.SetPxPyPzE(AssignedLeptons[2].Px(), AssignedLeptons[2].Py(), AssignedLeptons[2].Pz(), AssignedLeptons[2].Energy()); + + //double phis = Wlep.Phi() - mets[0]->Phi(); + //double cosphis = TMath::Cos(phis); + mWt = TMath::Sqrt((Wlep.Pt() + met_Pt)*(Wlep.Pt() +met_Pt)-(Wlep.Px() + met_px)*(Wlep.Px() + met_px) - (Wlep.Py() + met_py)* (Wlep.Py() + met_py)); + //mWtsecond = TMath::Sqrt(2*Wlep.Pt() * met_Pt*(1-cosphis)); + + + nCuts++; + nbEvents_2++; + + Zboson.Clear(); + + Zboson.SetPxPyPzE(( Zlep0 + Zlep1).Px() ,( Zlep0 + Zlep1).Py(),( Zlep0 + Zlep1).Pz(),( Zlep0 + Zlep1).Energy()) ; + Zboson_M = (Zlep0+Zlep1).M(); + Zboson_Px = ( Zlep0 + Zlep1).Px(); + Zboson_Py = ( Zlep0 + Zlep1).Py(); + Zboson_Pz = ( Zlep0 + Zlep1).Pz(); + Zboson_Energy = ( Zlep0 + Zlep1).Energy(); + + + } + else{ + continueFlow = false; + Zboson_M = -5; + Zboson_Px = -5; + Zboson_Py = -5; + Zboson_Pz = -5; + Zboson_Energy = -5; + mWt = -5; + } + } + else{ + continueFlow = false; + Zboson_M = -5; + Zboson_Px = -5; + Zboson_Py = -5; + Zboson_Pz = -5; + Zboson_Energy = -5; + mWt = -5; + } + + + + if(Zboson_M < 76 || Zboson_M > 106) + { + selections.push_back(0); + continueFlow = false; + } + else{ + selections.push_back(1); + if(continueFlow){ + nCuts++; + nbEvents_3++; + histo1D["cutFlow"]->Fill(3., eventweight); + baseSelected = true; + } + } + + + if(selectedJets.size() < 2){ + selections.push_back(0); + continueFlow = false; + } + else{ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(4., eventweight); + nCuts++; + nbEvents_4++; + } + } + if(selectedCSVLBJets.size() < 1){ + selections.push_back(0); + continueFlow = false; + } + else{ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(5., eventweight); + nCuts++; + nbEvents_5++; + } + } + + + + if(false){ // no mWT cut + selections.push_back(0); + continueFlow = false; + } + else{ + selections.push_back(1); + if(continueFlow){ + // mWtFile << evt_num << endl; + histo1D["cutFlow"]->Fill(6., eventweight); + nCuts++; + nbEvents_6++; + } + } + + // double met_pz = MEtz(Wmu, Wel, Wlep, met_px, met_py); + // cout << "MET reconstruc" << endl; + double met_pz = 0.; // has to be adapted !!! + metTLVbf.SetPxPyPzE(met_px,met_py,met_pz,TMath::Sqrt(met_px*met_px+met_py*met_py+met_pz*met_pz)); + met_Ptbf = metTLVbf.Pt(); + metTLV = MetzCalculator(Wlep, metTLVbf); + + // cout << "Met reconstructed" << endl; + met_Px = metTLV.Px(); + met_Py = metTLV.Py(); + met_Pz = metTLV.Pz(); + SMbjet.Clear(); + SMtop.Clear(); + int SMbjetindex = -5; + if(selectedCSVLBJets.size() > 0 ){ + // cout << "bjets " << selectedCSVLBJets.size() << " jets " << selectedJets.size() << endl; + SMbjetindex = SMjetCalculator(selectedJets, verbose); + // cout << "SMbjetindex " << SMbjetindex << endl; + SMbjet.SetPxPyPzE(selectedJets[SMbjetindex]->Px(),selectedJets[SMbjetindex]->Py(),selectedJets[SMbjetindex]->Pz(),selectedJets[SMbjetindex]->Energy()); + + if(Assigned && continueFlow) { + SMtop_M = (Wlep+SMbjet+metTLV).M(); + SMtop.SetPxPyPzE((SMbjet.Px()+Wlep.Px()+metTLV.Px()),(SMbjet.Py()+Wlep.Py()+metTLV.Py()),(SMbjet.Pz()+Wlep.Pz()+metTLV.Pz()),(SMbjet.Energy()+Wlep.Energy()+metTLV.Energy())); + mlb = (Wlep+SMbjet).M(); + dRWlepb = Wlep.DeltaR(SMbjet); + dRZb = Zboson.DeltaR(SMbjet); + dPhiWlepb = Wlep.DeltaPhi(SMbjet); + dPhiZb = Zboson.DeltaPhi(SMbjet); + } + else { + SMtop_M = -5.; + mlb = -5.; + dRWlepb = -5; + dRZb = -5; + } + } + else SMtop_M = -5. ; + + cjet.Clear(); + cjet_tagger.Clear(); + FCNCtop.Clear(); + FCNCtop_tagger.Clear(); + int cjetindex = -5; + int cjetindex_tagger = -5; + if(Assigned && continueFlow && selectedJets.size()>1) { + cjetindex = FCNCjetCalculator(selectedJets,Zboson ,SMbjetindex, 3); + //cout << "bjet_index " << SMbjetindex << endl; + cjetindex_tagger = FCNCjetCalculatorTagger(selectedJets,SMbjetindex, 3); + // cout << "cjet index " << cjetindex << endl; + cjet.SetPxPyPzE(selectedJets[cjetindex]->Px(),selectedJets[cjetindex]->Py(),selectedJets[cjetindex]->Pz(),selectedJets[cjetindex]->Energy()); + //cout << "cjetindex_tagger " << cjetindex_tagger << endl; + cjet_tagger.SetPxPyPzE(selectedJets[cjetindex_tagger]->Px(),selectedJets[cjetindex_tagger]->Py(),selectedJets[cjetindex_tagger]->Pz(),selectedJets[cjetindex_tagger]->Energy()); + + FCNCtop.SetPxPyPzE((cjet+Zboson).Px(), (cjet+Zboson).Py(), (cjet+Zboson).Pz(), (cjet+Zboson).Energy()); + FCNCtop_M = (Zlep0+Zlep1+cjet).M(); + cjet_Pt = TMath::Sqrt(cjet.Px()*cjet.Px()+cjet.Py()*cjet.Py()); + dRZc = Zboson.DeltaR(cjet); + dRWlepc = Wlep.DeltaR(cjet); + dPhiZc = Zboson.DeltaPhi(cjet); + dPhiWlepc = Wlep.DeltaPhi(cjet); + dRSMFCNCtop = SMtop.DeltaR(FCNCtop); + dPhiSMFCNCtop = SMtop.DeltaPhi(FCNCtop); + + + FCNCtop_tagger.SetPxPyPzE((cjet_tagger+Zboson).Px(), (cjet_tagger+Zboson).Py(), (cjet_tagger+Zboson).Pz(), (cjet_tagger+Zboson).Energy()); + FCNCtop_M_tagger = (Zlep0+Zlep1+cjet_tagger).M(); + cjet_Pt_tagger = TMath::Sqrt(cjet_tagger.Px()*cjet_tagger.Px()+cjet_tagger.Py()*cjet_tagger.Py()); + dRZc_tagger = Zboson.DeltaR(cjet_tagger); + dRWlepc_tagger = Wlep.DeltaR(cjet_tagger); + dPhiZc_tagger = Zboson.DeltaPhi(cjet_tagger); + dPhiWlepc_tagger = Wlep.DeltaPhi(cjet_tagger); + dRSMFCNCtop_tagger = SMtop.DeltaR(FCNCtop_tagger); + dPhiSMFCNCtop_tagger = SMtop.DeltaPhi(FCNCtop_tagger); + + } + else { + FCNCtop_M = -5.; + // cout << "event: " << evt_num << " - Zboson.M()= " << Zboson.M() << " - cjet.M()= " << cjet.M() << " - top.M()= " << (Zboson+cjet).M() << endl; + dRZc = -5; + dRWlepc = -5; + dPhiWlepc = -5; + dPhiZc = -5; + dRSMFCNCtop = -5 ; + dPhiSMFCNCtop = -5; + cjet_Pt = -5; + FCNCtop_M_tagger = -5.; + // cout << "event: " << evt_num << " - Zboson.M()= " << Zboson.M() << " - cjet.M()= " << cjet.M() << " - top.M()= " << (Zboson+cjet).M() << endl; + dRZc_tagger = -5; + dRWlepc_tagger = -5; + dPhiWlepc_tagger = -5; + dPhiZc_tagger = -5; + dRSMFCNCtop_tagger = -5 ; + dPhiSMFCNCtop_tagger = -5; + cjet_Pt_tagger = -5; + } + + + + if(SMtop_M < 95 || SMtop_M > 200 ){ + selections.push_back(0); + continueFlow = false; + // continue; + } + else{ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(7., eventweight); + nCuts++; + nbEvents_7++; + + } + } + + // if(continueFlow) eventSelected = true; + // else eventSelected = false; + if(passedMET && continueFlow){ + histo1D["cutFlow"]->Fill(8., eventweight); + nCuts++; + nbEvents_8++; + eventSelected = true; + } + ////////////////////////////////////// + // DO STUFF WITH SELECTED EVENTS //// + ////////////////////////////////////// + // fill the tree + if(eventSelected || baseSelected){ + + nJets = 0; + for(Int_t seljet = 0; seljet < selectedJets.size(); seljet++) + { + + pt_jet[nJets]=selectedJets[seljet]->Pt(); + px_jet[nJets]=selectedJets[seljet]->Px(); + py_jet[nJets]=selectedJets[seljet]->Py(); + pz_jet[nJets]=selectedJets[seljet]->Pz(); + phi_jet[nJets]=selectedJets[seljet]->Phi(); + eta_jet[nJets]=selectedJets[seljet]->Eta(); + E_jet[nJets]=selectedJets[seljet]->E(); + charge_jet[nJets]=selectedJets[seljet]->charge(); + bdisc_jet[nJets]=selectedJets[seljet]->btag_combinedInclusiveSecondaryVertexV2BJetTags() ; + cdiscCvsB_jet[nJets]=selectedJets[seljet]->ctag_pfCombinedCvsBJetTags() ; + cdiscCvsL_jet[nJets]=selectedJets[seljet]->ctag_pfCombinedCvsLJetTags() ; + nJets++; + } + if(selectedJets.size()>0) cdiscCvsB_jet_1 = selectedJets[0]->ctag_pfCombinedCvsBJetTags(); + if(selectedJets.size()>0) cdiscCvsL_jet_1 = selectedJets[0]->ctag_pfCombinedCvsLJetTags(); + if(selectedJets.size()>0) pt_jet_1 = selectedJets[0]->Pt(); + if(selectedJets.size()>1) pt_jet_2 = selectedJets[1]->Pt(); + if(selectedJets.size()>2) pt_jet_3 = selectedJets[2]->Pt(); + nJets_CSVT = selectedCSVTBJets.size(); + nJets_CSVM = selectedCSVMBJets.size(); + nJets_CSVL = selectedCSVLBJets.size(); + nMuons = 0; + for (Int_t selmu =0; selmu < selectedMuons.size() ; selmu++ ) + { + + pt_muon[nMuons]=selectedMuons[selmu]->Pt(); + phi_muon[nMuons]=selectedMuons[selmu]->Phi(); + eta_muon[nMuons]=selectedMuons[selmu]->Eta(); + E_muon[nMuons]=selectedMuons[selmu]->E(); + + pfIso_muon[nMuons]=selectedMuons[selmu]->relPfIso(4,0); + if(!isData) + { + MuonIDSF[nMuons] = muonSFWeightID_T->at(selectedMuons[selmu]->Eta(), selectedMuons[selmu]->Pt(), 0); + MuonIsoSF[nMuons] = muonSFWeightIso_TT->at(selectedMuons[selmu]->Eta(), selectedMuons[selmu]->Pt(), 0); + } + else + { + MuonIDSF[nMuons] = 1.; + MuonIsoSF[nMuons] = 1.; + } + charge_muon[nMuons]=selectedMuons[selmu]->charge(); + nMuons++; + } + if(selectedMuons.size()>0) pt_muon_1 = selectedMuons[0]->Pt(); + if(selectedMuons.size()>1) pt_muon_2 = selectedMuons[1]->Pt(); + if(selectedMuons.size()>2) pt_muon_3 = selectedMuons[2]->Pt(); + nElectrons=0; + for (Int_t selel =0; selel < selectedElectrons.size() ; selel++ ) + { + + pt_electron[nElectrons]=selectedElectrons[selel]->Pt(); + phi_electron[nElectrons]=selectedElectrons[selel]->Phi(); + eta_electron[nElectrons]=selectedElectrons[selel]->Eta(); + eta_superCluster_electron[nElectrons]=selectedElectrons[selel]->superClusterEta(); + E_electron[nElectrons]=selectedElectrons[selel]->E(); + pfIso_electron[nElectrons]=selectedElectrons[selel]->relPfIso(3,0); + charge_electron[nElectrons]=selectedElectrons[selel]->charge(); + if(!isData) ElectronSF[nElectrons] = electronSFWeight->at(selectedElectrons[selel]->Eta(),selectedElectrons[selel]->Pt(),0)*electronSFWeightReco->at(selectedElectrons[selel]->Eta(),selectedElectrons[selel]->Pt(),0); + else ElectronSF[nElectrons] = 1.; + + nElectrons++; + } + if(selectedElectrons.size()>0) pt_electron_1 = selectedElectrons[0]->Pt(); + if(selectedElectrons.size()>1) pt_electron_2 = selectedElectrons[1]->Pt(); + if(selectedElectrons.size()>2) pt_electron_3 = selectedElectrons[2]->Pt(); + + + nLeptons = nMuons + nElectrons; + + } + + if(eventSelected){ + nbSelectedEvents++; + if(matching && JetPartonPair_bottom.size()>0){ + + if(JetPartonPair_bottom[0].first == SMbjetindex) nMatched_bottom++; + else nNonMatched_bottom++; + + } + if(matching && JetPartonPair_charm.size()>0){ + + if(JetPartonPair_charm[0].first == cjetindex) nMatched_charm++; + else nNonMatched_charm++; + } + if(matching && JetPartonPair_charm.size()>0){ + + if(JetPartonPair_charm[0].first == cjetindex_tagger) nMatched_charm_tag++; + else nNonMatched_charm_tag++; + } + if(matching) + { + if(cjetindex_tagger == cjetindex) nTagEqMass++; + else nTagNotEqMass++; + + } + if(matching && elecIndices.size() == 2){ + if( (elecIndices[0] == JetPartonPair_electron[0].first) && (elecIndices[1] == JetPartonPair_electron[1].first)) nMatched_Zelec++; + else if((elecIndices[1] == JetPartonPair_electron[0].first) && (elecIndices[0] == JetPartonPair_electron[1].first)) nMatched_Zelec++; + else nNonMatched_Zelec++; + + } + if(matching && muIndices.size() == 2){ + if( (muIndices[0] == JetPartonPair_muon[0].first) && (muIndices[1] == JetPartonPair_muon[1].first)) nMatched_Zmu++; + else if((muIndices[1] == JetPartonPair_muon[0].first) && (muIndices[0] == JetPartonPair_muon[1].first)) nMatched_Zmu++; + else nNonMatched_Zmu++; + + } + if(matching && WelecIndices.size() == 1){ + if( (WelecIndices[0] == JetPartonPair_Welectron[0].first)) nMatched_Welec++; + else nNonMatched_Welec++; + + } + if(matching && WmuIndices.size() == 1){ + if( (WmuIndices[0] == JetPartonPair_Wmuon[0].first) ) nMatched_Wmu++; + else nNonMatched_Wmu++; + + } + + //cout << "SIZE mu " << JetPartonPair_muon.size() << " elec " << JetPartonPair_electron.size() << endl; ; + myTree->Fill(); + } + if(baseSelected){ baselineTree->Fill(); } + if(selections.size() != 8) cout << "ERROR SOMETHING WENT WRONG WITH THE SELECTIONS " << endl; + for(int inb = 0; inb 0 jet: " << nbEvents_4 << endl; + cout << "nbEvents_5 1 bjet: " << nbEvents_5 << endl; + cout << "nbEvents_6 mWt: " << nbEvents_6 << endl; + cout << "nbEvents_7 SMtop: " << nbEvents_7 << endl; + cout << "nbEvents_8 MET: " << nbEvents_8 << endl; + + + nTrigg = nbEvents_0; + n3lep = nbEvents_1; + nVetoMu = nbEvents_1m; + nVetoEl = nbEvents_2m; + nOS = nbEvents_2; + nZmass = nbEvents_3; + nJet = nbEvents_4; + nBJet = nbEvents_5; + nMWT = nbEvents_6; + nSMtop = nbEvents_7; + nMET= nbEvents_8; + + + + + + if(matching) { + cout << "Percentage matched charm: " << (double) nMatched_charm / (nMatched_charm + nNonMatched_charm) << endl; + cout << "Percentage matched charm tag: " << (double) nMatched_charm_tag / (nMatched_charm_tag + nNonMatched_charm_tag) << endl; + cout << "Percentage tag equal mass charm: " << (double) nTagEqMass / (nTagEqMass+nTagNotEqMass) << endl; + cout << "Percentage matched bottom: " << (double) nMatched_bottom / (nMatched_bottom + nNonMatched_bottom) << endl; + cout << "Percentage matched Z elec: " << (double) nMatched_Zelec/ (nMatched_Zelec + nNonMatched_Zelec) << endl; + cout << "Percentage matched Z mu: " << (double) nMatched_Zmu/ (nMatched_Zmu + nNonMatched_Zmu) << endl; + cout << "Percentage matched W elec: " << (double) nMatched_Welec/ (nMatched_Welec + nNonMatched_Welec) << endl; + cout << "Percentage matched W mu: " << (double) nMatched_Wmu/ (nMatched_Wmu + nNonMatched_Wmu) << endl; + cout << "Percentage matched Z: " << (double) (nMatched_Zmu+nMatched_Zelec)/ (nMatched_Zmu +nMatched_Zelec+nNonMatched_Zelec+ nNonMatched_Zmu) << endl; + cout << "Percentage matched W: " << (double) (nMatched_Welec+nMatched_Wmu)/ (nMatched_Welec + nMatched_Wmu + nNonMatched_Wmu+ nNonMatched_Welec) << endl; + } + // for(int j = 0; j < 9; j++){ cout << cutstep[j] << endl; } + sumW = (int) sumWeights; + nEv = (int) nEvents; + + globalTree->Fill(); + if(verbose == 0) cout << "end eventloop" << endl; + + cout << nbSelectedEvents << " events out of initial " << nbEvents << " selected " << endl; + cout << nbSelectedEvents << " events out of trigged " << nbTrig << " selected " << endl; + cout << setprecision(2) << ((double)nbTrig/(double)nbEvents)*100 << " % of the initial events stay after Trigger" << endl; + + if (! isData ) + { + cout << "Data set " << datasets[d]->Title() << " has " << nofPosWeights << " events with positive weights and " << nofNegWeights << " events with negative weights." << endl; + cout << " Pos - neg is " << nofPosWeights - nofNegWeights << ", pos + neg is " << nofPosWeights + nofNegWeights << endl; + cout << "The sum of the weights is " << ((int)sumWeights) << ", whereas the total number of events is " << ((int)nEvents) << endl; + + // Determine scale factor due to negative weights + nloSF = ((double) (nofPosWeights - nofNegWeights))/((double) (nofPosWeights + nofNegWeights)); + cout << "This corresponds to an event scale factor of " << nloSF << endl; + } + tupfile->cd(); + myTree->Write(); + globalTree->Write(); + baselineTree->Write(); + tupfile->Close(); + delete tupfile; + if(!isData && !btagShape) delete btwt; + // if(!isData && fillBtagHisto) delete btwt; + treeLoader.UnLoadDataset(); + } //End Loop on Datasets + + + + ///////////// + // Writing // + ///////////// + + cout << " - Writing outputs to the files ..." << endl; + + + + fout-> cd(); + for (map::const_iterator it = histo1D.begin(); it != histo1D.end(); it++) + { + cout << "1D Plot: " << it->first << endl; + TCanvas *ctemp = new TCanvas(); + ctemp->cd(); + TH1F *temp = it->second; + temp->Draw(); + delete ctemp; + } + for (map::const_iterator it = histo2D.begin(); it != histo2D.end(); it++) + { + cout << "2D Plot: " << it->first << endl; + TCanvas *ctemp = new TCanvas(); + ctemp->cd(); + TH2F *temp = it->second; + temp->Draw(); + delete ctemp; + } + fout->Write(); + fout->Close(); + delete fout; + + + cout << "It took us " << ((double)clock() - start) / CLOCKS_PER_SEC << " to run the program" << endl; + cout << "********************************************" << endl; + cout << " End of the program !! " << endl; + cout << "********************************************" << endl; + + return 0; +}; + + +/////////////////////////////////////// FUNCTIONS +// + + + +string ConvertIntToString(int Number, bool pad) +{ + ostringstream convert; + convert.clear(); + if ( pad && Number < 10 ) { convert << std::setw(2) << std::setfill('0');} + convert << Number; + return convert.str(); +}; + + +string MakeTimeStamp() +{ + time_t t = time(0); // get time now + struct tm * now = localtime( & t ); + + int year = now->tm_year - 100; /// + 1900 to get current year + int month = now->tm_mon + 1; + int day = now->tm_mday; + int hour = now->tm_hour; + int min = now->tm_min; + //int sec = now->tm_sec; + + string year_str = ConvertIntToString(year, true); + string month_str = ConvertIntToString(month, true); + string day_str = ConvertIntToString(day, true); + string hour_str = ConvertIntToString(hour, true); + string min_str = ConvertIntToString(min, true); + //string sec_str = ConvertIntToString(sec, true); + + string date_str = year_str + month_str + day_str; //+ "_" + hour_str + min_str; + return date_str; +}; + + +double MEtz(bool mu, bool el, TLorentzVector Wlep, double MetPx, double MetPy) +{ + + double emu = Wlep.E(); + double pxmu = Wlep.Px(); + double pymu = Wlep.Py(); + double pzmu = Wlep.Pz(); + double pxnu = MetPx; + double pynu = MetPy; + double pznu = 0.; + if(el && ! mu) M_mu = M_el; + + double a = M_W*M_W - M_mu*M_mu + 2.0*pxmu*pxnu + 2.0*pymu*pynu; + double A = 4.0*(emu*emu - pzmu*pzmu); + double B = -4.0*a*pzmu; + double C = 4.0*emu*emu*(pxnu*pxnu + pynu*pynu) - a*a; + + + bool isComplex_ = false; + double tmproot = B*B - 4.0*A*C; + + if (tmproot<0) { + isComplex_= true; + pznu = - B/(2*A); // take real part of complex roots + } + else { + isComplex_ = false; + double tmpsol1 = (-B + TMath::Sqrt(tmproot))/(2.0*A); + double tmpsol2 = (-B - TMath::Sqrt(tmproot))/(2.0*A); + + if (TMath::Abs(tmpsol2-pzmu) < TMath::Abs(tmpsol1-pzmu)) { pznu = tmpsol2;} + else pznu = tmpsol1; + + + } + return pznu; + +} +; + +int FCNCjetCalculator(std::vector Jets, TLorentzVector recoZ ,int index, int verb) +{ + + double TempMinMass = 100000.00; + double TopMass = 172.9; + TLorentzVector Jetcandidate; + int NbInColl = -1; + if(Jets.size() > 1){ + //cout << " non bjets: " << nonBJets.size() << " possibilities " <Px(),Jets[iJ]->Py(),Jets[iJ]->Pz(),Jets[iJ]->Energy()); + //cout << iJ << " tempMinM " << TempMinMass << " newmass " << (recoZ+Jet).M() ; + if(fabs((recoZ+Jet).M() - TopMass) < TempMinMass) + { + TempMinMass = fabs((recoZ+Jet).M() - TopMass); + Jetcandidate.SetPxPyPzE(Jet.Px(), Jet.Py(), Jet.Pz(), Jet.E()); + NbInColl = iJ; + + } + //cout << " NbInColl is " << iJ << endl; + // 269297.249181 + } + } + else{ + NbInColl = -5, + cout << "no cjets available" << endl; + } + return NbInColl; +}; + +int FCNCjetCalculatorTagger(std::vector Jets,int index, int verb) +{ + + double TempMinMass = 100000.00; + double TopMass = 172.9; + TLorentzVector Jetcandidate; + int NbInColl = -5; + if(Jets.size() > 2){ + // cout << " jets: " << Jets.size() << " possibilities " <ctag_pfCombinedCvsLJetTags()+Jets[iJ]->ctag_pfCombinedCvsBJetTags())>=(Jets[kJ]->ctag_pfCombinedCvsLJetTags()+Jets[kJ]->ctag_pfCombinedCvsBJetTags())) NbInColl = iJ; + else NbInColl = kJ; + } + } + } + else if(Jets.size() == 2){ + if(index == 0) NbInColl = 1; + if(index == 1) NbInColl = 0; + } + else{ + NbInColl = -5, + cout << "no cjets available" << endl; + } + return NbInColl; +}; + + +float EffectiveAreaRho(TRootElectron *el, float rho_) +{ + double EffectiveArea = 0.; + // Updated to Spring 2015 EA from https://github.com/cms-sw/cmssw/blob/CMSSW_7_4_14/RecoEgamma/ElectronIdentification/data/Spring15/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_25ns.txt#L8 + if (fabs(el->superClusterEta()) >= 0.0 && fabs(el->superClusterEta()) < 1.0 ) EffectiveArea = 0.1752; + if (fabs(el->superClusterEta()) >= 1.0 && fabs(el->superClusterEta()) < 1.479 ) EffectiveArea = 0.1862; + if (fabs(el->superClusterEta()) >= 1.479 && fabs(el->superClusterEta()) < 2.0 ) EffectiveArea = 0.1411; + if (fabs(el->superClusterEta()) >= 2.0 && fabs(el->superClusterEta()) < 2.2 ) EffectiveArea = 0.1534; + if (fabs(el->superClusterEta()) >= 2.2 && fabs(el->superClusterEta()) < 2.3 ) EffectiveArea = 0.1903; + if (fabs(el->superClusterEta()) >= 2.3 && fabs(el->superClusterEta()) < 2.4 ) EffectiveArea = 0.2243; + if (fabs(el->superClusterEta()) >= 2.4 && fabs(el->superClusterEta()) < 5.0 ) EffectiveArea = 0.2687; + if (fabs(el->superClusterEta()) >= 5.0) EffectiveArea = -9999; + + double isocorr = 0; + + isocorr = rho_*EffectiveArea; + + return isocorr; +}; + +float EffectiveArea(TRootElectron *el) +{ + double EffectiveArea = 0.; + + if (fabs(el->superClusterEta()) >= 0.0 && fabs(el->superClusterEta()) < 1.0 ) EffectiveArea = 0.1752; + if (fabs(el->superClusterEta()) >= 1.0 && fabs(el->superClusterEta()) < 1.479 ) EffectiveArea = 0.1862; + if (fabs(el->superClusterEta()) >= 1.479 && fabs(el->superClusterEta()) < 2.0 ) EffectiveArea = 0.1411; + if (fabs(el->superClusterEta()) >= 2.0 && fabs(el->superClusterEta()) < 2.2 ) EffectiveArea = 0.1534; + if (fabs(el->superClusterEta()) >= 2.2 && fabs(el->superClusterEta()) < 2.3 ) EffectiveArea = 0.1903; + if (fabs(el->superClusterEta()) >= 2.3 && fabs(el->superClusterEta()) < 2.4 ) EffectiveArea = 0.2243; + if (fabs(el->superClusterEta()) >= 2.4 && fabs(el->superClusterEta()) < 5.0 ) EffectiveArea = 0.2687; + if (fabs(el->superClusterEta()) >= 5.0) EffectiveArea = -9999; + + + return EffectiveArea; +}; + + +float relPfIsoEl(TRootElectron *el, float _rho) +{ + float isoCorr = (el->neutralHadronIso(3) + el->photonIso(3) - EffectiveAreaRho(el,_rho)); + // float isolation = (el->chargedHadronIso(3) + (isoCorr > 0.0 ? isoCorr : 0.0))/(el->Pt()); + float isolation = (el->chargedHadronIso(3) + std::max(el->neutralHadronIso(3)+el->photonIso(3)-EffectiveAreaRho(el,_rho),float(0.)))/(el->Pt()); + return isolation; + +}; + + +float IsoDBeta(TRootMuon *mu) +{ + float iso = (mu->chargedHadronIso(4) + std::max(0.0, mu->neutralHadronIso(4) + mu->photonIso(4) - 0.5*mu->puChargedHadronIso(4)))/mu->Pt(); + + return iso; + +} + +vector LeptonAssigner(std::vector electrons,std::vector muons) +{ + // cout << " in assigner " << endl; + vector ReturnColl; + Assigned = false; + + if(electrons.size() + muons.size() != 3){ + cout << " WARNING: not 3 leptons " << endl; + cout << "muons " << muons.size() << " electrons " << electrons.size() << endl; + return ReturnColl; + } + elecbool = false; + mubool = false; + elecIndices.clear(); + muIndices.clear(); + WelecIndices.clear(); + WmuIndices.clear(); + // cout << " in 3 lep " << endl; + + TLorentzVector Zlepcan0; + Zlepcan0.SetPxPyPzE(0.,0.,0.,0.); + TLorentzVector Zlepcan1; + Zlepcan1.SetPxPyPzE(0.,0.,0.,0.); + TLorentzVector Wlepcan; + Wlepcan.SetPxPyPzE(0.,0.,0.,0.); + + if(electrons.size() == 2){ + //cout << "2 electr " << electrons[0]->charge() << " " << electrons[1]->charge() << endl; + if(electrons[0]->charge() != electrons[1]->charge()){ + Zlepcan0.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Zlepcan1.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + Wlepcan.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Assigned = true; + elecbool = true; + elecIndices.push_back(0); + elecIndices.push_back(1); + WmuIndices.push_back(0); + } + } + else if(muons.size() == 2){ + // cout << "2 muons" << endl; + if(muons[0]->charge() != muons[1]->charge()){ + Zlepcan0.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Zlepcan1.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + Wlepcan.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Assigned = true; + mubool = true; + muIndices.push_back(0); + muIndices.push_back(1); + WelecIndices.push_back(0); + } + } + else if(electrons.size() ==3){ + // cout << " 3 electrons " << endl; + bool can01 = false; + bool can02= false; + bool can12 = false; + elecbool = true; + if(electrons[0]->charge() != electrons[1]->charge()) can01 = true; + if(electrons[0]->charge() != electrons[2]->charge()) can02 = true; + if(electrons[2]->charge() != electrons[1]->charge()) can12 = true; + + double mass01 = 9999.; + double mass02 = 9999.; + double mass12 = 9999.; + TLorentzVector temp0; + temp0.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + TLorentzVector temp1; + temp1.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + TLorentzVector temp2; + temp2.SetPxPyPzE(electrons[2]->Px(), electrons[2]->Py(),electrons[2]->Pz(),electrons[2]->Energy()); + if(can01) mass01 = fabs(91.1-(temp1+temp0).M()); + if(can02) mass02 = fabs(91.1-(temp2+temp0).M()); + if(can12) mass12 = fabs(91.1-(temp1+temp2).M()); + if(mass01 <= mass02 && mass01 <= mass12){ + Zlepcan0.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Zlepcan1.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + Wlepcan.SetPxPyPzE(electrons[2]->Px(), electrons[2]->Py(),electrons[2]->Pz(),electrons[2]->Energy()); + Assigned = true; + elecIndices.push_back(0); elecIndices.push_back(1); WelecIndices.push_back(2); + } + else if(mass02 <= mass12 && mass02 < mass01){ + Zlepcan0.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Zlepcan1.SetPxPyPzE(electrons[2]->Px(), electrons[2]->Py(),electrons[2]->Pz(),electrons[2]->Energy()); + Wlepcan.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + Assigned = true; + elecIndices.push_back(0); elecIndices.push_back(2); WelecIndices.push_back(1); + } + else if(mass12 < mass01 && mass12 < mass02){ + Zlepcan0.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + Zlepcan1.SetPxPyPzE(electrons[2]->Px(), electrons[2]->Py(),electrons[2]->Pz(),electrons[2]->Energy()); + Wlepcan.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Assigned = true; + elecIndices.push_back(1); elecIndices.push_back(2); WelecIndices.push_back(0); + } + } + else if(muons.size() == 3){ + bool can01 = false; + bool can02= false; + bool can12 = false; + mubool = true; + if(muons[0]->charge() != muons[1]->charge()) can01 = true; + if(muons[0]->charge() != muons[2]->charge()) can02 = true; + if(muons[2]->charge() != muons[1]->charge()) can12 = true; + + double mass01 = 9999.; + double mass02 = 9999.; + double mass12 = 9999.; + TLorentzVector temp0; + temp0.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + TLorentzVector temp1; + temp1.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + TLorentzVector temp2; + temp2.SetPxPyPzE(muons[2]->Px(), muons[2]->Py(),muons[2]->Pz(),muons[2]->Energy()); + if(can01) mass01 = fabs(91.1-(temp1+temp0).M()); + if(can02) mass02 = fabs(91.1-(temp2+temp0).M()); + if(can12) mass12 = fabs(91.1-(temp1+temp2).M()); + if(mass01 <= mass02 && mass01 <= mass12){ + Zlepcan0.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Zlepcan1.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + Wlepcan.SetPxPyPzE(muons[2]->Px(), muons[2]->Py(),muons[2]->Pz(),muons[2]->Energy()); + Assigned = true; + muIndices.push_back(0); muIndices.push_back(1); WmuIndices.push_back(2); + } + else if(mass02 <= mass12 && mass02 < mass01){ + Zlepcan0.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Zlepcan1.SetPxPyPzE(muons[2]->Px(), muons[2]->Py(),muons[2]->Pz(),muons[2]->Energy()); + Wlepcan.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + Assigned = true; + muIndices.push_back(0); muIndices.push_back(2); WmuIndices.push_back(1); + } + else if(mass12 < mass01 && mass12 < mass02){ + Zlepcan0.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + Zlepcan1.SetPxPyPzE(muons[2]->Px(), muons[2]->Py(),muons[2]->Pz(),muons[2]->Energy()); + Wlepcan.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Assigned = true; + muIndices.push_back(1); muIndices.push_back(2); WmuIndices.push_back(0); + } + } + if(Assigned){ + ReturnColl.push_back(Zlepcan0); + ReturnColl.push_back(Zlepcan1); + ReturnColl.push_back(Wlepcan); + } + if(!Assigned){ + // cout << " WARNING: leptons not set for assignment " << endl; + return ReturnColl; + } + + + return ReturnColl; +} + +TLorentzVector MetzCalculator(TLorentzVector leptW, TLorentzVector v_met) +{ + + double term1 = leptW.Pz() * ( leptW.Px()* v_met.Px() + leptW.Py()*v_met.Py() + pow(80.399, 2)/2.); + + double det = pow(leptW.Px() * v_met.Px() + leptW.Py() * v_met.Py() + pow(80.399, 2)/2., 2) - v_met.Pt()*v_met.Pt() * (leptW.E()*leptW.E() - leptW.Pz()*leptW.Pz() ); + + if(det<0) det=0; + + double term2 = leptW.E() * pow(det, 0.5); + double denom = leptW.E()*leptW.E() - leptW.Pz()*leptW.Pz(); + double sol1 = (term1 - term2) / denom; + //double sol2 = (term1 + term2) / denom; + double nu_E = 0; + + TLorentzVector neutrino; + + nu_E = pow( pow(v_met.Px(),2) + pow(v_met.Py(),2) + pow(sol1,2), 0.5);//neglecting neutrino mass + neutrino.SetPxPyPzE( v_met.Px(), v_met.Py(), sol1, nu_E); + + return neutrino; + + +} + + + +int SMjetCalculator(std::vector Jets,int verb){ + int index_ = -5 ; + if(Jets.size()>1){ + for(int iJ = 0; iJ < Jets.size()-1 ; iJ++){ + for(int kJ = 1; kJ < Jets.size(); kJ++){ + if(Jets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() >= Jets[kJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags()) + { + index_ = iJ; + // cout << "index is " << iJ << endl ; + } + else { + index_ = kJ; + // cout << "index is " << kJ << endl; + } + } + + } + // cout << "index is " << index_ << endl; + } + else if(Jets.size() == 1){ + index_ = 0; + // cout << "index is " << index_ << endl; + + } + + + return index_; +}; + + + + + + diff --git a/Functions.cc b/Functions.cc new file mode 100644 index 0000000..80f90e4 --- /dev/null +++ b/Functions.cc @@ -0,0 +1,383 @@ +// +// Functions.cpp +// +// +// Created by Isis Van Parijs on 12/08/16. +// +// + +#include "Functions.hpp" + +Functions::Functions() +{ + //Settings + //Initializing CSVv2 b-tag WP + workingpointvalue_Loose = 0.460;//working points updated to 2015 BTV-POG recommendations. + workingpointvalue_Medium = 0.800;//working points updated to 2015 BTV-POG recommendations. + workingpointvalue_Tight = 0.935;//working points updated to 2015 BTV-POG recommendations. + + + + + + // what you want to do + synchex = false; + Assigned = false; + + + // settings + nMatched = 0; + nNonMatched = 0; + matching = false; + +} + + + + +string Functions::ConvertIntToString(int Number, bool pad) +{ + ostringstream convert; + convert.clear(); + if ( pad && Number < 10 ) { convert << std::setw(2) << std::setfill('0');} + convert << Number; + return convert.str(); +}; + + +string Functions::MakeTimeStamp() +{ + time_t t = time(0); // get time now + struct tm * now = localtime( & t ); + + int year = now->tm_year - 100; /// + 1900 to get current year + int month = now->tm_mon + 1; + int day = now->tm_mday; + int hour = now->tm_hour; + int min = now->tm_min; + //int sec = now->tm_sec; + + string year_str = ConvertIntToString(year, true); + string month_str = ConvertIntToString(month, true); + string day_str = ConvertIntToString(day, true); + string hour_str = ConvertIntToString(hour, true); + string min_str = ConvertIntToString(min, true); + //string sec_str = ConvertIntToString(sec, true); + + string date_str = year_str + month_str + day_str; //+ "_" + hour_str + min_str; + return date_str; +}; + + +double Functions::MEtz(bool mu, bool el, TLorentzVector Wlep, double MetPx, double MetPy) +{ + + double emu = Wlep.E(); + double pxmu = Wlep.Px(); + double pymu = Wlep.Py(); + double pzmu = Wlep.Pz(); + double pxnu = MetPx; + double pynu = MetPy; + double pznu = 0.; + if(el && ! mu) M_mu = M_el; + + double a = M_W*M_W - M_mu*M_mu + 2.0*pxmu*pxnu + 2.0*pymu*pynu; + double A = 4.0*(emu*emu - pzmu*pzmu); + double B = -4.0*a*pzmu; + double C = 4.0*emu*emu*(pxnu*pxnu + pynu*pynu) - a*a; + + + bool isComplex_ = false; + double tmproot = B*B - 4.0*A*C; + + if (tmproot<0) { + isComplex_= true; + pznu = - B/(2*A); // take real part of complex roots + } + else { + isComplex_ = false; + double tmpsol1 = (-B + TMath::Sqrt(tmproot))/(2.0*A); + double tmpsol2 = (-B - TMath::Sqrt(tmproot))/(2.0*A); + + if (TMath::Abs(tmpsol2-pzmu) < TMath::Abs(tmpsol1-pzmu)) { pznu = tmpsol2;} + else pznu = tmpsol1; + + + } + return pznu; + +} +; + +int Functions::FCNCjetCalculator(std::vector Jets, TLorentzVector recoZ ,int index, int verb) +{ + + double TempMinMass = 100000.00; + double TopMass = 172.9; + TLorentzVector Jetcandidate; + int NbInColl = -1; + if(Jets.size() > 1){ + //cout << " non bjets: " << nonBJets.size() << " possibilities " <Px(),nonBJets[iJ]->Py(),nonBJets[iJ]->Pz(),nonBJets[iJ]->Energy()); + //cout << iJ << " tempMinM " << TempMinMass << " newmass " << (recoZ+Jet).M() ; + if(fabs((recoZ+Jet).M() - TopMass) < TempMinMass) + { + TempMinMass = fabs((recoZ+Jet).M() - TopMass); + Jetcandidate.SetPxPyPzE(Jet.Px(), Jet.Py(), Jet.Pz(), Jet.E()); + NbInColl = iJ; + + } + //cout << " NbInColl is " << iJ << endl; + // 269297.249181 + } + if(matching && JetPartonPair.size()>0) { + if(JetPartonPair[0].first == NbInColl) nMatched++; + else nNonMatched++; + } + } + else{ + NbInColl = -5, + cout << "no cjets available" << endl; + } + return NbInColl; +}; + + +float Functions::EffectiveAreaRho(TRootElectron *el, float rho_) +{ + double EffectiveArea = 0.; + // Updated to Spring 2015 EA from https://github.com/cms-sw/cmssw/blob/CMSSW_7_4_14/RecoEgamma/ElectronIdentification/data/Spring15/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_25ns.txt#L8 + if (fabs(el->superClusterEta()) >= 0.0 && fabs(el->superClusterEta()) < 1.0 ) EffectiveArea = 0.1752; + if (fabs(el->superClusterEta()) >= 1.0 && fabs(el->superClusterEta()) < 1.479 ) EffectiveArea = 0.1862; + if (fabs(el->superClusterEta()) >= 1.479 && fabs(el->superClusterEta()) < 2.0 ) EffectiveArea = 0.1411; + if (fabs(el->superClusterEta()) >= 2.0 && fabs(el->superClusterEta()) < 2.2 ) EffectiveArea = 0.1534; + if (fabs(el->superClusterEta()) >= 2.2 && fabs(el->superClusterEta()) < 2.3 ) EffectiveArea = 0.1903; + if (fabs(el->superClusterEta()) >= 2.3 && fabs(el->superClusterEta()) < 2.4 ) EffectiveArea = 0.2243; + if (fabs(el->superClusterEta()) >= 2.4 && fabs(el->superClusterEta()) < 5.0 ) EffectiveArea = 0.2687; + if (fabs(el->superClusterEta()) >= 5.0) EffectiveArea = -9999; + + double isocorr = 0; + + isocorr = rho_*EffectiveArea; + + return isocorr; +}; + +float Functions::EffectiveArea(TRootElectron *el) +{ + double EffectiveArea = 0.; + + if (fabs(el->superClusterEta()) >= 0.0 && fabs(el->superClusterEta()) < 1.0 ) EffectiveArea = 0.1752; + if (fabs(el->superClusterEta()) >= 1.0 && fabs(el->superClusterEta()) < 1.479 ) EffectiveArea = 0.1862; + if (fabs(el->superClusterEta()) >= 1.479 && fabs(el->superClusterEta()) < 2.0 ) EffectiveArea = 0.1411; + if (fabs(el->superClusterEta()) >= 2.0 && fabs(el->superClusterEta()) < 2.2 ) EffectiveArea = 0.1534; + if (fabs(el->superClusterEta()) >= 2.2 && fabs(el->superClusterEta()) < 2.3 ) EffectiveArea = 0.1903; + if (fabs(el->superClusterEta()) >= 2.3 && fabs(el->superClusterEta()) < 2.4 ) EffectiveArea = 0.2243; + if (fabs(el->superClusterEta()) >= 2.4 && fabs(el->superClusterEta()) < 5.0 ) EffectiveArea = 0.2687; + if (fabs(el->superClusterEta()) >= 5.0) EffectiveArea = -9999; + + + return EffectiveArea; +}; + + +float Functions::relPfIsoEl(TRootElectron *el, float _rho) +{ + float isoCorr = (el->neutralHadronIso(3) + el->photonIso(3) - EffectiveAreaRho(el,_rho)); + // float isolation = (el->chargedHadronIso(3) + (isoCorr > 0.0 ? isoCorr : 0.0))/(el->Pt()); + float isolation = (el->chargedHadronIso(3) + std::max(el->neutralHadronIso(3)+el->photonIso(3)-EffectiveAreaRho(el,_rho),float(0.)))/(el->Pt()); + return isolation; + +}; + + +float Functions::IsoDBeta(TRootMuon *mu) +{ + float iso = (mu->chargedHadronIso(4) + std::max(0.0, mu->neutralHadronIso(4) + mu->photonIso(4) - 0.5*mu->puChargedHadronIso(4)))/mu->Pt(); + + return iso; + +} + +vector Functions::LeptonAssigner(std::vector electrons,std::vector muons) +{ + // cout << " in assigner " << endl; + vector ReturnColl; + Assigned = false; + + if(electrons.size() + muons.size() != 3){ + cout << " WARNING: not 3 leptons " << endl; + cout << "muons " << muons.size() << " electrons " << electrons.size() << endl; + return ReturnColl; + } + + // cout << " in 3 lep " << endl; + + TLorentzVector Zlepcan0; + Zlepcan0.SetPxPyPzE(0.,0.,0.,0.); + TLorentzVector Zlepcan1; + Zlepcan1.SetPxPyPzE(0.,0.,0.,0.); + TLorentzVector Wlepcan; + Wlepcan.SetPxPyPzE(0.,0.,0.,0.); + + if(electrons.size() == 2){ + //cout << "2 electr " << electrons[0]->charge() << " " << electrons[1]->charge() << endl; + if(electrons[0]->charge() != electrons[1]->charge()){ + Zlepcan0.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Zlepcan1.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + Wlepcan.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Assigned = true; + } + } + else if(muons.size() == 2){ + // cout << "2 muons" << endl; + if(muons[0]->charge() != muons[1]->charge()){ + Zlepcan0.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Zlepcan1.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + Wlepcan.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Assigned = true; + } + } + else if(electrons.size() ==3){ + // cout << " 3 electrons " << endl; + bool can01 = false; + bool can02= false; + bool can12 = false; + + if(electrons[0]->charge() != electrons[1]->charge()) can01 = true; + if(electrons[0]->charge() != electrons[2]->charge()) can02 = true; + if(electrons[2]->charge() != electrons[1]->charge()) can12 = true; + + double mass01 = 9999.; + double mass02 = 9999.; + double mass12 = 9999.; + TLorentzVector temp0; + temp0.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + TLorentzVector temp1; + temp1.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + TLorentzVector temp2; + temp2.SetPxPyPzE(electrons[2]->Px(), electrons[2]->Py(),electrons[2]->Pz(),electrons[2]->Energy()); + if(can01) mass01 = fabs(91.1-(temp1+temp0).M()); + if(can02) mass02 = fabs(91.1-(temp2+temp0).M()); + if(can12) mass12 = fabs(91.1-(temp1+temp2).M()); + if(mass01 <= mass02 && mass01 <= mass12){ + Zlepcan0.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Zlepcan1.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + Wlepcan.SetPxPyPzE(electrons[2]->Px(), electrons[2]->Py(),electrons[2]->Pz(),electrons[2]->Energy()); + Assigned = true; + } + else if(mass02 <= mass12 && mass02 < mass01){ + Zlepcan0.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Zlepcan1.SetPxPyPzE(electrons[2]->Px(), electrons[2]->Py(),electrons[2]->Pz(),electrons[2]->Energy()); + Wlepcan.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + Assigned = true; + + } + else if(mass12 < mass01 && mass12 < mass02){ + Zlepcan0.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + Zlepcan1.SetPxPyPzE(electrons[2]->Px(), electrons[2]->Py(),electrons[2]->Pz(),electrons[2]->Energy()); + Wlepcan.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Assigned = true; + } + } + else if(muons.size() == 3){ + bool can01 = false; + bool can02= false; + bool can12 = false; + if(muons[0]->charge() != muons[1]->charge()) can01 = true; + if(muons[0]->charge() != muons[2]->charge()) can02 = true; + if(muons[2]->charge() != muons[1]->charge()) can12 = true; + + double mass01 = 9999.; + double mass02 = 9999.; + double mass12 = 9999.; + TLorentzVector temp0; + temp0.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + TLorentzVector temp1; + temp1.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + TLorentzVector temp2; + temp2.SetPxPyPzE(muons[2]->Px(), muons[2]->Py(),muons[2]->Pz(),muons[2]->Energy()); + if(can01) mass01 = fabs(91.1-(temp1+temp0).M()); + if(can02) mass02 = fabs(91.1-(temp2+temp0).M()); + if(can12) mass12 = fabs(91.1-(temp1+temp2).M()); + if(mass01 <= mass02 && mass01 <= mass12){ + Zlepcan0.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Zlepcan1.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + Wlepcan.SetPxPyPzE(muons[2]->Px(), muons[2]->Py(),muons[2]->Pz(),muons[2]->Energy()); + Assigned = true; + } + else if(mass02 <= mass12 && mass02 < mass01){ + Zlepcan0.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Zlepcan1.SetPxPyPzE(muons[2]->Px(), muons[2]->Py(),muons[2]->Pz(),muons[2]->Energy()); + Wlepcan.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + Assigned = true; + + } + else if(mass12 < mass01 && mass12 < mass02){ + Zlepcan0.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + Zlepcan1.SetPxPyPzE(muons[2]->Px(), muons[2]->Py(),muons[2]->Pz(),muons[2]->Energy()); + Wlepcan.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Assigned = true; + } + } + if(Assigned){ + ReturnColl.push_back(Zlepcan0); + ReturnColl.push_back(Zlepcan1); + ReturnColl.push_back(Wlepcan); + } + if(!Assigned){ + // cout << " WARNING: leptons not set for assignment " << endl; + return ReturnColl; + } + + + return ReturnColl; +} + +TLorentzVector Functions::MetzCalculator(TLorentzVector leptW, TLorentzVector v_met) +{ + + double term1 = leptW.Pz() * ( leptW.Px()* v_met.Px() + leptW.Py()*v_met.Py() + pow(80.399, 2)/2.); + + double det = pow(leptW.Px() * v_met.Px() + leptW.Py() * v_met.Py() + pow(80.399, 2)/2., 2) - v_met.Pt()*v_met.Pt() * (leptW.E()*leptW.E() - leptW.Pz()*leptW.Pz() ); + + if(det<0) det=0; + + double term2 = leptW.E() * pow(det, 0.5); + double denom = leptW.E()*leptW.E() - leptW.Pz()*leptW.Pz(); + double sol1 = (term1 - term2) / denom; + //double sol2 = (term1 + term2) / denom; + double nu_E = 0; + + TLorentzVector neutrino; + + nu_E = pow( pow(v_met.Px(),2) + pow(v_met.Py(),2) + pow(sol1,2), 0.5);//neglecting neutrino mass + neutrino.SetPxPyPzE( v_met.Px(), v_met.Py(), sol1, nu_E); + + return neutrino; + + +} + + + +int SMjetCalculator(std::vector Jets,int verb){ + int index_ = -5 ; + for(int iJ = 0; iJ < Jets.size()-1 ; iJ++){ + for(int kJ = 1; kJ < Jets.size(); kJ++){ + if(Jets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() >= Jets[kJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags()) index_ = iJ; + else index_ = kJ; + } + } + + + + return index_; +}; + + + diff --git a/Functions.h b/Functions.h new file mode 100644 index 0000000..2afc8a4 --- /dev/null +++ b/Functions.h @@ -0,0 +1,147 @@ +// +// Functions.hpp +// +// +// Created by Isis Van Parijs on 12/08/16. +// +// + +#ifndef Functions_hpp +#define Functions_hpp + +#include + +#define _USE_MATH_DEFINES +#include "TStyle.h" +#include "TPaveText.h" +#include "TTree.h" +#include "TNtuple.h" +#include "TNtuple.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include "TRandom3.h" +#include "TRandom.h" +#include "TProfile.h" +#include +#include +#include + +//user code +#include "Functions.h" +#include "TopTreeProducer/interface/TRootRun.h" +#include "TopTreeProducer/interface/TRootEvent.h" +#include "TopTreeAnalysisBase/Selection/interface/Run2Selection.h" + +#include "TopTreeAnalysisBase/Content/interface/AnalysisEnvironment.h" +#include "TopTreeAnalysisBase/Content/interface/Dataset.h" +#include "TopTreeAnalysisBase/Tools/interface/JetTools.h" +#include "TopTreeAnalysisBase/Tools/interface/PlottingTools.h" +#include "TopTreeAnalysisBase/Tools/interface/TTreeLoader.h" +#include "TopTreeAnalysisBase/Tools/interface/AnalysisEnvironmentLoader.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/JetCorrectorParameters.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/JetCorrectionUncertainty.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MakeBinning.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MEzCalculator.h" +#include "TopTreeAnalysisBase/MCInformation/interface/LumiReWeighting.h" +#include "TopTreeAnalysisBase/MCInformation/interface/JetPartonMatching.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MEzCalculator.h" +#include "TopTreeAnalysisBase/Tools/interface/LeptonTools.h" +#include "TopTreeAnalysisBase/Tools/interface/SourceDate.h" +#include "TopTreeAnalysisBase/Tools/interface/Trigger.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/TTreeObservables.h" + +//This header file is taken directly from the BTV wiki. It contains +// to correctly apply an event level Btag SF. It is not yet on CVS +// as I hope to merge the functionality into BTagWeigtTools.h + +//#include "TopTreeAnalysisBase/Tools/interface/BTagSFUtil.h" +#include "TopTreeAnalysisBase/Tools/interface/BTagWeightTools.h" +#include "TopTreeAnalysisBase/Tools/interface/BTagCalibrationStandalone.h" + +#include "TopTreeAnalysisBase/Tools/interface/JetCombiner.h" +#include "TopTreeAnalysisBase/Tools/interface/MVATrainer.h" +#include "TopTreeAnalysisBase/Tools/interface/MVAComputer.h" + + +class Functions +{ + + public : + + //Methods + Functions(); + ~Functions(){}; + + void Set_Luminosity(double); //Set the luminosity re-scaling factor to be used thoughout the code + + + + //Initializing CSVv2 b-tag WP + float workingpointvalue_Loose = -1; + float workingpointvalue_Medium = -1; + float workingpointvalue_Tight = -1; + + + //What you want to do + bool synchex = false; + bool Assigned = false; + + + // home made functions + int FCNCjetCalculator(std::vector Jets, TLorentzVector recoZ ,int index, int verb); + int SMjetCalculator(std::vector Jets,int verb); + double MEtz(bool mu, bool el, TLorentzVector Wlep, double MetPx, double MetPy); + float EffectiveAreaRho(TRootElectron *el, float _rho) ; + float EffectiveArea(TRootElectron *el) ; + float relPfIsoEl(TRootElectron *el, float _rho); + float IsoDBeta(TRootMuon *mu); + vector LeptonAssigner(std::vector electrons,std::vector muons); + TLorentzVector MetzCalculator(TLorentzVector leptW, TLorentzVector v_met); + vector< pair > JetPartonPair; + + + // administration functions + string ConvertIntToString(int Number, bool pad); + string MakeTimeStamp(); + + + + + + + // members +// bool stop_program; + double M_W = 80.4; + double M_mu = 0.10566; // 105.66 MeV/c^2 + double M_el = 0.000510999; // 0.510998910 Mev/c^2 + int nMatched = 0; + int nNonMatched = 0; + bool matching = false; +}; + + + + + + + + + + + + + + + + + +#endif /* Functions_hpp */ diff --git a/LocalGridSubmission/SubmitAll.sh b/LocalGridSubmission/SubmitAll.sh new file mode 100644 index 0000000..b9c7358 --- /dev/null +++ b/LocalGridSubmission/SubmitAll.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if [[ -n $1 ]] #check if variable is not empty +then + if [[ $1 == "test" ]] + then + cd test + for f in ./submit*.sh + do + qsub $f + done + cd - + fi + +else + cd output + for f in ../submit*.sh + do + qsub $f + done + cd - + +fi diff --git a/LocalGridSubmission/createSubmitScript.py b/LocalGridSubmission/createSubmitScript.py new file mode 100644 index 0000000..0faa19e --- /dev/null +++ b/LocalGridSubmission/createSubmitScript.py @@ -0,0 +1,155 @@ +import xml.etree.cElementTree as ET +import subprocess +import time +import os +import glob +from shutil import copyfile +from datetime import datetime +# libray to copy files +import shutil + + +# Define time variable +now = datetime.now() +dd = str(now.day) +mm = str(now.month) +yyyy = str(now.year) +hh = str(now.hour) +mn= str(now.minute) + +# make a data string. Pick one of the two above +#date = dd+"_"+mm+"_"+yyyy+"_"+hh+"h"+mn+"min" +date = dd+"_"+mm+"_"+yyyy +#date = dd+"_"+mm+"_"+yyyy+"noTrig" + +#channels = ["MuMu","ElEl"] +channels = ["mumumu"] +fillBhisto = 0; +JES = 1; +JER = 1; + +# loop over channels +for chan in channels: + print "\nSearching list of sample used for ", chan, " channel!" + # getting the appropriate xml file + if "mumumu" in chan: + tree = ET.ElementTree(file='../config/Run2TriLepton_samples.xml') +# tree = ET.ElementTree(file='../config/test.xml') + elif "ElEl" in chan: + tree = ET.ElementTree(file='../config/FullSamplesElElV10.xml') + elif "ElMu" in chan: + tree = ET.ElementTree(file='../config/FullSamplesElMuV9.xml') + else: + print "Channel '", chan , "' is not a correct channel name. No tree has been loaded!" + sys.exit() + #tree = ET.ElementTree(file='../config/FullMcBkgdSamplesV9.xml') + #tree = ET.ElementTree(file='../config/DataSamples.xml') + #tree = ET.ElementTree(file='../config/DisplacedTopsSignal.xml') + #tree = ET.ElementTree(file='../config/FullSamplesElElV9.xml') + #tree = ET.ElementTree(file='../config/FullSamplesMuMuV9.xml') + + root = tree.getroot() + datasets = root.find('datasets') + + + print "found " + str(len(datasets)) + " datasets" + + # create new dirs if not already existing + if not os.path.exists("SubmitScripts/"+date): + os.makedirs("SubmitScripts/"+date) + if not os.path.exists("SubmitScripts/"+date+"/"+chan): + os.makedirs("SubmitScripts/"+date+"/"+chan) + if not os.path.exists("SubmitScripts/"+date+"/"+chan+"/output"): + os.makedirs("SubmitScripts/"+date+"/"+chan+"/output") + if not os.path.exists("SubmitScripts/"+date+"/"+chan+"/test"): + os.makedirs("SubmitScripts/"+date+"/"+chan+"/test") + + # copy the submitAll macro + copyfile("SubmitAll.sh","SubmitScripts/"+date+"/"+chan+"/SubmitAll.sh") + + + # list of variables + topTrees = [] + listOfFiles = [] + files_str="" + FilePerJob=0 + addPrefix=True + N_processed=0 + + # loop over all the dataset with add="1" + for d in datasets: + if d.attrib['add'] == '1': + print "found dataset to be added..." + str(d.attrib['name']) + commandString = "./Ntupler "+str(d.attrib['name'])+" "+str(d.attrib['title'])+" "+str(d.attrib['add'])+" "+str(d.attrib['color'])+" "+str(d.attrib['ls'])+" "+str(d.attrib['lw'])+" "+str(d.attrib['normf'])+" "+str(d.attrib['EqLumi'])+" "+str(d.attrib['xsection'])+" "+str(d.attrib['PreselEff']) + topTrees = glob.glob(d.attrib['filenames']) + + # setting the number of file per job depending whether it is data sample or not + # this ca be tweaked + if "Data" in str(d.attrib['name']): + FilePerJob=20 + else: + FilePerJob=2 + + # create a test job for each dataset + # create a file for this job + filenameTest="SubmitScripts/"+date+"/"+chan+"/test"+"/submit_"+str(d.attrib['name'])+"_"+"Test"+".sh" + # copy a skeleton file that set up the code environment, the wall time and the queue + shutil.copyfile("submitTestSkeleton.sh", filenameTest) + # append to the file the actual command + outfileTest = open (filenameTest, 'a') + print >> outfileTest, commandString, topTrees[0], " ", JES , " " , JER , " ", fillBhisto, " ", chan , " " , 1 , " 0" , " 10000" + + N_job = 0 + N_file = 1 + remainder= len(topTrees)%FilePerJob +# print "remainder is", remainder + +# print "len(topTrees) is ", len(topTrees) + # loop over all the root files + for f in range(0,len(topTrees)): +# print "file number ", f , " is : ", topTrees[f] + + # Combine multiple root files in a single job + listOfFiles.append(topTrees[f]) + + # if the number of files is big enough, create one job with the list of files + if (len(listOfFiles) == FilePerJob) or ((len(topTrees)- N_job * FilePerJob <= FilePerJob) and (len(listOfFiles) == remainder) ): +# print "len(listOfFiles) is ", len(listOfFiles) + + # Loop over the files of the current job + for fpj in range (0,len(listOfFiles)): +# print listOfFiles[fpj] + + # add prefix if need + if (addPrefix == True): + listOfFiles[fpj]="dcap://maite.iihe.ac.be"+listOfFiles[fpj] + # string contain the list of files separated by a space + files_str=files_str+ " " + listOfFiles[fpj] + N_processed=N_processed+1 + +# print files_str + + # create a file for this job + filename="SubmitScripts/"+date+"/"+chan+"/submit_"+str(d.attrib['name'])+"_"+str(N_job*FilePerJob+1)+"to"+str(N_job*FilePerJob+len(listOfFiles))+".sh" + # copy a skeleton file that set up the code environment, the wall time and the queue + shutil.copyfile("submitSkeleton.sh", filename) + # append to the file the actual command + outfile = open (filename, 'a') + print >> outfile, commandString, files_str, " ", JES, " " , JER, " " , fillBhisto, " ", chan , " " , str(N_job+1) , " 0" , " 2000000" + + # cleaning + listOfFiles=[] + files_str="" + + N_job=N_job+1 +# print N_job * FilePerJob +# print "Number of processed file is ", N_processed + + N_file=N_file+1 + + + +# print lisfOflisOfFiles + +# moving the newly created dir +#os.chdir("SubmitScripts/"+chan+"/"+date) diff --git a/LocalGridSubmission/createSubmitScriptWithCopy.py b/LocalGridSubmission/createSubmitScriptWithCopy.py new file mode 100644 index 0000000..7fb98f7 --- /dev/null +++ b/LocalGridSubmission/createSubmitScriptWithCopy.py @@ -0,0 +1,173 @@ +import xml.etree.cElementTree as ET +import subprocess +import time +import os +import glob +from shutil import copyfile +from datetime import datetime +# libray to copy files +import shutil + + +# Define time variable +now = datetime.now() +dd = str(now.day) +mm = str(now.month) +yyyy = str(now.year) +hh = str(now.hour) +mn= str(now.minute) + +# make a data string. Pick one of the two above +#date = dd+"_"+mm+"_"+yyyy+"_"+hh+"h"+mn+"min" +date = dd+"_"+mm+"_"+yyyy +#date = dd+"_"+mm+"_"+yyyy+"noTrig" + +#channels = ["MuMu","ElEl"] +#channels = ["mumumu","eee","all"] +channels = ["all"] +fillBhisto = 0; +JES = 1; +JER = 1; + +# loop over channels +for chan in channels: + print "\nSearching list of sample used for ", chan, " channel!" + # getting the appropriate xml file + if "mumumu" in chan: + tree = ET.ElementTree(file='../config/Run2TriLepton_samples.xml') +# tree = ET.ElementTree(file='../config/test.xml') + elif "eee" in chan: + tree = ET.ElementTree(file='../config/Run2TriLepton_samples.xml') + elif "all" in chan: + tree = ET.ElementTree(file='../config/Run2TriLepton_samples.xml') + elif "ElMu" in chan: + tree = ET.ElementTree(file='../config/FullSamplesElMuV9.xml') + else: + print "Channel '", chan , "' is not a correct channel name. No tree has been loaded!" + sys.exit() + + root = tree.getroot() + datasets = root.find('datasets') + print "found " + str(len(datasets)) + " datasets" + + # create new dirs if not already existing + if not os.path.exists("SubmitScripts/"+date): + os.makedirs("SubmitScripts/"+date) + if not os.path.exists("SubmitScripts/"+date+"/"+chan): + os.makedirs("SubmitScripts/"+date+"/"+chan) + if not os.path.exists("SubmitScripts/"+date+"/"+chan+"/output"): + os.makedirs("SubmitScripts/"+date+"/"+chan+"/output") + if not os.path.exists("SubmitScripts/"+date+"/"+chan+"/test"): + os.makedirs("SubmitScripts/"+date+"/"+chan+"/test") + + # copy the submitAll macro + copyfile("SubmitAll.sh","SubmitScripts/"+date+"/"+chan+"/SubmitAll.sh") + + + # list of variables + topTrees = [] + listOfFiles = [] + files_str="" + FilePerJob=0 + addPrefix=True + N_processed=0 + listOfScratchFiles = [] + listOfTmpDirFiles = [] + CopyCmdlistOfFiles = [] + scractFiles_str="" + tmpdirFiles_str="" + + + + # loop over all the dataset with add="1" + for d in datasets: + if d.attrib['add'] == '1': + print "found dataset to be added..." + str(d.attrib['name']) + commandString = "./FinalAn "+str(d.attrib['name'])+" "+str(d.attrib['title'])+" "+str(d.attrib['add'])+" "+str(d.attrib['color'])+" "+str(d.attrib['ls'])+" "+str(d.attrib['lw'])+" "+str(d.attrib['normf'])+" "+str(d.attrib['EqLumi'])+" "+str(d.attrib['xsection'])+" "+str(d.attrib['PreselEff']) + topTrees = glob.glob(d.attrib['filenames']) + + # setting the number of file per job depending whether it is data sample or not + # this ca be tweaked + if "Data" in str(d.attrib['name']): + FilePerJob=15 + else: + FilePerJob=2 + + # create a test job for each dataset + # create a file for this job + filenameTest="SubmitScripts/"+date+"/"+chan+"/test"+"/submit_"+str(d.attrib['name'])+"_"+"Test"+".sh" + # copy a skeleton file that set up the code environment, the wall time and the queue + shutil.copyfile("submitTestSkeleton.sh", filenameTest) + # append to the file the actual command + outfileTest = open (filenameTest, 'a') + print >> outfileTest, commandString, topTrees[0], " ", JES , " " , JER , " ", fillBhisto, " ", chan , " " , 1 , " 0" , " 10000" + + N_job = 0 + N_file = 1 + remainder= len(topTrees)%FilePerJob +# print "remainder is", remainder + +# print "len(topTrees) is ", len(topTrees) + # loop over all the root files + for f in range(0,len(topTrees)): +# print "file number ", f , " is : ", topTrees[f] + + # Combine multiple root files in a single job + listOfFiles.append(topTrees[f]) + #temp copy + CopyCmdlistOfFiles.append("dccp dcap://maite.iihe.ac.be:"+topTrees[f]+" /$TMPDIR/TOPTREE_"+str(f)+".root") + listOfScratchFiles.append(" /scratch/$PBS_JOBID/TOPTREE_"+str(f)+".root") + listOfTmpDirFiles.append(" /$TMPDIR/TOPTREE_"+str(f)+".root") + + + # if the number of files is big enough, create one job with the list of files + if (len(listOfFiles) == FilePerJob) or ((len(topTrees)- N_job * FilePerJob <= FilePerJob) and (len(listOfFiles) == remainder) ): +# print "len(listOfFiles) is ", len(listOfFiles) + + + # create a file for this job + filename="SubmitScripts/"+date+"/"+chan+"/submit_"+str(d.attrib['name'])+"_"+str(N_job*FilePerJob+1)+"to"+str(N_job*FilePerJob+len(listOfFiles))+".sh" + # copy a skeleton file that set up the code environment, the wall time and the queue + shutil.copyfile("submitSkeleton.sh", filename) + # append to the file the actual command + outfile = open (filename, 'a') + + # Loop over the files of the current job + for fpj in range (0,len(listOfFiles)): +# print listOfFiles[fpj] + + # add prefix if need + if (addPrefix == True): + listOfFiles[fpj]="dcap://maite.iihe.ac.be"+listOfFiles[fpj] + # string contain the list of files separated by a space + files_str=files_str+ " " + listOfFiles[fpj] + scractFiles_str=scractFiles_str+ " " + listOfScratchFiles[fpj] + tmpdirFiles_str=tmpdirFiles_str+ " " + listOfTmpDirFiles [fpj] + N_processed=N_processed+1 + # copy all the file + print >> outfile , CopyCmdlistOfFiles[fpj] + + + + print >> outfile, commandString, files_str, " ", JES, " " , JER, " " , fillBhisto, " ", chan , " " , str(N_job+1) , " 0" , " 2000000" + + # cleaning + listOfFiles=[] + files_str="" + listOfScratchFiles=[] + CopyCmdlistOfFiles=[] + listOfTmpDirFiles =[] + scractFiles_str="" + + N_job=N_job+1 +# print N_job * FilePerJob +# print "Number of processed file is ", N_processed + + N_file=N_file+1 + + + +# print lisfOflisOfFiles + +# moving the newly created dir +#os.chdir("SubmitScripts/"+chan+"/"+date) diff --git a/LocalGridSubmission/submitSkeleton.sh b/LocalGridSubmission/submitSkeleton.sh new file mode 100644 index 0000000..df07670 --- /dev/null +++ b/LocalGridSubmission/submitSkeleton.sh @@ -0,0 +1,15 @@ + +#!/bin/bash + +#PBS -q localgrid +#PBS -l walltime=04:00:00 + +source /user/ivanpari/.bash_login +source $VO_CMS_SW_DIR/cmsset_default.sh +# setting up your code and your env +cd /user/ivanpari/CMSSW_7_6_5/src/ +source /cvmfs/cms.cern.ch/cmsset_default.sh +eval `scramv1 runtime -sh` +cd TopBrussels/FCNCAnalysis + +# want you really want to do!! diff --git a/LocalGridSubmission/submitTestSkeleton.sh b/LocalGridSubmission/submitTestSkeleton.sh new file mode 100644 index 0000000..b6a47c3 --- /dev/null +++ b/LocalGridSubmission/submitTestSkeleton.sh @@ -0,0 +1,15 @@ + +#!/bin/bash + +#PBS -q localgrid +#PBS -l walltime=03:00:00 + +source /user/ivanpari/.bash_login +source $VO_CMS_SW_DIR/cmsset_default.sh +# setting up your code and your env +cd /user/ivanpari/CMSSW_7_4_15/src/ +source /cvmfs/cms.cern.ch/cmsset_default.sh +eval `scramv1 runtime -sh` +cd TopBrussels/FCNCAnalysis + +# want you really want to do!! diff --git a/MVA/TMVA.root b/MVA/TMVA.root deleted file mode 100644 index a1b9db0..0000000 Binary files a/MVA/TMVA.root and /dev/null differ diff --git a/MVA/TMVAClassification.C b/MVA/TMVAClassification.C deleted file mode 100644 index d2affa6..0000000 --- a/MVA/TMVAClassification.C +++ /dev/null @@ -1,572 +0,0 @@ -// @(#)root/tmva $Id: TMVAClassification.C,v 1.1.2.1 2012/12/13 15:38:04 fblekman Exp $ -/********************************************************************************** - * Project : TMVA - a Root-integrated toolkit for multivariate data analysis * - * Package : TMVA * - * Root Macro: TMVAClassification * - * * - * This macro provides examples for the training and testing of the * - * TMVA classifiers. * - * * - * As input data is used a toy-MC sample consisting of four Gaussian-distributed * - * and linearly correlated input variables. * - * * - * The methods to be used can be switched on and off by means of booleans, or * - * via the prompt command, for example: * - * * - * root -l TMVAClassification.C\(\"Fisher,Likelihood\"\) * - * * - * (note that the backslashes are mandatory) * - * If no method given, a default set is used. * - * * - * The output file "TMVA.root" can be analysed with the use of dedicated * - * macros (simply say: root -l ), which can be conveniently * - * invoked through a GUI that will appear at the end of the run of this macro. * - **********************************************************************************/ - -#include -#include -#include -#include - -#include "TChain.h" -#include "TClonesArray.h" -#include "TFile.h" -#include "TTree.h" -#include "TString.h" -#include "TObjString.h" -#include "TSystem.h" -#include "TROOT.h" -#include "TPluginManager.h" - -#include "../../TopTreeAnalysisBase/TMVA/macros/TMVAGui.C" -#include "../../TopTreeAnalysisBase/Content/interface/Dataset.h" - -#if not defined(__CINT__) || defined(__MAKECINT__) -// needs to be included when makecint runs (ACLIC) -#include "TMVA/Factory.h" -#include "TMVA/Tools.h" -#endif - - - -void TMVAClassification( TString myMethodList = "" ) -{ - // The explicit loading of the shared libTMVA is done in TMVAlogon.C, defined in .rootrc - // if you use your private .rootrc, or run from a different directory, please copy the - // corresponding lines from .rootrc - - // methods to be processed can be given as an argument; use format: - // - // mylinux~> root -l TMVAClassification.C\(\"myMethod1,myMethod2,myMethod3\"\) - // - // if you like to use a method via the plugin mechanism, we recommend using - // - // mylinux~> root -l TMVAClassification.C\(\"P_myMethod\"\) - // (an example is given for using the BDT as plugin (see below), - // but of course the real application is when you write your own - // method based) - - // this loads the library - TMVA::Tools::Instance(); - - //--------------------------------------------------------------- - // default MVA methods to be trained + tested - std::map Use; - - Use["Cuts"] = 0; - Use["CutsD"] = 0; - Use["CutsPCA"] = 0; - Use["CutsGA"] = 0; - Use["CutsSA"] = 0; - // --- - Use["Likelihood"] = 0; - Use["LikelihoodD"] = 0; // the "D" extension indicates decorrelated input variables (see option strings) - Use["LikelihoodPCA"] = 0; // the "PCA" extension indicates PCA-transformed input variables (see option strings) - Use["LikelihoodKDE"] = 0; - Use["LikelihoodMIX"] = 0; - // --- - Use["PDERS"] = 0; - Use["PDERSD"] = 0; - Use["PDERSPCA"] = 0; - Use["PDERSkNN"] = 0; // depreciated until further notice - Use["PDEFoam"] = 0; - // -- - Use["KNN"] = 0; - // --- - Use["HMatrix"] = 0; - Use["Fisher"] = 0; - Use["FisherG"] = 0; - Use["BoostedFisher"] = 0; - Use["LD"] = 0; - // --- - Use["FDA_GA"] = 0; - Use["FDA_SA"] = 0; - Use["FDA_MC"] = 0; - Use["FDA_MT"] = 0; - Use["FDA_GAMT"] = 0; - Use["FDA_MCMT"] = 0; - // --- - Use["MLP"] = 0; // this i /Software/LocalSoft/root_5.32.04/tmva/test/TMVAClassification.Cs the recommended ANN - Use["MLPBFGS"] = 0; // recommended ANN with optional training method - Use["CFMlpANN"] = 0; // *** missing - Use["TMlpANN"] = 0; - // --- - Use["SVM"] = 0; - // --- - Use["BDT"] = 1; - Use["BDTD"] = 0; - Use["BDTG"] = 0; - Use["BDTB"] = 0; - // --- - Use["RuleFit"] = 0; - // --- - Use["Plugin"] = 0; - // --------------------------------------------------------------- - - std::cout << std::endl; - std::cout << "==> Start TMVAClassification" << std::endl; - - // Create a new root output file. - TString suffix ("");//("_vs_DYJetsOnly"); - TString outfileName( "../MVA/TMVA"+suffix+".root" ); - TFile* outputFile = TFile::Open( outfileName, "RECREATE" ); - - // Create the factory object. Later you can choose the methods - // whose performance you'd like to investigate. The factory will - // then run the performance analysis for you. - // - // The first argument is the base of the name of all the - // weightfiles in the directory weight/ - // - // The second argument is the output file for the training results - // All TMVA output can be suppressed by removing the "!" (not) in - // front of the "Silent" argument in the option string - TMVA::Factory *factory = new TMVA::Factory( "TMVAClassification", outputFile,"!V:!Silent:Color:DrawProgressBar:Transformations=I;D;P;G,D" ); - - // If you wish to modify default settings - // (please check "src/Config.h" to see all available global options) - // (TMVA::gConfig().GetVariablePlotting()).fTimesRMS = 8.0; - // (TMVA::gConfig().GetIONames()).fWeightFileDir = "myWeightDirectory"; - - // Define the input variables that shall be used for the MVA training - // note that you may also use variable expressions, such as: "3*var1/var2*abs(var3)" - // [all types of expressions that can also be parsed by TTree::Draw( "expression" )] - //factory->AddVariable( "myvar1 := var1+var2", 'F' ); - //factory->AddVariable( "myvar2 := var1-var2", "Expression 2", "", 'F' ); - //factory->AddVariable( "var3", "Variable 3", "units", 'F' ); - //factory->AddVariable( "var4", "Variable 4", "units", 'F' ); - - factory->AddVariable("missingEt", "MET","GeV",'F'); - factory->AddVariable("InvMass_FCNC_top_Zdecay", "InvMass_FCNC_top","GeV",'F'); - factory->AddVariable("InvMass_SM_W", "InvMass_SM_W","GeV",'F'); - factory->AddVariable("InvMass_SM_lb", "InvMass_SM_lb","GeV",'F'); - factory->AddVariable("InvMass_SM_top", "InvMass_SM_top","GeV",'F'); - factory->AddVariable("InvMass_4lept_Zdecay", "InvMass_FCNC_H","GeV",'F'); - factory->AddVariable("Phi_Higgs", "Phi_Higgs","",'F'); - factory->AddVariable("Eta_Higgs", "Eta_Higgs","",'F'); - factory->AddVariable("nBJets", "nBJets","",'F'); - factory->AddVariable("nLJets", "nLJets","",'F'); - factory->AddVariable("nJets", "nJets","",'F'); - factory->AddVariable("Bdiscr", "Bdiscr","",'F'); - - - - // You can add so-called "Spectator variables", which are not used in the MVA training, - // but will appear in the final "TestTree" produced by TMVA. This TestTree will contain the - // input variables, the response values of all trained MVAs, and the spectator variables - //factory->AddSpectator( "spec1:=var1*2", "Spectator 1", "units", 'F' ); - //factory->AddSpectator( "spec2:=var1*3", "Spectator 2", "units", 'F' ); - - // read training and test data - - // load the signal and background event samples from ROOT trees - const float Luminosity = 19700; - //nb of bkg samples - const int nbckgd = 1;//7; - const int nsignal = 6; //6; - TFile *input_s[nsignal]={0}; - TFile *input_b[nbckgd] = {0}; - vector bckgdNames; - vector signalNames; - - signalNames.push_back("TTJetsTocHbW_HToZZ_ZToLL_HctL"); - signalNames.push_back("TTJetsTocHbW_HToWW_WToLNuL_HctL"); - signalNames.push_back("TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctL"); - signalNames.push_back("TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctL"); - signalNames.push_back("TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctL"); - signalNames.push_back("TTJetsTocZbW"); - - //bckgdNames.push_back("Data"); - - bckgdNames.push_back("GluGluHiggs4lep"); - bckgdNames.push_back("TTW"); - bckgdNames.push_back("TTZ"); - bckgdNames.push_back("VBHiggs4lep"); - bckgdNames.push_back("WZ_To3LNu"); - bckgdNames.push_back("ZZ_To4L"); - bckgdNames.push_back("ttH"); - bckgdNames.push_back("TTJetsTocHbW_HToZZ_ZToLL_HctL"); - - - // global event weights per tree (see below for setting event-wise weights) - Double_t backgroundWeight[nbckgd] = {1.}; - Double_t signalWeight[nsignal] = {1.}; - Double_t signalW =1.; - Double_t backgroundW =1.; - - - TTree *signal[nsignal] = {0}; - - //input MVA bkg tree - for(int i=0;iGetName() << std::endl; - - signal[i] = (TTree*)input_s[i]->Get("tree"); - - // events (A) = lumi * xsec, now we have a fixed nb of events that should be equal to A, so - // they should be multiplied or divided by normweight, so signalW = lumi*xsec/N) - TH1* hEventSummary = (TH1*) input_s[i]->Get("EventSummary"); - double nbOfevts = hEventSummary->GetBinContent(1); - - TH1* hXsection = (TH1*) input_s[i]->Get("Xsection"); - double xsection = hXsection->GetBinContent(1); - - signalW = Luminosity*xsection / nbOfevts; - signalWeight[i] = signalW; - - - - } - - - - TTree *background[nbckgd] = {0}; - - //input MVA bkg tree - for(int i=0;iGetName() << std::endl; - - background[i] = (TTree*)input_b[i]->Get("tree"); - - // events (A) = lumi * xsec, now we have a fixed nb of events that should be equal to A, so - // they should be multiplied or divided by normweight, so signalW = lumi*xsec/N) - TH1* hEventSummary = (TH1*) input_b[i]->Get("EventSummary"); - double nbOfevts = hEventSummary->GetBinContent(1); - - TH1* hXsection = (TH1*) input_b[i]->Get("Xsection"); - double xsection = hXsection->GetBinContent(1); - - backgroundW = Luminosity*xsection / nbOfevts; - signalWeight[i] = signalW; - - backgroundWeight[i] = backgroundW; - - - } - - // ====== register trees ==================================================== - // - // the following method is the prefered one: - // you can add an arbitrary number of signal or background trees - for(int i=0;iAddSignalTree( signal[i], signalWeight[i] ); - std::cout << "--- TMVAClassification : Global weight for backgd ("+signalNames[i]+"): " << signalWeight[i] << std::endl; - } - for(int i=0;iAddBackgroundTree( background[i], backgroundWeight[i] ); - std::cout << "--- TMVAClassification : Global weight for backgd ("+bckgdNames[i]+"): " << backgroundWeight[i] << std::endl; - } - - // To give different trees for training and testing, do as follows: - // factory->AddSignalTree( signalTrainingTree, signalTrainWeight, "Training" ); - // factory->AddSignalTree( signalTestTree, signalTestWeight, "Test" ); - - // Use the following code instead of the above two or four lines to add signal and background - // training and test events "by hand" - // NOTE that in this case one should not give expressions (such as "var1+var2") in the input - // variable definition, but simply compute the expression before adding the event - // - // // --- begin ---------------------------------------------------------- - // std::vector vars( 4 ); // vector has size of number of input variables - // Float_t treevars[4]; - // for (Int_t ivar=0; ivar<4; ivar++) signal->SetBranchAddress( Form( "var%i", ivar+1 ), &(treevars[ivar]) ); - // for (Int_t i=0; iGetEntries(); i++) { - // signal->GetEntry(i); - // for (Int_t ivar=0; ivar<4; ivar++) vars[ivar] = treevars[ivar]; - // // add training and test events; here: first half is training, second is testing - // // note that the weight can also be event-wise - // if (i < signal->GetEntries()/2) factory->AddSignalTrainingEvent( vars, signalWeight ); - // else factory->AddSignalTestEvent ( vars, signalWeight ); - // } - // - // for (Int_t ivar=0; ivar<4; ivar++) background->SetBranchAddress( Form( "var%i", ivar+1 ), &(treevars[ivar]) ); - // for (Int_t i=0; iGetEntries(); i++) { - // background->GetEntry(i); - // for (Int_t ivar=0; ivar<4; ivar++) vars[ivar] = treevars[ivar]; - // // add training and test events; here: first half is training, second is testing - // // note that the weight can also be event-wise - // if (i < background->GetEntries()/2) factory->AddBackgroundTrainingEvent( vars, backgroundWeight ); - // else factory->AddBackgroundTestEvent ( vars, backgroundWeight ); - // } - // // --- end ------------------------------------------------------------ - // - // ====== end of register trees ============================================== - - - // This would set individual event weights (the variables defined in the - // expression need to exist in the original TTree) - // for signal : factory->SetSignalWeightExpression("weight1*weight2"); - // for background: factory->SetBackgroundWeightExpression("weight1*weight2"); - factory->SetSignalWeightExpression( "pu_weight" ); - factory->SetBackgroundWeightExpression( "pu_weight" ); - - // Apply additional cuts on the signal and background samples (can be different) - TCut mycuts = " "; // for example: TCut mycuts = "abs(var1)<0.5 && abs(var2-0.5)<1"; - TCut mycutb = " "; // for example: TCut mycutb = "abs(var1)<0.5"; - // && mva_1stjet_pt>70 && mva_2ndjet_pt>50 - // tell the factory to use all remaining events in the trees after training for testing: - //factory->PrepareTrainingAndTestTree( mycuts, mycutb,"nTrain_Signal=0:nTrain_Background=0:SplitMode=Random:NormMode=EqualNumEvents:!V" ); - //factory->PrepareTrainingAndTestTree( mycuts, mycutb,"nTrain_Signal=0:nTrain_Background=0:SplitMode=Random:NormMode=NumEvents:!V" ); - //factory->PrepareTrainingAndTestTree( mycuts, mycutb,"nTrain_Signal=0:nTrain_Background=0:SplitMode=Block:NormMode=NumEvents:!V" ); - //factory->PrepareTrainingAndTestTree( mycuts, mycutb,"nTrain_Signal=0:nTrain_Background=0:SplitMode=Random:NormMode=None:!V" ); - factory->PrepareTrainingAndTestTree( "","nTrain_Signal=0:nTrain_Background=0:SplitMode=Random:NormMode=NumEvents:!V" ); - - // If no numbers of events are given, half of the events in the tree are used for training, and - // the other half for testing: - // factory->PrepareTrainingAndTestTree( mycut, "SplitMode=random:!V" ); - // To also specify the number of testing events, use: - // factory->PrepareTrainingAndTestTree( mycut, - // "NSigTrain=3000:NBkgTrain=3000:NSigTest=3000:NBkgTest=3000:SplitMode=Random:!V" ); - - // ---- Book MVA methods - // - // please lookup the various method configuration options in the corresponding cxx files, eg: - // src/MethoCuts.cxx, etc, or here: http://tmva.sourceforge.net/optionRef.html - // it is possible to preset ranges in the option string in which the cut optimisation should be done: - // "...:CutRangeMin[2]=-1:CutRangeMax[2]=1"...", where [2] is the third input variable - - // Cut optimisation - if (Use["Cuts"]) - factory->BookMethod( TMVA::Types::kCuts, "Cuts", - "!H:!V:FitMethod=MC:EffSel:SampleSize=200000:VarProp=FSmart" ); - - if (Use["CutsD"]) - factory->BookMethod( TMVA::Types::kCuts, "CutsD", - "!H:!V:FitMethod=MC:EffSel:SampleSize=200000:VarProp=FSmart:VarTransform=Decorrelate" ); - - if (Use["CutsPCA"]) - factory->BookMethod( TMVA::Types::kCuts, "CutsPCA", - "!H:!V:FitMethod=MC:EffSel:SampleSize=200000:VarProp=FSmart:VarTransform=PCA" ); - - if (Use["CutsGA"]) - factory->BookMethod( TMVA::Types::kCuts, "CutsGA", - "H:!V:FitMethod=GA:CutRangeMin[0]=-10:CutRangeMax[0]=10:VarProp[1]=FMax:EffSel:Steps=30:Cycles=3:PopSize=400:SC_steps=10:SC_rate=5:SC_factor=0.95" ); - - if (Use["CutsSA"]) - factory->BookMethod( TMVA::Types::kCuts, "CutsSA", - "!H:!V:FitMethod=SA:EffSel:MaxCalls=150000:KernelTemp=IncAdaptive:InitialTemp=1e+6:MinTemp=1e-6:Eps=1e-10:UseDefaultScale" ); - - // Likelihood - if (Use["Likelihood"]) - factory->BookMethod( TMVA::Types::kLikelihood, "Likelihood", - "H:!V:TransformOutput:PDFInterpol=Spline2:NSmoothSig[0]=20:NSmoothBkg[0]=20:NSmoothBkg[1]=10:NSmooth=1:NAvEvtPerBin=50" ); - - // test the decorrelated likelihood - if (Use["LikelihoodD"]) - factory->BookMethod( TMVA::Types::kLikelihood, "LikelihoodD", - "!H:!V:!TransformOutput:PDFInterpol=Spline2:NSmoothSig[0]=20:NSmoothBkg[0]=20:NSmooth=5:NAvEvtPerBin=50:VarTransform=Decorrelate" ); - - if (Use["LikelihoodPCA"]) - factory->BookMethod( TMVA::Types::kLikelihood, "LikelihoodPCA", - "!H:!V:!TransformOutput:PDFInterpol=Spline2:NSmoothSig[0]=20:NSmoothBkg[0]=20:NSmooth=5:NAvEvtPerBin=50:VarTransform=PCA" ); - - // test the new kernel density estimator - if (Use["LikelihoodKDE"]) - factory->BookMethod( TMVA::Types::kLikelihood, "LikelihoodKDE", - "!H:!V:!TransformOutput:PDFInterpol=KDE:KDEtype=Gauss:KDEiter=Adaptive:KDEFineFactor=0.3:KDEborder=None:NAvEvtPerBin=50" ); - - // test the mixed splines and kernel density estimator (depending on which variable) - if (Use["LikelihoodMIX"]) - factory->BookMethod( TMVA::Types::kLikelihood, "LikelihoodMIX", - "!H:!V:!TransformOutput:PDFInterpolSig[0]=KDE:PDFInterpolBkg[0]=KDE:PDFInterpolSig[1]=KDE:PDFInterpolBkg[1]=KDE:PDFInterpolSig[2]=Spline2:PDFInterpolBkg[2]=Spline2:PDFInterpolSig[3]=Spline2:PDFInterpolBkg[3]=Spline2:KDEtype=Gauss:KDEiter=Nonadaptive:KDEborder=None:NAvEvtPerBin=50" ); - - // test the multi-dimensional probability density estimator - // here are the options strings for the MinMax and RMS methods, respectively: - // "!H:!V:VolumeRangeMode=MinMax:DeltaFrac=0.2:KernelEstimator=Gauss:GaussSigma=0.3" ); - // "!H:!V:VolumeRangeMode=RMS:DeltaFrac=3:KernelEstimator=Gauss:GaussSigma=0.3" ); - if (Use["PDERS"]) - factory->BookMethod( TMVA::Types::kPDERS, "PDERS", - "!H:!V:NormTree=T:VolumeRangeMode=Adaptive:KernelEstimator=Gauss:GaussSigma=0.3:NEventsMin=400:NEventsMax=600" ); - - if (Use["PDERSkNN"]) - factory->BookMethod( TMVA::Types::kPDERS, "PDERSkNN", - "!H:!V:VolumeRangeMode=kNN:KernelEstimator=Gauss:GaussSigma=0.3:NEventsMin=400:NEventsMax=600" ); - - if (Use["PDERSD"]) - factory->BookMethod( TMVA::Types::kPDERS, "PDERSD", - "!H:!V:VolumeRangeMode=Adaptive:KernelEstimator=Gauss:GaussSigma=0.3:NEventsMin=400:NEventsMax=600:VarTransform=Decorrelate" ); - - if (Use["PDERSPCA"]) - factory->BookMethod( TMVA::Types::kPDERS, "PDERSPCA", - "!H:!V:VolumeRangeMode=Adaptive:KernelEstimator=Gauss:GaussSigma=0.3:NEventsMin=400:NEventsMax=600:VarTransform=PCA" ); - - // Multi-dimensional likelihood estimator using self-adapting phase-space binning - if (Use["PDEFoam"]) - factory->BookMethod( TMVA::Types::kPDEFoam, "PDEFoam", - "H:!V:SigBgSeparate=F:TailCut=0.001:VolFrac=0.0333:nActiveCells=500:nSampl=2000:nBin=5:CutNmin=T:Nmin=100:Kernel=None:Compress=T" ); - - // K-Nearest Neighbour classifier (KNN) - if (Use["KNN"]) - factory->BookMethod( TMVA::Types::kKNN, "KNN", - "H:nkNN=20:ScaleFrac=0.8:SigmaFact=1.0:Kernel=Gaus:UseKernel=F:UseWeight=T:!Trim" ); - // H-Matrix (chi2-squared) method - if (Use["HMatrix"]) - factory->BookMethod( TMVA::Types::kHMatrix, "HMatrix", "!H:!V" ); - - // Fisher discriminant - if (Use["Fisher"]) - factory->BookMethod( TMVA::Types::kFisher, "Fisher", "H:!V:Fisher:CreateMVAPdfs:PDFInterpolMVAPdf=Spline2:NbinsMVAPdf=60:NsmoothMVAPdf=10" ); - - // Fisher with Gauss-transformed input variables - if (Use["FisherG"]) - factory->BookMethod( TMVA::Types::kFisher, "FisherG", "H:!V:VarTransform=Gauss" ); - - // Composite classifier: ensemble (tree) of boosted Fisher classifiers - if (Use["BoostedFisher"]) - factory->BookMethod( TMVA::Types::kFisher, "BoostedFisher", "H:!V:Boost_Num=20:Boost_Transform=log:Boost_Type=AdaBoost:Boost_AdaBoostBeta=0.2"); - - // Linear discriminant (same as Fisher) - if (Use["LD"]) - factory->BookMethod( TMVA::Types::kLD, "LD", "H:!V:VarTransform=None" ); - - // Function discrimination analysis (FDA) -- test of various fitters - the recommended one is Minuit (or GA or SA) - if (Use["FDA_MC"]) - factory->BookMethod( TMVA::Types::kFDA, "FDA_MC", - "H:!V:Formula=(0)+(1)*x0+(2)*x1+(3)*x2+(4)*x3:ParRanges=(-1,1);(-10,10);(-10,10);(-10,10);(-10,10):FitMethod=MC:SampleSize=100000:Sigma=0.1" ); - - if (Use["FDA_GA"]) // can also use Simulated Annealing (SA) algorithm (see Cuts_SA options]) - factory->BookMethod( TMVA::Types::kFDA, "FDA_GA", - "H:!V:Formula=(0)+(1)*x0+(2)*x1+(3)*x2+(4)*x3:ParRanges=(-1,1);(-10,10);(-10,10);(-10,10);(-10,10):FitMethod=GA:PopSize=300:Cycles=3:Steps=20:Trim=True:SaveBestGen=1" ); - - if (Use["FDA_SA"]) // can also use Simulated Annealing (SA) algorithm (see Cuts_SA options]) - factory->BookMethod( TMVA::Types::kFDA, "FDA_SA", - "H:!V:Formula=(0)+(1)*x0+(2)*x1+(3)*x2+(4)*x3:ParRanges=(-1,1);(-10,10);(-10,10);(-10,10);(-10,10):FitMethod=SA:MaxCalls=15000:KernelTemp=IncAdaptive:InitialTemp=1e+6:MinTemp=1e-6:Eps=1e-10:UseDefaultScale" ); - - if (Use["FDA_MT"]) - factory->BookMethod( TMVA::Types::kFDA, "FDA_MT", - "H:!V:Formula=(0)+(1)*x0+(2)*x1+(3)*x2+(4)*x3:ParRanges=(-1,1);(-10,10);(-10,10);(-10,10);(-10,10):FitMethod=MINUIT:ErrorLevel=1:PrintLevel=-1:FitStrategy=2:UseImprove:UseMinos:SetBatch" ); - - if (Use["FDA_GAMT"]) - factory->BookMethod( TMVA::Types::kFDA, "FDA_GAMT", - "H:!V:Formula=(0)+(1)*x0+(2)*x1+(3)*x2+(4)*x3:ParRanges=(-1,1);(-10,10);(-10,10);(-10,10);(-10,10):FitMethod=GA:Converger=MINUIT:ErrorLevel=1:PrintLevel=-1:FitStrategy=0:!UseImprove:!UseMinos:SetBatch:Cycles=1:PopSize=5:Steps=5:Trim" ); - - if (Use["FDA_MCMT"]) - factory->BookMethod( TMVA::Types::kFDA, "FDA_MCMT", - "H:!V:Formula=(0)+(1)*x0+(2)*x1+(3)*x2+(4)*x3:ParRanges=(-1,1);(-10,10);(-10,10);(-10,10);(-10,10):FitMethod=MC:Converger=MINUIT:ErrorLevel=1:PrintLevel=-1:FitStrategy=0:!UseImprove:!UseMinos:SetBatch:SampleSize=20" ); - - // TMVA ANN: MLP (recommended ANN) -- all ANNs in TMVA are Multilayer Perceptrons - if (Use["MLP"]){ - //factory->BookMethod( TMVA::Types::kMLP, "MLP", "H:!V:NeuronType=tanh:VarTransform=N:NCycles=600:HiddenLayers=N+5:TestRate=5" ); - //factory->BookMethod( TMVA::Types::kMLP, "MLP (HiddenLayers:1)", "H:!V:NeuronType=tanh:VarTransform=N:NCycles=500:HiddenLayers=1:TestRate=10" ); - //factory->BookMethod( TMVA::Types::kMLP, "MLP (HiddenLayers:5)", "H:!V:NeuronType=tanh:VarTransform=N:NCycles=500:HiddenLayers=5:TestRate=10" ); - //factory->BookMethod( TMVA::Types::kMLP, "MLP (HiddenLayers:10)","H:!V:NeuronType=tanh:VarTransform=N:NCycles=500:HiddenLayers=10:TestRate=10" ); - //factory->BookMethod( TMVA::Types::kMLP, "MLP (HiddenLayers:15)","H:!V:NeuronType=tanh:VarTransform=N:NCycles=500:HiddenLayers=15:TestRate=10" ); - factory->BookMethod( TMVA::Types::kMLP, "MLP (HL:N+1,N)","H:!V:NeuronType=tanh:VarTransform=N:NCycles=500:HiddenLayers=N+1,N:TestRate=10" ); - } - if (Use["MLPBFGS"]) - factory->BookMethod( TMVA::Types::kMLP, "MLPBFGS", "H:!V:NeuronType=tanh:VarTransform=N:NCycles=600:HiddenLayers=N+5:TestRate=5:TrainingMethod=BFGS" ); - - - // CF(Clermont-Ferrand)ANN - if (Use["CFMlpANN"]) - factory->BookMethod( TMVA::Types::kCFMlpANN, "CFMlpANN", "!H:!V:NCycles=2000:HiddenLayers=N+1,N" ); // n_cycles:#nodes:#nodes:... - - // Tmlp(Root)ANN - if (Use["TMlpANN"]) - factory->BookMethod( TMVA::Types::kTMlpANN, "TMlpANN", "!H:!V:NCycles=200:HiddenLayers=N+1,N:LearningMethod=BFGS:ValidationFraction=0.3" ); // n_cycles:#nodes:#nodes:... - - // Support Vector Machine - if (Use["SVM"]) - factory->BookMethod( TMVA::Types::kSVM, "SVM", "Gamma=0.25:Tol=0.001:VarTransform=Norm" ); - - // Boosted Decision Trees - if (Use["BDTG"]) // Gradient Boost - factory->BookMethod( TMVA::Types::kBDT, "BDTG", - "!H:!V:NTrees=1000:BoostType=Grad:Shrinkage=0.30:UseBaggedGrad:GradBaggingFraction=0.6:SeparationType=GiniIndex:nCuts=20:NNodesMax=5" ); - - if (Use["BDT"]){ // Adaptive Boost - factory->BookMethod( TMVA::Types::kBDT,"BDT"+suffix, - "!H:!V:NTrees=400:nEventsMin=40:MaxDepth=3:BoostType=AdaBoost:SeparationType=GiniIndex:nCuts=20:PruneMethod=NoPruning" ); - //factory->BookMethod( TMVA::Types::kBDT,"BDT (NTrees:400, Min #evts:40, Depth:3)", - // "!H:!V:NTrees=400:nEventsMin=40:MaxDepth=3:BoostType=AdaBoost:SeparationType=GiniIndex:nCuts=20:PruneMethod=NoPruning" ); - //factory->BookMethod( TMVA::Types::kBDT,"BDT (NTrees:800, Min #evts:400, Depth:3)", - // "!H:!V:NTrees=800:nEventsMin=400:MaxDepth=3:BoostType=AdaBoost:SeparationType=GiniIndex:nCuts=20:PruneMethod=NoPruning" ); - //factory->BookMethod( TMVA::Types::kBDT,"BDT (NTrees:800, Min #evts:40, Depth:3)", - // "!H:!V:NTrees=800:nEventsMin=40:MaxDepth=3:BoostType=AdaBoost:SeparationType=GiniIndex:nCuts=20:PruneMethod=NoPruning" ); - } - if (Use["BDTB"]) // Bagging - factory->BookMethod( TMVA::Types::kBDT, "BDTB", - "!H:!V:NTrees=400:BoostType=Bagging:SeparationType=GiniIndex:nCuts=20:PruneMethod=NoPruning" ); - - if (Use["BDTD"]) // Decorrelation + Adaptive Boost - factory->BookMethod( TMVA::Types::kBDT, "BDTD", - "!H:!V:NTrees=400:nEventsMin=40:MaxDepth=3:BoostType=AdaBoost:SeparationType=GiniIndex:nCuts=20:PruneMethod=NoPruning:VarTransform=Decorrelate" ); - - // RuleFit -- TMVA implementation of Friedman's method - if (Use["RuleFit"]) - factory->BookMethod( TMVA::Types::kRuleFit, "RuleFit", - "H:!V:RuleFitModule=RFTMVA:Model=ModRuleLinear:MinImp=0.001:RuleMinDist=0.001:NTrees=20:fEventsMin=0.01:fEventsMax=0.5:GDTau=-1.0:GDTauPrec=0.01:GDStep=0.01:GDNSteps=10000:GDErrScale=1.02" ); - - // -------------------------------------------------------------------------------------------------- - - // As an example how to use the ROOT plugin mechanism, book BDT via - // plugin mechanism - if (Use["Plugin"]) { - // - // first the plugin has to be defined, which can happen either through the following line in the local or global .rootrc: - // - // # plugin handler plugin name(regexp) class to be instanciated library constructor format - // Plugin.TMVA@@MethodBase: ^BDT TMVA::MethodBDT TMVA.1 "MethodBDT(TString,TString,DataSet&,TString)" - // - // or by telling the global plugin manager directly - gPluginMgr->AddHandler("TMVA@@MethodBase", "BDT", "TMVA::MethodBDT", "TMVA.1", "MethodBDT(TString,TString,DataSet&,TString)"); - factory->BookMethod( TMVA::Types::kPlugins, "BDT", - "!H:!V:NTrees=400:BoostType=AdaBoost:SeparationType=GiniIndex:nCuts=20:PruneMethod=CostComplexity:PruneStrength=50" ); - } - - // -------------------------------------------------------------------------------------------------- - - // ---- Now you can tell the factory to train, test, and evaluate the MVAs - - // Train MVAs using the set of training events - factory->TrainAllMethodsForClassification(); - - // ---- Evaluate all MVAs using the set of test events - factory->TestAllMethods(); - - // ----- Evaluate and compare performance of all configured MVAs - factory->EvaluateAllMethods(); - - // -------------------------------------------------------------- - - // Save the output - outputFile->Close(); - - std::cout << "==> Wrote root file: " << outputFile->GetName() << std::endl; - std::cout << "==> TMVAClassification is done!" << std::endl; - - delete factory; - - // Launch the GUI for the root macros - if (!gROOT->IsBatch()) TMVAGui( outfileName ); -} diff --git a/MVA/TMVAClassification_C.d b/MVA/TMVAClassification_C.d deleted file mode 100644 index 906cd5a..0000000 --- a/MVA/TMVAClassification_C.d +++ /dev/null @@ -1,90 +0,0 @@ - -# DO NOT DELETE - -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TChain.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TTree.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TBranch.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TNamed.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TObject.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/Rtypes.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/RConfig.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/RVersion.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/DllImport.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/Rtypeinfo.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/snprintf.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/strlcpy.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TGenericClassInfo.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TSchemaHelper.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TStorage.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TVersionCheck.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/Riosfwd.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TBuffer.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TString.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TMathBase.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TObjArray.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TSeqCollection.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TCollection.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TIterator.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TAttFill.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TDataType.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TDictionary.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/Property.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TAttLine.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TAttMarker.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TArrayD.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TArray.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TArrayI.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TClass.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TObjString.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TVirtualTreePlayer.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TClonesArray.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TFile.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TDirectoryFile.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TDirectory.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TList.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TDatime.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TUUID.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TMap.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/THashTable.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TUrl.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TSystem.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TInetAddress.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TTimer.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TSysEvtHandler.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TQObject.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TTime.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TROOT.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TPluginManager.h -./TMVAClassification_C.so: ../../TopTreeAnalysisBase/TMVA/macros/TMVAGui.C -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TKey.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TControlBar.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TControlBarButton.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TControlBarImp.h -./TMVAClassification_C.so: ../../TopTreeAnalysisBase/TMVA/macros/tmvaglob.C -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TPad.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TVirtualPad.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TAttPad.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TVirtualX.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TAttText.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/GuiTypes.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/Buttons.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TCanvas.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TAttCanvas.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TCanvasImp.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TColor.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TImage.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TAttImage.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TVectorDfwd.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TH1.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TAxis.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TAttAxis.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TArrayC.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TArrayS.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TArrayF.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/Foption.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TVectorFfwd.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TFitResultPtr.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/TStyle.h -./TMVAClassification_C.so: ../../TopTreeAnalysisBase/Content/interface/Dataset.h -./TMVAClassification_C.so: /user_mnt/user/keaveney/public/root_v5.34.05/root/include/cintdictversion.h /user_mnt/user/keaveney/public/root_v5.34.05/root/include/RVersion.h -TMVAClassification_C__ROOTBUILDVERSION= 5.34/05 diff --git a/MVA/TMVAClassification_C.so b/MVA/TMVAClassification_C.so deleted file mode 100755 index 30b2308..0000000 Binary files a/MVA/TMVAClassification_C.so and /dev/null differ diff --git a/MVA/plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c1.eps b/MVA/plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c1.eps deleted file mode 100644 index 1377391..0000000 --- a/MVA/plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c1.eps +++ /dev/null @@ -1,122 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%BoundingBox: 0 0 567 533 -%%Title: plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c1.eps: Correlation profiles for 'Id'-transformed signal variables -%%Creator: ROOT Version 5.34/05 -%%CreationDate: Tue Mar 4 15:31:13 2014 -%%EndComments -%%BeginProlog -80 dict begin -/s {stroke} def /l {lineto} def /m {moveto} def /t {translate} def -/r {rotate} def /rl {roll} def /R {repeat} def -/d {rlineto} def /rm {rmoveto} def /gr {grestore} def /f {eofill} def -/c {setrgbcolor} def /black {0 setgray} def /sd {setdash} def -/cl {closepath} def /sf {scalefont setfont} def /lw {setlinewidth} def -/box {m dup 0 exch d exch 0 d 0 exch neg d cl} def -/NC{systemdict begin initclip end}def/C{NC box clip newpath}def -/bl {box s} def /bf {box f} def /Y { 0 exch d} def /X { 0 d} def -/K {{pop pop 0 moveto} exch kshow} bind def -/ita {/ang 15 def gsave [1 0 ang dup sin exch cos div 1 0 0] concat} def -/mp {newpath /y exch def /x exch def} def -/side {[w .77 mul w .23 mul] .385 w mul sd w 0 l currentpoint t -144 r} def -/mr {mp x y w2 0 360 arc} def /m24 {mr s} def /m20 {mr f} def -/mb {mp x y w2 add m w2 neg 0 d 0 w neg d w 0 d 0 w d cl} def -/mt {mp x y w2 add m w2 neg w neg d w 0 d cl} def -/m21 {mb f} def /m25 {mb s} def /m22 {mt f} def /m26{mt s} def -/m23 {mp x y w2 sub m w2 w d w neg 0 d cl f} def -/m27 {mp x y w2 add m w3 neg w2 neg d w3 w2 neg d w3 w2 d cl s} def -/m28 {mp x w2 sub y w2 sub w3 add m w3 0 d 0 w3 neg d w3 0 d 0 w3 d w3 0 d 0 w3 d w3 neg 0 d 0 w3 d w3 neg 0 d 0 w3 neg d w3 neg 0 d cl s } def -/m29 {mp gsave x w2 sub y w2 add w3 sub m currentpoint t 4 {side} repeat cl fill gr} def -/m30 {mp gsave x w2 sub y w2 add w3 sub m currentpoint t 4 {side} repeat cl s gr} def -/m31 {mp x y w2 sub m 0 w d x w2 sub y m w 0 d x w2 sub y w2 add m w w neg d x w2 sub y w2 sub m w w d s} def -/m32 {mp x y w2 sub m w2 w d w neg 0 d cl s} def -/m33 {mp x y w2 add m w3 neg w2 neg d w3 w2 neg d w3 w2 d cl f} def -/m34 {mp x w2 sub y w2 sub w3 add m w3 0 d 0 w3 neg d w3 0 d 0 w3 d w3 0 d 0 w3 d w3 neg 0 d 0 w3 d w3 neg 0 d 0 w3 neg d w3 neg 0 d cl f } def -/m2 {mp x y w2 sub m 0 w d x w2 sub y m w 0 d s} def -/m5 {mp x w2 sub y w2 sub m w w d x w2 sub y w2 add m w w neg d s} def -/reEncode {exch findfont dup length dict begin {1 index /FID eq {pop pop} {def} ifelse } forall /Encoding exch def currentdict end dup /FontName get exch definefont pop } def [/Times-Bold /Times-Italic /Times-BoldItalic /Helvetica /Helvetica-Oblique - /Helvetica-Bold /Helvetica-BoldOblique /Courier /Courier-Oblique /Courier-Bold /Courier-BoldOblique /Times-Roman /AvantGarde-Book /AvantGarde-BookOblique /AvantGarde-Demi /AvantGarde-DemiOblique /Bookman-Demi /Bookman-DemiItalic /Bookman-Light - /Bookman-LightItalic /Helvetica-Narrow /Helvetica-Narrow-Bold /Helvetica-Narrow-BoldOblique /Helvetica-Narrow-Oblique /NewCenturySchlbk-Roman /NewCenturySchlbk-Bold /NewCenturySchlbk-BoldItalic /NewCenturySchlbk-Italic /Palatino-Bold - /Palatino-BoldItalic /Palatino-Italic /Palatino-Roman ] {ISOLatin1Encoding reEncode } forall -%%EndProlog -%%BeginSetup -%%EndSetup -newpath gsave .25 .25 scale gsave 0 0 t 0.490196 0.545098 0.615686 c[ ] 0 sd 3 lw 0.941176 0.941176 0.941176 c 2268 2130 0 0 bf 0.490196 0.545098 0.615686 c 0.941176 0.941176 0.941176 c 2222 2088 23 21 bf black 1 1 0.992157 c 1801 1578 311 322 - bf black 1801 1578 311 322 bl 1 1 0.992157 c 1801 1578 311 322 bf black 1801 1578 311 322 bl 0.49 0.6 0.82 c 0 0.733333 1 c 6 6 407 353 bf 0.386667 0 1 c 6 6 473 353 bf 6 5 353 359 bf 0 0.546666 1 c 6 5 449 359 bf 0 1 0.986667 c 6 5 467 359 bf - 0.386667 0 1 c 6 5 1169 359 bf 0 1 0.0533333 c 6 5 347 364 bf 0 1 0.986667 c 6 5 377 364 bf 0 0.733333 1 c 6 5 383 364 bf 0 1 0.986667 c 6 5 407 364 bf 0 0.546666 1 c 6 5 425 364 bf 0 0.733333 1 c 6 5 467 364 bf 0.6 1 0 c 6 5 479 364 bf 0 0.266667 1 - c 6 5 509 364 bf 0 0.733333 1 c 6 5 581 364 bf 6 5 599 364 bf 0 0.546666 1 c 6 5 605 364 bf 0 0.733333 1 c 6 5 611 364 bf 6 5 659 364 bf 0 1 0.52 c 6 5 683 364 bf 0.386667 0 1 c 6 5 713 364 bf 0 0.733333 1 c 6 5 737 364 bf 0.386667 0 1 c 6 5 905 364 - bf 0 0.733333 1 c 6 5 929 364 bf 0 1 0.986667 c 6 6 329 369 bf 0.386667 0 1 c 6 6 359 369 bf 0 0.733333 1 c 6 6 365 369 bf 6 6 401 369 bf 0 0.546666 1 c 6 6 419 369 bf 0 1 0.986667 c 6 6 425 369 bf 0 1 0.0533333 c 6 6 437 369 bf 0.88 1 0 c 6 6 455 - 369 bf 0 0.266667 1 c 6 6 485 369 bf 0 0.546666 1 c 6 6 497 369 bf 0 0.733333 1 c 6 6 533 369 bf 6 6 539 369 bf 6 6 545 369 bf 6 6 557 369 bf 0.413333 1 0 c 6 6 581 369 bf 0 0.733333 1 c 6 6 623 369 bf 0.386667 0 1 c 6 6 647 369 bf 0 0.733333 1 c 6 - 6 683 369 bf 0 1 0.986667 c 6 6 707 369 bf 0.386667 0 1 c 6 6 713 369 bf 0 0.733333 1 c 6 6 845 369 bf 0.2 0 1 c 6 6 857 369 bf 0 0.733333 1 c 6 6 923 369 bf 6 6 1145 369 bf 6 6 1295 369 bf 0 0.546666 1 c 6 5 323 375 bf 0.386667 0 1 c 6 5 341 375 bf - 0 0.733333 1 c 6 5 347 375 bf 6 5 353 375 bf 6 5 377 375 bf 0.133333 1 0 c 6 5 389 375 bf 0 0.733333 1 c 6 5 395 375 bf 0 1 0.8 c 6 5 401 375 bf 0 0.733333 1 c 6 5 407 375 bf 0 1 0.52 c 6 5 419 375 bf 0 0.733333 1 c 6 5 431 375 bf 6 5 437 375 bf 0 - 0.546666 1 c 6 5 449 375 bf 0 0.733333 1 c 6 5 461 375 bf 6 5 479 375 bf 0 0.546666 1 c 6 5 491 375 bf 0 0.733333 1 c 6 5 497 375 bf 0 0.546666 1 c 6 5 503 375 bf 0 0.733333 1 c 6 5 509 375 bf 6 5 521 375 bf 0 0.546666 1 c 6 5 539 375 bf 0 0.733333 - 1 c 6 5 581 375 bf 6 5 593 375 bf 0.386667 0 1 c 6 5 599 375 bf 6 5 629 375 bf 0 0.733333 1 c 6 5 635 375 bf 6 5 839 375 bf 6 5 1163 375 bf 6 5 329 380 bf 0 0.546666 1 c 6 5 347 380 bf 6 5 365 380 bf 0.2 0 1 c 6 5 383 380 bf 0 0.546666 1 c 6 5 389 - 380 bf 1 0 0 c 6 5 395 380 bf 0.386667 0 1 c 6 5 401 380 bf 0 0.733333 1 c 6 5 407 380 bf 6 5 419 380 bf 0.133333 1 0 c 6 5 437 380 bf 0 1 0.8 c 6 5 449 380 bf 0 1 0.986667 c 6 5 455 380 bf 0 0.546666 1 c 6 5 473 380 bf 6 5 479 380 bf 0 1 0.52 c 6 5 - 485 380 bf 0.2 0 1 c 6 5 503 380 bf 0 0.0800001 1 c 6 5 509 380 bf 0 1 0.333333 c 6 5 527 380 bf 0.386667 0 1 c 6 5 545 380 bf 0 0.733333 1 c 6 5 575 380 bf 0 0.0800001 1 c 6 5 593 380 bf 0 0.733333 1 c 6 5 629 380 bf 6 5 665 380 bf 0 0.0800001 1 c - 6 5 701 380 bf 0 0.733333 1 c 6 5 713 380 bf 6 5 743 380 bf 0 1 0.52 c 6 5 755 380 bf 0 0.266667 1 c 6 5 767 380 bf 0 0.546666 1 c 6 5 827 380 bf 0 0.733333 1 c 6 5 941 380 bf 6 5 1001 380 bf 0 0.266667 1 c 6 5 1013 380 bf 0 0.0800001 1 c 6 5 1097 - 380 bf 0 0.733333 1 c 6 5 1283 380 bf 6 5 1499 380 bf 0.386667 0 1 c 6 5 335 385 bf 0.6 1 0 c 6 5 347 385 bf 0 0.546666 1 c 6 5 353 385 bf 0 0.733333 1 c 6 5 359 385 bf 6 5 365 385 bf 6 5 383 385 bf 6 5 389 385 bf 0 1 0.333333 c 6 5 401 385 bf 0 - 0.733333 1 c 6 5 407 385 bf 0 0.266667 1 c 6 5 419 385 bf 0 1 0.0533333 c 6 5 425 385 bf 0 1 0.333333 c 6 5 431 385 bf 0.6 1 0 c 6 5 437 385 bf 0.413333 1 0 c 6 5 443 385 bf 0 1 0.0533333 c 6 5 449 385 bf 0 1 0.986667 c 6 5 461 385 bf 0 0.733333 1 c - 6 5 473 385 bf 6 5 479 385 bf 6 5 491 385 bf 6 5 503 385 bf 6 5 515 385 bf 6 5 521 385 bf 0 0.266667 1 c 6 5 533 385 bf 0 0.733333 1 c 6 5 557 385 bf 0.88 1 0 c 6 5 563 385 bf 0.386667 0 1 c 6 5 599 385 bf 0 0.733333 1 c 6 5 611 385 bf 6 5 665 385 - bf 0.386667 0 1 c 6 5 671 385 bf 0 0.733333 1 c 6 5 821 385 bf 6 5 893 385 bf 6 6 317 390 bf 6 6 335 390 bf 6 6 347 390 bf 6 6 395 390 bf 6 6 401 390 bf 0.386667 0 1 c 6 6 413 390 bf 0.2 0 1 c 6 6 437 390 bf 0 0.733333 1 c 6 6 443 390 bf 0 1 - 0.0533333 c 6 6 449 390 bf 0 0.733333 1 c 6 6 497 390 bf 0 1 0.52 c 6 6 503 390 bf 0 0.733333 1 c 6 6 557 390 bf 6 6 581 390 bf 6 6 587 390 bf 0.386667 0 1 c 6 6 599 390 bf 0 0.266667 1 c 6 6 605 390 bf 0.133333 1 0 c 6 6 617 390 bf 0 1 0.52 c 6 6 - 665 390 bf 0 0.546666 1 c 6 6 725 390 bf 0 1 0.52 c 6 6 749 390 bf 6 6 761 390 bf 0 0.733333 1 c 6 6 767 390 bf 6 6 809 390 bf 6 6 815 390 bf 6 6 1235 390 bf 6 6 1691 390 bf 6 5 401 396 bf 6 5 425 396 bf 0.133333 1 0 c 6 5 443 396 bf 0 0.733333 1 c - 6 5 449 396 bf 6 5 461 396 bf 0 1 0.52 c 6 5 497 396 bf 0 1 0.0533333 c 6 5 527 396 bf 0 0.733333 1 c 6 5 539 396 bf 6 5 551 396 bf 6 5 587 396 bf 0.386667 0 1 c 6 5 611 396 bf 0 0.0800001 1 c 6 5 623 396 bf 0 0.733333 1 c 6 5 629 396 bf 6 5 683 396 - bf 6 5 743 396 bf 0 1 0.52 c 6 5 431 401 bf 0 0.733333 1 c 6 5 461 401 bf 0 1 0.986667 c 6 5 467 401 bf 0 0.733333 1 c 6 5 563 401 bf 6 5 617 401 bf 6 5 851 401 bf 6 5 1025 401 bf 0.386667 0 1 c 6 5 401 406 bf 0 0.733333 1 c 6 5 443 406 bf 0 - 0.546666 1 c 6 5 485 406 bf 0 0.733333 1 c 6 5 521 406 bf 0.386667 0 1 c 6 5 689 406 bf 0 0.733333 1 c 6 5 755 406 bf 0.386667 0 1 c 6 5 773 406 bf 0 0.733333 1 c 6 5 827 406 bf 6 6 413 411 bf 0 0.0800001 1 c 6 6 473 411 bf 0 1 0.52 c 6 6 479 411 bf - 0 0.266667 1 c 6 6 509 411 bf 0 1 0.52 c 6 6 575 411 bf 0.386667 0 1 c 6 6 593 411 bf 0 1 0.52 c 6 6 599 411 bf 0.386667 0 1 c 6 6 611 411 bf 0 0.733333 1 c 6 6 623 411 bf 0 0.546666 1 c 6 6 647 411 bf 0 0.733333 1 c 6 6 653 411 bf 0 0.546666 1 c 6 - 6 695 411 bf 0 0.733333 1 c 6 6 743 411 bf 6 6 779 411 bf 6 6 917 411 bf 0 1 0.52 c 6 6 1013 411 bf 0.2 0 1 c 6 6 1463 411 bf 0 0.733333 1 c 6 5 329 417 bf 0 0.266667 1 c 6 5 377 417 bf 0 0.546666 1 c 6 5 401 417 bf 0 0.733333 1 c 6 5 479 417 bf 6 5 - 569 417 bf 0.386667 0 1 c 6 5 1025 417 bf 0 0.733333 1 c 6 5 1055 417 bf 6 5 545 422 bf 6 5 677 422 bf 0 1 0.52 c 6 5 731 422 bf 0 0.733333 1 c 6 5 737 422 bf 6 5 761 422 bf 0 0.546666 1 c 6 5 779 422 bf 0 1 0.52 c 6 5 317 427 bf 0.2 0 1 c 6 5 389 - 427 bf 0 0.733333 1 c 6 5 395 427 bf 6 5 455 427 bf 6 5 461 427 bf 0 0.546666 1 c 6 5 503 427 bf 0 0.733333 1 c 6 5 527 427 bf 0.2 0 1 c 6 5 593 427 bf 0 0.733333 1 c 6 5 767 427 bf 0.386667 0 1 c 6 5 785 427 bf 0 0.733333 1 c 6 5 803 427 bf 6 6 383 - 432 bf 6 6 557 432 bf 0 0.0800001 1 c 6 5 449 438 bf 0 0.733333 1 c 6 5 491 438 bf 6 5 641 438 bf 0 1 0.986667 c 6 5 701 438 bf 0 0.733333 1 c 6 5 791 438 bf 0 0.0800001 1 c 6 5 377 443 bf 0 0.733333 1 c 6 5 449 443 bf 0 0.266667 1 c 6 5 1175 443 bf - 0 0.0800001 1 c 6 5 335 448 bf 0 1 0.52 c 6 5 389 448 bf 0 0.733333 1 c 6 5 461 448 bf 0 1 0.52 c 6 5 545 448 bf 0.386667 0 1 c 6 5 875 448 bf 0 0.0800001 1 c 6 6 431 453 bf 0 0.733333 1 c 6 6 845 453 bf 0 0.266667 1 c 6 6 1013 453 bf 0 0.733333 1 c - 6 5 371 459 bf 6 5 401 459 bf 6 5 467 459 bf 0 1 0.986667 c 6 5 473 459 bf 0.2 0 1 c 6 5 545 459 bf 0 0.733333 1 c 6 5 473 464 bf 0.2 0 1 c 6 5 533 469 bf 0 1 0.52 c 6 5 623 469 bf 0 0.266667 1 c 6 5 707 469 bf 0.386667 0 1 c 6 6 587 474 bf 0 - 0.733333 1 c 6 6 893 474 bf 6 5 641 480 bf 6 5 1109 480 bf 0.2 0 1 c 6 5 485 485 bf 0 0.0800001 1 c 6 5 569 485 bf 0 0.266667 1 c 6 5 605 485 bf 0 0.0800001 1 c 6 5 923 485 bf 0 0.733333 1 c 6 6 641 490 bf 0 1 0.52 c 6 6 875 490 bf 0 0.733333 1 c 6 - 6 953 490 bf 6 5 827 496 bf 6 5 1091 496 bf 0 1 0.986667 c 6 5 521 501 bf 0 0.733333 1 c 6 6 515 511 bf 0.386667 0 1 c 6 6 1968 511 bf 0 1 0.52 c 6 5 635 527 bf 0 0.733333 1 c 6 6 767 532 bf 0.386667 0 1 c 6 6 1277 532 bf 0 0.733333 1 c 6 5 773 543 - bf 0 0.266667 1 c 6 5 1013 559 bf 0 0.0800001 1 c 6 5 917 569 bf 6 5 533 580 bf 0 0.546666 1 c 6 6 665 595 bf 0 0.733333 1 c 6 5 437 801 bf 6 5 1097 811 bf 0.49 0.6 0.82 c black 311 322 m 1801 X s - gsave 2222 2088 23 21 C 1574.8 62.9921 t 0 r /Helvetica findfont 103.237 sf 0 0 m (MET [GeV]) show NC gr 613 373 m -51 Y s 673 347 m -25 Y s 734 347 m -25 Y s 795 347 m -25 Y s 855 347 m -25 Y s 916 373 m -51 Y s 976 347 m -25 Y s 1037 347 m -25 - Y s 1098 347 m -25 Y s 1158 347 m -25 Y s 1219 373 m -51 Y s 1279 347 m -25 Y s 1340 347 m -25 Y s 1400 347 m -25 Y s 1461 347 m -25 Y s 1522 373 m -51 Y s 1582 347 m -25 Y s 1643 347 m -25 Y s 1703 347 m -25 Y s 1764 347 m -25 Y s 1825 373 m -51 Y - s 613 373 m -51 Y s 552 347 m -25 Y s 492 347 m -25 Y s 431 347 m -25 Y s 370 347 m -25 Y s 1825 373 m -51 Y s 1885 347 m -25 Y s 1946 347 m -25 Y s 2006 347 m -25 Y s 2067 347 m -25 Y s - gsave 2222 2088 23 21 C 561.203 217.609 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (50) show NC gr - gsave 2222 2088 23 21 C 836.077 217.609 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (100) show NC gr - gsave 2222 2088 23 21 C 1139.58 217.609 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (150) show NC gr - gsave 2222 2088 23 21 C 1443.09 217.609 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (200) show NC gr - gsave 2222 2088 23 21 C 1746.6 217.609 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (250) show NC gr 311 1900 m 1801 X s 613 1849 m 51 Y s 673 1875 m 25 Y s 734 1875 m 25 Y s 795 1875 m 25 Y s 855 1875 m 25 Y s 916 1849 m 51 Y s 976 1875 m 25 Y s - 1037 1875 m 25 Y s 1098 1875 m 25 Y s 1158 1875 m 25 Y s 1219 1849 m 51 Y s 1279 1875 m 25 Y s 1340 1875 m 25 Y s 1400 1875 m 25 Y s 1461 1875 m 25 Y s 1522 1849 m 51 Y s 1582 1875 m 25 Y s 1643 1875 m 25 Y s 1703 1875 m 25 Y s 1764 1875 m 25 Y s - 1825 1849 m 51 Y s 613 1849 m 51 Y s 552 1875 m 25 Y s 492 1875 m 25 Y s 431 1875 m 25 Y s 370 1875 m 25 Y s 1825 1849 m 51 Y s 1885 1875 m 25 Y s 1946 1875 m 25 Y s 2006 1875 m 25 Y s 2067 1875 m 25 Y s 311 322 m 1578 Y s - gsave 2222 2088 23 21 C 103.078 658.554 t 90 r /Helvetica findfont 103.237 sf 0 0 m (InvMass_FCNC_top [GeV]) show NC gr 361 586 m -50 X s 336 648 m -25 X s 336 710 m -25 X s 336 771 m -25 X s 336 833 m -25 X s 361 895 m -50 X s 336 957 m -25 X s - 336 1019 m -25 X s 336 1081 m -25 X s 336 1142 m -25 X s 361 1204 m -50 X s 336 1266 m -25 X s 336 1328 m -25 X s 336 1390 m -25 X s 336 1452 m -25 X s 361 1513 m -50 X s 336 1575 m -25 X s 336 1637 m -25 X s 336 1699 m -25 X s 336 1761 m -25 X s - 361 1823 m -50 X s 361 586 m -50 X s 336 524 m -25 X s 336 462 m -25 X s 336 400 m -25 X s 336 338 m -25 X s 361 1823 m -50 X s 336 1885 m -25 X s - gsave 2222 2088 23 21 C 131.711 555.476 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (500) show NC gr - gsave 2222 2088 23 21 C 80.1718 864.71 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (1000) show NC gr - gsave 2222 2088 23 21 C 80.1718 1173.94 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (1500) show NC gr - gsave 2222 2088 23 21 C 80.1718 1483.18 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (2000) show NC gr - gsave 2222 2088 23 21 C 80.1718 1792.41 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (2500) show NC gr 2112 322 m 1578 Y s 2061 586 m 51 X s 2086 648 m 26 X s 2086 710 m 26 X s 2086 771 m 26 X s 2086 833 m 26 X s 2061 895 m 51 X s 2086 957 m 26 X s - 2086 1019 m 26 X s 2086 1081 m 26 X s 2086 1142 m 26 X s 2061 1204 m 51 X s 2086 1266 m 26 X s 2086 1328 m 26 X s 2086 1390 m 26 X s 2086 1452 m 26 X s 2061 1513 m 51 X s 2086 1575 m 26 X s 2086 1637 m 26 X s 2086 1699 m 26 X s 2086 1761 m 26 X s - 2061 1823 m 51 X s 2061 586 m 51 X s 2086 524 m 26 X s 2086 462 m 26 X s 2086 400 m 26 X s 2086 338 m 26 X s 2061 1823 m 51 X s 2086 1885 m 26 X s 1 0 0 c 0.81 0.37 0.38 c 1 0 0 c 333 385 m 5 Y s 333 390 m 5 Y s 311 390 m 22 X s 333 390 m 23 X s 322 - 385 m 23 X s 322 395 m 23 X s 311 379 m 23 Y s 356 379 m 23 Y s /w 2 def /w2 {w 2 div} def /w3 {w 3 div} def 333 390 m20 378 389 m 5 Y s 378 394 m 5 Y s 356 394 m 22 X s 378 394 m 23 X s 367 389 m 23 X s 367 399 m 23 X s 356 383 m 23 Y s 401 383 m - 23 Y s 378 394 m20 423 388 m 10 Y s 423 398 m 10 Y s 401 398 m 22 X s 423 398 m 23 X s 412 388 m 23 X s 412 408 m 23 X s 401 387 m 22 Y s 446 387 m 22 Y s 423 398 m20 468 394 m 4 Y s 468 398 m 3 Y s 446 398 m 22 X s 468 398 m 23 X s 457 394 m 23 X s - 457 401 m 23 X s 446 386 m 23 Y s 491 386 m 23 Y s 468 398 m20 513 395 m 7 Y s 513 402 m 6 Y s 491 402 m 22 X s 513 402 m 23 X s 502 395 m 23 X s 502 408 m 23 X s 491 390 m 23 Y s 536 390 m 23 Y s 513 402 m20 558 401 m 8 Y s 558 409 m 8 Y s 536 409 - m 22 X s 558 409 m 23 X s 547 401 m 23 X s 547 417 m 23 X s 536 398 m 22 Y s 581 398 m 22 Y s 558 409 m20 603 391 m 6 Y s 603 397 m 7 Y s 581 397 m 22 X s 603 397 m 23 X s 592 391 m 23 X s 592 404 m 23 X s 581 386 m 23 Y s 626 386 m 23 Y s 603 397 - m20 648 414 m 15 Y s 648 429 m 15 Y s 626 429 m 22 X s 648 429 m 23 X s 637 414 m 23 X s 637 444 m 23 X s 626 417 m 23 Y s 671 417 m 23 Y s 648 429 m20 693 389 m 10 Y s 693 399 m 11 Y s 671 399 m 22 X s 693 399 m 23 X s 682 389 m 23 X s 682 410 m 23 - X s 671 388 m 23 Y s 716 388 m 23 Y s 693 399 m20 738 393 m 5 Y s 738 398 m 4 Y s 716 398 m 22 X s 738 398 m 23 X s 727 393 m 23 X s 727 402 m 23 X s 716 386 m 23 Y s 761 386 m 23 Y s 738 398 m20 783 424 m 14 Y s 783 438 m 15 Y s 761 438 m 22 X s - 783 438 m 23 X s 772 424 m 23 X s 772 453 m 23 X s 761 427 m 23 Y s 806 427 m 23 Y s 783 438 m20 828 394 m 13 Y s 828 407 m 12 Y s 806 407 m 22 X s 828 407 m 23 X s 817 394 m 23 X s 817 419 m 23 X s 806 395 m 23 Y s 851 395 m 23 Y s 828 407 m20 874 - 437 m 20 Y s 874 457 m 20 Y s 851 457 m 23 X s 874 457 m 22 X s 862 437 m 23 X s 862 477 m 23 X s 851 446 m 23 Y s 896 446 m 23 Y s 874 457 m20 919 387 m 26 Y s 919 413 m 27 Y s 896 413 m 23 X s 919 413 m 22 X s 907 387 m 23 X s 907 440 m 23 X s 896 - 402 m 23 Y s 941 402 m 23 Y s 919 413 m20 964 397 m 38 Y s 964 435 m 38 Y s 941 435 m 23 X s 964 435 m 22 X s 952 397 m 23 X s 952 473 m 23 X s 941 424 m 23 Y s 986 424 m 23 Y s 964 435 m20 1009 403 m 20 Y s 1009 423 m 21 Y s 986 423 m 23 X s 1009 - 423 m 22 X s 997 403 m 23 X s 997 444 m 23 X s 986 412 m 23 Y s 1031 412 m 23 Y s 1009 423 m20 1031 417 m 23 X s 1054 417 m 22 X s 1031 405 m 23 Y s 1076 405 m 23 Y s 1054 417 m20 1099 487 m 79 Y s 1099 566 m 80 Y s 1076 566 m 23 X s 1099 566 m 22 X - s 1087 487 m 23 X s 1087 646 m 23 X s 1076 555 m 23 Y s 1121 555 m 23 Y s 1099 566 m20 1121 374 m 23 X s 1144 374 m 22 X s 1121 363 m 23 Y s 1166 363 m 23 Y s 1144 374 m20 1189 378 m 24 Y s 1189 402 m 24 Y s 1166 402 m 23 X s 1189 402 m 22 X s 1177 - 378 m 23 X s 1177 426 m 23 X s 1166 391 m 23 Y s 1211 391 m 23 Y s 1189 402 m20 1211 395 m 23 X s 1234 395 m 22 X s 1211 383 m 23 Y s 1256 383 m 23 Y s 1234 395 m20 1279 371 m 10 Y s 1279 381 m 11 Y s 1256 381 m 23 X s 1279 381 m 22 X s 1267 371 m - 23 X s 1267 392 m 23 X s 1256 370 m 23 Y s 1301 370 m 23 Y s 1279 381 m20 1436 415 m 23 X s 1459 415 m 22 X s 1436 404 m 23 Y s 1481 404 m 23 Y s 1459 415 m20 1504 385 m s 1504 385 m s 1481 385 m 23 X s 1504 385 m 22 X s 1492 385 m 23 X s 1492 385 m - 23 X s 1481 373 m 23 Y s 1526 373 m 23 Y s 1504 385 m20 1661 394 m 23 X s 1684 394 m 22 X s 1661 383 m 22 Y s 1706 383 m 22 Y s 1684 394 m20 1932 512 m 22 X s 1954 512 m 23 X s 1932 501 m 23 Y s 1977 501 m 23 Y s 1954 512 m20 black 311 322 m 1801 X - s 613 373 m -51 Y s 673 347 m -25 Y s 734 347 m -25 Y s 795 347 m -25 Y s 855 347 m -25 Y s 916 373 m -51 Y s 976 347 m -25 Y s 1037 347 m -25 Y s 1098 347 m -25 Y s 1158 347 m -25 Y s 1219 373 m -51 Y s 1279 347 m -25 Y s 1340 347 m -25 Y s 1400 - 347 m -25 Y s 1461 347 m -25 Y s 1522 373 m -51 Y s 1582 347 m -25 Y s 1643 347 m -25 Y s 1703 347 m -25 Y s 1764 347 m -25 Y s 1825 373 m -51 Y s 613 373 m -51 Y s 552 347 m -25 Y s 492 347 m -25 Y s 431 347 m -25 Y s 370 347 m -25 Y s 1825 373 m - -51 Y s 1885 347 m -25 Y s 1946 347 m -25 Y s 2006 347 m -25 Y s 2067 347 m -25 Y s 311 1900 m 1801 X s 613 1849 m 51 Y s 673 1875 m 25 Y s 734 1875 m 25 Y s 795 1875 m 25 Y s 855 1875 m 25 Y s 916 1849 m 51 Y s 976 1875 m 25 Y s 1037 1875 m 25 Y s - 1098 1875 m 25 Y s 1158 1875 m 25 Y s 1219 1849 m 51 Y s 1279 1875 m 25 Y s 1340 1875 m 25 Y s 1400 1875 m 25 Y s 1461 1875 m 25 Y s 1522 1849 m 51 Y s 1582 1875 m 25 Y s 1643 1875 m 25 Y s 1703 1875 m 25 Y s 1764 1875 m 25 Y s 1825 1849 m 51 Y s - 613 1849 m 51 Y s 552 1875 m 25 Y s 492 1875 m 25 Y s 431 1875 m 25 Y s 370 1875 m 25 Y s 1825 1849 m 51 Y s 1885 1875 m 25 Y s 1946 1875 m 25 Y s 2006 1875 m 25 Y s 2067 1875 m 25 Y s 311 322 m 1578 Y s 361 586 m -50 X s 336 648 m -25 X s 336 710 m - -25 X s 336 771 m -25 X s 336 833 m -25 X s 361 895 m -50 X s 336 957 m -25 X s 336 1019 m -25 X s 336 1081 m -25 X s 336 1142 m -25 X s 361 1204 m -50 X s 336 1266 m -25 X s 336 1328 m -25 X s 336 1390 m -25 X s 336 1452 m -25 X s 361 1513 m -50 X - s 336 1575 m -25 X s 336 1637 m -25 X s 336 1699 m -25 X s 336 1761 m -25 X s 361 1823 m -50 X s 361 586 m -50 X s 336 524 m -25 X s 336 462 m -25 X s 336 400 m -25 X s 336 338 m -25 X s 361 1823 m -50 X s 336 1885 m -25 X s 2112 322 m 1578 Y s 2061 - 586 m 51 X s 2086 648 m 26 X s 2086 710 m 26 X s 2086 771 m 26 X s 2086 833 m 26 X s 2061 895 m 51 X s 2086 957 m 26 X s 2086 1019 m 26 X s 2086 1081 m 26 X s 2086 1142 m 26 X s 2061 1204 m 51 X s 2086 1266 m 26 X s 2086 1328 m 26 X s 2086 1390 m 26 - X s 2086 1452 m 26 X s 2061 1513 m 51 X s 2086 1575 m 26 X s 2086 1637 m 26 X s 2086 1699 m 26 X s 2086 1761 m 26 X s 2061 1823 m 51 X s 2061 586 m 51 X s 2086 524 m 26 X s 2086 462 m 26 X s 2086 400 m 26 X s 2086 338 m 26 X s 2061 1823 m 51 X s - 2086 1885 m 26 X s 0.490196 0.545098 0.615686 c 0.364706 0.419608 0.490196 c 1556 124 45 1975 bf 0.490196 0.545098 0.615686 c 45 1975 m 1556 X s 1601 1975 m 124 Y s 1601 2099 m -1556 X s 45 2099 m -124 Y s 1 1 1 c black 1 1 1 c - gsave 2222 2088 23 21 C 108.805 2015.75 t 0 r /Helvetica-Bold findfont 68.8244 sf 0 0 m (InvMass_FCNC_top versus MET \(Signal\)_Id) show NC gr - gr gr showpage -end -%%EOF diff --git a/MVA/plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c1.png b/MVA/plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c1.png deleted file mode 100644 index 8d616d2..0000000 Binary files a/MVA/plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c1.png and /dev/null differ diff --git a/MVA/plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c2.eps b/MVA/plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c2.eps deleted file mode 100644 index 373f7e4..0000000 --- a/MVA/plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c2.eps +++ /dev/null @@ -1,294 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%BoundingBox: 0 0 567 533 -%%Title: plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c2.eps: Correlation profiles for 'Id'-transformed background variables -%%Creator: ROOT Version 5.34/05 -%%CreationDate: Tue Mar 4 15:31:14 2014 -%%EndComments -%%BeginProlog -80 dict begin -/s {stroke} def /l {lineto} def /m {moveto} def /t {translate} def -/r {rotate} def /rl {roll} def /R {repeat} def -/d {rlineto} def /rm {rmoveto} def /gr {grestore} def /f {eofill} def -/c {setrgbcolor} def /black {0 setgray} def /sd {setdash} def -/cl {closepath} def /sf {scalefont setfont} def /lw {setlinewidth} def -/box {m dup 0 exch d exch 0 d 0 exch neg d cl} def -/NC{systemdict begin initclip end}def/C{NC box clip newpath}def -/bl {box s} def /bf {box f} def /Y { 0 exch d} def /X { 0 d} def -/K {{pop pop 0 moveto} exch kshow} bind def -/ita {/ang 15 def gsave [1 0 ang dup sin exch cos div 1 0 0] concat} def -/mp {newpath /y exch def /x exch def} def -/side {[w .77 mul w .23 mul] .385 w mul sd w 0 l currentpoint t -144 r} def -/mr {mp x y w2 0 360 arc} def /m24 {mr s} def /m20 {mr f} def -/mb {mp x y w2 add m w2 neg 0 d 0 w neg d w 0 d 0 w d cl} def -/mt {mp x y w2 add m w2 neg w neg d w 0 d cl} def -/m21 {mb f} def /m25 {mb s} def /m22 {mt f} def /m26{mt s} def -/m23 {mp x y w2 sub m w2 w d w neg 0 d cl f} def -/m27 {mp x y w2 add m w3 neg w2 neg d w3 w2 neg d w3 w2 d cl s} def -/m28 {mp x w2 sub y w2 sub w3 add m w3 0 d 0 w3 neg d w3 0 d 0 w3 d w3 0 d 0 w3 d w3 neg 0 d 0 w3 d w3 neg 0 d 0 w3 neg d w3 neg 0 d cl s } def -/m29 {mp gsave x w2 sub y w2 add w3 sub m currentpoint t 4 {side} repeat cl fill gr} def -/m30 {mp gsave x w2 sub y w2 add w3 sub m currentpoint t 4 {side} repeat cl s gr} def -/m31 {mp x y w2 sub m 0 w d x w2 sub y m w 0 d x w2 sub y w2 add m w w neg d x w2 sub y w2 sub m w w d s} def -/m32 {mp x y w2 sub m w2 w d w neg 0 d cl s} def -/m33 {mp x y w2 add m w3 neg w2 neg d w3 w2 neg d w3 w2 d cl f} def -/m34 {mp x w2 sub y w2 sub w3 add m w3 0 d 0 w3 neg d w3 0 d 0 w3 d w3 0 d 0 w3 d w3 neg 0 d 0 w3 d w3 neg 0 d 0 w3 neg d w3 neg 0 d cl f } def -/m2 {mp x y w2 sub m 0 w d x w2 sub y m w 0 d s} def -/m5 {mp x w2 sub y w2 sub m w w d x w2 sub y w2 add m w w neg d s} def -/reEncode {exch findfont dup length dict begin {1 index /FID eq {pop pop} {def} ifelse } forall /Encoding exch def currentdict end dup /FontName get exch definefont pop } def [/Times-Bold /Times-Italic /Times-BoldItalic /Helvetica /Helvetica-Oblique - /Helvetica-Bold /Helvetica-BoldOblique /Courier /Courier-Oblique /Courier-Bold /Courier-BoldOblique /Times-Roman /AvantGarde-Book /AvantGarde-BookOblique /AvantGarde-Demi /AvantGarde-DemiOblique /Bookman-Demi /Bookman-DemiItalic /Bookman-Light - /Bookman-LightItalic /Helvetica-Narrow /Helvetica-Narrow-Bold /Helvetica-Narrow-BoldOblique /Helvetica-Narrow-Oblique /NewCenturySchlbk-Roman /NewCenturySchlbk-Bold /NewCenturySchlbk-BoldItalic /NewCenturySchlbk-Italic /Palatino-Bold - /Palatino-BoldItalic /Palatino-Italic /Palatino-Roman ] {ISOLatin1Encoding reEncode } forall -%%EndProlog -%%BeginSetup -%%EndSetup -newpath gsave .25 .25 scale gsave 0 0 t 0.490196 0.545098 0.615686 c[ ] 0 sd 3 lw 0.941176 0.941176 0.941176 c 2268 2130 0 0 bf 0.490196 0.545098 0.615686 c 0.941176 0.941176 0.941176 c 2222 2088 23 21 bf black 1 1 0.992157 c 1801 1578 311 322 - bf black 1801 1578 311 322 bl 1 1 0.992157 c 1801 1578 311 322 bf black 1801 1578 311 322 bl 0.49 0.6 0.82 c 0.386667 0 1 c 6 5 569 322 bf 6 5 989 322 bf 6 5 1727 322 bf 6 6 347 332 bf 6 6 365 332 bf 6 6 413 332 bf 6 6 509 332 bf 6 6 545 332 bf 6 6 - 761 332 bf 6 6 779 332 bf 6 6 785 332 bf 6 5 335 338 bf 6 5 371 338 bf 6 5 377 338 bf 6 5 395 338 bf 6 5 401 338 bf 6 5 431 338 bf 6 5 449 338 bf 6 5 455 338 bf 6 5 473 338 bf 6 5 569 338 bf 6 5 605 338 bf 6 5 653 338 bf 6 5 767 338 bf 6 5 1379 338 - bf 6 5 335 343 bf 6 5 347 343 bf 6 5 359 343 bf 6 5 365 343 bf 6 5 371 343 bf 6 5 377 343 bf 6 5 395 343 bf 6 5 401 343 bf 6 5 413 343 bf 6 5 419 343 bf 6 5 425 343 bf 6 5 449 343 bf 6 5 467 343 bf 6 5 485 343 bf 6 5 491 343 bf 6 5 497 343 bf 6 5 - 521 343 bf 6 5 557 343 bf 6 5 581 343 bf 6 5 599 343 bf 6 5 935 343 bf 6 5 335 348 bf 6 5 341 348 bf 6 5 365 348 bf 6 5 371 348 bf 6 5 377 348 bf 6 5 383 348 bf 6 5 401 348 bf 6 5 407 348 bf 6 5 413 348 bf 6 5 419 348 bf 6 5 431 348 bf 6 5 437 348 - bf 6 5 449 348 bf 6 5 455 348 bf 6 5 479 348 bf 6 5 485 348 bf 6 5 491 348 bf 6 5 497 348 bf 6 5 503 348 bf 6 5 509 348 bf 6 5 533 348 bf 6 5 551 348 bf 6 5 647 348 bf 0.2 0 1 c 6 6 317 353 bf 0.386667 0 1 c 6 6 323 353 bf 6 6 329 353 bf 6 6 335 353 - bf 6 6 341 353 bf 6 6 347 353 bf 0.2 0 1 c 6 6 353 353 bf 6 6 359 353 bf 0.386667 0 1 c 6 6 365 353 bf 6 6 371 353 bf 0.2 0 1 c 6 6 377 353 bf 0.386667 0 1 c 6 6 383 353 bf 6 6 389 353 bf 6 6 395 353 bf 0.2 0 1 c 6 6 401 353 bf 6 6 407 353 bf 6 6 - 413 353 bf 6 6 419 353 bf 6 6 425 353 bf 6 6 431 353 bf 0.386667 0 1 c 6 6 437 353 bf 6 6 443 353 bf 6 6 449 353 bf 6 6 455 353 bf 0.2 0 1 c 6 6 461 353 bf 0.386667 0 1 c 6 6 467 353 bf 6 6 473 353 bf 6 6 479 353 bf 6 6 485 353 bf 6 6 491 353 bf 6 6 - 497 353 bf 6 6 503 353 bf 6 6 509 353 bf 6 6 515 353 bf 6 6 521 353 bf 6 6 527 353 bf 6 6 533 353 bf 6 6 539 353 bf 6 6 551 353 bf 6 6 557 353 bf 6 6 563 353 bf 6 6 569 353 bf 6 6 587 353 bf 6 6 593 353 bf 6 6 599 353 bf 6 6 611 353 bf 6 6 689 353 - bf 6 6 779 353 bf 6 5 311 359 bf 6 5 317 359 bf 6 5 323 359 bf 0.2 0 1 c 6 5 329 359 bf 6 5 335 359 bf 0.386667 0 1 c 6 5 341 359 bf 0.2 0 1 c 6 5 347 359 bf 0 0.0800001 1 c 6 5 353 359 bf 6 5 359 359 bf 0.2 0 1 c 6 5 365 359 bf 0 0.0800001 1 c 6 5 - 371 359 bf 6 5 377 359 bf 0.386667 0 1 c 6 5 383 359 bf 0 0.0800001 1 c 6 5 389 359 bf 6 5 395 359 bf 6 5 401 359 bf 6 5 407 359 bf 0 0.266667 1 c 6 5 413 359 bf 0 0.0800001 1 c 6 5 419 359 bf 0 0.266667 1 c 6 5 425 359 bf 0.2 0 1 c 6 5 431 359 bf 0 - 0.0800001 1 c 6 5 437 359 bf 0.2 0 1 c 6 5 443 359 bf 6 5 449 359 bf 0 0.0800001 1 c 6 5 455 359 bf 0.2 0 1 c 6 5 461 359 bf 6 5 467 359 bf 0.386667 0 1 c 6 5 473 359 bf 0.2 0 1 c 6 5 479 359 bf 6 5 485 359 bf 6 5 491 359 bf 0.386667 0 1 c 6 5 497 - 359 bf 6 5 503 359 bf 6 5 509 359 bf 6 5 515 359 bf 0.2 0 1 c 6 5 521 359 bf 0.386667 0 1 c 6 5 527 359 bf 6 5 533 359 bf 6 5 539 359 bf 6 5 545 359 bf 6 5 551 359 bf 0.2 0 1 c 6 5 563 359 bf 0.386667 0 1 c 6 5 569 359 bf 6 5 575 359 bf 6 5 581 359 - bf 6 5 587 359 bf 6 5 593 359 bf 6 5 599 359 bf 6 5 605 359 bf 6 5 617 359 bf 6 5 635 359 bf 6 5 653 359 bf 6 5 665 359 bf 6 5 671 359 bf 6 5 677 359 bf 6 5 689 359 bf 6 5 713 359 bf 6 5 731 359 bf 6 5 779 359 bf 6 5 791 359 bf 6 5 833 359 bf 6 5 - 851 359 bf 6 5 923 359 bf 6 5 311 364 bf 0.2 0 1 c 6 5 317 364 bf 0 0.546666 1 c 6 5 323 364 bf 0 0.733333 1 c 6 5 329 364 bf 0 0.546666 1 c 6 5 335 364 bf 0 1 0.52 c 6 5 341 364 bf 0 1 0.986667 c 6 5 347 364 bf 0 0.546666 1 c 6 5 353 364 bf 0 1 - 0.333333 c 6 5 359 364 bf 0 1 0.52 c 6 5 365 364 bf 0 1 0.333333 c 6 5 371 364 bf 0.133333 1 0 c 6 5 377 364 bf 0 1 0.333333 c 6 5 383 364 bf 6 5 389 364 bf 0 1 0.0533333 c 6 5 395 364 bf 6 5 401 364 bf 0 1 0.333333 c 6 5 407 364 bf 6 5 413 364 bf 6 - 5 419 364 bf 0 1 0.8 c 6 5 425 364 bf 0 1 0.52 c 6 5 431 364 bf 0 1 0.8 c 6 5 437 364 bf 6 5 443 364 bf 6 5 449 364 bf 0 1 0.333333 c 6 5 455 364 bf 0 1 0.52 c 6 5 461 364 bf 0 0.733333 1 c 6 5 467 364 bf 0 1 0.8 c 6 5 473 364 bf 0 1 0.986667 c 6 5 - 479 364 bf 0 0.266667 1 c 6 5 485 364 bf 6 5 491 364 bf 0 0.546666 1 c 6 5 497 364 bf 0 0.266667 1 c 6 5 503 364 bf 0 0.546666 1 c 6 5 509 364 bf 6 5 515 364 bf 6 5 521 364 bf 0 0.0800001 1 c 6 5 527 364 bf 0 0.266667 1 c 6 5 533 364 bf 0.2 0 1 c 6 - 5 539 364 bf 0 0.0800001 1 c 6 5 545 364 bf 0.2 0 1 c 6 5 551 364 bf 0 0.266667 1 c 6 5 557 364 bf 0.2 0 1 c 6 5 563 364 bf 0 0.0800001 1 c 6 5 569 364 bf 6 5 575 364 bf 0.2 0 1 c 6 5 581 364 bf 6 5 587 364 bf 6 5 593 364 bf 0.386667 0 1 c 6 5 599 - 364 bf 6 5 605 364 bf 6 5 611 364 bf 6 5 617 364 bf 6 5 623 364 bf 6 5 629 364 bf 6 5 641 364 bf 6 5 647 364 bf 6 5 653 364 bf 6 5 659 364 bf 6 5 665 364 bf 6 5 671 364 bf 6 5 677 364 bf 6 5 689 364 bf 6 5 701 364 bf 6 5 707 364 bf 6 5 713 364 bf 6 - 5 719 364 bf 6 5 725 364 bf 6 5 731 364 bf 6 5 743 364 bf 6 5 749 364 bf 6 5 755 364 bf 6 5 767 364 bf 6 5 809 364 bf 6 5 1055 364 bf 0.2 0 1 c 6 6 311 369 bf 0 0.266667 1 c 6 6 317 369 bf 0 1 0.986667 c 6 6 323 369 bf 0 1 0.8 c 6 6 329 369 bf 6 6 - 335 369 bf 0 1 0.333333 c 6 6 341 369 bf 0 1 0.0533333 c 6 6 347 369 bf 0.6 1 0 c 6 6 353 369 bf 1 0.653333 0 c 6 6 359 369 bf 1 0.933333 0 c 6 6 365 369 bf 1 0.653333 0 c 6 6 371 369 bf 1 0.466667 0 c 6 6 377 369 bf 6 6 383 369 bf 6 6 389 369 bf 1 - 0 0 c 6 6 395 369 bf 1 0.466667 0 c 6 6 401 369 bf 1 0.933333 0 c 6 6 407 369 bf 6 6 413 369 bf 1 0.186667 0 c 6 6 419 369 bf 1 0 0 c 6 6 425 369 bf 0.88 1 0 c 6 6 431 369 bf 0.6 1 0 c 6 6 437 369 bf 1 0.933333 0 c 6 6 443 369 bf 0.88 1 0 c 6 6 449 - 369 bf 1 0.653333 0 c 6 6 455 369 bf 0 1 0.0533333 c 6 6 461 369 bf 6 6 467 369 bf 0.413333 1 0 c 6 6 473 369 bf 6 6 479 369 bf 0.133333 1 0 c 6 6 485 369 bf 0 1 0.8 c 6 6 491 369 bf 0 1 0.52 c 6 6 497 369 bf 0 1 0.986667 c 6 6 503 369 bf 6 6 509 - 369 bf 6 6 515 369 bf 0 0.546666 1 c 6 6 521 369 bf 6 6 527 369 bf 0 0.733333 1 c 6 6 533 369 bf 0 0.0800001 1 c 6 6 539 369 bf 0 0.266667 1 c 6 6 545 369 bf 0 0.546666 1 c 6 6 551 369 bf 0 0.266667 1 c 6 6 557 369 bf 0 0.0800001 1 c 6 6 563 369 bf - 6 6 569 369 bf 0.2 0 1 c 6 6 575 369 bf 6 6 581 369 bf 0 0.266667 1 c 6 6 587 369 bf 0.2 0 1 c 6 6 593 369 bf 0.386667 0 1 c 6 6 599 369 bf 0.2 0 1 c 6 6 605 369 bf 6 6 611 369 bf 6 6 617 369 bf 6 6 623 369 bf 6 6 629 369 bf 6 6 635 369 bf 0.386667 - 0 1 c 6 6 641 369 bf 6 6 647 369 bf 6 6 653 369 bf 6 6 659 369 bf 6 6 665 369 bf 6 6 671 369 bf 6 6 677 369 bf 6 6 683 369 bf 6 6 689 369 bf 6 6 695 369 bf 6 6 701 369 bf 6 6 725 369 bf 6 6 731 369 bf 6 6 737 369 bf 6 6 743 369 bf 6 6 761 369 bf 6 6 - 767 369 bf 6 6 779 369 bf 6 6 821 369 bf 6 6 845 369 bf 6 6 875 369 bf 0 0.0800001 1 c 6 5 311 375 bf 0 0.546666 1 c 6 5 317 375 bf 6 5 323 375 bf 0 1 0.52 c 6 5 329 375 bf 0 1 0.8 c 6 5 335 375 bf 0 1 0.333333 c 6 5 341 375 bf 0.133333 1 0 c 6 5 - 347 375 bf 0.88 1 0 c 6 5 353 375 bf 6 5 359 375 bf 6 5 365 375 bf 1 0.466667 0 c 6 5 371 375 bf 1 0 0 c 6 5 377 375 bf 1 0.933333 0 c 6 5 383 375 bf 0.6 1 0 c 6 5 389 375 bf 1 0.653333 0 c 6 5 395 375 bf 1 0 0 c 6 5 401 375 bf 1 0.653333 0 c 6 5 - 407 375 bf 1 0.466667 0 c 6 5 413 375 bf 0.6 1 0 c 6 5 419 375 bf 1 0.933333 0 c 6 5 425 375 bf 0.88 1 0 c 6 5 431 375 bf 1 0.466667 0 c 6 5 437 375 bf 1 0.653333 0 c 6 5 443 375 bf 0.6 1 0 c 6 5 449 375 bf 0.88 1 0 c 6 5 455 375 bf 0.133333 1 0 c 6 - 5 461 375 bf 0 1 0.333333 c 6 5 467 375 bf 0 1 0.52 c 6 5 473 375 bf 6 5 479 375 bf 0 1 0.333333 c 6 5 485 375 bf 0 1 0.52 c 6 5 491 375 bf 6 5 497 375 bf 0 1 0.8 c 6 5 503 375 bf 0 1 0.986667 c 6 5 509 375 bf 0 0.733333 1 c 6 5 515 375 bf 6 5 521 - 375 bf 6 5 527 375 bf 0 0.266667 1 c 6 5 533 375 bf 6 5 539 375 bf 0 0.0800001 1 c 6 5 545 375 bf 0 0.266667 1 c 6 5 551 375 bf 0 0.0800001 1 c 6 5 557 375 bf 0.2 0 1 c 6 5 563 375 bf 0 0.266667 1 c 6 5 569 375 bf 6 5 575 375 bf 0.2 0 1 c 6 5 581 - 375 bf 6 5 587 375 bf 6 5 593 375 bf 6 5 599 375 bf 6 5 605 375 bf 6 5 611 375 bf 0.386667 0 1 c 6 5 617 375 bf 6 5 623 375 bf 0.2 0 1 c 6 5 629 375 bf 0.386667 0 1 c 6 5 635 375 bf 6 5 641 375 bf 6 5 647 375 bf 6 5 653 375 bf 6 5 659 375 bf 6 5 665 - 375 bf 6 5 671 375 bf 6 5 677 375 bf 6 5 689 375 bf 6 5 695 375 bf 6 5 701 375 bf 6 5 707 375 bf 6 5 725 375 bf 6 5 731 375 bf 6 5 737 375 bf 6 5 743 375 bf 6 5 749 375 bf 6 5 785 375 bf 6 5 821 375 bf 6 5 311 380 bf 0 0.266667 1 c 6 5 317 380 bf 0 - 0.733333 1 c 6 5 323 380 bf 0 1 0.986667 c 6 5 329 380 bf 6 5 335 380 bf 0 1 0.333333 c 6 5 341 380 bf 0 1 0.0533333 c 6 5 347 380 bf 0.88 1 0 c 6 5 353 380 bf 0.6 1 0 c 6 5 359 380 bf 0.413333 1 0 c 6 5 365 380 bf 0.6 1 0 c 6 5 371 380 bf 0.413333 - 1 0 c 6 5 377 380 bf 0.88 1 0 c 6 5 383 380 bf 1 0.653333 0 c 6 5 389 380 bf 0.88 1 0 c 6 5 395 380 bf 1 0.933333 0 c 6 5 401 380 bf 1 0.653333 0 c 6 5 407 380 bf 6 5 413 380 bf 0.6 1 0 c 6 5 419 380 bf 0.413333 1 0 c 6 5 425 380 bf 0.6 1 0 c 6 5 - 431 380 bf 6 5 437 380 bf 6 5 443 380 bf 0.133333 1 0 c 6 5 449 380 bf 0.413333 1 0 c 6 5 455 380 bf 0 1 0.333333 c 6 5 461 380 bf 0 1 0.52 c 6 5 467 380 bf 0 1 0.333333 c 6 5 473 380 bf 0 1 0.52 c 6 5 479 380 bf 0 1 0.986667 c 6 5 485 380 bf 0 1 - 0.8 c 6 5 491 380 bf 0 1 0.52 c 6 5 497 380 bf 0 0.733333 1 c 6 5 503 380 bf 0 0.546666 1 c 6 5 509 380 bf 0 0.266667 1 c 6 5 515 380 bf 0 0.546666 1 c 6 5 521 380 bf 6 5 527 380 bf 0 0.0800001 1 c 6 5 533 380 bf 0 0.266667 1 c 6 5 539 380 bf 0 - 0.546666 1 c 6 5 545 380 bf 0 0.266667 1 c 6 5 551 380 bf 0 0.0800001 1 c 6 5 557 380 bf 0 0.266667 1 c 6 5 563 380 bf 6 5 569 380 bf 0.2 0 1 c 6 5 575 380 bf 0 0.0800001 1 c 6 5 581 380 bf 6 5 587 380 bf 0.386667 0 1 c 6 5 593 380 bf 6 5 599 380 bf - 0.2 0 1 c 6 5 605 380 bf 6 5 611 380 bf 6 5 617 380 bf 0.386667 0 1 c 6 5 623 380 bf 0.2 0 1 c 6 5 629 380 bf 0.386667 0 1 c 6 5 635 380 bf 6 5 641 380 bf 6 5 647 380 bf 6 5 653 380 bf 6 5 659 380 bf 6 5 665 380 bf 6 5 671 380 bf 6 5 677 380 bf 6 5 - 683 380 bf 6 5 689 380 bf 6 5 695 380 bf 6 5 701 380 bf 6 5 707 380 bf 6 5 713 380 bf 6 5 725 380 bf 6 5 755 380 bf 6 5 767 380 bf 6 5 779 380 bf 6 5 785 380 bf 6 5 797 380 bf 6 5 311 385 bf 0 0.266667 1 c 6 5 317 385 bf 6 5 323 385 bf 0 0.546666 1 - c 6 5 329 385 bf 0 1 0.8 c 6 5 335 385 bf 0 1 0.52 c 6 5 341 385 bf 0 1 0.0533333 c 6 5 347 385 bf 6 5 353 385 bf 0 1 0.333333 c 6 5 359 385 bf 0 1 0.0533333 c 6 5 365 385 bf 0.133333 1 0 c 6 5 371 385 bf 6 5 377 385 bf 0.6 1 0 c 6 5 383 385 bf 6 5 - 389 385 bf 1 0.466667 0 c 6 5 395 385 bf 0.133333 1 0 c 6 5 401 385 bf 0.6 1 0 c 6 5 407 385 bf 0.413333 1 0 c 6 5 413 385 bf 6 5 419 385 bf 0.133333 1 0 c 6 5 425 385 bf 6 5 431 385 bf 0.6 1 0 c 6 5 437 385 bf 0 1 0.0533333 c 6 5 443 385 bf 0 1 - 0.52 c 6 5 449 385 bf 0 1 0.0533333 c 6 5 455 385 bf 0 1 0.8 c 6 5 461 385 bf 0 1 0.333333 c 6 5 467 385 bf 0 1 0.8 c 6 5 473 385 bf 6 5 479 385 bf 0 0.733333 1 c 6 5 485 385 bf 6 5 491 385 bf 6 5 497 385 bf 0 0.546666 1 c 6 5 503 385 bf 0 1 - 0.986667 c 6 5 509 385 bf 0 0.733333 1 c 6 5 515 385 bf 0 0.266667 1 c 6 5 521 385 bf 0 0.0800001 1 c 6 5 527 385 bf 0 0.266667 1 c 6 5 533 385 bf 6 5 539 385 bf 0 0.0800001 1 c 6 5 545 385 bf 0.2 0 1 c 6 5 551 385 bf 0 0.0800001 1 c 6 5 557 385 bf - 6 5 563 385 bf 0.386667 0 1 c 6 5 569 385 bf 0 0.0800001 1 c 6 5 575 385 bf 6 5 581 385 bf 0.386667 0 1 c 6 5 587 385 bf 0.2 0 1 c 6 5 593 385 bf 6 5 599 385 bf 6 5 605 385 bf 6 5 611 385 bf 0.386667 0 1 c 6 5 617 385 bf 6 5 623 385 bf 6 5 629 385 - bf 6 5 635 385 bf 6 5 641 385 bf 6 5 647 385 bf 6 5 653 385 bf 6 5 659 385 bf 6 5 665 385 bf 6 5 671 385 bf 6 5 677 385 bf 6 5 689 385 bf 6 5 695 385 bf 6 5 701 385 bf 6 5 713 385 bf 6 5 719 385 bf 6 5 851 385 bf 6 5 869 385 bf 0.2 0 1 c 6 6 311 390 - bf 6 6 317 390 bf 0 0.546666 1 c 6 6 323 390 bf 0 0.266667 1 c 6 6 329 390 bf 6 6 335 390 bf 0 0.546666 1 c 6 6 341 390 bf 0 1 0.8 c 6 6 347 390 bf 0 1 0.333333 c 6 6 353 390 bf 0 1 0.986667 c 6 6 359 390 bf 0 1 0.52 c 6 6 365 390 bf 0 1 0.8 c 6 6 - 371 390 bf 0.133333 1 0 c 6 6 377 390 bf 0 1 0.52 c 6 6 383 390 bf 6 6 389 390 bf 0 1 0.0533333 c 6 6 395 390 bf 6 6 401 390 bf 6 6 407 390 bf 0 1 0.333333 c 6 6 413 390 bf 0 1 0.0533333 c 6 6 419 390 bf 0 1 0.52 c 6 6 425 390 bf 0 1 0.8 c 6 6 431 - 390 bf 0 1 0.986667 c 6 6 437 390 bf 0 1 0.8 c 6 6 443 390 bf 6 6 449 390 bf 0 1 0.986667 c 6 6 455 390 bf 0 0.733333 1 c 6 6 461 390 bf 0 1 0.8 c 6 6 467 390 bf 0 0.546666 1 c 6 6 473 390 bf 0 0.733333 1 c 6 6 479 390 bf 0 0.266667 1 c 6 6 485 390 - bf 0 0.546666 1 c 6 6 491 390 bf 6 6 497 390 bf 0 0.0800001 1 c 6 6 503 390 bf 0 0.266667 1 c 6 6 509 390 bf 0 0.0800001 1 c 6 6 515 390 bf 0 0.266667 1 c 6 6 521 390 bf 6 6 527 390 bf 0 0.0800001 1 c 6 6 533 390 bf 0.2 0 1 c 6 6 539 390 bf 6 6 545 - 390 bf 0 0.0800001 1 c 6 6 551 390 bf 0.386667 0 1 c 6 6 557 390 bf 0.2 0 1 c 6 6 563 390 bf 6 6 569 390 bf 0.386667 0 1 c 6 6 575 390 bf 0.2 0 1 c 6 6 581 390 bf 0.386667 0 1 c 6 6 587 390 bf 6 6 593 390 bf 6 6 599 390 bf 6 6 605 390 bf 6 6 611 390 - bf 6 6 617 390 bf 6 6 623 390 bf 6 6 629 390 bf 6 6 635 390 bf 6 6 641 390 bf 6 6 647 390 bf 6 6 653 390 bf 6 6 659 390 bf 6 6 665 390 bf 6 6 671 390 bf 6 6 677 390 bf 6 6 683 390 bf 6 6 695 390 bf 6 6 701 390 bf 6 6 707 390 bf 6 6 713 390 bf 6 6 - 731 390 bf 6 6 749 390 bf 6 6 755 390 bf 6 5 311 396 bf 0 0.0800001 1 c 6 5 317 396 bf 6 5 323 396 bf 0.2 0 1 c 6 5 329 396 bf 0 0.546666 1 c 6 5 335 396 bf 6 5 341 396 bf 0 0.266667 1 c 6 5 347 396 bf 0 0.546666 1 c 6 5 353 396 bf 0 0.733333 1 c 6 - 5 359 396 bf 6 5 365 396 bf 0 1 0.52 c 6 5 371 396 bf 0 0.733333 1 c 6 5 377 396 bf 0 1 0.8 c 6 5 383 396 bf 0 0.733333 1 c 6 5 389 396 bf 0 1 0.52 c 6 5 395 396 bf 6 5 401 396 bf 6 5 407 396 bf 0 1 0.8 c 6 5 413 396 bf 0 1 0.52 c 6 5 419 396 bf 0 1 - 0.986667 c 6 5 425 396 bf 0 0.733333 1 c 6 5 431 396 bf 0 1 0.986667 c 6 5 437 396 bf 6 5 443 396 bf 0 0.266667 1 c 6 5 449 396 bf 0 0.733333 1 c 6 5 455 396 bf 0 0.546666 1 c 6 5 461 396 bf 0 0.733333 1 c 6 5 467 396 bf 0 0.546666 1 c 6 5 473 396 - bf 0 0.266667 1 c 6 5 479 396 bf 6 5 485 396 bf 6 5 491 396 bf 0 0.0800001 1 c 6 5 497 396 bf 0 0.546666 1 c 6 5 503 396 bf 0 0.0800001 1 c 6 5 509 396 bf 0 0.266667 1 c 6 5 515 396 bf 0.2 0 1 c 6 5 521 396 bf 6 5 527 396 bf 0 0.0800001 1 c 6 5 533 - 396 bf 0.2 0 1 c 6 5 539 396 bf 6 5 545 396 bf 6 5 551 396 bf 6 5 557 396 bf 6 5 563 396 bf 0 0.0800001 1 c 6 5 569 396 bf 0.386667 0 1 c 6 5 575 396 bf 6 5 581 396 bf 6 5 587 396 bf 6 5 593 396 bf 0.2 0 1 c 6 5 599 396 bf 0.386667 0 1 c 6 5 605 396 - bf 6 5 611 396 bf 6 5 623 396 bf 6 5 629 396 bf 6 5 635 396 bf 6 5 641 396 bf 6 5 647 396 bf 6 5 659 396 bf 6 5 665 396 bf 6 5 677 396 bf 6 5 701 396 bf 6 5 707 396 bf 6 5 719 396 bf 6 5 311 401 bf 0.2 0 1 c 6 5 317 401 bf 6 5 323 401 bf 0 0.0800001 - 1 c 6 5 329 401 bf 0 0.266667 1 c 6 5 335 401 bf 6 5 341 401 bf 0 0.0800001 1 c 6 5 347 401 bf 0 0.546666 1 c 6 5 353 401 bf 6 5 359 401 bf 0 0.733333 1 c 6 5 365 401 bf 0 1 0.986667 c 6 5 371 401 bf 6 5 377 401 bf 0 1 0.333333 c 6 5 383 401 bf 0 - 0.266667 1 c 6 5 389 401 bf 0 0.733333 1 c 6 5 395 401 bf 6 5 401 401 bf 0 0.546666 1 c 6 5 407 401 bf 0 1 0.986667 c 6 5 413 401 bf 0 0.546666 1 c 6 5 419 401 bf 0 0.733333 1 c 6 5 425 401 bf 0 0.546666 1 c 6 5 431 401 bf 0 1 0.986667 c 6 5 437 401 - bf 0 0.546666 1 c 6 5 443 401 bf 0 0.266667 1 c 6 5 449 401 bf 0 0.733333 1 c 6 5 455 401 bf 0 0.266667 1 c 6 5 461 401 bf 6 5 467 401 bf 0 0.733333 1 c 6 5 473 401 bf 6 5 479 401 bf 0 0.266667 1 c 6 5 485 401 bf 0 0.0800001 1 c 6 5 491 401 bf 6 5 - 497 401 bf 0.386667 0 1 c 6 5 503 401 bf 0 0.0800001 1 c 6 5 509 401 bf 0.2 0 1 c 6 5 515 401 bf 6 5 521 401 bf 0 0.0800001 1 c 6 5 527 401 bf 6 5 533 401 bf 0.2 0 1 c 6 5 539 401 bf 0.386667 0 1 c 6 5 545 401 bf 6 5 551 401 bf 0.2 0 1 c 6 5 557 401 - bf 0.386667 0 1 c 6 5 563 401 bf 6 5 569 401 bf 6 5 575 401 bf 6 5 581 401 bf 6 5 587 401 bf 6 5 593 401 bf 6 5 599 401 bf 6 5 605 401 bf 6 5 611 401 bf 6 5 617 401 bf 6 5 623 401 bf 6 5 629 401 bf 6 5 635 401 bf 0.2 0 1 c 6 5 641 401 bf 0.386667 0 - 1 c 6 5 647 401 bf 6 5 653 401 bf 6 5 665 401 bf 6 5 689 401 bf 6 5 701 401 bf 6 5 719 401 bf 6 5 743 401 bf 6 5 773 401 bf 6 5 311 406 bf 0 0.0800001 1 c 6 5 317 406 bf 0.2 0 1 c 6 5 323 406 bf 0 0.0800001 1 c 6 5 329 406 bf 0.2 0 1 c 6 5 335 406 - bf 0 0.266667 1 c 6 5 341 406 bf 0 0.546666 1 c 6 5 347 406 bf 0 1 0.8 c 6 5 353 406 bf 0 0.266667 1 c 6 5 359 406 bf 0 0.733333 1 c 6 5 365 406 bf 0 0.546666 1 c 6 5 371 406 bf 0 0.266667 1 c 6 5 377 406 bf 0 0.733333 1 c 6 5 383 406 bf 0 1 - 0.986667 c 6 5 389 406 bf 0 0.266667 1 c 6 5 395 406 bf 0 0.733333 1 c 6 5 401 406 bf 0 1 0.986667 c 6 5 407 406 bf 0 0.733333 1 c 6 5 413 406 bf 0 0.546666 1 c 6 5 419 406 bf 0 0.266667 1 c 6 5 425 406 bf 0 0.0800001 1 c 6 5 431 406 bf 0 0.546666 1 - c 6 5 437 406 bf 0 0.0800001 1 c 6 5 443 406 bf 0 0.266667 1 c 6 5 449 406 bf 0 0.0800001 1 c 6 5 455 406 bf 0 0.546666 1 c 6 5 461 406 bf 0 0.266667 1 c 6 5 467 406 bf 6 5 473 406 bf 0 0.0800001 1 c 6 5 479 406 bf 0 0.266667 1 c 6 5 485 406 bf 6 5 - 491 406 bf 6 5 497 406 bf 0 0.0800001 1 c 6 5 503 406 bf 0 0.266667 1 c 6 5 509 406 bf 0 0.0800001 1 c 6 5 515 406 bf 0.2 0 1 c 6 5 521 406 bf 6 5 527 406 bf 6 5 533 406 bf 6 5 539 406 bf 6 5 545 406 bf 0.386667 0 1 c 6 5 551 406 bf 6 5 557 406 bf - 0.2 0 1 c 6 5 563 406 bf 0.386667 0 1 c 6 5 569 406 bf 6 5 575 406 bf 6 5 581 406 bf 6 5 587 406 bf 0.2 0 1 c 6 5 593 406 bf 0.386667 0 1 c 6 5 599 406 bf 6 5 611 406 bf 6 5 617 406 bf 6 5 623 406 bf 6 5 629 406 bf 6 5 635 406 bf 6 5 641 406 bf 6 5 - 665 406 bf 6 5 677 406 bf 6 5 683 406 bf 6 5 689 406 bf 6 5 713 406 bf 6 5 719 406 bf 6 5 737 406 bf 6 6 317 411 bf 0 0.266667 1 c 6 6 323 411 bf 0.2 0 1 c 6 6 329 411 bf 0 0.0800001 1 c 6 6 335 411 bf 6 6 341 411 bf 6 6 347 411 bf 0 0.266667 1 c 6 - 6 353 411 bf 0 0.733333 1 c 6 6 359 411 bf 0 0.266667 1 c 6 6 365 411 bf 0 1 0.986667 c 6 6 371 411 bf 0 0.733333 1 c 6 6 377 411 bf 6 6 383 411 bf 0 1 0.986667 c 6 6 389 411 bf 0 0.0800001 1 c 6 6 395 411 bf 0 0.546666 1 c 6 6 401 411 bf 6 6 407 - 411 bf 0 0.266667 1 c 6 6 413 411 bf 0 0.0800001 1 c 6 6 419 411 bf 0 0.546666 1 c 6 6 425 411 bf 6 6 431 411 bf 6 6 437 411 bf 6 6 443 411 bf 0 1 0.986667 c 6 6 449 411 bf 0 0.733333 1 c 6 6 455 411 bf 0 0.266667 1 c 6 6 461 411 bf 6 6 467 411 bf - 0.2 0 1 c 6 6 473 411 bf 0 0.0800001 1 c 6 6 479 411 bf 0 0.266667 1 c 6 6 485 411 bf 0 0.0800001 1 c 6 6 491 411 bf 6 6 497 411 bf 6 6 503 411 bf 0.386667 0 1 c 6 6 509 411 bf 0.2 0 1 c 6 6 515 411 bf 6 6 521 411 bf 6 6 527 411 bf 0.386667 0 1 c 6 - 6 533 411 bf 6 6 539 411 bf 0.2 0 1 c 6 6 545 411 bf 0.386667 0 1 c 6 6 551 411 bf 6 6 557 411 bf 6 6 563 411 bf 6 6 569 411 bf 6 6 575 411 bf 6 6 581 411 bf 6 6 587 411 bf 6 6 593 411 bf 6 6 599 411 bf 6 6 605 411 bf 6 6 611 411 bf 6 6 617 411 bf 6 - 6 623 411 bf 6 6 641 411 bf 6 6 647 411 bf 6 6 653 411 bf 6 6 659 411 bf 6 6 665 411 bf 6 6 671 411 bf 6 6 677 411 bf 6 6 683 411 bf 6 6 725 411 bf 6 6 731 411 bf 6 6 743 411 bf 6 6 791 411 bf 6 6 803 411 bf 6 5 311 417 bf 0.2 0 1 c 6 5 317 417 bf - 0.386667 0 1 c 6 5 323 417 bf 0.2 0 1 c 6 5 329 417 bf 0 0.266667 1 c 6 5 335 417 bf 6 5 341 417 bf 6 5 347 417 bf 6 5 353 417 bf 0 0.0800001 1 c 6 5 359 417 bf 0 0.546666 1 c 6 5 365 417 bf 0 0.266667 1 c 6 5 371 417 bf 6 5 377 417 bf 0 0.733333 1 - c 6 5 383 417 bf 0 0.266667 1 c 6 5 389 417 bf 0 0.733333 1 c 6 5 395 417 bf 0 1 0.8 c 6 5 401 417 bf 0 0.266667 1 c 6 5 407 417 bf 6 5 413 417 bf 6 5 419 417 bf 6 5 425 417 bf 6 5 431 417 bf 6 5 437 417 bf 0 0.0800001 1 c 6 5 443 417 bf 0 0.546666 - 1 c 6 5 449 417 bf 0 0.266667 1 c 6 5 455 417 bf 0.2 0 1 c 6 5 461 417 bf 0 0.0800001 1 c 6 5 467 417 bf 0.2 0 1 c 6 5 473 417 bf 0 0.0800001 1 c 6 5 479 417 bf 0.386667 0 1 c 6 5 485 417 bf 0.2 0 1 c 6 5 491 417 bf 0 0.0800001 1 c 6 5 497 417 bf 6 - 5 503 417 bf 0.2 0 1 c 6 5 509 417 bf 6 5 515 417 bf 6 5 521 417 bf 6 5 527 417 bf 0.386667 0 1 c 6 5 533 417 bf 0.2 0 1 c 6 5 539 417 bf 6 5 545 417 bf 0.386667 0 1 c 6 5 551 417 bf 6 5 557 417 bf 6 5 563 417 bf 6 5 569 417 bf 6 5 575 417 bf 6 5 - 581 417 bf 6 5 587 417 bf 6 5 593 417 bf 6 5 599 417 bf 6 5 605 417 bf 6 5 617 417 bf 6 5 623 417 bf 6 5 629 417 bf 6 5 635 417 bf 6 5 641 417 bf 6 5 647 417 bf 6 5 653 417 bf 6 5 665 417 bf 6 5 671 417 bf 6 5 677 417 bf 6 5 683 417 bf 6 5 695 417 - bf 6 5 707 417 bf 6 5 719 417 bf 6 5 743 417 bf 6 5 869 417 bf 6 5 1043 417 bf 6 5 311 422 bf 6 5 317 422 bf 6 5 323 422 bf 0 0.0800001 1 c 6 5 329 422 bf 6 5 335 422 bf 6 5 341 422 bf 0 0.266667 1 c 6 5 347 422 bf 0.2 0 1 c 6 5 353 422 bf 0 - 0.266667 1 c 6 5 359 422 bf 0 0.0800001 1 c 6 5 365 422 bf 0 0.733333 1 c 6 5 371 422 bf 0 0.0800001 1 c 6 5 377 422 bf 0 0.266667 1 c 6 5 383 422 bf 0 0.546666 1 c 6 5 389 422 bf 0 0.266667 1 c 6 5 395 422 bf 6 5 401 422 bf 6 5 407 422 bf 0 - 0.546666 1 c 6 5 413 422 bf 0 0.266667 1 c 6 5 419 422 bf 6 5 425 422 bf 6 5 431 422 bf 6 5 437 422 bf 6 5 443 422 bf 0.2 0 1 c 6 5 449 422 bf 0 0.266667 1 c 6 5 455 422 bf 0 0.0800001 1 c 6 5 461 422 bf 0.2 0 1 c 6 5 467 422 bf 0 0.0800001 1 c 6 5 - 473 422 bf 0 0.266667 1 c 6 5 479 422 bf 0.2 0 1 c 6 5 485 422 bf 0.386667 0 1 c 6 5 491 422 bf 0.2 0 1 c 6 5 497 422 bf 0 0.0800001 1 c 6 5 503 422 bf 0.386667 0 1 c 6 5 509 422 bf 6 5 515 422 bf 6 5 521 422 bf 0.2 0 1 c 6 5 527 422 bf 6 5 533 422 - bf 6 5 539 422 bf 0.386667 0 1 c 6 5 545 422 bf 6 5 551 422 bf 6 5 557 422 bf 6 5 563 422 bf 6 5 569 422 bf 6 5 575 422 bf 6 5 581 422 bf 6 5 587 422 bf 6 5 593 422 bf 6 5 599 422 bf 6 5 611 422 bf 6 5 617 422 bf 6 5 623 422 bf 6 5 629 422 bf 6 5 - 641 422 bf 6 5 647 422 bf 6 5 659 422 bf 6 5 671 422 bf 6 5 683 422 bf 6 5 701 422 bf 6 5 725 422 bf 6 5 311 427 bf 0.2 0 1 c 6 5 317 427 bf 0.386667 0 1 c 6 5 323 427 bf 6 5 329 427 bf 6 5 335 427 bf 0.2 0 1 c 6 5 341 427 bf 0 0.0800001 1 c 6 5 347 - 427 bf 6 5 353 427 bf 0.2 0 1 c 6 5 359 427 bf 0 0.0800001 1 c 6 5 365 427 bf 0 0.266667 1 c 6 5 371 427 bf 0 0.0800001 1 c 6 5 377 427 bf 0 0.266667 1 c 6 5 383 427 bf 6 5 389 427 bf 0.2 0 1 c 6 5 395 427 bf 0 0.0800001 1 c 6 5 401 427 bf 0 - 0.266667 1 c 6 5 407 427 bf 0 0.0800001 1 c 6 5 413 427 bf 0 0.266667 1 c 6 5 419 427 bf 0 0.0800001 1 c 6 5 425 427 bf 0 0.266667 1 c 6 5 431 427 bf 0.2 0 1 c 6 5 437 427 bf 0 0.0800001 1 c 6 5 443 427 bf 6 5 449 427 bf 0.2 0 1 c 6 5 455 427 bf 6 5 - 461 427 bf 0 0.266667 1 c 6 5 467 427 bf 0 0.0800001 1 c 6 5 473 427 bf 0.2 0 1 c 6 5 479 427 bf 0 0.0800001 1 c 6 5 485 427 bf 0.2 0 1 c 6 5 491 427 bf 0 0.0800001 1 c 6 5 497 427 bf 0.386667 0 1 c 6 5 503 427 bf 0.2 0 1 c 6 5 509 427 bf 6 5 515 - 427 bf 0.386667 0 1 c 6 5 521 427 bf 0.2 0 1 c 6 5 527 427 bf 0.386667 0 1 c 6 5 533 427 bf 0.2 0 1 c 6 5 539 427 bf 0.386667 0 1 c 6 5 545 427 bf 6 5 551 427 bf 6 5 557 427 bf 6 5 563 427 bf 0.2 0 1 c 6 5 569 427 bf 0.386667 0 1 c 6 5 575 427 bf 6 - 5 581 427 bf 6 5 587 427 bf 6 5 593 427 bf 6 5 599 427 bf 6 5 605 427 bf 6 5 611 427 bf 6 5 617 427 bf 6 5 623 427 bf 6 5 629 427 bf 6 5 653 427 bf 6 5 659 427 bf 6 5 665 427 bf 6 5 713 427 bf 6 5 761 427 bf 6 5 1403 427 bf 6 6 311 432 bf 6 6 317 - 432 bf 6 6 323 432 bf 0.2 0 1 c 6 6 329 432 bf 0 0.0800001 1 c 6 6 335 432 bf 6 6 341 432 bf 6 6 347 432 bf 0.2 0 1 c 6 6 353 432 bf 0 0.0800001 1 c 6 6 359 432 bf 6 6 365 432 bf 0 0.266667 1 c 6 6 371 432 bf 6 6 377 432 bf 0.2 0 1 c 6 6 383 432 bf - 0 0.0800001 1 c 6 6 389 432 bf 0 0.266667 1 c 6 6 395 432 bf 0.2 0 1 c 6 6 401 432 bf 6 6 407 432 bf 6 6 413 432 bf 0 0.0800001 1 c 6 6 419 432 bf 0 0.266667 1 c 6 6 425 432 bf 6 6 431 432 bf 0 0.0800001 1 c 6 6 437 432 bf 6 6 443 432 bf 0.386667 0 - 1 c 6 6 449 432 bf 0 0.0800001 1 c 6 6 455 432 bf 6 6 461 432 bf 0.2 0 1 c 6 6 467 432 bf 0.386667 0 1 c 6 6 473 432 bf 0.2 0 1 c 6 6 479 432 bf 6 6 485 432 bf 6 6 491 432 bf 0.386667 0 1 c 6 6 497 432 bf 0.2 0 1 c 6 6 503 432 bf 6 6 509 432 bf - 0.386667 0 1 c 6 6 515 432 bf 6 6 521 432 bf 6 6 527 432 bf 0.2 0 1 c 6 6 533 432 bf 0.386667 0 1 c 6 6 539 432 bf 6 6 545 432 bf 6 6 551 432 bf 6 6 557 432 bf 6 6 563 432 bf 6 6 569 432 bf 6 6 575 432 bf 6 6 581 432 bf 6 6 593 432 bf 6 6 599 432 bf - 6 6 605 432 bf 6 6 611 432 bf 6 6 617 432 bf 6 6 623 432 bf 6 6 629 432 bf 6 6 641 432 bf 6 6 671 432 bf 6 6 791 432 bf 6 5 311 438 bf 0.2 0 1 c 6 5 317 438 bf 6 5 323 438 bf 6 5 329 438 bf 6 5 335 438 bf 6 5 341 438 bf 0.386667 0 1 c 6 5 347 438 bf - 0.2 0 1 c 6 5 353 438 bf 0 0.0800001 1 c 6 5 359 438 bf 0 0.266667 1 c 6 5 365 438 bf 6 5 371 438 bf 0.2 0 1 c 6 5 377 438 bf 0 0.0800001 1 c 6 5 383 438 bf 6 5 389 438 bf 6 5 395 438 bf 6 5 401 438 bf 6 5 407 438 bf 6 5 413 438 bf 6 5 419 438 bf 0 - 0.266667 1 c 6 5 425 438 bf 0 0.0800001 1 c 6 5 431 438 bf 0.386667 0 1 c 6 5 437 438 bf 0 0.266667 1 c 6 5 443 438 bf 0 0.0800001 1 c 6 5 449 438 bf 0.2 0 1 c 6 5 455 438 bf 6 5 461 438 bf 6 5 467 438 bf 6 5 473 438 bf 6 5 479 438 bf 6 5 485 438 bf - 6 5 491 438 bf 0.386667 0 1 c 6 5 497 438 bf 6 5 503 438 bf 6 5 509 438 bf 0.2 0 1 c 6 5 515 438 bf 0.386667 0 1 c 6 5 521 438 bf 0.2 0 1 c 6 5 527 438 bf 0.386667 0 1 c 6 5 533 438 bf 6 5 539 438 bf 6 5 545 438 bf 6 5 551 438 bf 6 5 557 438 bf 6 5 - 563 438 bf 6 5 569 438 bf 6 5 575 438 bf 6 5 581 438 bf 6 5 587 438 bf 6 5 605 438 bf 6 5 617 438 bf 6 5 665 438 bf 6 5 671 438 bf 6 5 683 438 bf 6 5 719 438 bf 6 5 737 438 bf 6 5 743 438 bf 6 5 791 438 bf 6 5 317 443 bf 6 5 323 443 bf 6 5 329 443 - bf 0.2 0 1 c 6 5 335 443 bf 6 5 341 443 bf 0.386667 0 1 c 6 5 347 443 bf 0.2 0 1 c 6 5 353 443 bf 6 5 359 443 bf 6 5 365 443 bf 6 5 371 443 bf 0 0.0800001 1 c 6 5 377 443 bf 0.2 0 1 c 6 5 383 443 bf 6 5 389 443 bf 0 0.0800001 1 c 6 5 395 443 bf 0.2 - 0 1 c 6 5 401 443 bf 0 0.0800001 1 c 6 5 407 443 bf 0.2 0 1 c 6 5 413 443 bf 0 0.0800001 1 c 6 5 419 443 bf 0.2 0 1 c 6 5 425 443 bf 6 5 431 443 bf 0 0.0800001 1 c 6 5 437 443 bf 0.2 0 1 c 6 5 443 443 bf 0.386667 0 1 c 6 5 449 443 bf 0 0.0800001 1 c - 6 5 455 443 bf 0.386667 0 1 c 6 5 461 443 bf 0.2 0 1 c 6 5 467 443 bf 0.386667 0 1 c 6 5 473 443 bf 0.2 0 1 c 6 5 479 443 bf 6 5 485 443 bf 6 5 491 443 bf 6 5 497 443 bf 6 5 503 443 bf 0.386667 0 1 c 6 5 509 443 bf 6 5 515 443 bf 6 5 521 443 bf 6 5 - 527 443 bf 6 5 533 443 bf 0.2 0 1 c 6 5 539 443 bf 0.386667 0 1 c 6 5 545 443 bf 6 5 551 443 bf 6 5 557 443 bf 6 5 563 443 bf 6 5 569 443 bf 6 5 575 443 bf 6 5 587 443 bf 6 5 593 443 bf 6 5 599 443 bf 6 5 605 443 bf 6 5 617 443 bf 6 5 623 443 bf 6 5 - 629 443 bf 6 5 635 443 bf 6 5 641 443 bf 6 5 647 443 bf 6 5 659 443 bf 6 5 317 448 bf 6 5 323 448 bf 0.2 0 1 c 6 5 329 448 bf 6 5 335 448 bf 6 5 341 448 bf 0.386667 0 1 c 6 5 347 448 bf 0.2 0 1 c 6 5 353 448 bf 0 0.266667 1 c 6 5 359 448 bf 0 - 0.0800001 1 c 6 5 365 448 bf 0.2 0 1 c 6 5 371 448 bf 6 5 377 448 bf 0 0.266667 1 c 6 5 383 448 bf 0 0.0800001 1 c 6 5 389 448 bf 6 5 395 448 bf 0 0.266667 1 c 6 5 401 448 bf 0 0.0800001 1 c 6 5 407 448 bf 0.2 0 1 c 6 5 413 448 bf 0 0.0800001 1 c 6 - 5 419 448 bf 0.2 0 1 c 6 5 425 448 bf 0.386667 0 1 c 6 5 431 448 bf 0 0.0800001 1 c 6 5 437 448 bf 0.2 0 1 c 6 5 443 448 bf 0 0.266667 1 c 6 5 449 448 bf 0.2 0 1 c 6 5 455 448 bf 6 5 461 448 bf 6 5 467 448 bf 6 5 473 448 bf 6 5 485 448 bf 6 5 491 - 448 bf 6 5 497 448 bf 0.386667 0 1 c 6 5 503 448 bf 6 5 509 448 bf 0.2 0 1 c 6 5 515 448 bf 0.386667 0 1 c 6 5 521 448 bf 6 5 527 448 bf 0.2 0 1 c 6 5 533 448 bf 0.386667 0 1 c 6 5 539 448 bf 0.2 0 1 c 6 5 545 448 bf 0.386667 0 1 c 6 5 551 448 bf 6 - 5 557 448 bf 6 5 563 448 bf 6 5 575 448 bf 0.2 0 1 c 6 5 581 448 bf 0.386667 0 1 c 6 5 587 448 bf 6 5 593 448 bf 6 5 599 448 bf 6 5 605 448 bf 6 5 611 448 bf 6 5 623 448 bf 6 5 629 448 bf 6 5 635 448 bf 6 5 647 448 bf 6 5 677 448 bf 6 5 695 448 bf 6 - 5 749 448 bf 6 5 815 448 bf 6 5 821 448 bf 6 6 311 453 bf 6 6 317 453 bf 6 6 323 453 bf 0.2 0 1 c 6 6 329 453 bf 6 6 335 453 bf 6 6 341 453 bf 0 0.0800001 1 c 6 6 347 453 bf 0.386667 0 1 c 6 6 353 453 bf 0.2 0 1 c 6 6 359 453 bf 0 0.0800001 1 c 6 6 - 365 453 bf 6 6 371 453 bf 6 6 377 453 bf 0.386667 0 1 c 6 6 383 453 bf 0 0.0800001 1 c 6 6 389 453 bf 0.386667 0 1 c 6 6 395 453 bf 0.2 0 1 c 6 6 401 453 bf 0 0.0800001 1 c 6 6 407 453 bf 0.2 0 1 c 6 6 413 453 bf 6 6 419 453 bf 6 6 425 453 bf 6 6 - 431 453 bf 0 0.0800001 1 c 6 6 437 453 bf 0.386667 0 1 c 6 6 443 453 bf 0.2 0 1 c 6 6 449 453 bf 6 6 455 453 bf 6 6 461 453 bf 6 6 467 453 bf 6 6 473 453 bf 0.386667 0 1 c 6 6 479 453 bf 6 6 485 453 bf 6 6 491 453 bf 6 6 497 453 bf 6 6 503 453 bf 6 - 6 509 453 bf 6 6 515 453 bf 6 6 521 453 bf 6 6 533 453 bf 6 6 539 453 bf 6 6 545 453 bf 6 6 557 453 bf 6 6 563 453 bf 6 6 575 453 bf 6 6 581 453 bf 6 6 587 453 bf 6 6 593 453 bf 6 6 611 453 bf 6 6 623 453 bf 6 6 629 453 bf 6 6 635 453 bf 6 6 665 453 - bf 6 6 677 453 bf 6 6 701 453 bf 6 6 707 453 bf 6 6 821 453 bf 6 6 929 453 bf 6 5 311 459 bf 6 5 317 459 bf 6 5 323 459 bf 6 5 329 459 bf 6 5 335 459 bf 0.2 0 1 c 6 5 341 459 bf 0 0.0800001 1 c 6 5 347 459 bf 0.2 0 1 c 6 5 353 459 bf 6 5 359 459 bf - 0 0.0800001 1 c 6 5 365 459 bf 0.2 0 1 c 6 5 371 459 bf 6 5 377 459 bf 6 5 383 459 bf 6 5 389 459 bf 6 5 395 459 bf 6 5 401 459 bf 0 0.0800001 1 c 6 5 407 459 bf 0.2 0 1 c 6 5 413 459 bf 0.386667 0 1 c 6 5 419 459 bf 0 0.0800001 1 c 6 5 425 459 bf - 0.386667 0 1 c 6 5 431 459 bf 6 5 437 459 bf 6 5 443 459 bf 0.2 0 1 c 6 5 449 459 bf 6 5 455 459 bf 6 5 461 459 bf 0 0.0800001 1 c 6 5 467 459 bf 0.2 0 1 c 6 5 473 459 bf 6 5 479 459 bf 0.386667 0 1 c 6 5 485 459 bf 0.2 0 1 c 6 5 491 459 bf 6 5 497 - 459 bf 0.386667 0 1 c 6 5 503 459 bf 6 5 515 459 bf 6 5 521 459 bf 6 5 527 459 bf 6 5 533 459 bf 6 5 539 459 bf 6 5 545 459 bf 6 5 551 459 bf 6 5 557 459 bf 6 5 563 459 bf 6 5 569 459 bf 6 5 581 459 bf 6 5 587 459 bf 6 5 599 459 bf 6 5 623 459 bf 6 - 5 653 459 bf 6 5 659 459 bf 6 5 671 459 bf 6 5 731 459 bf 6 5 737 459 bf 6 5 743 459 bf 6 5 911 459 bf 6 5 317 464 bf 6 5 323 464 bf 6 5 329 464 bf 6 5 335 464 bf 0.2 0 1 c 6 5 341 464 bf 6 5 347 464 bf 0.386667 0 1 c 6 5 353 464 bf 0.2 0 1 c 6 5 - 359 464 bf 6 5 365 464 bf 0 0.0800001 1 c 6 5 371 464 bf 0.2 0 1 c 6 5 377 464 bf 6 5 383 464 bf 0 0.0800001 1 c 6 5 389 464 bf 0.2 0 1 c 6 5 395 464 bf 0 0.0800001 1 c 6 5 401 464 bf 0.386667 0 1 c 6 5 407 464 bf 0.2 0 1 c 6 5 413 464 bf 6 5 419 - 464 bf 0.386667 0 1 c 6 5 425 464 bf 0.2 0 1 c 6 5 431 464 bf 6 5 437 464 bf 6 5 443 464 bf 6 5 449 464 bf 6 5 455 464 bf 0 0.0800001 1 c 6 5 461 464 bf 0.386667 0 1 c 6 5 467 464 bf 6 5 473 464 bf 0.2 0 1 c 6 5 479 464 bf 0.386667 0 1 c 6 5 485 464 - bf 6 5 491 464 bf 6 5 497 464 bf 6 5 503 464 bf 6 5 509 464 bf 6 5 515 464 bf 6 5 521 464 bf 6 5 527 464 bf 6 5 539 464 bf 6 5 545 464 bf 6 5 551 464 bf 6 5 581 464 bf 6 5 587 464 bf 6 5 593 464 bf 6 5 599 464 bf 6 5 605 464 bf 6 5 617 464 bf 6 5 - 629 464 bf 6 5 635 464 bf 6 5 641 464 bf 6 5 677 464 bf 6 5 689 464 bf 6 5 695 464 bf 6 5 779 464 bf 6 5 851 464 bf 6 5 1013 464 bf 6 5 317 469 bf 6 5 329 469 bf 6 5 335 469 bf 0.2 0 1 c 6 5 341 469 bf 0.386667 0 1 c 6 5 347 469 bf 6 5 353 469 bf - 0.2 0 1 c 6 5 359 469 bf 6 5 365 469 bf 0.386667 0 1 c 6 5 371 469 bf 6 5 377 469 bf 0 0.0800001 1 c 6 5 383 469 bf 0.386667 0 1 c 6 5 389 469 bf 0.2 0 1 c 6 5 395 469 bf 6 5 401 469 bf 6 5 407 469 bf 0.386667 0 1 c 6 5 413 469 bf 0.2 0 1 c 6 5 419 - 469 bf 6 5 425 469 bf 6 5 431 469 bf 6 5 437 469 bf 0.386667 0 1 c 6 5 443 469 bf 6 5 449 469 bf 0.2 0 1 c 6 5 455 469 bf 6 5 461 469 bf 0.386667 0 1 c 6 5 467 469 bf 6 5 473 469 bf 6 5 479 469 bf 0.2 0 1 c 6 5 485 469 bf 0.386667 0 1 c 6 5 491 469 - bf 6 5 497 469 bf 6 5 503 469 bf 6 5 509 469 bf 6 5 515 469 bf 6 5 521 469 bf 6 5 527 469 bf 6 5 533 469 bf 6 5 539 469 bf 6 5 557 469 bf 6 5 569 469 bf 6 5 575 469 bf 6 5 593 469 bf 6 5 611 469 bf 6 5 617 469 bf 6 5 629 469 bf 6 5 695 469 bf 6 5 - 713 469 bf 6 6 311 474 bf 6 6 323 474 bf 0.2 0 1 c 6 6 329 474 bf 6 6 341 474 bf 6 6 347 474 bf 6 6 353 474 bf 0.386667 0 1 c 6 6 359 474 bf 0.2 0 1 c 6 6 365 474 bf 6 6 371 474 bf 6 6 377 474 bf 6 6 383 474 bf 6 6 389 474 bf 6 6 395 474 bf 0.386667 - 0 1 c 6 6 401 474 bf 0.2 0 1 c 6 6 407 474 bf 0 0.0800001 1 c 6 6 413 474 bf 0.386667 0 1 c 6 6 419 474 bf 6 6 425 474 bf 0.2 0 1 c 6 6 431 474 bf 0.386667 0 1 c 6 6 437 474 bf 0.2 0 1 c 6 6 443 474 bf 0.386667 0 1 c 6 6 449 474 bf 6 6 455 474 bf 6 - 6 461 474 bf 6 6 467 474 bf 0.2 0 1 c 6 6 473 474 bf 0.386667 0 1 c 6 6 479 474 bf 6 6 485 474 bf 0.2 0 1 c 6 6 491 474 bf 0.386667 0 1 c 6 6 497 474 bf 6 6 503 474 bf 6 6 509 474 bf 6 6 515 474 bf 6 6 521 474 bf 6 6 527 474 bf 6 6 533 474 bf 6 6 - 539 474 bf 6 6 545 474 bf 6 6 551 474 bf 6 6 557 474 bf 6 6 569 474 bf 6 6 575 474 bf 6 6 593 474 bf 6 6 605 474 bf 6 6 629 474 bf 6 6 635 474 bf 6 6 653 474 bf 6 6 659 474 bf 6 6 695 474 bf 6 6 701 474 bf 6 6 719 474 bf 6 5 317 480 bf 6 5 323 480 - bf 6 5 329 480 bf 6 5 335 480 bf 6 5 341 480 bf 6 5 347 480 bf 6 5 353 480 bf 6 5 359 480 bf 6 5 365 480 bf 6 5 371 480 bf 6 5 377 480 bf 6 5 383 480 bf 0.2 0 1 c 6 5 389 480 bf 0.386667 0 1 c 6 5 395 480 bf 6 5 401 480 bf 6 5 407 480 bf 0.2 0 1 c 6 - 5 413 480 bf 0.386667 0 1 c 6 5 419 480 bf 0.2 0 1 c 6 5 425 480 bf 6 5 431 480 bf 6 5 437 480 bf 0.386667 0 1 c 6 5 443 480 bf 6 5 449 480 bf 6 5 455 480 bf 6 5 461 480 bf 6 5 473 480 bf 6 5 479 480 bf 6 5 485 480 bf 6 5 491 480 bf 6 5 497 480 bf 6 - 5 503 480 bf 6 5 509 480 bf 6 5 515 480 bf 6 5 521 480 bf 6 5 527 480 bf 6 5 533 480 bf 6 5 539 480 bf 6 5 545 480 bf 6 5 569 480 bf 6 5 575 480 bf 6 5 581 480 bf 6 5 593 480 bf 6 5 641 480 bf 6 5 671 480 bf 6 5 677 480 bf 6 5 311 485 bf 6 5 323 485 - bf 6 5 329 485 bf 6 5 335 485 bf 0.2 0 1 c 6 5 341 485 bf 0.386667 0 1 c 6 5 347 485 bf 6 5 353 485 bf 6 5 359 485 bf 6 5 365 485 bf 0.2 0 1 c 6 5 371 485 bf 6 5 377 485 bf 0.386667 0 1 c 6 5 383 485 bf 6 5 389 485 bf 6 5 395 485 bf 6 5 401 485 bf 6 - 5 407 485 bf 0.2 0 1 c 6 5 413 485 bf 0.386667 0 1 c 6 5 419 485 bf 6 5 425 485 bf 0 0.0800001 1 c 6 5 431 485 bf 0.386667 0 1 c 6 5 437 485 bf 6 5 443 485 bf 6 5 449 485 bf 6 5 455 485 bf 0.2 0 1 c 6 5 461 485 bf 6 5 467 485 bf 0.386667 0 1 c 6 5 - 473 485 bf 6 5 479 485 bf 6 5 485 485 bf 6 5 491 485 bf 0.2 0 1 c 6 5 497 485 bf 0.386667 0 1 c 6 5 503 485 bf 6 5 509 485 bf 6 5 521 485 bf 6 5 527 485 bf 6 5 533 485 bf 6 5 551 485 bf 6 5 563 485 bf 6 5 569 485 bf 6 5 575 485 bf 6 5 581 485 bf 6 5 - 593 485 bf 6 5 599 485 bf 6 5 617 485 bf 6 5 629 485 bf 6 5 647 485 bf 6 5 653 485 bf 6 5 659 485 bf 6 5 677 485 bf 6 5 803 485 bf 6 5 869 485 bf 6 6 311 490 bf 6 6 317 490 bf 6 6 323 490 bf 6 6 329 490 bf 6 6 335 490 bf 0.2 0 1 c 6 6 341 490 bf - 0.386667 0 1 c 6 6 347 490 bf 0.2 0 1 c 6 6 353 490 bf 0.386667 0 1 c 6 6 359 490 bf 6 6 365 490 bf 6 6 371 490 bf 6 6 377 490 bf 6 6 383 490 bf 0.2 0 1 c 6 6 389 490 bf 0.386667 0 1 c 6 6 395 490 bf 0.2 0 1 c 6 6 401 490 bf 0.386667 0 1 c 6 6 407 - 490 bf 6 6 413 490 bf 6 6 419 490 bf 0.2 0 1 c 6 6 425 490 bf 6 6 431 490 bf 0.386667 0 1 c 6 6 437 490 bf 6 6 443 490 bf 0.2 0 1 c 6 6 449 490 bf 0.386667 0 1 c 6 6 455 490 bf 6 6 461 490 bf 6 6 467 490 bf 6 6 473 490 bf 6 6 479 490 bf 6 6 485 490 - bf 6 6 491 490 bf 6 6 503 490 bf 6 6 515 490 bf 6 6 527 490 bf 6 6 533 490 bf 6 6 545 490 bf 6 6 551 490 bf 6 6 557 490 bf 6 6 563 490 bf 6 6 569 490 bf 6 6 593 490 bf 6 6 599 490 bf 6 6 623 490 bf 6 6 635 490 bf 6 6 653 490 bf 6 6 665 490 bf 6 6 - 821 490 bf 6 5 311 496 bf 6 5 323 496 bf 6 5 329 496 bf 6 5 335 496 bf 6 5 341 496 bf 6 5 347 496 bf 6 5 353 496 bf 6 5 359 496 bf 6 5 365 496 bf 0.2 0 1 c 6 5 371 496 bf 6 5 377 496 bf 0.386667 0 1 c 6 5 383 496 bf 6 5 389 496 bf 0.2 0 1 c 6 5 395 - 496 bf 0.386667 0 1 c 6 5 401 496 bf 6 5 407 496 bf 0.2 0 1 c 6 5 413 496 bf 0.386667 0 1 c 6 5 419 496 bf 6 5 425 496 bf 6 5 431 496 bf 6 5 437 496 bf 6 5 443 496 bf 0.2 0 1 c 6 5 449 496 bf 0.386667 0 1 c 6 5 455 496 bf 6 5 461 496 bf 6 5 467 496 - bf 6 5 473 496 bf 6 5 479 496 bf 6 5 485 496 bf 6 5 491 496 bf 6 5 497 496 bf 6 5 503 496 bf 6 5 509 496 bf 0.2 0 1 c 6 5 515 496 bf 0.386667 0 1 c 6 5 533 496 bf 6 5 557 496 bf 6 5 563 496 bf 6 5 569 496 bf 6 5 575 496 bf 6 5 605 496 bf 6 5 611 496 - bf 6 5 617 496 bf 6 5 653 496 bf 6 5 725 496 bf 6 5 743 496 bf 6 5 761 496 bf 6 5 791 496 bf 6 5 1061 496 bf 6 5 323 501 bf 6 5 329 501 bf 6 5 335 501 bf 6 5 341 501 bf 6 5 347 501 bf 6 5 353 501 bf 6 5 359 501 bf 6 5 365 501 bf 6 5 371 501 bf 6 5 - 377 501 bf 6 5 383 501 bf 6 5 389 501 bf 6 5 395 501 bf 6 5 401 501 bf 0.2 0 1 c 6 5 407 501 bf 0.386667 0 1 c 6 5 413 501 bf 6 5 419 501 bf 6 5 425 501 bf 0.2 0 1 c 6 5 431 501 bf 0.386667 0 1 c 6 5 437 501 bf 6 5 443 501 bf 6 5 449 501 bf 6 5 455 - 501 bf 6 5 461 501 bf 6 5 467 501 bf 6 5 473 501 bf 6 5 479 501 bf 6 5 485 501 bf 6 5 491 501 bf 6 5 497 501 bf 6 5 503 501 bf 6 5 515 501 bf 6 5 521 501 bf 6 5 533 501 bf 6 5 539 501 bf 6 5 551 501 bf 6 5 557 501 bf 6 5 569 501 bf 6 5 593 501 bf 6 - 5 611 501 bf 6 5 623 501 bf 6 5 695 501 bf 6 5 719 501 bf 6 5 767 501 bf 6 5 935 501 bf 6 5 317 506 bf 6 5 329 506 bf 6 5 335 506 bf 6 5 341 506 bf 6 5 347 506 bf 6 5 359 506 bf 6 5 371 506 bf 0.2 0 1 c 6 5 377 506 bf 0.386667 0 1 c 6 5 383 506 bf - 0.2 0 1 c 6 5 389 506 bf 0.386667 0 1 c 6 5 395 506 bf 6 5 401 506 bf 0.2 0 1 c 6 5 407 506 bf 0.386667 0 1 c 6 5 413 506 bf 6 5 419 506 bf 6 5 425 506 bf 6 5 431 506 bf 6 5 437 506 bf 6 5 443 506 bf 6 5 449 506 bf 6 5 455 506 bf 6 5 461 506 bf 6 5 - 467 506 bf 6 5 473 506 bf 6 5 479 506 bf 6 5 485 506 bf 6 5 491 506 bf 6 5 497 506 bf 6 5 503 506 bf 6 5 515 506 bf 6 5 521 506 bf 6 5 527 506 bf 6 5 545 506 bf 6 5 557 506 bf 6 5 581 506 bf 6 5 593 506 bf 6 5 599 506 bf 6 5 605 506 bf 6 5 617 506 - bf 6 5 629 506 bf 6 5 635 506 bf 6 5 653 506 bf 6 5 701 506 bf 6 5 1223 506 bf 6 6 329 511 bf 6 6 335 511 bf 6 6 341 511 bf 0.2 0 1 c 6 6 347 511 bf 0.386667 0 1 c 6 6 353 511 bf 6 6 359 511 bf 6 6 365 511 bf 6 6 371 511 bf 6 6 377 511 bf 0.2 0 1 c - 6 6 383 511 bf 0.386667 0 1 c 6 6 389 511 bf 6 6 395 511 bf 6 6 401 511 bf 0.2 0 1 c 6 6 407 511 bf 0.386667 0 1 c 6 6 413 511 bf 6 6 419 511 bf 6 6 425 511 bf 6 6 431 511 bf 6 6 437 511 bf 6 6 443 511 bf 6 6 449 511 bf 6 6 455 511 bf 6 6 467 511 bf - 6 6 473 511 bf 6 6 479 511 bf 6 6 485 511 bf 6 6 491 511 bf 6 6 503 511 bf 6 6 509 511 bf 6 6 527 511 bf 6 6 533 511 bf 6 6 539 511 bf 6 6 545 511 bf 6 6 575 511 bf 6 6 623 511 bf 6 6 677 511 bf 6 5 323 517 bf 6 5 335 517 bf 6 5 341 517 bf 6 5 347 - 517 bf 6 5 353 517 bf 6 5 359 517 bf 6 5 365 517 bf 6 5 371 517 bf 6 5 377 517 bf 6 5 383 517 bf 6 5 389 517 bf 6 5 395 517 bf 6 5 401 517 bf 6 5 407 517 bf 6 5 413 517 bf 6 5 419 517 bf 6 5 425 517 bf 6 5 431 517 bf 6 5 437 517 bf 6 5 443 517 bf 6 - 5 449 517 bf 6 5 455 517 bf 6 5 461 517 bf 6 5 467 517 bf 6 5 473 517 bf 6 5 485 517 bf 6 5 491 517 bf 6 5 497 517 bf 6 5 503 517 bf 6 5 515 517 bf 6 5 527 517 bf 6 5 533 517 bf 6 5 539 517 bf 6 5 545 517 bf 6 5 551 517 bf 6 5 563 517 bf 6 5 575 517 - bf 6 5 581 517 bf 6 5 611 517 bf 6 5 623 517 bf 6 5 731 517 bf 6 5 323 522 bf 6 5 341 522 bf 6 5 347 522 bf 6 5 353 522 bf 6 5 359 522 bf 6 5 365 522 bf 0.2 0 1 c 6 5 371 522 bf 0.386667 0 1 c 6 5 383 522 bf 6 5 389 522 bf 6 5 395 522 bf 6 5 401 522 - bf 6 5 407 522 bf 6 5 413 522 bf 6 5 419 522 bf 6 5 425 522 bf 6 5 431 522 bf 6 5 437 522 bf 6 5 443 522 bf 6 5 449 522 bf 6 5 455 522 bf 6 5 461 522 bf 6 5 467 522 bf 6 5 473 522 bf 6 5 479 522 bf 6 5 485 522 bf 6 5 491 522 bf 6 5 503 522 bf 6 5 - 509 522 bf 6 5 515 522 bf 6 5 527 522 bf 6 5 539 522 bf 6 5 593 522 bf 6 5 599 522 bf 6 5 605 522 bf 6 5 629 522 bf 6 5 671 522 bf 6 5 695 522 bf 6 5 1337 522 bf 6 5 317 527 bf 6 5 329 527 bf 6 5 335 527 bf 6 5 353 527 bf 6 5 359 527 bf 6 5 365 527 - bf 6 5 377 527 bf 6 5 383 527 bf 6 5 389 527 bf 6 5 395 527 bf 6 5 407 527 bf 6 5 413 527 bf 6 5 419 527 bf 0.2 0 1 c 6 5 425 527 bf 0.386667 0 1 c 6 5 437 527 bf 6 5 443 527 bf 6 5 449 527 bf 0.2 0 1 c 6 5 455 527 bf 0.386667 0 1 c 6 5 461 527 bf 6 - 5 467 527 bf 6 5 473 527 bf 6 5 479 527 bf 6 5 485 527 bf 6 5 503 527 bf 6 5 515 527 bf 6 5 563 527 bf 6 5 581 527 bf 6 5 587 527 bf 6 5 677 527 bf 6 6 323 532 bf 6 6 329 532 bf 6 6 341 532 bf 6 6 347 532 bf 6 6 353 532 bf 6 6 365 532 bf 6 6 371 532 - bf 6 6 377 532 bf 6 6 389 532 bf 6 6 395 532 bf 6 6 401 532 bf 6 6 419 532 bf 6 6 425 532 bf 6 6 431 532 bf 6 6 437 532 bf 6 6 443 532 bf 6 6 449 532 bf 6 6 455 532 bf 6 6 461 532 bf 6 6 467 532 bf 0.2 0 1 c 6 6 473 532 bf 0.386667 0 1 c 6 6 479 532 - bf 6 6 509 532 bf 6 6 515 532 bf 6 6 527 532 bf 6 6 533 532 bf 6 6 539 532 bf 6 6 545 532 bf 6 6 575 532 bf 6 6 761 532 bf 6 5 335 538 bf 6 5 341 538 bf 6 5 359 538 bf 6 5 365 538 bf 6 5 371 538 bf 6 5 383 538 bf 6 5 389 538 bf 6 5 401 538 bf 6 5 - 407 538 bf 6 5 419 538 bf 6 5 425 538 bf 6 5 431 538 bf 6 5 443 538 bf 6 5 449 538 bf 6 5 461 538 bf 6 5 467 538 bf 6 5 473 538 bf 6 5 479 538 bf 6 5 485 538 bf 6 5 491 538 bf 6 5 497 538 bf 6 5 503 538 bf 6 5 509 538 bf 6 5 515 538 bf 6 5 539 538 - bf 6 5 551 538 bf 6 5 317 543 bf 6 5 335 543 bf 6 5 347 543 bf 6 5 353 543 bf 6 5 365 543 bf 6 5 371 543 bf 6 5 377 543 bf 6 5 383 543 bf 6 5 395 543 bf 6 5 401 543 bf 0.2 0 1 c 6 5 407 543 bf 0.386667 0 1 c 6 5 413 543 bf 6 5 419 543 bf 6 5 425 543 - bf 6 5 431 543 bf 6 5 437 543 bf 6 5 443 543 bf 6 5 449 543 bf 6 5 455 543 bf 6 5 461 543 bf 6 5 473 543 bf 6 5 485 543 bf 6 5 491 543 bf 6 5 509 543 bf 6 5 515 543 bf 6 5 521 543 bf 6 5 527 543 bf 6 5 545 543 bf 6 5 557 543 bf 6 5 587 543 bf 6 5 - 611 543 bf 6 5 641 543 bf 6 5 317 548 bf 6 5 323 548 bf 6 5 341 548 bf 6 5 347 548 bf 6 5 353 548 bf 6 5 371 548 bf 6 5 377 548 bf 6 5 389 548 bf 6 5 401 548 bf 6 5 407 548 bf 6 5 425 548 bf 6 5 431 548 bf 6 5 437 548 bf 6 5 449 548 bf 6 5 455 548 - bf 6 5 461 548 bf 6 5 467 548 bf 6 5 473 548 bf 6 5 485 548 bf 6 5 497 548 bf 6 5 533 548 bf 6 5 563 548 bf 6 5 569 548 bf 6 5 587 548 bf 6 5 593 548 bf 6 5 635 548 bf 6 6 323 553 bf 6 6 335 553 bf 6 6 341 553 bf 6 6 359 553 bf 6 6 365 553 bf 6 6 - 371 553 bf 6 6 377 553 bf 6 6 389 553 bf 6 6 395 553 bf 6 6 401 553 bf 6 6 407 553 bf 6 6 413 553 bf 6 6 419 553 bf 6 6 431 553 bf 6 6 437 553 bf 6 6 443 553 bf 6 6 449 553 bf 6 6 455 553 bf 6 6 467 553 bf 6 6 479 553 bf 6 6 485 553 bf 6 6 497 553 - bf 6 6 509 553 bf 6 6 515 553 bf 6 6 533 553 bf 6 6 569 553 bf 6 6 689 553 bf 6 6 743 553 bf 6 6 767 553 bf 6 5 311 559 bf 6 5 341 559 bf 6 5 347 559 bf 6 5 353 559 bf 6 5 371 559 bf 6 5 377 559 bf 6 5 395 559 bf 6 5 407 559 bf 6 5 413 559 bf 6 5 - 419 559 bf 6 5 425 559 bf 6 5 431 559 bf 6 5 437 559 bf 6 5 443 559 bf 6 5 449 559 bf 6 5 479 559 bf 6 5 503 559 bf 6 5 515 559 bf 6 5 545 559 bf 6 5 599 559 bf 6 5 641 559 bf 6 5 665 559 bf 6 5 833 559 bf 6 5 1523 559 bf 6 5 323 564 bf 6 5 341 564 - bf 6 5 347 564 bf 6 5 353 564 bf 6 5 365 564 bf 6 5 371 564 bf 6 5 383 564 bf 6 5 395 564 bf 6 5 401 564 bf 6 5 413 564 bf 6 5 419 564 bf 6 5 431 564 bf 6 5 437 564 bf 6 5 443 564 bf 6 5 449 564 bf 6 5 455 564 bf 6 5 473 564 bf 6 5 479 564 bf 6 5 - 485 564 bf 6 5 491 564 bf 6 5 503 564 bf 6 5 533 564 bf 6 5 557 564 bf 6 5 569 564 bf 6 5 581 564 bf 6 5 587 564 bf 6 5 599 564 bf 6 5 629 564 bf 6 5 725 564 bf 6 5 341 569 bf 6 5 347 569 bf 6 5 353 569 bf 6 5 359 569 bf 6 5 377 569 bf 0.2 0 1 c 6 5 - 383 569 bf 0.386667 0 1 c 6 5 389 569 bf 6 5 407 569 bf 6 5 413 569 bf 6 5 431 569 bf 6 5 437 569 bf 6 5 455 569 bf 6 5 467 569 bf 6 5 479 569 bf 6 5 491 569 bf 6 5 503 569 bf 6 5 509 569 bf 6 5 533 569 bf 6 5 545 569 bf 6 5 587 569 bf 6 5 605 569 - bf 6 6 353 574 bf 6 6 371 574 bf 6 6 383 574 bf 6 6 389 574 bf 6 6 395 574 bf 6 6 401 574 bf 6 6 407 574 bf 6 6 419 574 bf 6 6 431 574 bf 6 6 437 574 bf 6 6 455 574 bf 6 6 461 574 bf 6 6 473 574 bf 6 6 509 574 bf 6 6 515 574 bf 6 6 545 574 bf 6 6 - 551 574 bf 6 6 563 574 bf 6 6 623 574 bf 6 6 1061 574 bf 6 5 323 580 bf 6 5 335 580 bf 6 5 347 580 bf 6 5 365 580 bf 6 5 371 580 bf 6 5 389 580 bf 6 5 401 580 bf 6 5 407 580 bf 6 5 413 580 bf 6 5 419 580 bf 6 5 425 580 bf 6 5 431 580 bf 6 5 437 580 - bf 6 5 443 580 bf 6 5 449 580 bf 6 5 455 580 bf 6 5 461 580 bf 6 5 467 580 bf 6 5 485 580 bf 6 5 497 580 bf 6 5 503 580 bf 6 5 533 580 bf 6 5 569 580 bf 6 5 629 580 bf 6 5 749 580 bf 6 5 323 585 bf 6 5 329 585 bf 6 5 341 585 bf 6 5 347 585 bf 6 5 - 353 585 bf 6 5 359 585 bf 6 5 371 585 bf 6 5 383 585 bf 6 5 389 585 bf 6 5 395 585 bf 6 5 401 585 bf 6 5 407 585 bf 6 5 419 585 bf 6 5 425 585 bf 6 5 431 585 bf 6 5 437 585 bf 6 5 449 585 bf 6 5 455 585 bf 6 5 461 585 bf 6 5 479 585 bf 6 5 497 585 - bf 6 5 503 585 bf 6 5 575 585 bf 6 5 611 585 bf 6 5 323 590 bf 6 5 365 590 bf 6 5 371 590 bf 6 5 377 590 bf 6 5 413 590 bf 6 5 419 590 bf 6 5 425 590 bf 6 5 431 590 bf 6 5 437 590 bf 6 5 449 590 bf 6 5 461 590 bf 6 5 485 590 bf 6 5 503 590 bf 6 5 - 509 590 bf 6 5 533 590 bf 6 5 539 590 bf 6 5 563 590 bf 6 5 683 590 bf 6 5 707 590 bf 6 5 881 590 bf 6 6 323 595 bf 6 6 347 595 bf 6 6 359 595 bf 6 6 413 595 bf 6 6 425 595 bf 6 6 443 595 bf 6 6 455 595 bf 6 6 461 595 bf 6 6 467 595 bf 6 6 479 595 - bf 6 6 485 595 bf 6 6 491 595 bf 6 6 503 595 bf 6 6 515 595 bf 6 6 521 595 bf 6 6 533 595 bf 6 6 545 595 bf 6 6 575 595 bf 6 6 599 595 bf 6 6 1433 595 bf 6 5 347 601 bf 6 5 383 601 bf 6 5 389 601 bf 6 5 395 601 bf 6 5 401 601 bf 6 5 407 601 bf 6 5 - 413 601 bf 6 5 425 601 bf 6 5 455 601 bf 6 5 497 601 bf 6 5 503 601 bf 6 5 509 601 bf 6 5 521 601 bf 6 5 557 601 bf 6 5 563 601 bf 6 5 575 601 bf 6 5 587 601 bf 6 5 653 601 bf 6 5 761 601 bf 6 5 809 601 bf 6 5 353 606 bf 6 5 359 606 bf 6 5 365 606 - bf 6 5 383 606 bf 6 5 395 606 bf 6 5 401 606 bf 6 5 413 606 bf 6 5 419 606 bf 6 5 425 606 bf 6 5 431 606 bf 6 5 437 606 bf 6 5 443 606 bf 6 5 467 606 bf 6 5 485 606 bf 6 5 515 606 bf 6 5 545 606 bf 6 5 581 606 bf 6 5 587 606 bf 6 6 335 611 bf 6 6 - 341 611 bf 6 6 347 611 bf 6 6 365 611 bf 6 6 383 611 bf 6 6 389 611 bf 6 6 401 611 bf 6 6 407 611 bf 6 6 413 611 bf 6 6 425 611 bf 6 6 437 611 bf 6 6 449 611 bf 6 6 473 611 bf 6 6 479 611 bf 6 6 497 611 bf 6 6 593 611 bf 6 6 647 611 bf 6 6 707 611 - bf 6 5 323 617 bf 6 5 341 617 bf 6 5 347 617 bf 6 5 359 617 bf 6 5 389 617 bf 6 5 395 617 bf 6 5 401 617 bf 6 5 413 617 bf 6 5 419 617 bf 6 5 425 617 bf 6 5 437 617 bf 6 5 443 617 bf 6 5 473 617 bf 6 5 623 617 bf 6 5 347 622 bf 6 5 359 622 bf 6 5 - 365 622 bf 6 5 371 622 bf 6 5 383 622 bf 6 5 389 622 bf 6 5 395 622 bf 6 5 401 622 bf 6 5 407 622 bf 6 5 413 622 bf 6 5 449 622 bf 6 5 455 622 bf 6 5 551 622 bf 6 5 575 622 bf 6 5 347 627 bf 6 5 359 627 bf 6 5 371 627 bf 6 5 377 627 bf 6 5 383 627 - bf 6 5 389 627 bf 6 5 395 627 bf 6 5 401 627 bf 6 5 413 627 bf 6 5 419 627 bf 6 5 425 627 bf 6 5 431 627 bf 6 5 437 627 bf 6 5 443 627 bf 6 5 449 627 bf 6 5 455 627 bf 6 5 461 627 bf 6 5 467 627 bf 6 5 473 627 bf 6 5 479 627 bf 6 5 485 627 bf 6 5 - 497 627 bf 6 5 533 627 bf 6 5 617 627 bf 6 5 737 627 bf 6 6 329 632 bf 6 6 371 632 bf 6 6 389 632 bf 6 6 395 632 bf 6 6 407 632 bf 6 6 431 632 bf 6 6 437 632 bf 6 6 455 632 bf 6 6 575 632 bf 6 6 581 632 bf 6 5 341 638 bf 6 5 347 638 bf 6 5 353 638 - bf 6 5 365 638 bf 6 5 377 638 bf 6 5 383 638 bf 6 5 395 638 bf 6 5 401 638 bf 6 5 407 638 bf 6 5 413 638 bf 6 5 419 638 bf 6 5 431 638 bf 6 5 437 638 bf 6 5 449 638 bf 6 5 455 638 bf 6 5 461 638 bf 6 5 473 638 bf 6 5 479 638 bf 6 5 491 638 bf 6 5 - 503 638 bf 6 5 509 638 bf 6 5 551 638 bf 6 5 629 638 bf 6 5 689 638 bf 6 5 827 638 bf 6 5 317 643 bf 6 5 347 643 bf 6 5 365 643 bf 6 5 377 643 bf 6 5 401 643 bf 6 5 413 643 bf 6 5 419 643 bf 6 5 437 643 bf 6 5 449 643 bf 6 5 461 643 bf 6 5 491 643 - bf 6 5 497 643 bf 6 5 515 643 bf 6 5 545 643 bf 6 5 557 643 bf 6 5 317 648 bf 6 5 341 648 bf 6 5 347 648 bf 6 5 371 648 bf 6 5 395 648 bf 6 5 425 648 bf 6 5 437 648 bf 6 5 449 648 bf 6 5 473 648 bf 6 5 497 648 bf 6 5 515 648 bf 6 5 533 648 bf 6 5 - 539 648 bf 6 5 551 648 bf 6 5 605 648 bf 6 6 347 653 bf 6 6 365 653 bf 6 6 407 653 bf 6 6 431 653 bf 6 6 455 653 bf 6 6 467 653 bf 6 6 485 653 bf 6 6 503 653 bf 6 6 515 653 bf 6 6 521 653 bf 6 5 329 659 bf 6 5 341 659 bf 6 5 383 659 bf 6 5 407 659 - bf 6 5 419 659 bf 6 5 539 659 bf 6 5 599 659 bf 6 5 611 659 bf 6 5 641 659 bf 6 5 389 664 bf 6 5 467 664 bf 6 5 317 669 bf 6 5 383 669 bf 6 5 401 669 bf 6 5 425 669 bf 6 5 431 669 bf 6 5 479 669 bf 6 5 521 669 bf 6 5 551 669 bf 6 5 575 669 bf 6 5 - 587 669 bf 6 6 329 674 bf 6 6 335 674 bf 6 6 419 674 bf 6 6 437 674 bf 6 6 485 674 bf 6 6 503 674 bf 6 6 515 674 bf 6 6 641 674 bf 6 5 377 680 bf 6 5 509 680 bf 6 5 515 680 bf 6 5 557 680 bf 6 5 623 680 bf 6 5 371 685 bf 6 5 401 685 bf 6 5 443 685 - bf 6 5 449 685 bf 6 5 461 685 bf 6 5 497 685 bf 6 5 527 685 bf 6 5 539 685 bf 6 5 545 685 bf 6 5 323 690 bf 6 5 353 690 bf 6 5 395 690 bf 6 5 437 690 bf 6 5 485 690 bf 6 5 491 690 bf 6 5 521 690 bf 6 5 641 690 bf 6 6 341 695 bf 6 6 347 695 bf 6 6 - 365 695 bf 6 6 377 695 bf 6 6 419 695 bf 6 6 431 695 bf 6 6 437 695 bf 6 6 449 695 bf 6 6 509 695 bf 6 6 551 695 bf 6 6 611 695 bf 6 5 389 701 bf 6 5 401 701 bf 6 5 407 701 bf 6 5 509 701 bf 6 5 527 701 bf 6 5 611 701 bf 6 5 809 701 bf 6 5 323 706 - bf 6 5 377 706 bf 6 5 389 706 bf 6 5 443 706 bf 6 5 491 706 bf 6 5 503 706 bf 6 5 527 706 bf 6 5 599 706 bf 6 5 371 711 bf 6 5 377 711 bf 6 5 419 711 bf 6 5 431 711 bf 6 5 443 711 bf 6 5 473 711 bf 6 5 479 711 bf 6 5 509 711 bf 6 5 581 711 bf 6 5 - 743 711 bf 6 5 779 711 bf 6 6 359 716 bf 6 6 365 716 bf 6 6 383 716 bf 6 6 389 716 bf 6 6 413 716 bf 6 6 419 716 bf 6 6 449 716 bf 6 6 515 716 bf 6 6 521 716 bf 6 6 569 716 bf 6 5 449 722 bf 6 5 455 722 bf 6 5 623 722 bf 6 5 635 722 bf 6 5 401 727 - bf 6 5 407 727 bf 6 5 521 727 bf 6 5 629 727 bf 6 5 707 727 bf 6 6 395 732 bf 6 6 449 732 bf 6 6 461 732 bf 6 6 503 732 bf 6 6 581 732 bf 6 5 377 738 bf 6 5 395 738 bf 6 5 449 738 bf 6 5 491 738 bf 6 5 521 738 bf 6 5 347 743 bf 6 5 353 743 bf 6 5 - 449 743 bf 6 5 455 743 bf 6 5 485 743 bf 6 5 503 743 bf 6 5 575 743 bf 6 5 455 748 bf 6 5 587 748 bf 6 6 341 753 bf 6 6 383 753 bf 6 6 437 753 bf 6 6 479 753 bf 6 5 383 759 bf 6 5 407 759 bf 6 5 449 759 bf 6 5 377 764 bf 6 5 455 764 bf 6 5 521 764 - bf 6 5 569 764 bf 6 5 335 769 bf 6 5 341 769 bf 6 5 419 769 bf 6 5 431 780 bf 6 5 503 780 bf 6 5 383 785 bf 6 5 431 785 bf 6 5 461 785 bf 6 5 671 785 bf 6 5 2022 785 bf 6 5 341 790 bf 6 5 347 790 bf 6 5 359 790 bf 6 5 389 790 bf 6 5 401 790 bf 6 5 - 419 790 bf 6 5 449 790 bf 6 5 473 790 bf 6 5 635 790 bf 6 6 389 795 bf 6 6 401 795 bf 6 6 509 795 bf 6 5 431 801 bf 6 5 419 806 bf 6 5 437 806 bf 6 5 449 806 bf 6 5 545 806 bf 6 5 365 811 bf 6 5 509 811 bf 6 6 353 816 bf 6 6 401 816 bf 6 6 443 816 - bf 6 6 653 816 bf 6 5 371 822 bf 6 5 503 822 bf 6 5 563 822 bf 6 5 347 827 bf 6 5 395 827 bf 6 5 413 827 bf 6 5 521 827 bf 6 5 605 827 bf 6 5 683 827 bf 6 5 533 832 bf 6 6 329 837 bf 6 6 353 837 bf 6 6 461 837 bf 6 6 473 837 bf 6 6 491 837 bf 6 5 - 377 843 bf 6 5 629 843 bf 6 5 479 848 bf 6 5 587 848 bf 6 5 407 859 bf 6 5 485 859 bf 6 5 509 859 bf 6 5 407 864 bf 6 5 437 864 bf 6 5 443 864 bf 6 5 467 864 bf 6 5 545 864 bf 6 5 359 880 bf 6 5 707 880 bf 6 5 365 885 bf 6 5 413 885 bf 6 5 311 906 - bf 6 5 335 911 bf 6 5 455 911 bf 6 5 437 922 bf 6 5 353 927 bf 6 5 413 927 bf 6 5 461 927 bf 6 5 755 927 bf 6 5 467 948 bf 6 5 665 948 bf 6 6 383 953 bf 6 5 431 959 bf 6 5 347 964 bf 6 5 533 964 bf 6 5 389 969 bf 6 5 419 980 bf 6 5 491 980 bf 6 5 - 419 990 bf 6 5 473 990 bf 6 6 467 995 bf 6 5 479 1011 bf 6 5 497 1011 bf 6 5 413 1053 bf 6 6 425 1058 bf 6 6 437 1058 bf 6 6 455 1058 bf 6 6 875 1058 bf 6 5 419 1080 bf 6 5 491 1106 bf 6 5 455 1111 bf 6 6 599 1137 bf 6 5 401 1148 bf 6 5 587 1148 bf - 6 5 851 1153 bf 6 5 467 1164 bf 6 6 389 1179 bf 6 6 437 1179 bf 6 5 569 1232 bf 6 5 881 1432 bf 6 5 425 1448 bf 6 5 377 1511 bf 6 5 419 1511 bf 0.49 0.6 0.82 c black 311 322 m 1801 X s - gsave 2222 2088 23 21 C 1574.8 62.9921 t 0 r /Helvetica findfont 103.237 sf 0 0 m (MET [GeV]) show NC gr 613 373 m -51 Y s 673 347 m -25 Y s 734 347 m -25 Y s 795 347 m -25 Y s 855 347 m -25 Y s 916 373 m -51 Y s 976 347 m -25 Y s 1037 347 m -25 - Y s 1098 347 m -25 Y s 1158 347 m -25 Y s 1219 373 m -51 Y s 1279 347 m -25 Y s 1340 347 m -25 Y s 1400 347 m -25 Y s 1461 347 m -25 Y s 1522 373 m -51 Y s 1582 347 m -25 Y s 1643 347 m -25 Y s 1703 347 m -25 Y s 1764 347 m -25 Y s 1825 373 m -51 Y - s 613 373 m -51 Y s 552 347 m -25 Y s 492 347 m -25 Y s 431 347 m -25 Y s 370 347 m -25 Y s 1825 373 m -51 Y s 1885 347 m -25 Y s 1946 347 m -25 Y s 2006 347 m -25 Y s 2067 347 m -25 Y s - gsave 2222 2088 23 21 C 561.203 217.609 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (50) show NC gr - gsave 2222 2088 23 21 C 836.077 217.609 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (100) show NC gr - gsave 2222 2088 23 21 C 1139.58 217.609 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (150) show NC gr - gsave 2222 2088 23 21 C 1443.09 217.609 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (200) show NC gr - gsave 2222 2088 23 21 C 1746.6 217.609 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (250) show NC gr 311 1900 m 1801 X s 613 1849 m 51 Y s 673 1875 m 25 Y s 734 1875 m 25 Y s 795 1875 m 25 Y s 855 1875 m 25 Y s 916 1849 m 51 Y s 976 1875 m 25 Y s - 1037 1875 m 25 Y s 1098 1875 m 25 Y s 1158 1875 m 25 Y s 1219 1849 m 51 Y s 1279 1875 m 25 Y s 1340 1875 m 25 Y s 1400 1875 m 25 Y s 1461 1875 m 25 Y s 1522 1849 m 51 Y s 1582 1875 m 25 Y s 1643 1875 m 25 Y s 1703 1875 m 25 Y s 1764 1875 m 25 Y s - 1825 1849 m 51 Y s 613 1849 m 51 Y s 552 1875 m 25 Y s 492 1875 m 25 Y s 431 1875 m 25 Y s 370 1875 m 25 Y s 1825 1849 m 51 Y s 1885 1875 m 25 Y s 1946 1875 m 25 Y s 2006 1875 m 25 Y s 2067 1875 m 25 Y s 311 322 m 1578 Y s - gsave 2222 2088 23 21 C 103.078 658.554 t 90 r /Helvetica findfont 103.237 sf 0 0 m (InvMass_FCNC_top [GeV]) show NC gr 361 586 m -50 X s 336 648 m -25 X s 336 710 m -25 X s 336 771 m -25 X s 336 833 m -25 X s 361 895 m -50 X s 336 957 m -25 X s - 336 1019 m -25 X s 336 1081 m -25 X s 336 1142 m -25 X s 361 1204 m -50 X s 336 1266 m -25 X s 336 1328 m -25 X s 336 1390 m -25 X s 336 1452 m -25 X s 361 1513 m -50 X s 336 1575 m -25 X s 336 1637 m -25 X s 336 1699 m -25 X s 336 1761 m -25 X s - 361 1823 m -50 X s 361 586 m -50 X s 336 524 m -25 X s 336 462 m -25 X s 336 400 m -25 X s 336 338 m -25 X s 361 1823 m -50 X s 336 1885 m -25 X s - gsave 2222 2088 23 21 C 131.711 555.476 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (500) show NC gr - gsave 2222 2088 23 21 C 80.1718 864.71 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (1000) show NC gr - gsave 2222 2088 23 21 C 80.1718 1173.94 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (1500) show NC gr - gsave 2222 2088 23 21 C 80.1718 1483.18 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (2000) show NC gr - gsave 2222 2088 23 21 C 80.1718 1792.41 t 0 r /Helvetica findfont 91.7659 sf 0 0 m (2500) show NC gr 2112 322 m 1578 Y s 2061 586 m 51 X s 2086 648 m 26 X s 2086 710 m 26 X s 2086 771 m 26 X s 2086 833 m 26 X s 2061 895 m 51 X s 2086 957 m 26 X s - 2086 1019 m 26 X s 2086 1081 m 26 X s 2086 1142 m 26 X s 2061 1204 m 51 X s 2086 1266 m 26 X s 2086 1328 m 26 X s 2086 1390 m 26 X s 2086 1452 m 26 X s 2061 1513 m 51 X s 2086 1575 m 26 X s 2086 1637 m 26 X s 2086 1699 m 26 X s 2086 1761 m 26 X s - 2061 1823 m 51 X s 2061 586 m 51 X s 2086 524 m 26 X s 2086 462 m 26 X s 2086 400 m 26 X s 2086 338 m 26 X s 2061 1823 m 51 X s 2086 1885 m 26 X s 1 0 0 c 0.81 0.37 0.38 c 1 0 0 c 333 409 m 2 Y s 333 411 m 1 Y s 311 411 m 22 X s 333 411 m 23 X s 322 - 409 m 23 X s 322 412 m 23 X s 311 399 m 23 Y s 356 399 m 23 Y s /w 2 def /w2 {w 2 div} def /w3 {w 3 div} def 333 411 m20 378 408 m 1 Y s 378 409 m 1 Y s 356 409 m 22 X s 378 409 m 23 X s 367 408 m 23 X s 367 410 m 23 X s 356 398 m 23 Y s 401 398 m - 23 Y s 378 409 m20 423 411 m 1 Y s 423 412 m 1 Y s 401 412 m 22 X s 423 412 m 23 X s 412 411 m 23 X s 412 413 m 23 X s 401 401 m 23 Y s 446 401 m 23 Y s 423 412 m20 468 411 m 1 Y s 468 412 m 1 Y s 446 412 m 22 X s 468 412 m 23 X s 457 411 m 23 X s - 457 413 m 23 X s 446 400 m 23 Y s 491 400 m 23 Y s 468 412 m20 513 410 m 1 Y s 513 411 m 1 Y s 491 411 m 22 X s 513 411 m 23 X s 502 410 m 23 X s 502 412 m 23 X s 491 399 m 23 Y s 536 399 m 23 Y s 513 411 m20 558 411 m 2 Y s 558 413 m 2 Y s 536 413 - m 22 X s 558 413 m 23 X s 547 411 m 23 X s 547 415 m 23 X s 536 401 m 23 Y s 581 401 m 23 Y s 558 413 m20 603 415 m 4 Y s 603 419 m 4 Y s 581 419 m 22 X s 603 419 m 23 X s 592 415 m 23 X s 592 423 m 23 X s 581 407 m 23 Y s 626 407 m 23 Y s 603 419 - m20 648 418 m 6 Y s 648 424 m 5 Y s 626 424 m 22 X s 648 424 m 23 X s 637 418 m 23 X s 637 429 m 23 X s 626 412 m 23 Y s 671 412 m 23 Y s 648 424 m20 693 415 m 6 Y s 693 421 m 7 Y s 671 421 m 22 X s 693 421 m 23 X s 682 415 m 23 X s 682 428 m 23 X s - 671 410 m 23 Y s 716 410 m 23 Y s 693 421 m20 738 423 m 16 Y s 738 439 m 17 Y s 716 439 m 22 X s 738 439 m 23 X s 727 423 m 23 X s 727 456 m 23 X s 716 428 m 23 Y s 761 428 m 23 Y s 738 439 m20 783 401 m 18 Y s 783 419 m 18 Y s 761 419 m 22 X s 783 - 419 m 23 X s 772 401 m 23 X s 772 437 m 23 X s 761 408 m 23 Y s 806 408 m 23 Y s 783 419 m20 828 462 m 40 Y s 828 502 m 39 Y s 806 502 m 22 X s 828 502 m 23 X s 817 462 m 23 X s 817 541 m 23 X s 806 490 m 23 Y s 851 490 m 23 Y s 828 502 m20 874 570 - m 117 Y s 874 687 m 118 Y s 851 687 m 23 X s 874 687 m 22 X s 862 570 m 23 X s 862 805 m 23 X s 851 676 m 23 Y s 896 676 m 23 Y s 874 687 m20 919 394 m 27 Y s 919 421 m 27 Y s 896 421 m 23 X s 919 421 m 22 X s 907 394 m 23 X s 907 448 m 23 X s 896 - 410 m 23 Y s 941 410 m 23 Y s 919 421 m20 1009 349 m 49 Y s 1009 398 m 50 Y s 986 398 m 23 X s 1009 398 m 22 X s 997 349 m 23 X s 997 448 m 23 X s 986 387 m 23 Y s 1031 387 m 23 Y s 1009 398 m20 1054 392 m 46 Y s 1054 438 m 46 Y s 1031 438 m 23 X s - 1054 438 m 22 X s 1042 392 m 23 X s 1042 484 m 23 X s 1031 426 m 23 Y s 1076 426 m 23 Y s 1054 438 m20 1211 509 m 23 X s 1234 509 m 22 X s 1211 498 m 23 Y s 1256 498 m 23 Y s 1234 509 m20 1301 523 m 23 X s 1324 523 m 22 X s 1301 511 m 23 Y s 1346 - 511 m 23 Y s 1324 523 m20 1346 338 m 23 X s 1369 338 m 22 X s 1346 327 m 23 Y s 1391 327 m 23 Y s 1369 338 m20 1391 431 m 23 X s 1414 431 m 22 X s 1391 419 m 23 Y s 1436 419 m 23 Y s 1414 431 m20 1436 600 m 23 X s 1459 600 m 22 X s 1436 589 m 23 Y s - 1481 589 m 23 Y s 1459 600 m20 1526 560 m 23 X s 1549 560 m 22 X s 1526 548 m 23 Y s 1571 548 m 23 Y s 1549 560 m20 1706 326 m 23 X s 1729 326 m 22 X s 1706 314 m 23 Y s 1751 314 m 23 Y s 1729 326 m20 2022 788 m 22 X s 2044 788 m 23 X s 2022 776 m - 23 Y s 2067 776 m 23 Y s 2044 788 m20 black 311 322 m 1801 X s 613 373 m -51 Y s 673 347 m -25 Y s 734 347 m -25 Y s 795 347 m -25 Y s 855 347 m -25 Y s 916 373 m -51 Y s 976 347 m -25 Y s 1037 347 m -25 Y s 1098 347 m -25 Y s 1158 347 m -25 Y s - 1219 373 m -51 Y s 1279 347 m -25 Y s 1340 347 m -25 Y s 1400 347 m -25 Y s 1461 347 m -25 Y s 1522 373 m -51 Y s 1582 347 m -25 Y s 1643 347 m -25 Y s 1703 347 m -25 Y s 1764 347 m -25 Y s 1825 373 m -51 Y s 613 373 m -51 Y s 552 347 m -25 Y s 492 - 347 m -25 Y s 431 347 m -25 Y s 370 347 m -25 Y s 1825 373 m -51 Y s 1885 347 m -25 Y s 1946 347 m -25 Y s 2006 347 m -25 Y s 2067 347 m -25 Y s 311 1900 m 1801 X s 613 1849 m 51 Y s 673 1875 m 25 Y s 734 1875 m 25 Y s 795 1875 m 25 Y s 855 1875 m - 25 Y s 916 1849 m 51 Y s 976 1875 m 25 Y s 1037 1875 m 25 Y s 1098 1875 m 25 Y s 1158 1875 m 25 Y s 1219 1849 m 51 Y s 1279 1875 m 25 Y s 1340 1875 m 25 Y s 1400 1875 m 25 Y s 1461 1875 m 25 Y s 1522 1849 m 51 Y s 1582 1875 m 25 Y s 1643 1875 m 25 Y - s 1703 1875 m 25 Y s 1764 1875 m 25 Y s 1825 1849 m 51 Y s 613 1849 m 51 Y s 552 1875 m 25 Y s 492 1875 m 25 Y s 431 1875 m 25 Y s 370 1875 m 25 Y s 1825 1849 m 51 Y s 1885 1875 m 25 Y s 1946 1875 m 25 Y s 2006 1875 m 25 Y s 2067 1875 m 25 Y s 311 - 322 m 1578 Y s 361 586 m -50 X s 336 648 m -25 X s 336 710 m -25 X s 336 771 m -25 X s 336 833 m -25 X s 361 895 m -50 X s 336 957 m -25 X s 336 1019 m -25 X s 336 1081 m -25 X s 336 1142 m -25 X s 361 1204 m -50 X s 336 1266 m -25 X s 336 1328 m - -25 X s 336 1390 m -25 X s 336 1452 m -25 X s 361 1513 m -50 X s 336 1575 m -25 X s 336 1637 m -25 X s 336 1699 m -25 X s 336 1761 m -25 X s 361 1823 m -50 X s 361 586 m -50 X s 336 524 m -25 X s 336 462 m -25 X s 336 400 m -25 X s 336 338 m -25 X s - 361 1823 m -50 X s 336 1885 m -25 X s 2112 322 m 1578 Y s 2061 586 m 51 X s 2086 648 m 26 X s 2086 710 m 26 X s 2086 771 m 26 X s 2086 833 m 26 X s 2061 895 m 51 X s 2086 957 m 26 X s 2086 1019 m 26 X s 2086 1081 m 26 X s 2086 1142 m 26 X s 2061 - 1204 m 51 X s 2086 1266 m 26 X s 2086 1328 m 26 X s 2086 1390 m 26 X s 2086 1452 m 26 X s 2061 1513 m 51 X s 2086 1575 m 26 X s 2086 1637 m 26 X s 2086 1699 m 26 X s 2086 1761 m 26 X s 2061 1823 m 51 X s 2061 586 m 51 X s 2086 524 m 26 X s 2086 462 - m 26 X s 2086 400 m 26 X s 2086 338 m 26 X s 2061 1823 m 51 X s 2086 1885 m 26 X s 0.490196 0.545098 0.615686 c 0.364706 0.419608 0.490196 c 1556 124 45 1975 bf 0.490196 0.545098 0.615686 c 45 1975 m 1556 X s 1601 1975 m 124 Y s 1601 2099 m -1556 X - s 45 2099 m -124 Y s 1 1 1 c black 1 1 1 c - gsave 2222 2088 23 21 C 80.1718 2015.75 t 0 r /Helvetica-Bold findfont 63.089 sf 0 0 m (InvMass_FCNC_top versus MET \(Background\)_Id) show NC gr - gr gr showpage -end -%%EOF diff --git a/MVA/plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c2.png b/MVA/plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c2.png deleted file mode 100644 index 2bba481..0000000 Binary files a/MVA/plots/correlationscatter_InvMass_FCNC_top_Zdecay__Id_c2.png and /dev/null differ diff --git a/MVA/weights/TMVAClassification_BDT.class.C b/MVA/weights/TMVAClassification_BDT.class.C deleted file mode 100644 index 2363935..0000000 --- a/MVA/weights/TMVAClassification_BDT.class.C +++ /dev/null @@ -1,10072 +0,0 @@ -// Class: ReadBDT -// Automatically generated by MethodBase::MakeClass -// - -/* configuration options ===================================================== - -#GEN -*-*-*-*-*-*-*-*-*-*-*- general info -*-*-*-*-*-*-*-*-*-*-*- - -Method : BDT::BDT -TMVA Release : 4.1.4 [262404] -ROOT Release : 5.34/05 [336389] -Creator : ivanpari -Date : Tue Mar 4 15:30:59 2014 -Host : Linux mtop.iihe.ac.be 2.6.18-274.12.1.el5 #1 SMP Wed Nov 30 08:57:58 CET 2011 x86_64 x86_64 x86_64 GNU/Linux -Dir : /user_mnt/user/ivanpari/CMSSW_5_3_12_patch2/src/TopBrussels/FCNCAnalysis/MVA -Training events: 22941 -Analysis type : [Classification] - - -#OPT -*-*-*-*-*-*-*-*-*-*-*-*- options -*-*-*-*-*-*-*-*-*-*-*-*- - -# Set by User: -V: "False" [Verbose output (short form of "VerbosityLevel" below - overrides the latter one)] -H: "False" [Print method-specific help message] -NTrees: "400" [Number of trees in the forest] -BoostType: "AdaBoost" [Boosting type for the trees in the forest] -SeparationType: "giniindex" [Separation criterion for node splitting] -nEventsMin: "40" [Minimum number of events required in a leaf node (default: Classification: max(40, N_train/(Nvar^2)/10), Regression: 10)] -nCuts: "20" [Number of steps during node cut optimisation] -PruneMethod: "nopruning" [Method used for pruning (removal) of statistically insignificant branches] -MaxDepth: "3" [Max depth of the decision tree allowed] -# Default: -VerbosityLevel: "Default" [Verbosity level] -VarTransform: "None" [List of variable transformations performed before training, e.g., "D_Background,P_Signal,G,N_AllClasses" for: "Decorrelation, PCA-transformation, Gaussianisation, Normalisation, each for the given class of events ('AllClasses' denotes all events of all classes, if no class indication is given, 'All' is assumed)"] -CreateMVAPdfs: "False" [Create PDFs for classifier outputs (signal and background)] -IgnoreNegWeightsInTraining: "False" [Events with negative weights are ignored in the training (but are included for testing and performance evaluation)] -RenormByClass: "False" [Individually re-normalize each event class to the original size after boosting] -AdaBoostR2Loss: "quadratic" [Type of Loss function in AdaBoostR2t (Linear,Quadratic or Exponential)] -UseBaggedGrad: "False" [Use only a random subsample of all events for growing the trees in each iteration. (Only valid for GradBoost)] -GradBaggingFraction: "6.000000e-01" [Defines the fraction of events to be used in each iteration when UseBaggedGrad=kTRUE. (Only valid for GradBoost)] -Shrinkage: "1.000000e+00" [Learning rate for GradBoost algorithm] -AdaBoostBeta: "1.000000e+00" [Parameter for AdaBoost algorithm] -UseRandomisedTrees: "False" [Choose at each node splitting a random set of variables] -UseNvars: "2" [Number of variables used if randomised tree option is chosen] -UsePoissonNvars: "True" [Interpret "UseNvars" not as fixed number but as mean of a Possion distribution in each split] -UseNTrainEvents: "22941" [Number of randomly picked training events used in randomised (and bagged) trees] -UseWeightedTrees: "True" [Use weighted trees or simple average in classification from the forest] -UseYesNoLeaf: "True" [Use Sig or Bkg categories, or the purity=S/(S+B) as classification of the leaf node] -NodePurityLimit: "5.000000e-01" [In boosting/pruning, nodes with purity > NodePurityLimit are signal; background otherwise.] -UseFisherCuts: "False" [Use multivariate splits using the Fisher criterion] -MinLinCorrForFisher: "8.000000e-01" [The minimum linear correlation between two variables demanded for use in Fisher criterion in node splitting] -UseExclusiveVars: "False" [Variables already used in fisher criterion are not anymore analysed individually for node splitting] -PruneStrength: "0.000000e+00" [Pruning strength] -PruneBeforeBoost: "False" [Flag to prune the tree before applying boosting algorithm] -PruningValFraction: "5.000000e-01" [Fraction of events to use for optimizing automatic pruning.] -NNodesMax: "100000" [Max number of nodes in tree] -DoBoostMonitor: "False" [Create control plot with ROC integral vs tree number] -NegWeightTreatment: "inverseboostnegweights" [How to treat events with negative weights in the BDT training (particular the boosting) : Ignore; Boost With inverse boostweight; Pair events with negative and positive weights in traning sample and *annihilate* them (experimental!); Randomly pair events with negative and positive weights in leaf node and do not boost them (experimental!) ] -## - - -#VAR -*-*-*-*-*-*-*-*-*-*-*-* variables *-*-*-*-*-*-*-*-*-*-*-*- - -NVar 2 -missingEt missingEt missingEt MET GeV 'F' [0.148029312491,297.377746582] -InvMass_FCNC_top_Zdecay InvMass_FCNC_top_Zdecay InvMass_FCNC_top_Zdecay InvMass_FCNC_top GeV 'F' [73.2049026489,2625.35424805] -NSpec 0 - - -============================================================================ */ - -#include -#include -#include -#include - -#define NN new BDTNode - -#ifndef BDTNode__def -#define BDTNode__def - -class BDTNode { - -public: - - // constructor of an essentially "empty" node floating in space - BDTNode ( BDTNode* left,BDTNode* right, - int selector, double cutValue, bool cutType, - int nodeType, double purity, double response ) : - fLeft ( left ), - fRight ( right ), - fSelector ( selector ), - fCutValue ( cutValue ), - fCutType ( cutType ), - fNodeType ( nodeType ), - fPurity ( purity ), - fResponse ( response ){ - } - - virtual ~BDTNode(); - - // test event if it decends the tree at this node to the right - virtual bool GoesRight( const std::vector& inputValues ) const; - BDTNode* GetRight( void ) {return fRight; }; - - // test event if it decends the tree at this node to the left - virtual bool GoesLeft ( const std::vector& inputValues ) const; - BDTNode* GetLeft( void ) { return fLeft; }; - - // return S/(S+B) (purity) at this node (from training) - - double GetPurity( void ) const { return fPurity; } - // return the node type - int GetNodeType( void ) const { return fNodeType; } - double GetResponse(void) const {return fResponse;} - -private: - - BDTNode* fLeft; // pointer to the left daughter node - BDTNode* fRight; // pointer to the right daughter node - int fSelector; // index of variable used in node selection (decision tree) - double fCutValue; // cut value appplied on this node to discriminate bkg against sig - bool fCutType; // true: if event variable > cutValue ==> signal , false otherwise - int fNodeType; // Type of node: -1 == Bkg-leaf, 1 == Signal-leaf, 0 = internal - double fPurity; // Purity of node from training - double fResponse; // Regression response value of node -}; - -//_______________________________________________________________________ - BDTNode::~BDTNode() -{ - if (fLeft != NULL) delete fLeft; - if (fRight != NULL) delete fRight; -}; - -//_______________________________________________________________________ -bool BDTNode::GoesRight( const std::vector& inputValues ) const -{ - // test event if it decends the tree at this node to the right - bool result; - result = (inputValues[fSelector] > fCutValue ); - if (fCutType == true) return result; //the cuts are selecting Signal ; - else return !result; -} - -//_______________________________________________________________________ -bool BDTNode::GoesLeft( const std::vector& inputValues ) const -{ - // test event if it decends the tree at this node to the left - if (!this->GoesRight(inputValues)) return true; - else return false; -} - -#endif - -#ifndef IClassifierReader__def -#define IClassifierReader__def - -class IClassifierReader { - - public: - - // constructor - IClassifierReader() : fStatusIsClean( true ) {} - virtual ~IClassifierReader() {} - - // return classifier response - virtual double GetMvaValue( const std::vector& inputValues ) const = 0; - - // returns classifier status - bool IsStatusClean() const { return fStatusIsClean; } - - protected: - - bool fStatusIsClean; -}; - -#endif - -class ReadBDT : public IClassifierReader { - - public: - - // constructor - ReadBDT( std::vector& theInputVars ) - : IClassifierReader(), - fClassName( "ReadBDT" ), - fNvars( 2 ), - fIsNormalised( false ) - { - // the training input variables - const char* inputVars[] = { "missingEt", "InvMass_FCNC_top_Zdecay" }; - - // sanity checks - if (theInputVars.size() <= 0) { - std::cout << "Problem in class \"" << fClassName << "\": empty input vector" << std::endl; - fStatusIsClean = false; - } - - if (theInputVars.size() != fNvars) { - std::cout << "Problem in class \"" << fClassName << "\": mismatch in number of input values: " - << theInputVars.size() << " != " << fNvars << std::endl; - fStatusIsClean = false; - } - - // validate input variables - for (size_t ivar = 0; ivar < theInputVars.size(); ivar++) { - if (theInputVars[ivar] != inputVars[ivar]) { - std::cout << "Problem in class \"" << fClassName << "\": mismatch in input variable names" << std::endl - << " for variable [" << ivar << "]: " << theInputVars[ivar].c_str() << " != " << inputVars[ivar] << std::endl; - fStatusIsClean = false; - } - } - - // initialize min and max vectors (for normalisation) - fVmin[0] = 0.148029312491417; - fVmax[0] = 297.377746582031; - fVmin[1] = 73.2049026489258; - fVmax[1] = 2625.35424804688; - - // initialize input variable types - fType[0] = 'F'; - fType[1] = 'F'; - - // initialize constants - Initialize(); - - } - - // destructor - virtual ~ReadBDT() { - Clear(); // method-specific - } - - // the classifier response - // "inputValues" is a vector of input values in the same order as the - // variables given to the constructor - double GetMvaValue( const std::vector& inputValues ) const; - - private: - - // method-specific destructor - void Clear(); - - // common member variables - const char* fClassName; - - const size_t fNvars; - size_t GetNvar() const { return fNvars; } - char GetType( int ivar ) const { return fType[ivar]; } - - // normalisation of input variables - const bool fIsNormalised; - bool IsNormalised() const { return fIsNormalised; } - double fVmin[2]; - double fVmax[2]; - double NormVariable( double x, double xmin, double xmax ) const { - // normalise to output range: [-1, 1] - return 2*(x - xmin)/(xmax - xmin) - 1.0; - } - - // type of input variable: 'F' or 'I' - char fType[2]; - - // initialize internal variables - void Initialize(); - double GetMvaValue__( const std::vector& inputValues ) const; - - // private members (method specific) - std::vector fForest; // i.e. root nodes of decision trees - std::vector fBoostWeights; // the weights applied in the individual boosts -}; - -double ReadBDT::GetMvaValue__( const std::vector& inputValues ) const -{ - double myMVA = 0; - double norm = 0; - for (unsigned int itree=0; itreeGetNodeType() == 0) { //intermediate node - if (current->GoesRight(inputValues)) current=(BDTNode*)current->GetRight(); - else current=(BDTNode*)current->GetLeft(); - } - myMVA += fBoostWeights[itree] * current->GetNodeType(); - norm += fBoostWeights[itree]; - } - return myMVA /= norm; -}; - -void ReadBDT::Initialize() -{ - // itree = 0 - fBoostWeights.push_back(4.29771288731923); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.711098,-99) , -NN( -0, -0, --1, 260.814, 1, -1, 0.386478,-99) , -0, 103.37, 0, 0, 0.46308,-99) , -NN( -0, -0, --1, 50.4046, 0, -1, 0.0112112,-99) , -0, 70.917, 0, 0, 0.0140411,-99) ); - // itree = 1 - fBoostWeights.push_back(0.744619); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 51.2103, 0, 1, 0.864954,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.0323502,-99) , -0, 103.274, 1, 0, 0.801793,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.592434,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.463531,-99) , -0, 34.1368, 0, 0, 0.493355,-99) , -NN( -0, -0, --1, 181.658, 1, -1, 0.305703,-99) , -0, 20.3677, 0, 0, 0.396714,-99) , -0, 42.6094, 0, 0, 0.484622,-99) ); - // itree = 2 - fBoostWeights.push_back(0.445021); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 69.902, 0, 1, 0.896509,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.154328,-99) , -0, 102.639, 1, 0, 0.792443,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.606099,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498575,-99) , -0, 19.0194, 0, 0, 0.562229,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.777927,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.17221,-99) , -0, 48.4101, 0, 0, 0.255683,-99) , -1, 323.204, 1, 0, 0.54404,-99) , -0, 56.7632, 0, 0, 0.56865,-99) ); - // itree = 3 - fBoostWeights.push_back(0.48113); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 69.902, 0, 1, 0.847354,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.221658,-99) , -0, 102.639, 1, 0, 0.757598,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.580971,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.16314,-99) , -1, 332.246, 1, 0, 0.565146,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.564347,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.36081,-99) , -0, 46.3637, 0, 0, 0.412753,-99) , -0, 32.4989, 1, 0, 0.530863,-99) , -0, 56.7632, 0, 0, 0.550435,-99) ); - // itree = 4 - fBoostWeights.push_back(0.347422); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 69.902, 0, 1, 0.77432,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.31542,-99) , -0, 102.639, 1, 0, 0.706306,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.532609,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.410202,-99) , -1, 161.649, 0, 0, 0.488662,-99) , -NN( -0, -0, --1, 24.4504, 0, -1, 0.388146,-99) , -1, 202.039, 1, 0, 0.457366,-99) , -0, 56.7632, 0, 0, 0.476498,-99) ); - // itree = 5 - fBoostWeights.push_back(0.203292); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 260.814, 1, 1, 0.869179,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.201202,-99) , -0, 103.37, 1, 0, 0.74185,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.923088,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 902.307, 1, 0, 0.807012,-99) , -NN( -0, -0, --1, 425.226, 1, -1, 0.466175,-99) , -1, 807.868, 0, 0, 0.468653,-99) , -0, 70.917, 0, 0, 0.480576,-99) ); - // itree = 6 - fBoostWeights.push_back(0.189794); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 260.814, 1, 1, 0.84428,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.235861,-99) , -0, 103.37, 1, 0, 0.726861,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.810184,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.495876,-99) , -0, 6.20301, 0, 0, 0.60137,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.520649,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.334517,-99) , -0, 9.88098, 0, 0, 0.510766,-99) , -0, 6.84891, 1, 0, 0.518798,-99) , -0, 70.917, 0, 0, 0.527311,-99) ); - // itree = 7 - fBoostWeights.push_back(0.211695); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 260.814, 1, 1, 0.817668,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.27176,-99) , -0, 103.37, 1, 0, 0.710939,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.644473,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 286.809, 1, 0, 0.619334,-99) , -NN( -0, -0, --1, 12.9123, 0, -1, 0.468313,-99) , -0, 6.84891, 1, 0, 0.481518,-99) , -0, 70.917, 0, 0, 0.4904,-99) ); - // itree = 8 - fBoostWeights.push_back(0.167308); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 260.814, 1, 1, 0.783967,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.315611,-99) , -0, 103.37, 1, 0, 0.690916,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.91689,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -0, 22.2003, 1, 0, 0.800835,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.527483,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.204165,-99) , -1, 425.226, 1, 0, 0.523746,-99) , -1, 807.868, 0, 0, 0.525615,-99) , -0, 70.917, 0, 0, 0.531677,-99) ); - // itree = 9 - fBoostWeights.push_back(0.108692); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 260.814, 1, 1, 0.75429,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.35281,-99) , -0, 103.37, 1, 0, 0.673415,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.904661,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 902.307, 1, 0, 0.790386,-99) , -NN( -0, -0, --1, 528.532, 1, -1, 0.482893,-99) , -1, 807.868, 0, 0, 0.48483,-99) , -0, 70.917, 0, 0, 0.491488,-99) ); - // itree = 10 - fBoostWeights.push_back(0.138758); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.753342,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.012773,-99) , -1, 146.609, 0, 0, 0.690093,-99) , -NN( -0, -0, --1, 68.3289, 0, -1, 0.454993,-99) , -1, 244.898, 1, 0, 0.623499,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.700705,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498286,-99) , -0, 14.7792, 0, 0, 0.542197,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502247,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.351137,-99) , -0, 18.2516, 0, 0, 0.492823,-99) , -0, 16.3235, 1, 0, 0.509592,-99) , -0, 56.7632, 0, 0, 0.516865,-99) ); - // itree = 11 - fBoostWeights.push_back(0.215231); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 260.814, 1, 1, 0.73165,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.389234,-99) , -0, 103.37, 1, 0, 0.66315,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.568358,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 363.242, 1, 0, 0.560937,-99) , -NN( -0, -0, --1, 27.1116, 0, -1, 0.46522,-99) , -0, 16.9002, 1, 0, 0.498175,-99) , -0, 70.917, 0, 0, 0.503688,-99) ); - // itree = 12 - fBoostWeights.push_back(0.109304); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.739339,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.0154735,-99) , -1, 146.609, 0, 0, 0.68008,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.518373,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.479467,-99) , -0, 68.3289, 1, 0, 0.491519,-99) , -1, 244.898, 1, 0, 0.625919,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.903503,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -0, 23.4182, 1, 0, 0.821019,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.512313,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 528.532, 1, 0, 0.510485,-99) , -1, 807.868, 0, 0, 0.512409,-99) , -0, 56.7632, 0, 0, 0.519437,-99) ); - // itree = 13 - fBoostWeights.push_back(0.113385); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.717731,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.0172299,-99) , -1, 146.609, 0, 0, 0.661835,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.516365,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.48736,-99) , -0, 79.7814, 0, 0, 0.501909,-99) , -1, 244.898, 1, 0, 0.615025,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.893544,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -0, 23.4182, 1, 0, 0.812787,-99) , -NN( -0, -0, --1, 528.532, 1, -1, 0.483356,-99) , -1, 807.868, 0, 0, 0.485308,-99) , -0, 56.7632, 0, 0, 0.493196,-99) ); - // itree = 14 - fBoostWeights.push_back(0.102914); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.591951,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.37222,-99) , -1, 146.355, 0, 0, 0.579255,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.0747935,-99) , -1, 588.284, 1, 0, 0.572904,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.916209,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -0, 20.7661, 0, 0, 0.836788,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50881,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 498.38, 1, 0, 0.507032,-99) , -1, 815.005, 0, 0, 0.509015,-99) , -0, 42.6094, 0, 0, 0.518538,-99) ); - // itree = 15 - fBoostWeights.push_back(0.107375); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 219.505, 0, 1, 0.557072,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.0822341,-99) , -1, 588.284, 1, 0, 0.551296,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.907962,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -0, 20.7661, 0, 0, 0.829903,-99) , -NN( -0, -0, --1, 396.501, 1, -1, 0.481485,-99) , -1, 815.005, 0, 0, 0.483492,-99) , -0, 42.6094, 0, 0, 0.493523,-99) ); - // itree = 16 - fBoostWeights.push_back(0.080096); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.592354,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 126.98, 0, 0, 0.579161,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.865941,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498102,-99) , -1, 810.715, 0, 0, 0.500138,-99) , -1, 153.87, 1, 0, 0.512801,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.512298,-99) ); - // itree = 17 - fBoostWeights.push_back(0.115379); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.527437,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.526399,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.525901,-99) ); - // itree = 18 - fBoostWeights.push_back(0.0228174); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.83825,-99) , -NN( -0, -0, --1, 554.163, 1, -1, 0.496198,-99) , -1, 799.191, 0, 0, 0.497692,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497247,-99) ); - // itree = 19 - fBoostWeights.push_back(0.026); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.835132,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.503276,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 554.163, 1, 0, 0.501902,-99) , -1, 799.191, 0, 0, 0.503346,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.502902,-99) ); - // itree = 20 - fBoostWeights.push_back(0.0255921); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.831521,-99) , -NN( -0, -0, --1, 554.163, 1, -1, 0.495438,-99) , -1, 799.191, 0, 0, 0.496882,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.496448,-99) ); - // itree = 21 - fBoostWeights.push_back(0.0219678); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.504153,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.503225,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.502792,-99) ); - // itree = 22 - fBoostWeights.push_back(0.0216647); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.824753,-99) , -NN( -0, -0, --1, 554.163, 1, -1, 0.496364,-99) , -1, 799.191, 0, 0, 0.497753,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497329,-99) ); - // itree = 23 - fBoostWeights.push_back(0.0213683); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.504031,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.503123,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.5027,-99) ); - // itree = 24 - fBoostWeights.push_back(0.0211526); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.822101,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497338,-99) , -1, 804.982, 0, 0, 0.498689,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497801,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497386,-99) ); - // itree = 25 - fBoostWeights.push_back(0.0208687); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.503934,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.503045,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50263,-99) ); - // itree = 26 - fBoostWeights.push_back(0.0205909); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.815872,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497409,-99) , -1, 804.982, 0, 0, 0.498717,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497846,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49744,-99) ); - // itree = 27 - fBoostWeights.push_back(0.0203189); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.503822,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.502952,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.502545,-99) ); - // itree = 28 - fBoostWeights.push_back(0.0200526); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.809647,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497477,-99) , -1, 804.982, 0, 0, 0.498743,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49789,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497491,-99) ); - // itree = 29 - fBoostWeights.push_back(0.0197918); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.503715,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.502862,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.502464,-99) ); - // itree = 30 - fBoostWeights.push_back(0.0195363); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.80343,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497542,-99) , -1, 804.982, 0, 0, 0.498767,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497931,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497541,-99) ); - // itree = 31 - fBoostWeights.push_back(0.0192859); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.503612,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.502776,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.502386,-99) ); - // itree = 32 - fBoostWeights.push_back(0.0190405); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.797227,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497605,-99) , -1, 804.982, 0, 0, 0.498791,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497971,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497588,-99) ); - // itree = 33 - fBoostWeights.push_back(0.0188); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.503513,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.502693,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50231,-99) ); - // itree = 34 - fBoostWeights.push_back(0.134289); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.842708,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.440505,-99) , -1, 171.077, 0, 0, 0.661423,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.451091,-99) , -1, 244.898, 1, 0, 0.576054,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.584994,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.492993,-99) , -0, 16.2621, 1, 0, 0.505134,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.587599,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.429291,-99) , -0, 4.61524, 1, 0, 0.461084,-99) , -0, 13.5498, 0, 0, 0.495246,-99) , -0, 70.917, 0, 0, 0.497633,-99) ); - // itree = 35 - fBoostWeights.push_back(0.166591); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.561397,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.284959,-99) , -1, 146.74, 0, 0, 0.549595,-99) , -NN( -0, -0, --1, 712.481, 0, -1, 0.0625231,-99) , -1, 588.284, 1, 0, 0.546734,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.515117,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 320.707, 1, 0, 0.513217,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.812611,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 769.23, 0, 0, 0.228787,-99) , -1, 332.246, 1, 0, 0.507123,-99) , -0, 28.4556, 0, 0, 0.521011,-99) ); - // itree = 36 - fBoostWeights.push_back(0.156123); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.654396,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.0614501,-99) , -1, 551.599, 1, 0, 0.613554,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501804,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 134.44, 0, 0, 0.498355,-99) , -1, 330.745, 0, 0, 0.509306,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.578423,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.462749,-99) , -1, 274.739, 0, 0, 0.471892,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.785915,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 769.23, 0, 0, 0.22662,-99) , -1, 332.246, 1, 0, 0.467007,-99) , -0, 28.4556, 0, 0, 0.481766,-99) ); - // itree = 37 - fBoostWeights.push_back(0.111308); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50658,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 320.707, 1, 0, 0.504716,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.758478,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 769.23, 0, 0, 0.224281,-99) , -1, 332.246, 1, 0, 0.499472,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.61829,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.0710951,-99) , -1, 551.599, 1, 0, 0.582196,-99) , -NN( -0, -0, --1, 134.44, 0, -1, 0.459906,-99) , -1, 330.745, 0, 0, 0.471254,-99) , -0, 28.4556, 1, 0, 0.489599,-99) ); - // itree = 38 - fBoostWeights.push_back(0.123009); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.68522,-99) , -NN( -0, -0, --1, 524.158, 1, -1, 0.486726,-99) , -1, 802.39, 0, 0, 0.487775,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.517047,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -0, 2.84398, 0, 0, 0.500657,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.740196,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.35745,-99) , -0, 2.22879, 1, 0, 0.394353,-99) , -1, 181.658, 1, 0, 0.456127,-99) , -0, 14.3018, 0, 0, 0.480112,-99) ); - // itree = 39 - fBoostWeights.push_back(0.132863); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 153.824, 1, 1, 0.518646,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.518195,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.542541,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 279.928, 1, 0, 0.520553,-99) , -NN( -0, -0, --1, 10.5136, 1, -1, 0.41412,-99) , -0, 11.6058, 0, 0, 0.449282,-99) , -0, 14.3018, 0, 0, 0.501617,-99) ); - // itree = 40 - fBoostWeights.push_back(0.145237); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.547824,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.266086,-99) , -1, 138.504, 0, 0, 0.525665,-99) , -NN( -NN( -0, -0, --1, 0, 1, 1, 0.73277,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.469887,-99) , -1, 810.715, 0, 0, 0.470922,-99) , -1, 153.87, 1, 0, 0.479629,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.479302,-99) ); - // itree = 41 - fBoostWeights.push_back(0.114765); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.526313,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.474498,-99) , -1, 170.011, 0, 0, 0.507345,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 125.279, 0, 0, 0.506211,-99) , -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.536331,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.266157,-99) , -0, 41.4457, 1, 0, 0.427782,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -0, 14.5043, 0, 0, 0.39399,-99) , -1, 437.798, 1, 0, 0.504716,-99) ); - // itree = 42 - fBoostWeights.push_back(0.0124298); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500144,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.39434,-99) , -1, 382.559, 1, 0, 0.49808,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497489,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497174,-99) ); - // itree = 43 - fBoostWeights.push_back(0.0232054); - fForest.push_back( -NN( -0, -0, --1, 923.921, 1, -1, 0.494199,-99) ); - // itree = 44 - fBoostWeights.push_back(0.0222219); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502838,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.402882,-99) , -1, 382.559, 1, 0, 0.500895,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500311,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.5,-99) ); - // itree = 45 - fBoostWeights.push_back(0.0333292); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.609807,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.493964,-99) , -0, 85.0708, 0, 0, 0.495555,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.494984,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49468,-99) ); - // itree = 46 - fBoostWeights.push_back(0.0312846); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.505416,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.414691,-99) , -1, 382.559, 1, 0, 0.503659,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.503088,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.502783,-99) ); - // itree = 47 - fBoostWeights.push_back(0.0243492); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.715884,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.495436,-99) , -1, 804.982, 0, 0, 0.49614,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.495587,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.495291,-99) ); - // itree = 48 - fBoostWeights.push_back(0.0121219); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 70.917, 0, 1, 0.502189,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501635,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50134,-99) ); - // itree = 49 - fBoostWeights.push_back(0.0221815); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.57079,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497145,-99) , -0, 70.917, 0, 0, 0.499158,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498611,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498319,-99) ); - // itree = 50 - fBoostWeights.push_back(0.0208985); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.504401,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.503854,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.503562,-99) ); - // itree = 51 - fBoostWeights.push_back(0.0118535); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.708128,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498511,-99) , -1, 804.982, 0, 0, 0.499176,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498641,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498355,-99) ); - // itree = 52 - fBoostWeights.push_back(0.0117398); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.502121,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501585,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.5013,-99) ); - // itree = 53 - fBoostWeights.push_back(0.0116276); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.703228,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49854,-99) , -1, 804.982, 0, 0, 0.499186,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498657,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498374,-99) ); - // itree = 54 - fBoostWeights.push_back(0.0234701); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.503641,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.422209,-99) , -1, 382.559, 1, 0, 0.502074,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501545,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501263,-99) ); - // itree = 55 - fBoostWeights.push_back(0.0226434); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.705694,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.495768,-99) , -1, 804.982, 0, 0, 0.496432,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.495915,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.495639,-99) ); - // itree = 56 - fBoostWeights.push_back(0.0113762); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.502057,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50154,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501264,-99) ); - // itree = 57 - fBoostWeights.push_back(0.0112691); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.698579,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498585,-99) , -1, 804.982, 0, 0, 0.499213,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498702,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498429,-99) ); - // itree = 58 - fBoostWeights.push_back(0.0111633); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.502013,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501502,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501229,-99) ); - // itree = 59 - fBoostWeights.push_back(0.0110588); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.693834,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498611,-99) , -1, 804.982, 0, 0, 0.499222,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498717,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498447,-99) ); - // itree = 60 - fBoostWeights.push_back(0.0109557); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 85.0708, 0, 1, 0.50197,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501464,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501194,-99) ); - // itree = 61 - fBoostWeights.push_back(0.0159604); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.590629,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497974,-99) , -0, 85.0708, 0, 0, 0.499231,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498731,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498464,-99) ); - // itree = 62 - fBoostWeights.push_back(0.0154802); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.503113,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.502613,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.502346,-99) ); - // itree = 63 - fBoostWeights.push_back(0.0107497); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.688835,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49865,-99) , -1, 804.982, 0, 0, 0.499243,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49875,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498488,-99) ); - // itree = 64 - fBoostWeights.push_back(0.0450438); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.510001,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.48862,-99) , -1, 190.549, 1, 0, 0.501913,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501421,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501158,-99) ); - // itree = 65 - fBoostWeights.push_back(0.0111671); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.696137,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498552,-99) , -1, 804.982, 0, 0, 0.499171,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498693,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498437,-99) ); - // itree = 66 - fBoostWeights.push_back(0.0106977); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 70.917, 0, 1, 0.501946,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501467,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501211,-99) ); - // itree = 67 - fBoostWeights.push_back(0.0105999); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.691493,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498669,-99) , -1, 804.982, 0, 0, 0.499271,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498798,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498545,-99) ); - // itree = 68 - fBoostWeights.push_back(0.0105032); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 70.917, 0, 1, 0.501905,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501431,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501178,-99) ); - // itree = 69 - fBoostWeights.push_back(0.0195864); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.563502,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49748,-99) , -0, 70.917, 0, 0, 0.499279,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49881,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49856,-99) ); - // itree = 70 - fBoostWeights.push_back(0.0184656); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.503909,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50344,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50319,-99) ); - // itree = 71 - fBoostWeights.push_back(0.0102924); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.686713,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498708,-99) , -1, 804.982, 0, 0, 0.499292,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498832,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498587,-99) ); - // itree = 72 - fBoostWeights.push_back(0.0101997); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.50185,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50139,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501144,-99) ); - // itree = 73 - fBoostWeights.push_back(0.010108); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.682288,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498731,-99) , -1, 804.982, 0, 0, 0.4993,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498844,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498601,-99) ); - // itree = 74 - fBoostWeights.push_back(0.0100174); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501811,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501356,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501113,-99) ); - // itree = 75 - fBoostWeights.push_back(0.00992789); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.67791,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498753,-99) , -1, 804.982, 0, 0, 0.499307,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498856,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498615,-99) ); - // itree = 76 - fBoostWeights.push_back(0.0399326); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.507284,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.484275,-99) , -0, 14.3018, 0, 0, 0.501773,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501323,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501082,-99) ); - // itree = 77 - fBoostWeights.push_back(0.0163975); - fForest.push_back( -NN( -0, -0, --1, 923.921, 1, -1, 0.495901,-99) ); - // itree = 78 - fBoostWeights.push_back(0.0121544); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501533,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.388685,-99) , -1, 497.765, 1, 0, 0.500671,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500233,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.5,-99) ); - // itree = 79 - fBoostWeights.push_back(0.0162211); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.674626,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497134,-99) , -1, 804.982, 0, 0, 0.497679,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497247,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497016,-99) ); - // itree = 80 - fBoostWeights.push_back(0.0160312); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50255,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.391931,-99) , -1, 497.765, 1, 0, 0.501709,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501277,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501046,-99) ); - // itree = 81 - fBoostWeights.push_back(0.0158445); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.674584,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497218,-99) , -1, 804.982, 0, 0, 0.497762,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497337,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49711,-99) ); - // itree = 82 - fBoostWeights.push_back(0.00938765); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501699,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501274,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501047,-99) ); - // itree = 83 - fBoostWeights.push_back(0.00930601); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.669021,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498832,-99) , -1, 804.982, 0, 0, 0.499352,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498931,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498706,-99) ); - // itree = 84 - fBoostWeights.push_back(0.019199); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502969,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.433926,-99) , -1, 382.559, 1, 0, 0.501664,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501243,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501018,-99) ); - // itree = 85 - fBoostWeights.push_back(0.0185438); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.671208,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.496511,-99) , -1, 804.982, 0, 0, 0.497046,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.496632,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.496412,-99) ); - // itree = 86 - fBoostWeights.push_back(0.00913377); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501653,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50124,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501019,-99) ); - // itree = 87 - fBoostWeights.push_back(0.00905515); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.665071,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498863,-99) , -1, 804.982, 0, 0, 0.49937,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49896,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498741,-99) ); - // itree = 88 - fBoostWeights.push_back(0.0151369); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502409,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.397098,-99) , -1, 497.765, 1, 0, 0.50162,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50121,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500992,-99) ); - // itree = 89 - fBoostWeights.push_back(0.0149654); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.666424,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497376,-99) , -1, 804.982, 0, 0, 0.497892,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497489,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497273,-99) ); - // itree = 90 - fBoostWeights.push_back(0.00890408); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 85.0708, 0, 1, 0.501611,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501207,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500992,-99) ); - // itree = 91 - fBoostWeights.push_back(0.0131962); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.577457,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498326,-99) , -0, 85.0708, 0, 0, 0.499385,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498985,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498771,-99) ); - // itree = 92 - fBoostWeights.push_back(0.0128116); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.502596,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.502196,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501982,-99) ); - // itree = 93 - fBoostWeights.push_back(0.00875778); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.660831,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498901,-99) , -1, 804.982, 0, 0, 0.499393,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498998,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498787,-99) ); - // itree = 94 - fBoostWeights.push_back(0.0147221); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502342,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.398605,-99) , -1, 497.765, 1, 0, 0.501569,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501174,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500963,-99) ); - // itree = 95 - fBoostWeights.push_back(0.0145574); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.662167,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497442,-99) , -1, 804.982, 0, 0, 0.497943,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497554,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497346,-99) ); - // itree = 96 - fBoostWeights.push_back(0.00861478); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.50156,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501171,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500964,-99) ); - // itree = 97 - fBoostWeights.push_back(0.0085422); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.656964,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498928,-99) , -1, 804.982, 0, 0, 0.499407,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499021,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498815,-99) ); - // itree = 98 - fBoostWeights.push_back(0.0143556); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502283,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.400604,-99) , -1, 497.765, 1, 0, 0.501529,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501144,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500938,-99) ); - // itree = 99 - fBoostWeights.push_back(0.0141967); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.658273,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497506,-99) , -1, 804.982, 0, 0, 0.497994,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497613,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49741,-99) ); - // itree = 100 - fBoostWeights.push_back(0.00840486); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501521,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501141,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500938,-99) ); - // itree = 101 - fBoostWeights.push_back(0.00833462); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.65317,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498954,-99) , -1, 804.982, 0, 0, 0.49942,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499043,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498842,-99) ); - // itree = 102 - fBoostWeights.push_back(0.0140024); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502226,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.402561,-99) , -1, 497.765, 1, 0, 0.501491,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501114,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500913,-99) ); - // itree = 103 - fBoostWeights.push_back(0.0138492); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.654453,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497567,-99) , -1, 804.982, 0, 0, 0.498042,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49767,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497472,-99) ); - // itree = 104 - fBoostWeights.push_back(0.00820262); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 85.0708, 0, 1, 0.501483,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501112,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500913,-99) ); - // itree = 105 - fBoostWeights.push_back(0.012209); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.572076,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498452,-99) , -0, 85.0708, 0, 0, 0.499433,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499064,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498867,-99) ); - // itree = 106 - fBoostWeights.push_back(0.0173325); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.503112,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.406655,-99) , -1, 497.765, 1, 0, 0.502404,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.502035,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501838,-99) ); - // itree = 107 - fBoostWeights.push_back(0.0134601); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.655817,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497655,-99) , -1, 804.982, 0, 0, 0.498134,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497772,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497578,-99) ); - // itree = 108 - fBoostWeights.push_back(0.00812709); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501479,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501116,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500923,-99) ); - // itree = 109 - fBoostWeights.push_back(0.00806011); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.650928,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498988,-99) , -1, 804.982, 0, 0, 0.499447,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499087,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498895,-99) ); - // itree = 110 - fBoostWeights.push_back(0.00799381); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.50145,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50109,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500898,-99) ); - // itree = 111 - fBoostWeights.push_back(0.00792819); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.647272,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499005,-99) , -1, 804.982, 0, 0, 0.499452,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499095,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498904,-99) ); - // itree = 112 - fBoostWeights.push_back(0.0132459); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502111,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.407654,-99) , -1, 497.765, 1, 0, 0.501422,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501065,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500874,-99) ); - // itree = 113 - fBoostWeights.push_back(0.0131042); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.648485,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497704,-99) , -1, 804.982, 0, 0, 0.498158,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497806,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497618,-99) ); - // itree = 114 - fBoostWeights.push_back(0.00780727); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501415,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501063,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500875,-99) ); - // itree = 115 - fBoostWeights.push_back(0.00774364); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.643703,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499028,-99) , -1, 804.982, 0, 0, 0.499463,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499114,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498927,-99) ); - // itree = 116 - fBoostWeights.push_back(0.00768064); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 70.917, 0, 1, 0.501387,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501038,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500851,-99) ); - // itree = 117 - fBoostWeights.push_back(0.0143407); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.546726,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498156,-99) , -0, 70.917, 0, 0, 0.499467,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49912,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498935,-99) ); - // itree = 118 - fBoostWeights.push_back(0.0187597); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.503538,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.410094,-99) , -1, 497.765, 1, 0, 0.502859,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.502512,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.502327,-99) ); - // itree = 119 - fBoostWeights.push_back(0.0126876); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.647357,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497786,-99) , -1, 804.982, 0, 0, 0.498237,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497897,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497715,-99) ); - // itree = 120 - fBoostWeights.push_back(0.00763483); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.50139,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50105,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500868,-99) ); - // itree = 121 - fBoostWeights.push_back(0.00757317); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.642704,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49905,-99) , -1, 804.982, 0, 0, 0.499481,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499143,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498963,-99) ); - // itree = 122 - fBoostWeights.push_back(0.00751213); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501363,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501025,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500845,-99) ); - // itree = 123 - fBoostWeights.push_back(0.00745168); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.639232,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499065,-99) , -1, 804.982, 0, 0, 0.499485,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49915,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498971,-99) ); - // itree = 124 - fBoostWeights.push_back(0.015489); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502394,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.445408,-99) , -1, 382.559, 1, 0, 0.501337,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501002,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500823,-99) ); - // itree = 125 - fBoostWeights.push_back(0.0149764); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.641084,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497176,-99) , -1, 804.982, 0, 0, 0.497608,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497278,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497102,-99) ); - // itree = 126 - fBoostWeights.push_back(0.00733331); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.50133,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500824,-99) ); - // itree = 127 - fBoostWeights.push_back(0.00727472); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.635934,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499087,-99) , -1, 804.982, 0, 0, 0.499496,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499169,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498994,-99) ); - // itree = 128 - fBoostWeights.push_back(0.0121465); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501935,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.414188,-99) , -1, 497.765, 1, 0, 0.501304,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500977,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500802,-99) ); - // itree = 129 - fBoostWeights.push_back(0.0120206); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.637062,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497895,-99) , -1, 804.982, 0, 0, 0.498311,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497988,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497815,-99) ); - // itree = 130 - fBoostWeights.push_back(0.00716954); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501298,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500975,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500802,-99) ); - // itree = 131 - fBoostWeights.push_back(0.00711261); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.632613,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499107,-99) , -1, 804.982, 0, 0, 0.499506,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499185,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499013,-99) ); - // itree = 132 - fBoostWeights.push_back(0.011869); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501889,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.41588,-99) , -1, 497.765, 1, 0, 0.501274,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500952,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500781,-99) ); - // itree = 133 - fBoostWeights.push_back(0.011747); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.633718,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497943,-99) , -1, 804.982, 0, 0, 0.498349,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498031,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497862,-99) ); - // itree = 134 - fBoostWeights.push_back(0.00701102); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 85.0708, 0, 1, 0.501268,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50095,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500781,-99) ); - // itree = 135 - fBoostWeights.push_back(0.0104137); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.561863,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49868,-99) , -0, 85.0708, 0, 0, 0.499515,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.4992,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499031,-99) ); - // itree = 136 - fBoostWeights.push_back(0.0101186); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.50205,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501735,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501566,-99) ); - // itree = 137 - fBoostWeights.push_back(0.00691073); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.629132,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499133,-99) , -1, 804.982, 0, 0, 0.49952,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499208,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499041,-99) ); - // itree = 138 - fBoostWeights.push_back(0.0115831); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501842,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.417123,-99) , -1, 497.765, 1, 0, 0.501238,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500925,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500759,-99) ); - // itree = 139 - fBoostWeights.push_back(0.0114652); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.630222,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497989,-99) , -1, 804.982, 0, 0, 0.498383,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498075,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49791,-99) ); - // itree = 140 - fBoostWeights.push_back(0.00681355); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501232,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500924,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500759,-99) ); - // itree = 141 - fBoostWeights.push_back(0.00676021); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.625952,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499152,-99) , -1, 804.982, 0, 0, 0.499529,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499222,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499059,-99) ); - // itree = 142 - fBoostWeights.push_back(0.0113238); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501799,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.418753,-99) , -1, 497.765, 1, 0, 0.501209,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500902,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500739,-99) ); - // itree = 143 - fBoostWeights.push_back(0.0112093); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.62702,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498034,-99) , -1, 804.982, 0, 0, 0.498418,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498115,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497953,-99) ); - // itree = 144 - fBoostWeights.push_back(0.0103254); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501669,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.401084,-99) , -1, 536.167, 1, 0, 0.501204,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500901,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500739,-99) ); - // itree = 145 - fBoostWeights.push_back(0.0102723); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.626813,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498264,-99) , -1, 804.982, 0, 0, 0.498646,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498346,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498186,-99) ); - // itree = 146 - fBoostWeights.push_back(0.0066287); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501199,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500899,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500739,-99) ); - // itree = 147 - fBoostWeights.push_back(0.00657722); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.622851,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499175,-99) , -1, 804.982, 0, 0, 0.499542,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499244,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499085,-99) ); - // itree = 148 - fBoostWeights.push_back(0.0101959); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501643,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.400333,-99) , -1, 536.167, 1, 0, 0.501177,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500879,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500719,-99) ); - // itree = 149 - fBoostWeights.push_back(0.0101442); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.623701,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498278,-99) , -1, 804.982, 0, 0, 0.498651,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498356,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498199,-99) ); - // itree = 150 - fBoostWeights.push_back(0.010093); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50163,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.401788,-99) , -1, 536.167, 1, 0, 0.501172,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500877,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50072,-99) ); - // itree = 151 - fBoostWeights.push_back(0.0100424); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.623689,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498299,-99) , -1, 804.982, 0, 0, 0.498672,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49838,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498224,-99) ); - // itree = 152 - fBoostWeights.push_back(0.00645406); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 85.0708, 0, 1, 0.501168,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500876,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50072,-99) ); - // itree = 153 - fBoostWeights.push_back(0.00961136); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.557338,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498781,-99) , -0, 85.0708, 0, 0, 0.499554,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499264,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499109,-99) ); - // itree = 154 - fBoostWeights.push_back(0.0128606); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502345,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.403716,-99) , -1, 536.167, 1, 0, 0.501894,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501603,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501449,-99) ); - // itree = 155 - fBoostWeights.push_back(0.00989345); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.624822,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498332,-99) , -1, 804.982, 0, 0, 0.498708,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498421,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498268,-99) ); - // itree = 156 - fBoostWeights.push_back(0.00641526); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501166,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50088,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500727,-99) ); - // itree = 157 - fBoostWeights.push_back(0.006366); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.620991,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499201,-99) , -1, 804.982, 0, 0, 0.499563,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499278,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499126,-99) ); - // itree = 158 - fBoostWeights.push_back(0.00982267); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50159,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.403648,-99) , -1, 536.167, 1, 0, 0.501145,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50086,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500708,-99) ); - // itree = 159 - fBoostWeights.push_back(0.00977466); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.621804,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498345,-99) , -1, 804.982, 0, 0, 0.498711,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49843,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498279,-99) ); - // itree = 160 - fBoostWeights.push_back(0.00972712); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501579,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.405032,-99) , -1, 536.167, 1, 0, 0.501141,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500859,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500708,-99) ); - // itree = 161 - fBoostWeights.push_back(0.00968004); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.621793,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498364,-99) , -1, 804.982, 0, 0, 0.498731,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498452,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498303,-99) ); - // itree = 162 - fBoostWeights.push_back(0.00625074); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501136,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500857,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500708,-99) ); - // itree = 163 - fBoostWeights.push_back(0.00620307); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.618039,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499222,-99) , -1, 804.982, 0, 0, 0.499574,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499296,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499148,-99) ); - // itree = 164 - fBoostWeights.push_back(0.00961244); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501555,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.404262,-99) , -1, 536.167, 1, 0, 0.501115,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500838,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50069,-99) ); - // itree = 165 - fBoostWeights.push_back(0.00956647); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.618844,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498377,-99) , -1, 804.982, 0, 0, 0.498734,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498459,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498313,-99) ); - // itree = 166 - fBoostWeights.push_back(0.0176881); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502716,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.475097,-99) , -1, 305.755, 1, 0, 0.501111,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500837,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50069,-99) ); - // itree = 167 - fBoostWeights.push_back(0.0289627); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.516508,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.494517,-99) , -1, 267.353, 0, 0, 0.497203,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.496933,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.496789,-99) ); - // itree = 168 - fBoostWeights.push_back(0.0252119); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50455,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.472286,-99) , -1, 305.755, 1, 0, 0.502675,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.502406,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.502262,-99) ); - // itree = 169 - fBoostWeights.push_back(0.0160377); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.619874,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.496739,-99) , -1, 804.982, 0, 0, 0.497105,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.496842,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.496701,-99) ); - // itree = 170 - fBoostWeights.push_back(0.0256014); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.510114,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.496218,-99) , -0, 28.4556, 0, 0, 0.50109,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500827,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500687,-99) ); - // itree = 171 - fBoostWeights.push_back(0.0135914); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.503003,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.502742,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.502603,-99) ); - // itree = 172 - fBoostWeights.push_back(0.00592225); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.616257,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499257,-99) , -1, 804.982, 0, 0, 0.499605,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499348,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499211,-99) ); - // itree = 173 - fBoostWeights.push_back(0.00924774); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501505,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.406285,-99) , -1, 536.167, 1, 0, 0.501077,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50082,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500682,-99) ); - // itree = 174 - fBoostWeights.push_back(0.00920518); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.617043,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498433,-99) , -1, 804.982, 0, 0, 0.498786,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498531,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498395,-99) ); - // itree = 175 - fBoostWeights.push_back(0.00916301); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501494,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.407562,-99) , -1, 536.167, 1, 0, 0.501073,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500818,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500682,-99) ); - // itree = 176 - fBoostWeights.push_back(0.00912122); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.617033,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49845,-99) , -1, 804.982, 0, 0, 0.498803,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498551,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498416,-99) ); - // itree = 177 - fBoostWeights.push_back(0.00582119); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.50107,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500817,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500682,-99) ); - // itree = 178 - fBoostWeights.push_back(0.00577766); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.613496,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499275,-99) , -1, 804.982, 0, 0, 0.499614,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499363,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499229,-99) ); - // itree = 179 - fBoostWeights.push_back(0.00906214); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501473,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.406813,-99) , -1, 536.167, 1, 0, 0.50105,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500799,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500665,-99) ); - // itree = 180 - fBoostWeights.push_back(0.00902126); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.614275,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498461,-99) , -1, 804.982, 0, 0, 0.498805,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498556,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498423,-99) ); - // itree = 181 - fBoostWeights.push_back(0.00898075); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501463,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.408052,-99) , -1, 536.167, 1, 0, 0.501047,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500798,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500665,-99) ); - // itree = 182 - fBoostWeights.push_back(0.0089406); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.614265,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498478,-99) , -1, 804.982, 0, 0, 0.498822,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498575,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498444,-99) ); - // itree = 183 - fBoostWeights.push_back(0.0096817); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501555,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.427454,-99) , -1, 497.765, 1, 0, 0.501044,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500797,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500665,-99) ); - // itree = 184 - fBoostWeights.push_back(0.00959125); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.614441,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498311,-99) , -1, 804.982, 0, 0, 0.498656,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498412,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498282,-99) ); - // itree = 185 - fBoostWeights.push_back(0.00565209); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.50104,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500796,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500666,-99) ); - // itree = 186 - fBoostWeights.push_back(0.00561015); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.610823,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499296,-99) , -1, 804.982, 0, 0, 0.499627,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499384,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499255,-99) ); - // itree = 187 - fBoostWeights.push_back(0.00879906); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501432,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.40863,-99) , -1, 536.167, 1, 0, 0.501021,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500778,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500649,-99) ); - // itree = 188 - fBoostWeights.push_back(0.00876052); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.611581,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498505,-99) , -1, 804.982, 0, 0, 0.498841,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.4986,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498472,-99) ); - // itree = 189 - fBoostWeights.push_back(0.00872231); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501422,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.409817,-99) , -1, 536.167, 1, 0, 0.501018,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500777,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500649,-99) ); - // itree = 190 - fBoostWeights.push_back(0.00868444); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.611572,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498521,-99) , -1, 804.982, 0, 0, 0.498857,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498618,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498491,-99) ); - // itree = 191 - fBoostWeights.push_back(0.00864689); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501413,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.410991,-99) , -1, 536.167, 1, 0, 0.501015,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500776,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500649,-99) ); - // itree = 192 - fBoostWeights.push_back(0.00860967); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.611563,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498537,-99) , -1, 804.982, 0, 0, 0.498872,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498636,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498509,-99) ); - // itree = 193 - fBoostWeights.push_back(0.00549292); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501012,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500775,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500649,-99) ); - // itree = 194 - fBoostWeights.push_back(0.00545245); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.608208,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499316,-99) , -1, 804.982, 0, 0, 0.499639,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499403,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499278,-99) ); - // itree = 195 - fBoostWeights.push_back(0.00855713); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501393,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.410227,-99) , -1, 536.167, 1, 0, 0.500994,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500758,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500633,-99) ); - // itree = 196 - fBoostWeights.push_back(0.00852067); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.608947,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498546,-99) , -1, 804.982, 0, 0, 0.498873,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49864,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498515,-99) ); - // itree = 197 - fBoostWeights.push_back(0.00848453); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501384,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.411367,-99) , -1, 536.167, 1, 0, 0.500991,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500757,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500633,-99) ); - // itree = 198 - fBoostWeights.push_back(0.00844869); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.608939,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498561,-99) , -1, 804.982, 0, 0, 0.498888,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498657,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498533,-99) ); - // itree = 199 - fBoostWeights.push_back(0.00841315); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501375,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.412493,-99) , -1, 536.167, 1, 0, 0.500988,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500756,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500633,-99) ); - // itree = 200 - fBoostWeights.push_back(0.0083779); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.60893,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498576,-99) , -1, 804.982, 0, 0, 0.498903,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498673,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498551,-99) ); - // itree = 201 - fBoostWeights.push_back(0.00534099); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500985,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500755,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500633,-99) ); - // itree = 202 - fBoostWeights.push_back(0.0053019); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.605658,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499335,-99) , -1, 804.982, 0, 0, 0.49965,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499421,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.4993,-99) ); - // itree = 203 - fBoostWeights.push_back(0.00832821); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501356,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.411725,-99) , -1, 536.167, 1, 0, 0.500967,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500739,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500617,-99) ); - // itree = 204 - fBoostWeights.push_back(0.00829368); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.606381,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498584,-99) , -1, 804.982, 0, 0, 0.498903,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498677,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498556,-99) ); - // itree = 205 - fBoostWeights.push_back(0.00825943); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501348,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.41282,-99) , -1, 536.167, 1, 0, 0.500964,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500738,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500617,-99) ); - // itree = 206 - fBoostWeights.push_back(0.00822546); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.606373,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498598,-99) , -1, 804.982, 0, 0, 0.498917,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498693,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498573,-99) ); - // itree = 207 - fBoostWeights.push_back(0.00819177); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501339,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.413903,-99) , -1, 536.167, 1, 0, 0.500962,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500737,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500617,-99) ); - // itree = 208 - fBoostWeights.push_back(0.00815835); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.606365,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498612,-99) , -1, 804.982, 0, 0, 0.498931,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498709,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49859,-99) ); - // itree = 209 - fBoostWeights.push_back(0.0138458); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.515835,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498758,-99) , -1, 152.146, 1, 0, 0.500959,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500736,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500618,-99) ); - // itree = 210 - fBoostWeights.push_back(0.0154571); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.503528,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.503306,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.503187,-99) ); - // itree = 211 - fBoostWeights.push_back(0.00514687); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.60403,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499354,-99) , -1, 804.982, 0, 0, 0.499664,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499445,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499328,-99) ); - // itree = 212 - fBoostWeights.push_back(0.00806958); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501319,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.414002,-99) , -1, 536.167, 1, 0, 0.500943,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500724,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500608,-99) ); - // itree = 213 - fBoostWeights.push_back(0.00803715); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.604729,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498629,-99) , -1, 804.982, 0, 0, 0.498943,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498726,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49861,-99) ); - // itree = 214 - fBoostWeights.push_back(0.00800498); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501311,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.415051,-99) , -1, 536.167, 1, 0, 0.50094,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500723,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500608,-99) ); - // itree = 215 - fBoostWeights.push_back(0.00797307); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.604721,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498642,-99) , -1, 804.982, 0, 0, 0.498956,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498741,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498626,-99) ); - // itree = 216 - fBoostWeights.push_back(0.00794141); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501303,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.416088,-99) , -1, 536.167, 1, 0, 0.500938,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500723,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500608,-99) ); - // itree = 217 - fBoostWeights.push_back(0.00791); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.604714,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498656,-99) , -1, 804.982, 0, 0, 0.498969,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498756,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498642,-99) ); - // itree = 218 - fBoostWeights.push_back(0.00504691); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500935,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500722,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500608,-99) ); - // itree = 219 - fBoostWeights.push_back(0.00501051); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.601613,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499371,-99) , -1, 804.982, 0, 0, 0.499674,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499461,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499348,-99) ); - // itree = 220 - fBoostWeights.push_back(0.00786586); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501286,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.415312,-99) , -1, 536.167, 1, 0, 0.500919,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500706,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500593,-99) ); - // itree = 221 - fBoostWeights.push_back(0.00783505); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.602297,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498663,-99) , -1, 804.982, 0, 0, 0.498969,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498758,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498646,-99) ); - // itree = 222 - fBoostWeights.push_back(0.00780448); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501278,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.416321,-99) , -1, 536.167, 1, 0, 0.500916,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500706,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500593,-99) ); - // itree = 223 - fBoostWeights.push_back(0.00777414); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.602289,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498675,-99) , -1, 804.982, 0, 0, 0.498982,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498773,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498661,-99) ); - // itree = 224 - fBoostWeights.push_back(0.0106098); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501653,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.460536,-99) , -1, 382.559, 1, 0, 0.500914,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500705,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500593,-99) ); - // itree = 225 - fBoostWeights.push_back(0.0102777); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.602969,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498047,-99) , -1, 804.982, 0, 0, 0.498357,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49815,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498039,-99) ); - // itree = 226 - fBoostWeights.push_back(0.00490999); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 85.0708, 0, 1, 0.500911,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500704,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500593,-99) ); - // itree = 227 - fBoostWeights.push_back(0.00743836); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.54669,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499057,-99) , -0, 85.0708, 0, 0, 0.499684,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499478,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499368,-99) ); - // itree = 228 - fBoostWeights.push_back(0.00723356); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501494,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501288,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501178,-99) ); - // itree = 229 - fBoostWeights.push_back(0.00485244); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.599164,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499391,-99) , -1, 804.982, 0, 0, 0.499686,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499481,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499372,-99) ); - // itree = 230 - fBoostWeights.push_back(0.00763495); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501249,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.416786,-99) , -1, 536.167, 1, 0, 0.500892,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500687,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500578,-99) ); - // itree = 231 - fBoostWeights.push_back(0.00760591); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.599832,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498701,-99) , -1, 804.982, 0, 0, 0.498999,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498796,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498688,-99) ); - // itree = 232 - fBoostWeights.push_back(0.00757709); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501242,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.417752,-99) , -1, 536.167, 1, 0, 0.500889,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500687,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500578,-99) ); - // itree = 233 - fBoostWeights.push_back(0.0075485); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.599825,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498713,-99) , -1, 804.982, 0, 0, 0.499011,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49881,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498702,-99) ); - // itree = 234 - fBoostWeights.push_back(0.00752011); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501235,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.418708,-99) , -1, 536.167, 1, 0, 0.500887,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500686,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500578,-99) ); - // itree = 235 - fBoostWeights.push_back(0.00749194); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.599818,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498724,-99) , -1, 804.982, 0, 0, 0.499023,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498823,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498716,-99) ); - // itree = 236 - fBoostWeights.push_back(0.00476224); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500885,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500685,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500578,-99) ); - // itree = 237 - fBoostWeights.push_back(0.00472834); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.596873,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499407,-99) , -1, 804.982, 0, 0, 0.499694,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499495,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499389,-99) ); - // itree = 238 - fBoostWeights.push_back(0.00745251); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50122,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.417935,-99) , -1, 536.167, 1, 0, 0.50087,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500671,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500564,-99) ); - // itree = 239 - fBoostWeights.push_back(0.00742485); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.597528,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49873,-99) , -1, 804.982, 0, 0, 0.499022,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498825,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498719,-99) ); - // itree = 240 - fBoostWeights.push_back(0.00739739); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501213,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.418867,-99) , -1, 536.167, 1, 0, 0.500867,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50067,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500564,-99) ); - // itree = 241 - fBoostWeights.push_back(0.00737013); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.597522,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498742,-99) , -1, 804.982, 0, 0, 0.499033,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498837,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498733,-99) ); - // itree = 242 - fBoostWeights.push_back(0.00734307); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501206,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.419788,-99) , -1, 536.167, 1, 0, 0.500865,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500669,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500564,-99) ); - // itree = 243 - fBoostWeights.push_back(0.0073162); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.597515,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498753,-99) , -1, 804.982, 0, 0, 0.499045,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49885,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498746,-99) ); - // itree = 244 - fBoostWeights.push_back(0.00728954); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501199,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.420701,-99) , -1, 536.167, 1, 0, 0.500863,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500668,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500564,-99) ); - // itree = 245 - fBoostWeights.push_back(0.00726307); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.597509,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498764,-99) , -1, 804.982, 0, 0, 0.499056,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498863,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498759,-99) ); - // itree = 246 - fBoostWeights.push_back(0.00462491); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500861,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500668,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500564,-99) ); - // itree = 247 - fBoostWeights.push_back(0.0045922); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.594647,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499424,-99) , -1, 804.982, 0, 0, 0.499705,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499512,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49941,-99) ); - // itree = 248 - fBoostWeights.push_back(0.00722602); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501184,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.419922,-99) , -1, 536.167, 1, 0, 0.500846,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500654,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500551,-99) ); - // itree = 249 - fBoostWeights.push_back(0.0072); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.595281,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49877,-99) , -1, 804.982, 0, 0, 0.499054,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498864,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498762,-99) ); - // itree = 250 - fBoostWeights.push_back(0.00717418); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501178,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.420812,-99) , -1, 536.167, 1, 0, 0.500844,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500653,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500551,-99) ); - // itree = 251 - fBoostWeights.push_back(0.00714853); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.595275,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498781,-99) , -1, 804.982, 0, 0, 0.499065,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498876,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498774,-99) ); - // itree = 252 - fBoostWeights.push_back(0.00712308); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501171,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.421692,-99) , -1, 536.167, 1, 0, 0.500842,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500652,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500551,-99) ); - // itree = 253 - fBoostWeights.push_back(0.0070978); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.595269,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498791,-99) , -1, 804.982, 0, 0, 0.499076,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498888,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498787,-99) ); - // itree = 254 - fBoostWeights.push_back(0.0070727); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501165,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.422564,-99) , -1, 536.167, 1, 0, 0.50084,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500652,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500551,-99) ); - // itree = 255 - fBoostWeights.push_back(0.00704777); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.595263,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498802,-99) , -1, 804.982, 0, 0, 0.499086,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498899,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.4988,-99) ); - // itree = 256 - fBoostWeights.push_back(0.00449425); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.531242,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.5,-99) , -0, 70.917, 0, 0, 0.500838,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500651,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500551,-99) ); - // itree = 257 - fBoostWeights.push_back(0.00874255); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.501901,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501714,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501614,-99) ); - // itree = 258 - fBoostWeights.push_back(0.00445109); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.59241,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499442,-99) , -1, 804.982, 0, 0, 0.499715,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49953,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499431,-99) ); - // itree = 259 - fBoostWeights.push_back(0.00700574); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50115,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.421664,-99) , -1, 536.167, 1, 0, 0.500822,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500636,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500537,-99) ); - // itree = 260 - fBoostWeights.push_back(0.00698128); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.593026,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498807,-99) , -1, 804.982, 0, 0, 0.499085,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498901,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498802,-99) ); - // itree = 261 - fBoostWeights.push_back(0.006957); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501144,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.422514,-99) , -1, 536.167, 1, 0, 0.50082,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500636,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500538,-99) ); - // itree = 262 - fBoostWeights.push_back(0.00693288); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.59302,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498817,-99) , -1, 804.982, 0, 0, 0.499095,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498912,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498815,-99) ); - // itree = 263 - fBoostWeights.push_back(0.00690893); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501138,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.423354,-99) , -1, 536.167, 1, 0, 0.500818,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500635,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500538,-99) ); - // itree = 264 - fBoostWeights.push_back(0.00688515); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.593015,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498827,-99) , -1, 804.982, 0, 0, 0.499105,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498923,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498826,-99) ); - // itree = 265 - fBoostWeights.push_back(0.01319); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502036,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.480811,-99) , -1, 305.755, 1, 0, 0.500816,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500634,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500538,-99) ); - // itree = 266 - fBoostWeights.push_back(0.0220079); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.512858,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.495827,-99) , -1, 267.353, 0, 0, 0.497897,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497718,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497622,-99) ); - // itree = 267 - fBoostWeights.push_back(0.0191657); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.503492,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.47861,-99) , -1, 305.755, 1, 0, 0.502062,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501883,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501788,-99) ); - // itree = 268 - fBoostWeights.push_back(0.0120044); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.59385,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.497537,-99) , -1, 804.982, 0, 0, 0.497821,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.497646,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.497552,-99) ); - // itree = 269 - fBoostWeights.push_back(0.00429194); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500805,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500629,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500535,-99) ); - // itree = 270 - fBoostWeights.push_back(0.00426209); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.589914,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499465,-99) , -1, 804.982, 0, 0, 0.499732,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499557,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499463,-99) ); - // itree = 271 - fBoostWeights.push_back(0.00672931); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501108,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.423636,-99) , -1, 536.167, 1, 0, 0.500791,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500616,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500523,-99) ); - // itree = 272 - fBoostWeights.push_back(0.00670675); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.59051,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498852,-99) , -1, 804.982, 0, 0, 0.499122,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498949,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498856,-99) ); - // itree = 273 - fBoostWeights.push_back(0.00668433); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501102,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.424437,-99) , -1, 536.167, 1, 0, 0.500789,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500615,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500523,-99) ); - // itree = 274 - fBoostWeights.push_back(0.00666207); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.590505,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498862,-99) , -1, 804.982, 0, 0, 0.499132,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498959,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498867,-99) ); - // itree = 275 - fBoostWeights.push_back(0.00420433); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 85.0708, 0, 1, 0.500787,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500615,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500523,-99) ); - // itree = 276 - fBoostWeights.push_back(0.00650947); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.541873,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499175,-99) , -0, 85.0708, 0, 0, 0.499736,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499564,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499473,-99) ); - // itree = 277 - fBoostWeights.push_back(0.00875473); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501631,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.42561,-99) , -1, 536.167, 1, 0, 0.501321,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501149,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501057,-99) ); - // itree = 278 - fBoostWeights.push_back(0.00659632); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.591381,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498878,-99) , -1, 804.982, 0, 0, 0.49915,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49898,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498889,-99) ); - // itree = 279 - fBoostWeights.push_back(0.00419882); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500789,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500619,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500528,-99) ); - // itree = 280 - fBoostWeights.push_back(0.00416976); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.58877,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499477,-99) , -1, 804.982, 0, 0, 0.49974,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49957,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49948,-99) ); - // itree = 281 - fBoostWeights.push_back(0.00656602); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501084,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.425361,-99) , -1, 536.167, 1, 0, 0.500776,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500606,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500516,-99) ); - // itree = 282 - fBoostWeights.push_back(0.00654453); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.58935,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498882,-99) , -1, 804.982, 0, 0, 0.499148,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498979,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498889,-99) ); - // itree = 283 - fBoostWeights.push_back(0.00652319); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501078,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.426135,-99) , -1, 536.167, 1, 0, 0.500774,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500606,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500516,-99) ); - // itree = 284 - fBoostWeights.push_back(0.00650198); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.589345,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498891,-99) , -1, 804.982, 0, 0, 0.499157,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498989,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.4989,-99) ); - // itree = 285 - fBoostWeights.push_back(0.00411429); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500773,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500605,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500516,-99) ); - // itree = 286 - fBoostWeights.push_back(0.0040859); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.586773,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499487,-99) , -1, 804.982, 0, 0, 0.499744,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499577,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499488,-99) ); - // itree = 287 - fBoostWeights.push_back(0.00647261); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501066,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.425372,-99) , -1, 536.167, 1, 0, 0.50076,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500593,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500504,-99) ); - // itree = 288 - fBoostWeights.push_back(0.00645173); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.587351,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498894,-99) , -1, 804.982, 0, 0, 0.499155,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498989,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498901,-99) ); - // itree = 289 - fBoostWeights.push_back(0.00643099); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501061,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.426127,-99) , -1, 536.167, 1, 0, 0.500758,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500592,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500504,-99) ); - // itree = 290 - fBoostWeights.push_back(0.00641037); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.587346,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498903,-99) , -1, 804.982, 0, 0, 0.499163,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498999,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498911,-99) ); - // itree = 291 - fBoostWeights.push_back(0.00638989); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501056,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.426876,-99) , -1, 536.167, 1, 0, 0.500756,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500592,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500504,-99) ); - // itree = 292 - fBoostWeights.push_back(0.00636954); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.587341,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498912,-99) , -1, 804.982, 0, 0, 0.499172,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499008,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498921,-99) ); - // itree = 293 - fBoostWeights.push_back(0.00634932); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50105,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.427617,-99) , -1, 536.167, 1, 0, 0.500755,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500591,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500504,-99) ); - // itree = 294 - fBoostWeights.push_back(0.00632923); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.587336,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49892,-99) , -1, 804.982, 0, 0, 0.49918,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499018,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498931,-99) ); - // itree = 295 - fBoostWeights.push_back(0.00400675); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500753,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500591,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500504,-99) ); - // itree = 296 - fBoostWeights.push_back(0.00397924); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.584829,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499501,-99) , -1, 804.982, 0, 0, 0.499752,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49959,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499503,-99) ); - // itree = 297 - fBoostWeights.push_back(0.00630141); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501039,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.426855,-99) , -1, 536.167, 1, 0, 0.500741,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500579,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500492,-99) ); - // itree = 298 - fBoostWeights.push_back(0.00628162); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.585393,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498924,-99) , -1, 804.982, 0, 0, 0.499178,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499017,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498931,-99) ); - // itree = 299 - fBoostWeights.push_back(0.00626195); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501034,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.42758,-99) , -1, 536.167, 1, 0, 0.500739,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500578,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500492,-99) ); - // itree = 300 - fBoostWeights.push_back(0.00624241); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.585388,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498932,-99) , -1, 804.982, 0, 0, 0.499186,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499026,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498941,-99) ); - // itree = 301 - fBoostWeights.push_back(0.00413645); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.52848,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499973,-99) , -0, 70.917, 0, 0, 0.500737,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500578,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500492,-99) ); - // itree = 302 - fBoostWeights.push_back(0.0101062); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.502008,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.429148,-99) , -1, 536.167, 1, 0, 0.501716,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501556,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501471,-99) ); - // itree = 303 - fBoostWeights.push_back(0.00618162); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.587209,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49895,-99) , -1, 804.982, 0, 0, 0.49921,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499052,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498967,-99) ); - // itree = 304 - fBoostWeights.push_back(0.00395221); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500746,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500588,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500504,-99) ); - // itree = 305 - fBoostWeights.push_back(0.00392518); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.584751,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499508,-99) , -1, 804.982, 0, 0, 0.499758,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499601,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499516,-99) ); - // itree = 306 - fBoostWeights.push_back(0.00615503); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50102,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.429331,-99) , -1, 536.167, 1, 0, 0.500734,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500576,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500492,-99) ); - // itree = 307 - fBoostWeights.push_back(0.00613615); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.585292,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498953,-99) , -1, 804.982, 0, 0, 0.499207,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499051,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498967,-99) ); - // itree = 308 - fBoostWeights.push_back(0.00388666); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500732,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500576,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500492,-99) ); - // itree = 309 - fBoostWeights.push_back(0.00386013); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.582857,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499516,-99) , -1, 804.982, 0, 0, 0.499761,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499605,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499521,-99) ); - // itree = 310 - fBoostWeights.push_back(0.00611004); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501009,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.42857,-99) , -1, 536.167, 1, 0, 0.50072,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500564,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500481,-99) ); - // itree = 311 - fBoostWeights.push_back(0.00609143); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.583404,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498957,-99) , -1, 804.982, 0, 0, 0.499205,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49905,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498967,-99) ); - // itree = 312 - fBoostWeights.push_back(0.00607293); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501004,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.429262,-99) , -1, 536.167, 1, 0, 0.500718,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500564,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500481,-99) ); - // itree = 313 - fBoostWeights.push_back(0.00605455); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.583399,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498964,-99) , -1, 804.982, 0, 0, 0.499212,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499058,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498976,-99) ); - // itree = 314 - fBoostWeights.push_back(0.00603627); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500999,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.429947,-99) , -1, 536.167, 1, 0, 0.500717,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500563,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500481,-99) ); - // itree = 315 - fBoostWeights.push_back(0.00601811); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.583395,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498972,-99) , -1, 804.982, 0, 0, 0.49922,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499067,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498985,-99) ); - // itree = 316 - fBoostWeights.push_back(0.00600006); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500995,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.430627,-99) , -1, 536.167, 1, 0, 0.500716,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500563,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500481,-99) ); - // itree = 317 - fBoostWeights.push_back(0.00598211); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.583391,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49898,-99) , -1, 804.982, 0, 0, 0.499228,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499075,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498994,-99) ); - // itree = 318 - fBoostWeights.push_back(0.00378869); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500714,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500562,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500481,-99) ); - // itree = 319 - fBoostWeights.push_back(0.00376294); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.581014,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499528,-99) , -1, 804.982, 0, 0, 0.499767,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499616,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499534,-99) ); - // itree = 320 - fBoostWeights.push_back(0.00595731); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500984,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.429868,-99) , -1, 536.167, 1, 0, 0.500702,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500551,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50047,-99) ); - // itree = 321 - fBoostWeights.push_back(0.00593962); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.581548,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498982,-99) , -1, 804.982, 0, 0, 0.499225,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499074,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498994,-99) ); - // itree = 322 - fBoostWeights.push_back(0.00592203); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500979,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.430532,-99) , -1, 536.167, 1, 0, 0.500701,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50055,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50047,-99) ); - // itree = 323 - fBoostWeights.push_back(0.00590455); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.581544,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49899,-99) , -1, 804.982, 0, 0, 0.499232,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499082,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499002,-99) ); - // itree = 324 - fBoostWeights.push_back(0.00588717); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500975,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.431191,-99) , -1, 536.167, 1, 0, 0.5007,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50055,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50047,-99) ); - // itree = 325 - fBoostWeights.push_back(0.00586989); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.58154,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498997,-99) , -1, 804.982, 0, 0, 0.499239,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49909,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499011,-99) ); - // itree = 326 - fBoostWeights.push_back(0.00585271); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500971,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.431844,-99) , -1, 536.167, 1, 0, 0.500698,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500549,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50047,-99) ); - // itree = 327 - fBoostWeights.push_back(0.00583564); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.581535,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499004,-99) , -1, 804.982, 0, 0, 0.499247,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499099,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49902,-99) ); - // itree = 328 - fBoostWeights.push_back(0.0036946); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500697,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500549,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50047,-99) ); - // itree = 329 - fBoostWeights.push_back(0.00366959); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.579214,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49954,-99) , -1, 804.982, 0, 0, 0.499773,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499626,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499547,-99) ); - // itree = 330 - fBoostWeights.push_back(0.00581206); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50096,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.431088,-99) , -1, 536.167, 1, 0, 0.500685,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500538,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500459,-99) ); - // itree = 331 - fBoostWeights.push_back(0.00579522); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.579736,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499007,-99) , -1, 804.982, 0, 0, 0.499244,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499097,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499019,-99) ); - // itree = 332 - fBoostWeights.push_back(0.00577847); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500956,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.431727,-99) , -1, 536.167, 1, 0, 0.500684,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500537,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500459,-99) ); - // itree = 333 - fBoostWeights.push_back(0.00576182); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.579732,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499014,-99) , -1, 804.982, 0, 0, 0.499251,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499105,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499027,-99) ); - // itree = 334 - fBoostWeights.push_back(0.00386275); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.526596,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499969,-99) , -0, 70.917, 0, 0, 0.500683,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500537,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500459,-99) ); - // itree = 335 - fBoostWeights.push_back(0.0103002); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501991,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.453508,-99) , -0, 99.2246, 1, 0, 0.501597,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501451,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.501373,-99) ); - // itree = 336 - fBoostWeights.push_back(0.00856157); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.537478,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498553,-99) , -0, 85.0708, 0, 0, 0.499064,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498919,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498842,-99) ); - // itree = 337 - fBoostWeights.push_back(0.00758376); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501417,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.432716,-99) , -1, 536.167, 1, 0, 0.501148,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.501004,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500926,-99) ); - // itree = 338 - fBoostWeights.push_back(0.00570373); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.580632,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499027,-99) , -1, 804.982, 0, 0, 0.499267,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499124,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499047,-99) ); - // itree = 339 - fBoostWeights.push_back(0.00663906); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501071,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.453493,-99) , -0, 99.2246, 1, 0, 0.500684,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500541,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500465,-99) ); - // itree = 340 - fBoostWeights.push_back(0.006491); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.577816,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49882,-99) , -1, 804.982, 0, 0, 0.499052,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498909,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498833,-99) ); - // itree = 341 - fBoostWeights.push_back(0.00567637); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500937,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.431429,-99) , -1, 536.167, 1, 0, 0.500665,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500523,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500447,-99) ); - // itree = 342 - fBoostWeights.push_back(0.0056603); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.577618,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499026,-99) , -1, 804.982, 0, 0, 0.499257,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499115,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49904,-99) ); - // itree = 343 - fBoostWeights.push_back(0.00564433); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500933,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.432046,-99) , -1, 536.167, 1, 0, 0.500664,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500522,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500447,-99) ); - // itree = 344 - fBoostWeights.push_back(0.00562844); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.577614,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499033,-99) , -1, 804.982, 0, 0, 0.499264,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499123,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499048,-99) ); - // itree = 345 - fBoostWeights.push_back(0.00561265); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500929,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.432657,-99) , -1, 536.167, 1, 0, 0.500663,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500522,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500447,-99) ); - // itree = 346 - fBoostWeights.push_back(0.00559694); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.57761,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.49904,-99) , -1, 804.982, 0, 0, 0.49927,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49913,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499056,-99) ); - // itree = 347 - fBoostWeights.push_back(0.00558132); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500925,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.433264,-99) , -1, 536.167, 1, 0, 0.500661,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500521,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500447,-99) ); - // itree = 348 - fBoostWeights.push_back(0.00556579); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.577606,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499047,-99) , -1, 804.982, 0, 0, 0.499277,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499138,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499063,-99) ); - // itree = 349 - fBoostWeights.push_back(0.00349231); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 85.0708, 0, 1, 0.50066,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500521,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500447,-99) ); - // itree = 350 - fBoostWeights.push_back(0.00548216); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.536074,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499305,-99) , -0, 85.0708, 0, 0, 0.499787,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499648,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499574,-99) ); - // itree = 351 - fBoostWeights.push_back(0.00829661); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501504,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.454439,-99) , -0, 99.2246, 1, 0, 0.501122,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500983,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500909,-99) ); - // itree = 352 - fBoostWeights.push_back(0.00451903); - fForest.push_back( -NN( -0, -0, --1, 923.921, 1, -1, 0.49887,-99) ); - // itree = 353 - fBoostWeights.push_back(0.00375868); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500472,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.433454,-99) , -1, 536.167, 1, 0, 0.500211,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500073,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.5,-99) ); - // itree = 354 - fBoostWeights.push_back(0.00552625); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.57681,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499051,-99) , -1, 804.982, 0, 0, 0.499279,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499142,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499068,-99) ); - // itree = 355 - fBoostWeights.push_back(0.00551102); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500914,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.433612,-99) , -1, 536.167, 1, 0, 0.500652,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500515,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500442,-99) ); - // itree = 356 - fBoostWeights.push_back(0.00549588); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.576807,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499057,-99) , -1, 804.982, 0, 0, 0.499285,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499149,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499076,-99) ); - // itree = 357 - fBoostWeights.push_back(0.00343809); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 85.0708, 0, 1, 0.500651,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500515,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500442,-99) ); - // itree = 358 - fBoostWeights.push_back(0.0054309); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.535953,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499312,-99) , -0, 85.0708, 0, 0, 0.499791,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499656,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499583,-99) ); - // itree = 359 - fBoostWeights.push_back(0.00731653); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501373,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.434536,-99) , -1, 536.167, 1, 0, 0.501114,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500978,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500905,-99) ); - // itree = 360 - fBoostWeights.push_back(0.00545094); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.57758,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499069,-99) , -1, 804.982, 0, 0, 0.499299,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499164,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499092,-99) ); - // itree = 361 - fBoostWeights.push_back(0.00343904); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.500653,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500519,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500447,-99) ); - // itree = 362 - fBoostWeights.push_back(0.00341606); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.575409,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499572,-99) , -1, 804.982, 0, 0, 0.499794,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499659,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499588,-99) ); - // itree = 363 - fBoostWeights.push_back(0.00543053); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500901,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.434253,-99) , -1, 536.167, 1, 0, 0.500643,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500508,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500437,-99) ); - // itree = 364 - fBoostWeights.push_back(0.00541583); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.575901,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499071,-99) , -1, 804.982, 0, 0, 0.499296,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499162,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499091,-99) ); - // itree = 365 - fBoostWeights.push_back(0.0054012); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500897,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.43483,-99) , -1, 536.167, 1, 0, 0.500642,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500508,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500437,-99) ); - // itree = 366 - fBoostWeights.push_back(0.00538665); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.575898,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499077,-99) , -1, 804.982, 0, 0, 0.499302,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499169,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499098,-99) ); - // itree = 367 - fBoostWeights.push_back(0.00627935); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501012,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.455342,-99) , -0, 99.2246, 1, 0, 0.500641,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500508,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500437,-99) ); - // itree = 368 - fBoostWeights.push_back(0.00803972); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.534557,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498626,-99) , -0, 85.0708, 0, 0, 0.499096,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.498964,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.498894,-99) ); - // itree = 369 - fBoostWeights.push_back(0.00795376); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501432,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.454906,-99) , -0, 99.2246, 1, 0, 0.501054,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500922,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500851,-99) ); - // itree = 370 - fBoostWeights.push_back(0.00441408); - fForest.push_back( -NN( -0, -0, --1, 923.921, 1, -1, 0.498897,-99) ); - // itree = 371 - fBoostWeights.push_back(0.0036153); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500454,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.435053,-99) , -1, 536.167, 1, 0, 0.500201,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50007,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.5,-99) ); - // itree = 372 - fBoostWeights.push_back(0.00534618); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.57521,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499081,-99) , -1, 804.982, 0, 0, 0.499304,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499174,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499104,-99) ); - // itree = 373 - fBoostWeights.push_back(0.00533193); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500887,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.435191,-99) , -1, 536.167, 1, 0, 0.500633,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500502,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500433,-99) ); - // itree = 374 - fBoostWeights.push_back(0.00531775); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.575207,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499087,-99) , -1, 804.982, 0, 0, 0.49931,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.49918,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499111,-99) ); - // itree = 375 - fBoostWeights.push_back(0.00530365); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500883,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.435753,-99) , -1, 536.167, 1, 0, 0.500632,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500502,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500433,-99) ); - // itree = 376 - fBoostWeights.push_back(0.00528962); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.575203,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499093,-99) , -1, 804.982, 0, 0, 0.499316,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499187,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499118,-99) ); - // itree = 377 - fBoostWeights.push_back(0.00527567); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500879,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.436311,-99) , -1, 536.167, 1, 0, 0.500631,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500502,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500433,-99) ); - // itree = 378 - fBoostWeights.push_back(0.00526179); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.5752,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499099,-99) , -1, 804.982, 0, 0, 0.499322,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499194,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499125,-99) ); - // itree = 379 - fBoostWeights.push_back(0.00330586); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 804.982, 0, 1, 0.50063,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500501,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500433,-99) ); - // itree = 380 - fBoostWeights.push_back(0.00328392); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.573105,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499588,-99) , -1, 804.982, 0, 0, 0.499803,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499675,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499607,-99) ); - // itree = 381 - fBoostWeights.push_back(0.00524285); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500871,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.435585,-99) , -1, 536.167, 1, 0, 0.50062,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500491,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500423,-99) ); - // itree = 382 - fBoostWeights.push_back(0.00522915); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.573584,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499101,-99) , -1, 804.982, 0, 0, 0.499319,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499191,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499123,-99) ); - // itree = 383 - fBoostWeights.push_back(0.00521551); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500867,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.436132,-99) , -1, 536.167, 1, 0, 0.500619,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500491,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500423,-99) ); - // itree = 384 - fBoostWeights.push_back(0.00520194); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.573581,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499107,-99) , -1, 804.982, 0, 0, 0.499325,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499198,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.49913,-99) ); - // itree = 385 - fBoostWeights.push_back(0.00518845); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500864,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.436674,-99) , -1, 536.167, 1, 0, 0.500618,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500491,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500423,-99) ); - // itree = 386 - fBoostWeights.push_back(0.00517502); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.573578,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499112,-99) , -1, 804.982, 0, 0, 0.49933,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499204,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499137,-99) ); - // itree = 387 - fBoostWeights.push_back(0.00516167); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50086,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.437213,-99) , -1, 536.167, 1, 0, 0.500617,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50049,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500423,-99) ); - // itree = 388 - fBoostWeights.push_back(0.00514838); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.573575,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499118,-99) , -1, 804.982, 0, 0, 0.499336,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499211,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499144,-99) ); - // itree = 389 - fBoostWeights.push_back(0.00323024); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 85.0708, 0, 1, 0.500616,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.50049,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500423,-99) ); - // itree = 390 - fBoostWeights.push_back(0.00506876); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.533819,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499358,-99) , -0, 85.0708, 0, 0, 0.499808,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499683,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499616,-99) ); - // itree = 391 - fBoostWeights.push_back(0.007776); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501409,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.456262,-99) , -0, 99.2246, 1, 0, 0.501042,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500917,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.50085,-99) ); - // itree = 392 - fBoostWeights.push_back(0.00424258); - fForest.push_back( -NN( -0, -0, --1, 923.921, 1, -1, 0.498939,-99) ); - // itree = 393 - fBoostWeights.push_back(0.00398313); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.500501,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.451167,-99) , -1, 497.765, 1, 0, 0.50019,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500066,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.5,-99) ); - // itree = 394 - fBoostWeights.push_back(0.00563771); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.572954,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.498991,-99) , -1, 804.982, 0, 0, 0.499207,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499084,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499018,-99) ); - // itree = 395 - fBoostWeights.push_back(0.00318972); - fForest.push_back( -NN( -NN( -NN( -0, -0, --1, 85.0708, 0, 1, 0.500608,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500485,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500419,-99) ); - // itree = 396 - fBoostWeights.push_back(0.00504144); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.533805,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.499361,-99) , -0, 85.0708, 0, 0, 0.499811,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.499688,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.499622,-99) ); - // itree = 397 - fBoostWeights.push_back(0.00765818); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.501394,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.457654,-99) , -0, 99.2246, 1, 0, 0.501038,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500915,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.500849,-99) ); - // itree = 398 - fBoostWeights.push_back(0.00413063); - fForest.push_back( -NN( -0, -0, --1, 923.921, 1, -1, 0.498967,-99) ); - // itree = 399 - fBoostWeights.push_back(0.00342153); - fForest.push_back( -NN( -NN( -NN( -NN( -0, -0, --1, 0, 1, 1, 0.50043,-99) , -NN( -0, -0, --1, 0, 1, -1, 0.437147,-99) , -1, 536.167, 1, 0, 0.500188,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 113.537, 0, 0, 0.500065,-99) , -NN( -0, -0, --1, 0, 1, -1, 0,-99) , -1, 923.921, 1, 0, 0.5,-99) ); - return; -}; - -// Clean up -inline void ReadBDT::Clear() -{ - for (unsigned int itree=0; itree& inputValues ) const - { - // classifier response value - double retval = 0; - - // classifier response, sanity check first - if (!IsStatusClean()) { - std::cout << "Problem in class \"" << fClassName << "\": cannot return classifier response" - << " because status is dirty" << std::endl; - retval = 0; - } - else { - if (IsNormalised()) { - // normalise variables - std::vector iV; - int ivar = 0; - for (std::vector::const_iterator varIt = inputValues.begin(); - varIt != inputValues.end(); varIt++, ivar++) { - iV.push_back(NormVariable( *varIt, fVmin[ivar], fVmax[ivar] )); - } - retval = GetMvaValue__( iV ); - } - else { - retval = GetMvaValue__( inputValues ); - } - } - - return retval; - } diff --git a/MVA/weights/TMVAClassification_BDT.weights.xml b/MVA/weights/TMVAClassification_BDT.weights.xml deleted file mode 100644 index 1f203ac..0000000 --- a/MVA/weights/TMVAClassification_BDT.weights.xml +++ /dev/null @@ -1,4735 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/NtupleAnalyzer.cc b/NtupleAnalyzer.cc new file mode 100644 index 0000000..75f3b9d --- /dev/null +++ b/NtupleAnalyzer.cc @@ -0,0 +1,744 @@ +#include "TStyle.h" +#include "TPaveText.h" + +#include +#include +#include +#include +#include +#include "TRandom3.h" +#include "TNtuple.h" +#include +#include + +//user code +#include "TopTreeProducer/interface/TRootRun.h" +#include "TopTreeProducer/interface/TRootEvent.h" +#include "TopTreeAnalysisBase/Selection/interface/SelectionTable.h" +#include "TopTreeAnalysisBase/Content/interface/AnalysisEnvironment.h" +#include "TopTreeAnalysisBase/Tools/interface/TTreeLoader.h" +#include "TopTreeAnalysisBase/Tools/interface/MultiSamplePlot.h" +//#include "../macros/Style.C" + + + + +using namespace std; +using namespace TopTree; + +// Normal Plots (TH1F* and TH2F*) +map histo1D; +map histo2D; +map FileObj; +map globalFileObj; +map nTuple; +map ttree; +map ntree; +map otree; +map globalttree; +map MSPlot; + + +// functions prototype +std::string intToStr (int number); +void DatasetPlotter(int nBins, float plotLow, float plotHigh, string sVarofinterest, string xmlNom, string TreePath, string pathPNG); +void MSPCreator (string pathPNG); +void TH2FPlotter (int nBinsX,float lowX, float highX, string sVarofinterestX ); +string ConvertIntToString(int nb, bool pad); +string MakeTimeStamp(); + + + + + +// CONFIGURATION +Bool_t debug = true; +bool mumumu = false; +bool eee = false; +string channelpostfix = ""; +double DataLumi = -1; +bool elecPlot = false; +bool muPlot = false; +//applying all appropriate scale factors for individual objects if the bool is set to true +Bool_t applyElectronSF = false; +Bool_t applyMuonSF = false; +Bool_t applyPUSF = false; +Bool_t applyGlobalSF = false; +Bool_t applyAMC = false; +Bool_t applyBtagSF = false; +Bool_t NewPhys = false; +Bool_t applyMET = false; +string dateString; + +int main(int argc, char* argv[]) +{ + if (debug){ + cout << "argc = " << argc << endl; + for(int i = 0; i < argc; i++) + { + cout << "argv[" << i << "] = " << argv[i] << endl; + } + } + if(argc < 7) cout << " ERROR: 6 arguments expected" << endl; + + + //Placing arguments in properly typed variables + const string channel = argv[1]; + debug = false; + applyElectronSF = false; + applyMuonSF = false; + applyPUSF = false; + applyGlobalSF = false; + debug = strtol(argv[2],NULL,10); + applyElectronSF = strtol(argv[3],NULL,10); + applyMuonSF = strtol(argv[4],NULL,10); + applyPUSF = strtol(argv[5],NULL,10); + applyBtagSF = strtol(argv[6],NULL,10); + applyGlobalSF = strtol(argv[7],NULL,10); + applyAMC = strtol(argv[8],NULL,10); + applyMET = strtol(argv[9],NULL,10); + + + string xmlFileName; + string CraneenPath; + CraneenPath = "NtupleMakerOutput/MergedTuples/"; + if(channel=="MuMuMu") + { + cout << " --> Using the TriMuon channel..." << endl; + channelpostfix = "_mumumu"; + xmlFileName = "config/Run2TriLepton_samples_analyzer_mumumu.xml"; + mumumu = true; + eee = false; + DataLumi = 2100 ;//2612.180735004;// pb-1 + CraneenPath += "mumumu/"; + } + else if(channel=="ElElEl") + { + cout << " --> Using the TriElectron channel..." << endl; + channelpostfix = "_eee"; + xmlFileName = "config/Run2TriLepton_samples_analyzer_eee.xml"; + mumumu = false; + eee = true; + DataLumi = 2612.180735004;// pb-1 + CraneenPath += "eee/"; + } + else if(channel=="All") + { + cout << " --> Using the all channel..." << endl; + channelpostfix = "_all"; + xmlFileName = "config/Run2TriLepton_samples_analy.xml"; + mumumu = false; + eee = false; + DataLumi = 2612.180735004;// pb-1 + CraneenPath += "all/"; + } + else + { + cerr << "The channel '" << channel << "' is not in the list of authorised channels !!" << endl; + exit(1); + } + dateString = MakeTimeStamp(); + // CraneenPath += dateString + "/"; + CraneenPath += "160812/"; + string pathPNG = "myOutput"; + mkdir(pathPNG.c_str(),0777); + pathPNG += "/" + dateString + "/"; + mkdir(pathPNG.c_str(),0777); + pathPNG += "MSPlots"+channelpostfix+"/"; + mkdir(pathPNG.c_str(),0777); + cout <<"Making directory :"<< pathPNG < datasets; + if (debug) cout << "will start loading from xml file ..." << endl; + treeLoader.LoadDatasets (datasets, xmlfile); //cout<<"datasets loaded"<cd(); + string plotname = sVarofinterest; ///// Non Jet Split plot + // make for loop here!!! + MSPlot[plotname.c_str()] = new MultiSamplePlot(datasets, plotname.c_str(), nBins, plotLow, plotHigh, sVarofinterest.c_str()); + + + //***********************************************OPEN FILES & GET NTUPLES********************************************** + string dataSetName, filepath , slumi; + + int nEntries; + float ScaleFactor, NormFactor; + double varofInterest; + double varofInterest_double [20]; + + + + vector v; + // to avoid modifying original string + // first duplicate the original string and return a char pointer then free the memory + if(debug) cout << "LOOKING at " << sVarofinterest.c_str() << endl; + char delim[] = " []"; + char * dup = strdup(sVarofinterest.c_str()); + char * token = strtok(dup, delim); + while(token != NULL){ + v.push_back(string(token)); + // the call is treated as a subsequent calls to strtok: + // the function continues from where it left in previous invocation + token = strtok(NULL, delim); + } + free(dup); + + // if (debug) cout << v[0] << " " << v[1] << endl; + double weightv2 = 0. ; + double weightv3 = 0.; + for (int d = 0; d < datasets.size(); d++) //Loop through datasets + { + dataSetName = datasets[d]->Name(); + cout<<"Dataset: :"<Get(TTreename.c_str()); //get ttre for each dataset + nEntries = (int)ttree[dataSetName.c_str()]->GetEntries(); + cout<<" nEntries: "<Get(globalTTreename.c_str()); //get ttre for each dataset + if(debug) cout << "globalttree " << globalttree[dataSetName.c_str()]<< endl; + int globalnEntries = (int)globalttree[dataSetName.c_str()]->GetEntries(); + cout<<" nEntries gt: "<SetBranchAddress(v[1].c_str(),&varofInterest); + ttree[dataSetName.c_str()]->SetBranchAddress(v[0].c_str(),varofInterest_double); + } + + else if (v.size() == 1){ + if (debug) cout << "v.size is to 1" << " and v[0] is " << v[0] << endl ; + ttree[dataSetName.c_str()]->SetBranchAddress(v[0].c_str(),&varofInterest);//&varofInterest // faco To be fixed! + + } + else { + cout << "Vector of string does not have the good size!!!" << endl; + } + // eo logic to set the right branch address depending on the string given as argument of the datasetplotter + + bool isData= false; + bool isAMC = false; + if(dataSetName.find("Data")!=string::npos || dataSetName.find("data")!=string::npos || dataSetName.find("DATA")!=string::npos) isData =true; + if(debug) cout << "isData? " << isData << endl; + if(dataSetName.find("amc")!=string::npos) isAMC =true; + cout << "isAMC? " << isAMC << endl; + /////////////////////////////////// + // determine event scalefactor /// + ////////////////////////////////// + + if(applyGlobalSF) cout << " Applying scale factors (not for data)" << endl; + + // get the SF from the corresponding branch + Int_t PassedMET = 0; + ttree[dataSetName.c_str()]->SetBranchAddress("PassedMETFilter",&PassedMET); + + Double_t puSF = 1. ; + ttree[dataSetName.c_str()]->SetBranchAddress("puSF",&puSF); + + Double_t nloW; + ttree[dataSetName.c_str()]->SetBranchAddress("nloWeight",&nloW); + + Double_t electronSF[10]; + ttree[dataSetName.c_str()]->SetBranchAddress("ElectronSF",&electronSF); + + Double_t muonID[10]; + ttree[dataSetName.c_str()]->SetBranchAddress("MuonIDSF", &muonID); + + Double_t muonIso[10]; + ttree[dataSetName.c_str()]->SetBranchAddress("MuonIsoSF", &muonIso); + + Double_t muonTrigv2[10]; + ttree[dataSetName.c_str()]->SetBranchAddress("MuonTrigSFv2", &muonTrigv2); + + Double_t muonTrigv3[10]; + ttree[dataSetName.c_str()]->SetBranchAddress("MuonTrigSFv3", &muonTrigv3); + + Int_t nEl; + ttree[dataSetName.c_str()]->SetBranchAddress("nElectrons",&nEl); + + Int_t nMu; + ttree[dataSetName.c_str()]->SetBranchAddress("nMuons",&nMu); + + Int_t nPosW; + globalttree[dataSetName.c_str()]->SetBranchAddress("nofPosWeights",&nPosW); + + Int_t nNegW; + globalttree[dataSetName.c_str()]->SetBranchAddress("nofNegWeights",&nNegW); + + Int_t nEvents; + globalttree[dataSetName.c_str()]->SetBranchAddress("nEv",&nEvents); + + Int_t SumW; + globalttree[dataSetName.c_str()]->SetBranchAddress("sumW",&SumW); + + Int_t nbHLTv2; + globalttree[dataSetName.c_str()]->SetBranchAddress("nofEventsHLTv2",&nbHLTv2); + + Int_t nbHLTv3; + globalttree[dataSetName.c_str()]->SetBranchAddress("nofEventsHLTv3", &nbHLTv3); + + Int_t nMatch; + if(dataSetName.find("NP_overlay_FCNC_TT")!= string::npos) globalttree[dataSetName.c_str()]->SetBranchAddress("nMatched",&nMatch); + + Int_t nNonMatch; + if(dataSetName.find("NP_overlay_FCNC_TT")!= string::npos) globalttree[dataSetName.c_str()]->SetBranchAddress("nNonMatched",&nNonMatch); + + + Double_t BSF; + ttree[dataSetName.c_str()]->SetBranchAddress("btagSF",&BSF); + + Int_t nMatched_c; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nMatched_charm", &nMatched_c); + + Int_t nMatched_b; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nMatched_bottom", &nMatched_b); + + Int_t nMatched_Zel; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nMatched_Zelec", &nMatched_Zel); + + Int_t nMatched_Zm; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nMatched_Zmu", &nMatched_Zm); + + Int_t nMatched_Wel; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nMatched_Welec", &nMatched_Wel); + + Int_t nMatched_Wm; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nMatched_Wmu", &nMatched_Wm); + + Int_t nMatched_ct; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nMatched_charm_tag", &nMatched_ct); + + Int_t nMatched_tm; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nTagEqMass", &nMatched_tm); + + Int_t nNonMatched_c; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nNonMatched_charm", &nNonMatched_c); + + Int_t nNonMatched_b; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nNonMatched_bottom", &nNonMatched_b); + + Int_t nNonMatched_Zel; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nNonMatched_Zelec", &nNonMatched_Zel); + + Int_t nNonMatched_Zm; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nNonMatched_Zmu", &nNonMatched_Zm); + + Int_t nNonMatched_Wel; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nNonMatched_Welec", &nNonMatched_Wel); + + Int_t nNonMatched_Wm; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nNonMatched_Wmu", &nNonMatched_Wm); + + Int_t nNonMatched_ct; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nNonMatched_charm_tag", &nNonMatched_ct); + + Int_t nNonMatched_tm; + if(NewPhys) globalttree[dataSetName.c_str()]->SetBranchAddress("nTagNotEqMass", &nNonMatched_tm); + + + Int_t NbCuts; + globalttree[dataSetName.c_str()]->SetBranchAddress("nCuts", &NbCuts); + + double CutSteps[10]; + // globalttree[dataSetName.c_str()]->SetBranchAddress("cutstep[nCuts]", &CutSteps); + + if(debug) cout << "done setting SF addresses " << endl; + + // ----------- + // eo of event SF + + + + double globalScaleFactor= 1.; + double nloSF = 1.; + int nPos = 0; + int nNeg = 0; + int Ev = 0; + int Weights = 0; + int Matched = 0; + int nonMatched = 0; + int NmatchCharm, NonmatchCharm, NmatchBottom, NonmatchBottom, NmatchZelec, NonmatchZelec, NmatchZmu, NonmatchZmu, NmatchWelec, NonmatchWmu, TagEqM, TagNeqM, NmatchTcharm, NonmatchTcharm, NonmatchWelec,NmatchWmu; + NmatchCharm = NonmatchCharm = NmatchBottom = NonmatchBottom = NmatchZelec = NonmatchZelec = NmatchZmu = NonmatchZmu= NmatchWelec= NonmatchWmu= TagEqM= TagNeqM= NmatchTcharm= NonmatchTcharm = NonmatchWelec = NmatchWmu =0 ; + + if(!isData) + { + + for (int k = 0; kGetEntry(k); + if(debug) cout << "get globaltree" << endl; + if(applyAMC && isAMC && !isData) nPos += nPosW; + if(applyAMC && isAMC && !isData) nNeg += nNegW; + if(applyAMC && isAMC && !isData) Ev += nEvents; + if(applyAMC && isAMC && !isData) Weights += SumW; +// if(dataSetName.find("NP_overlay_FCNC_TT")!= string::npos) Matched += nMatch; +// if(dataSetName.find("NP_overlay_FCNC_TT")!= string::npos) nonMatched += nNonMatch; + // cout << "nPos " << nPos << " vs " << nPosW << " nNeg " << nNeg << " vs " << nNegW << " + " << nPos + nNeg << " - " << nPos - nNeg << endl; + // cout << "nEvents " << nEvents << " vs " << Ev << " sumWeights " << SumW << " vs " << Weights << endl; + if(NewPhys){ + NmatchCharm += nMatched_c; + NonmatchCharm += nNonMatched_c; + NmatchBottom += nMatched_b; + NonmatchBottom += nNonMatched_b; + NmatchZelec += nMatched_Zel; + NonmatchZelec += nNonMatched_Zel; + NmatchZmu += nMatched_Zm; + NonmatchZmu += nNonMatched_Zm; + NmatchWelec += nMatched_Wel; + NonmatchWelec += nNonMatched_Wel; + NmatchWmu += nMatched_Wm; + NonmatchWmu += nNonMatched_Wm; + TagEqM += nMatched_tm; + TagNeqM += nNonMatched_tm; + NmatchTcharm += nMatched_ct; + NonmatchTcharm += nNonMatched_ct; + } + } + // if(!isData) nloSF *= (double) Weights/(double) Ev; // + if(applyAMC && isAMC && !isData) nloSF *= ((double) (nPos + nNeg))/((double) (nPos - nNeg)); + if(applyAMC && isAMC && !isData) cout << " nloSF: " << nloSF << endl; + if(NewPhys) { + //cout << " % matched: " << (double) (Matched) / (double) (Matched + nonMatched) << endl; + cout << " % matched charm: " << (double) (NmatchCharm) / (double) (NmatchCharm + NonmatchCharm) << endl; + cout << " % matched bottom: " << (double) (NmatchBottom) / (double) (NmatchBottom + NonmatchBottom) << endl; + cout << " % matched Z electron: " << (double) (NmatchZelec) / (double) (NmatchZelec + NonmatchZelec) << endl; + cout << " % matched Z muon: " << (double) (NmatchZmu) / (double) (NmatchZmu + NonmatchZmu) << endl; + cout << " % matched W electron: " << (double) (NmatchWelec) / (double) (NmatchWelec + NonmatchWelec) << endl; + cout << " % matched W muon: " << (double) (NmatchWmu) / (double) (NmatchWmu + NonmatchWmu) << endl; + cout << " % matched charm tag method: " << (double) (NmatchTcharm) / (double) (NmatchTcharm + NonmatchTcharm) << endl; + cout << " % matched charm tag same as charm mass: " << (double) (TagEqM) / (double) (TagEqM + TagNeqM) << endl; + } + } + for (int j = 0; jGetEntry(j); + // cout << "nEl " << nEl << " nMu " << nMu << endl; + globalScaleFactor = 1.; + if(v.size() == 1 && sVarofinterest.find("nElectrons")!=string::npos) {varofInterest = nEl;} + if(v.size() == 1 && sVarofinterest.find("nMuons")!=string::npos) {varofInterest = nMu;} + + if(applyMET && PassedMET == 0 ){continue; } + if(applyGlobalSF && !isData) // sf on and not data + { + // Electron scale factors + if(applyElectronSF) + { + for(unsigned int i = 0; i < nEl ; i ++) + { + // if(debug) cout << "lepton sf at index " << i << " is " << electronSF[i] << endl; + globalScaleFactor *= electronSF[i]; + //if(debug) cout << "the globalScaleFactor is " << globalScaleFactor << endl; + } + } + if(applyMuonSF) + { + for(unsigned int i = 0; i < nMu ; i ++) + { + // if(debug) cout << "Muon ID sf at index " << i << " is " << muonID[i] << endl; + // if(debug) cout << "Muon Iso sf at index " << i << " is " << muonIso[i] << endl; + // if(debug) cout << "Muon trig v2 sf at index " << i << " is " << muonTrigv2[i] << endl; + // if(debug) cout << "Muon trig v3 sf at index " << i << " is " << muonTrigv3[i] << endl; + // if(isData) weightv2 = (double) nbHLTv2 / (double) (nbHLTv2 + nbHLTv3); + // if(isData) weightv3 = (double) nbHLTv3 / (double) (nbHLTv2 + nbHLTv3); + // cout << "weightv2 " << weightv2 << " weightv3 " << weightv3 << endl; + globalScaleFactor *= muonID[i] * muonIso[i] ; + // if(debug) cout << "the globalScaleFactor is " << globalScaleFactor << endl; + } + } + if(applyPUSF) + { + globalScaleFactor *= puSF; + if (debug){ + // cout << "puSF is " << puSF << endl; + // cout << "the globalScaleFactor is " << globalScaleFactor << endl; + } + + } + if(applyBtagSF) + { + globalScaleFactor *= BSF; + } + + + + } + + if(applyAMC && !isData) globalScaleFactor =globalScaleFactor * nloSF * nloW; + if(NewPhys) globalScaleFactor = 1.; + + // ---------------- + // eo event SF + // make MS plot for single value + if (v.size() == 1){ + if (isData) + { + // for data, fill once per event, weighted with the event scale factor only ???? what?? + MSPlot[plotname.c_str()]->Fill(varofInterest, datasets[d], false, 1); + } + else + { + // for MC, fill once per event and multiply by the event scale factor. Then reweigt by Lumi/Eqlumi where Eqlumi is gotten from the xml file + MSPlot[plotname.c_str()]->Fill(varofInterest, datasets[d], true, globalScaleFactor*DataLumi); + } + } + // make MS plot for vector + if (v.size() == 2){ + + // bo of loop over the number of object per entry + if(elecPlot) varofInterest = nEl; + if(muPlot) varofInterest = nMu; + for (int i_object =0 ; i_object < varofInterest ;i_object ++ ) + { + if (debug) cout << "varofInterest is " << varofInterest_double[i_object] << endl; + if (isData) + { + // for data, fill once per event, weighted with the event scale factor + MSPlot[plotname.c_str()]->Fill(varofInterest_double[i_object], datasets[d], false,1); + } + else + { + // for MC, fill once per event and multiply by the event scale factor. Then reweigt by Lumi/Eqlumi where Eqlumi is gotten from the xml file + MSPlot[plotname.c_str()]->Fill(varofInterest_double[i_object], datasets[d], true, globalScaleFactor*DataLumi); + + } + + } + + } + + } // nentries + cout<<" event SF: "<cd(); + cout << "created " << (pathPNG+"/Output.root").c_str() << endl; + + // Loop over all the MSPlots + for(map::const_iterator it = MSPlot.begin(); it != MSPlot.end(); it++) + { + + string name = "MyMSP_" + it->first; + cout << " name " << name << endl; + MultiSamplePlot *temp = it->second; + if (debug){ + cout << "Saving the MSP" << endl; + cout << " and it->first is " << it->first << endl; + } + temp->Draw("MyMSP"+it->first, 0, false, false, false, 1);// 0 = no ratio 1 = ratio + // name += "_3L"; + if(!applyGlobalSF) name += "_noSF"; + if(!applyPUSF) name += "_noPUSF"; + if(!applyElectronSF) name += "_noElSF"; + if(!applyMuonSF) name+= "_noMuSF"; + if(!applyAMC) name+= "_noAMCcor"; + if(!applyBtagSF) name+= "_noBtagSF"; + cout << "name " << name << endl; + temp->Write(outfile, name, true,pathPNG.c_str() , "png"); + // vector temp_histo = it->GetTH1FNames(); + // for (int i_hist=0; i_hist < temp_histo.size();i_hist++ ){ + // cout << "hist is" << temp_histo[i_hist] << endl; + // cout << "integral is " << it->GetTH1F(temp_histo[i_hist].GetSum()) << endl; + // } + } + + outfile->Write("kOverwrite"); +} + + + +string ConvertIntToString(int Number, bool pad) +{ + ostringstream convert; + convert.clear(); + if ( pad && Number < 10 ) { convert << std::setw(2) << std::setfill('0');} + convert << Number; + return convert.str(); +}; + + +string MakeTimeStamp() +{ + time_t t = time(0); // get time now + struct tm * now = localtime( & t ); + + int year = now->tm_year - 100; /// + 1900 to get current year + int month = now->tm_mon + 1; + int day = now->tm_mday; + int hour = now->tm_hour; + int min = now->tm_min; + int sec = now->tm_sec; + + string year_str = ConvertIntToString(year, true); + string month_str = ConvertIntToString(month, true); + string day_str = ConvertIntToString(day, true); + string hour_str = ConvertIntToString(hour, true); + string min_str = ConvertIntToString(min, true); + //string sec_str = ConvertIntToString(sec, true); + + string date_str = year_str + month_str + day_str; //+ "_" + hour_str + min_str; + return date_str; +}; diff --git a/NtupleMVA.cc b/NtupleMVA.cc new file mode 100644 index 0000000..765fb2b --- /dev/null +++ b/NtupleMVA.cc @@ -0,0 +1,753 @@ +#include "TStyle.h" +#include "TPaveText.h" + +#include +#include +#include +#include +#include +#include "TRandom3.h" +#include "TNtuple.h" +#include +#include + +//user code +#include "TopTreeProducer/interface/TRootRun.h" +#include "TopTreeProducer/interface/TRootEvent.h" +#include "TopTreeAnalysisBase/Selection/interface/SelectionTable.h" +#include "TopTreeAnalysisBase/Content/interface/AnalysisEnvironment.h" +#include "TopTreeAnalysisBase/Tools/interface/TTreeLoader.h" +#include "TopTreeAnalysisBase/Tools/interface/MultiSamplePlot.h" +//#include "../macros/Style.C" + + +//inlcludes for TMVA +#include "TopTreeAnalysisBase/Tools/interface/MVATrainer.h" +#include "TopTreeAnalysisBase/Tools/interface/MVAComputer.h" + + +using namespace std; +using namespace TopTree; + +// Normal Plots (TH1F* and TH2F*) +map histo1D; +map histo2D; +map FileObj; +map globalFileObj; +map nTuple; +map ttree; +map ntree; +map otree; +map globalttree; +map MSPlot; + + +// functions prototype +std::string intToStr (int number); +void DatasetPlotter(int nBins, float plotLow, float plotHigh, string sVarofinterest, string xmlNom, string TreePath, string pathPNG); +void MSPCreator (string pathPNG); +void TH2FPlotter (int nBinsX,float lowX, float highX, string sVarofinterestX ); +void MVAanalysis(bool doTraining, std::string MVAmethod, int skipEvents, std::string SignalName, std::string BkgName ,std::string xmlNom_train,std::string xmlNom_evaluate , TString CraneenPath, std::string channel); +string ConvertIntToString(int nb, bool pad); +string MakeTimeStamp(); + + + + + +// CONFIGURATION +Bool_t debug = true; +bool mumumu = false; +bool eee = false; +string channelpostfix = ""; +double DataLumi = -1; +bool elecPlot = false; +bool muPlot = false; +bool doScaling = false; +//applying all appropriate scale factors for individual objects if the bool is set to true + +Bool_t train_mva = false; +string dateString; + +int main(int argc, char* argv[]) +{ + if (debug){ + cout << "argc = " << argc << endl; + for(int i = 0; i < argc; i++) + { + cout << "argv[" << i << "] = " << argv[i] << endl; + } + } + + + + //Placing arguments in properly typed variables + const string channel = argv[1]; + debug = false; + train_mva = false; + debug = strtol(argv[2],NULL,10); + train_mva = strtol(argv[3],NULL,10); + const string signalName = argv[4]; + const string bkgName = argv[5]; + doScaling = strtol(argv[6],NULL,10); + + + string xmlFileName; + string CraneenPath; + CraneenPath = "NtupleMakerOutput/MergedTuples/"; + if(channel=="MuMuMu") + { + cout << " --> Using the TriMuon channel..." << endl; + channelpostfix = "_mumumu"; + xmlFileName = "config/Run2TriLepton_samples_analyzer_mumumu.xml"; + mumumu = true; + eee = false; + DataLumi = 2100 ;//2612.180735004;// pb-1 + CraneenPath += "mumumu/"; + } + else if(channel=="ElElEl") + { + cout << " --> Using the TriElectron channel..." << endl; + channelpostfix = "_eee"; + xmlFileName = "config/Run2TriLepton_samples_analyzer_eee.xml"; + mumumu = false; + eee = true; + DataLumi = 2612.180735004;// pb-1 + CraneenPath += "eee/"; + } + else if(channel=="All") + { + cout << " --> Using the all channel..." << endl; + channelpostfix = "_all"; + xmlFileName = "config/Run2TriLepton_samples_analy.xml"; + mumumu = false; + eee = false; + DataLumi = 2612.180735004;// pb-1 + CraneenPath += "all/"; + } + else + { + cerr << "The channel '" << channel << "' is not in the list of authorised channels !!" << endl; + exit(1); + } + dateString = MakeTimeStamp(); + // CraneenPath += dateString + "/"; + CraneenPath += "160718/"; + string pathPNG = "myOutput"; + mkdir(pathPNG.c_str(),0777); + pathPNG += "/" + dateString + "/"; + mkdir(pathPNG.c_str(),0777); + pathPNG += "MVAPlots"+channelpostfix+"/"; + mkdir(pathPNG.c_str(),0777); + cout <<"Making directory :"<< pathPNG <cd(); + cout << "created " << (pathPNG+"/Output_MVA.root").c_str() << endl; + + // Loop over all the MSPlots + for(map::const_iterator it = MSPlot.begin(); it != MSPlot.end(); it++) + { + + string name = "MyMSP_" + it->first; + cout << " name " << name << endl; + MultiSamplePlot *temp = it->second; + if (debug){ + cout << "Saving the MSP" << endl; + cout << " and it->first is " << it->first << endl; + } + temp->Draw("MyMSP"+it->first, 1, false, false, false, 10);// 0 = no ratio + // name += "_3L"; + + cout << "name " << name << endl; + temp->Write(outfile, name, true,pathPNG.c_str() , "png"); + // vector temp_histo = it->GetTH1FNames(); + // for (int i_hist=0; i_hist < temp_histo.size();i_hist++ ){ + // cout << "hist is" << temp_histo[i_hist] << endl; + // cout << "integral is " << it->GetTH1F(temp_histo[i_hist].GetSum()) << endl; + // } + } + + outfile->Write("kOverwrite"); +} + + +void MVAanalysis(bool doTraining, std::string MVAmethod, int skipEvents, std::string SignalName,std::string BkgName,std::string xmlNom_train,std::string xmlNom_evaluate , TString CraneenPath, std::string channel) +{ + + // Set cuts + // + TString set_MET_cut = ">30"; + TString set_mTW_cut = ""; + TString set_NJets_cut = ">1"; //ONLY STRICT SIGN (> / < / ==) + TString set_NBJets_cut = "=1"; //ONLY STRICT SIGN (> / < / ==) + + std::vector CUTvars; + CUTvars.push_back("MET"); + + + MVAComputer* Eventcomputer_ =0; + MVATrainer* Eventtrainer_ = 0; + if(doTraining) Eventtrainer_ = new MVATrainer(MVAmethod,"TrainedEventMVA"+channel, "TrainedEventMVA"+channel+".root"); + vector MVAvars; + if(debug) cout << "event trainier initialised " << endl; + + // the name of the variables to be used, order is important! + // MVAvars.push_back("NumberOfElectrons"); // doesn't contribute + // MVAvars.push_back("NumberOfMuons"); // doesn't contribute + // MVAvars.push_back("Zmass"); // doesn't contribute + // MVAvars.push_back("TrMassW"); lowcontribution ? +// MVAvars.push_back("MET"); + // MVAvars.push_back("CvsL_1"); + // MVAvars.push_back("CvsB_1"); + // MVAvars.push_back("CvsL_2"); + // MVAvars.push_back("CvsB_2"); + MVAvars.push_back("pt_electron_1"); + // MVAvars.push_back("pt_electron_2"); + // MVAvars.push_back("pt_electron_3"); + MVAvars.push_back("pt_muon_1"); + // MVAvars.push_back("pt_muon_2"); + // MVAvars.push_back("pt_muon_3"); +// MVAvars.push_back("pt_jet_1"); // related wit FNC top mass + // MVAvars.push_back("pt_jet_2"); + MVAvars.push_back("topMass"); + // MVAvars.push_back("nCSVL"); + MVAvars.push_back("nCSVM"); + // MVAvars.push_back("nCSVT"); +// MVAvars.push_back("bdis_1"); + MVAvars.push_back("bdis_2"); + MVAvars.push_back("FCNCtopmass"); + // MVAvars.push_back("Pt_cjet"); +// MVAvars.push_back("deltaPhiSMFCNCtop"); // related with FCNC tiop mass +// MVAvars.push_back("deltaPhiWlepb"); +// MVAvars.push_back("deltaPhiWlepc"); +// MVAvars.push_back("deltaPhiZc"); // related with FCNC top mass + MVAvars.push_back("deltaPhiZb"); + //MVAvars.push_back("deltaRSMFCNCtop"); // correlated with deltaPhiWlepC deltaPhiZc + MVAvars.push_back("deltaRWlepb"); +// MVAvars.push_back("deltaRWlepc"); + // MVAvars.push_back("deltaRZc"); // related with fcnc top mass + MVAvars.push_back("deltaRZb"); + MVAvars.push_back("MassWlepB"); + + + if(doTraining){ + for(unsigned int N_var = 0; N_var < MVAvars.size(); N_var++) + { + Eventtrainer_->bookInputVar(MVAvars[N_var]); + } + Eventtrainer_->bookWeight("Weight"); + if(debug) cout << "input variables booked" << endl; + } + if(!doTraining) Eventcomputer_ = new MVAComputer(MVAmethod,"TrainedEventMVA"+channel+".root", "TrainedEventMVA"+channel,MVAvars, "test"); + + + + cout<<""< datasets; //cout<<"vector filled"<Name(); + cout<<"Dataset: :"<Get(TTreename.c_str()); //get ttree for each dataset + nEntries = ttree[dataSetName.c_str()]->GetEntries(); + cout<<" nEntries: "<Get(sglobaltree.c_str()); + // int globalnEntries = (int)globalttree[dataSetName.c_str()]->GetEntries(); + // cout<<" nEntries gt: "<SetBranchAddress("PassedMETFilter",&PassedMET); + + Double_t puSF = 1. ; + ttree[dataSetName.c_str()]->SetBranchAddress("puSF",&puSF); + + Double_t nloW; + ttree[dataSetName.c_str()]->SetBranchAddress("nloWeight",&nloW); + + Double_t electronSF[10]; + ttree[dataSetName.c_str()]->SetBranchAddress("ElectronSF",&electronSF); + + Double_t muonID[10]; + ttree[dataSetName.c_str()]->SetBranchAddress("MuonIDSF", &muonID); + + Double_t muonIso[10]; + ttree[dataSetName.c_str()]->SetBranchAddress("MuonIsoSF", &muonIso); + + //Int_t nPosW; + //globalttree[dataSetName.c_str()]->SetBranchAddress("nofPosWeights",&nPosW); + + // Int_t nNegW; + // globalttree[dataSetName.c_str()]->SetBranchAddress("nofNegWeights",&nNegW); + + Double_t BSF; + ttree[dataSetName.c_str()]->SetBranchAddress("btagSF",&BSF); + + + double nloSF = 1.; + // int nPos = 0; + // int nNeg = 0; + + /* if(isAMC && !isData) + { + for (int k = 0; kGetEntry(k); + nPos += nPosW; + nNeg += nNegW; + } + // if(!isData) nloSF *= (double) Weights/(double) Ev; // + nloSF *= ((double) (nPos + nNeg))/((double) (nPos - nNeg)); + cout << " nloSF: " << nloSF << endl; + } + */ + if(dataSetName.find("tZq_amc")!=string::npos) nloSF = 3.76316; + if(dataSetName.find("WZJets_amc")!=string::npos) nloSF = 1.52061; + if(dataSetName.find("ST_tamc")!=string::npos) nloSF = 4.64013; + if(dataSetName.find("TTWJetsToLNu_amc")!=string::npos) nloSF = 1.94035; + if(dataSetName.find("TTZToQQ_amc")!=string::npos) nloSF = 2.13364; + if(dataSetName.find("TTZToLLNuNu_amc")!=string::npos) nloSF = 2.15175; + if(dataSetName.find("Zjets(0amc")!=string::npos) nloSF = 1.49209; + ///////////////////////////////////////// + // Define variables relevant for MVA + //////////////////////////////////////// + int NumberOfElectrons, NumberOfMuons, nJets,nCSVL, nCSVM, nCSVT; + double TrMassW, MET, CvsL_1, CvsL[20], CvsB_1, CvsB[20], pt_electron_1, pt_electron_2, pt_electron_3, pt_muon_1, pt_muon_2, pt_muon_3, pt_jet_1,pt_jet_2,topMass, Zmass, bDisc[20], FCNCtopmass, Pt_cjet, deltaPhiWlepb, deltaPhiWlepc, deltaPhiZc, deltaPhiZb, deltaPhiSMFCNCtop,deltaRWlepb, deltaRWlepc, deltaRZc, deltaRZb, deltaRSMFCNCtop, MassWlepB ; + + ttree[(dataSetName).c_str()]->SetBranchAddress("nElectrons",&NumberOfElectrons); + ttree[(dataSetName).c_str()]->SetBranchAddress("nMuons",&NumberOfMuons); + ttree[(dataSetName).c_str()]->SetBranchAddress("Zboson_M", &Zmass); + ttree[(dataSetName).c_str()]->SetBranchAddress("mWt", &TrMassW); + ttree[(dataSetName).c_str()]->SetBranchAddress("met_Pt", &MET); + ttree[(dataSetName).c_str()]->SetBranchAddress("nJets", &nJets); + ttree[(dataSetName).c_str()]->SetBranchAddress("cdiscCvsL_jet_1", &CvsL_1); + ttree[(dataSetName).c_str()]->SetBranchAddress("cdiscCvsB_jet_1", &CvsB_1); + ttree[(dataSetName).c_str()]->SetBranchAddress("cdiscCvsL_jet", &CvsL); + // ttree[(dataSetName).c_str()]->SetBranchAddress("cdiscCvsB_jet[nJets]", &CvsB); + ttree[(dataSetName).c_str()]->SetBranchAddress("pt_electron_1", &pt_electron_1); + ttree[(dataSetName).c_str()]->SetBranchAddress("pt_electron_2", &pt_electron_2); + ttree[(dataSetName).c_str()]->SetBranchAddress("pt_electron_3", &pt_electron_3); + ttree[(dataSetName).c_str()]->SetBranchAddress("pt_muon_1", &pt_muon_1); + ttree[(dataSetName).c_str()]->SetBranchAddress("pt_muon_2", &pt_muon_2); + ttree[(dataSetName).c_str()]->SetBranchAddress("pt_muon_3", &pt_muon_3); + ttree[(dataSetName).c_str()]->SetBranchAddress("pt_jet_1", &pt_jet_1); + ttree[(dataSetName).c_str()]->SetBranchAddress("pt_jet_2", &pt_jet_2); + ttree[(dataSetName).c_str()]->SetBranchAddress("SMtop_M", &topMass); + ttree[(dataSetName).c_str()]->SetBranchAddress("bdisc_jet", &bDisc); + // ttree[(dataSetName).c_str()]->SetBranchAddress("nJets_CSVL", &nCSVL); + ttree[(dataSetName).c_str()]->SetBranchAddress("nJets_CSVM", &nCSVM); + ttree[(dataSetName).c_str()]->SetBranchAddress("nJets_CSVT", &nCSVT); + ttree[(dataSetName).c_str()]->SetBranchAddress("FCNCtop_M", &FCNCtopmass); + ttree[(dataSetName).c_str()]->SetBranchAddress("cjet_Pt", &Pt_cjet); + ttree[(dataSetName).c_str()]->SetBranchAddress("dPhiSMFCNCtop",&deltaPhiSMFCNCtop); + ttree[(dataSetName).c_str()]->SetBranchAddress("dPhiWlepb",&deltaPhiWlepb); + ttree[(dataSetName).c_str()]->SetBranchAddress("dPhiWlepc",&deltaPhiWlepc); + ttree[(dataSetName).c_str()]->SetBranchAddress("dPhiZc",&deltaPhiZc); + ttree[(dataSetName).c_str()]->SetBranchAddress("dPhiZb",&deltaPhiZb); + ttree[(dataSetName).c_str()]->SetBranchAddress("dRSMFCNCtop",&deltaRSMFCNCtop); + ttree[(dataSetName).c_str()]->SetBranchAddress("dRWlepb",&deltaRWlepb); + ttree[(dataSetName).c_str()]->SetBranchAddress("dRWlepc",&deltaRWlepc); + ttree[(dataSetName).c_str()]->SetBranchAddress("dRZc",&deltaRZc); + ttree[(dataSetName).c_str()]->SetBranchAddress("dRZb",&deltaRZb); + ttree[(dataSetName).c_str()]->SetBranchAddress("mlb",&MassWlepB); + + + + + + + // int Train_nEntries = int(nEntries/skipEvents); + // if(isData && !doTraining) Train_nEntries = int(nEntries/skipEvents); + + cout << "Number of entries: " << nEntries << endl; //", number of train Entries: " << Train_nEntries << endl; + + ////////////////////////////////////////////////////////// + // Running on events + ////////////////////////////////////////////////////////// + + if(doTraining) + { + cout << "signal is " << SignalName << endl; + cout << "bkg is " << BkgName << endl; + + if(isData && SignalName != "Data") continue; + + for (int j = 0; jGetEntry(j); + + if(doScaling){ + if(!PassedMET){continue;} + if(debug) cout << "MET SF " << endl; + //electron + for(unsigned int iEl = 0; iEl < NumberOfElectrons ; iEl ++) + { + //cout << "entry " << j << " electron " << iEl << " SF " << electronSF[iEl]<< endl; + ScaleFactor *= electronSF[iEl]; + } + if(debug) cout << "electron SF " << endl; + //muon + for(unsigned int iMu = 0; iMu < NumberOfMuons ; iMu ++) + { + ScaleFactor *= muonID[iMu]*muonIso[iMu]; + + } + if(debug) cout << "muon SF " << endl; + //PU + ScaleFactor *= puSF; + if(debug) cout << "PU SF " << endl; + //btag + ScaleFactor *= BSF; + if(debug) cout << "btag SF " << endl; + //AMC + ScaleFactor *= nloSF * nloW; + if(debug) cout << "amc SF " << endl; + + if(dataSetName.find("NP")!=string::npos){ ScaleFactor = 1.;} + } + NormFactor = DataLumi / datasets[d]->EquivalentLumi(); //data->NormFactor*Lumi + ScaleFactor *= NormFactor; + if(debug) cout << "normalisation SF " << endl; + if(dataSetName.find("NP")!=string::npos){ ScaleFactor = 1.;} + if(ScaleFactor < 0 ) ScaleFactor *= -1; + if(dataSetName.find("NP_overlay")!=string::npos ) + { + + Eventtrainer_->FillWeight("S","Weight", ScaleFactor); + // Eventtrainer_->Fill("S","NumberOfElectrons", NumberOfElectrons); + // Eventtrainer_->Fill("S","NumberOfMuons", NumberOfMuons); + // Eventtrainer_->Fill("S","Zmass", Zmass); +// Eventtrainer_->Fill("S","TrMassW", TrMassW); +// Eventtrainer_->Fill("S","MET", MET ); + // Eventtrainer_->Fill("S","CvsL_1", CvsL_1 ); + // Eventtrainer_->Fill("S","CvsB_1", CvsB_1 ); + // Eventtrainer_->Fill("S","CvsL_2", CvsL[1] ); + // Eventtrainer_->Fill("S","CvsB_2", CvsB[1] ); + Eventtrainer_->Fill("S","pt_electron_1", pt_electron_1 ); + // Eventtrainer_->Fill("S","pt_electron_2", pt_electron_2 ); + // Eventtrainer_->Fill("S","pt_electron_3", pt_electron_3 ); + Eventtrainer_->Fill("S","pt_muon_1", pt_muon_1 ); + // Eventtrainer_->Fill("S","pt_muon_2", pt_muon_2 ); + // Eventtrainer_->Fill("S","pt_muon_3", pt_muon_3 ); +// Eventtrainer_->Fill("S","pt_jet_1", pt_jet_1 ); + // Eventtrainer_->Fill("S","pt_jet_2", pt_jet_2 ); + Eventtrainer_->Fill("S","topMass", topMass ); + // Eventtrainer_->Fill("S","nCSVL", nCSVL); + Eventtrainer_->Fill("S","nCSVM", nCSVM); + // Eventtrainer_->Fill("S","nCSVT", nCSVT); +// Eventtrainer_->Fill("S","bdis_1", bDisc[0]); + Eventtrainer_->Fill("S","bdis_2", bDisc[1]); + Eventtrainer_->Fill("S","FCNCtopmass",FCNCtopmass); +// Eventtrainer_->Fill("S","Pt_cjet",Pt_cjet); +// Eventtrainer_->Fill("S","deltaPhiSMFCNCtop",deltaPhiSMFCNCtop); +// Eventtrainer_->Fill("S","deltaPhiWlepb",deltaPhiWlepb); +// Eventtrainer_->Fill("S","deltaPhiWlepc",deltaPhiWlepc); +// Eventtrainer_->Fill("S","deltaPhiZc",deltaPhiZc); + Eventtrainer_->Fill("S","deltaPhiZb",deltaPhiZb); +// Eventtrainer_->Fill("S","deltaRSMFCNCtop",deltaRSMFCNCtop); + Eventtrainer_->Fill("S","deltaRWlepb",deltaRWlepb); +// Eventtrainer_->Fill("S","deltaRWlepc",deltaRWlepc); +// Eventtrainer_->Fill("S","deltaRZc",deltaRZc); + Eventtrainer_->Fill("S","deltaRZb",deltaRZb); + Eventtrainer_->Fill("S","MassWlepB",MassWlepB); + } + else if((dataSetName.find("TTZ")!=string::npos || dataSetName.find("WZJets")!=string::npos || dataSetName.find("tZq")!=string::npos) && BkgName.find("all")==string::npos ) + { + //cout << "train against 1 bkg" << endl; + Eventtrainer_->FillWeight("B","Weight", ScaleFactor); + // Eventtrainer_->Fill("B","NumberOfElectrons", NumberOfElectrons); + // Eventtrainer_->Fill("B","NumberOfMuons", NumberOfMuons); + // Eventtrainer_->Fill("B","Zmass", Zmass); +// Eventtrainer_->Fill("B","TrMassW", TrMassW); +// Eventtrainer_->Fill("B","MET", MET ); + // Eventtrainer_->Fill("B","CvsL_1", CvsL_1 ); + // Eventtrainer_->Fill("B","CvsB_1", CvsB_1 ); + // Eventtrainer_->Fill("B","CvsL_2", CvsL[1] ); + // Eventtrainer_->Fill("B","CvsB_2", CvsB[1] ); + Eventtrainer_->Fill("B","pt_electron_1", pt_electron_1 ); + // Eventtrainer_->Fill("B","pt_electron_2", pt_electron_2 ); + // Eventtrainer_->Fill("B","pt_electron_3", pt_electron_3 ); + Eventtrainer_->Fill("B","pt_muon_1", pt_muon_1 ); + // Eventtrainer_->Fill("B","pt_muon_2", pt_muon_2 ); + // Eventtrainer_->Fill("B","pt_muon_3", pt_muon_3 ); +// Eventtrainer_->Fill("B","pt_jet_1", pt_jet_1 ); + // Eventtrainer_->Fill("B","pt_jet_2", pt_jet_2 ); + Eventtrainer_->Fill("B","topMass", topMass ); + // Eventtrainer_->Fill("B","nCSVL", nCSVL); + Eventtrainer_->Fill("B","nCSVM", nCSVM); + // Eventtrainer_->Fill("B","nCSVT", nCSVT); +// Eventtrainer_->Fill("B","bdis_1", bDisc[0]); + Eventtrainer_->Fill("B","bdis_2", bDisc[1]); + Eventtrainer_->Fill("B","FCNCtopmass",FCNCtopmass); +// Eventtrainer_->Fill("B","Pt_cjet",Pt_cjet); +// Eventtrainer_->Fill("B","deltaPhiSMFCNCtop",deltaPhiSMFCNCtop); +// Eventtrainer_->Fill("B","deltaPhiWlepb",deltaPhiWlepb); +// Eventtrainer_->Fill("B","deltaPhiWlepc",deltaPhiWlepc); +// Eventtrainer_->Fill("B","deltaPhiZc",deltaPhiZc); + Eventtrainer_->Fill("B","deltaPhiZb",deltaPhiZb); +// Eventtrainer_->Fill("B","deltaRSMFCNCtop",deltaRSMFCNCtop); + Eventtrainer_->Fill("B","deltaRWlepb",deltaRWlepb); +// Eventtrainer_->Fill("B","deltaRWlepc",deltaRWlepc); +// Eventtrainer_->Fill("B","deltaRZc",deltaRZc); + Eventtrainer_->Fill("B","deltaRZb",deltaRZb); + Eventtrainer_->Fill("B","MassWlepB",MassWlepB); + + } + else if( BkgName.find("all")!=string::npos) + { + //cout << "train against all bkg" << endl; + Eventtrainer_->FillWeight("B","Weight", ScaleFactor); + // Eventtrainer_->Fill("B","NumberOfElectrons", NumberOfElectrons); + // Eventtrainer_->Fill("B","NumberOfMuons", NumberOfMuons); + // Eventtrainer_->Fill("B","Zmass", Zmass); + Eventtrainer_->Fill("B","TrMassW", TrMassW); + Eventtrainer_->Fill("B","MET", MET ); + /// Eventtrainer_->Fill("B","CvsL_1", CvsL_1 ); + Eventtrainer_->Fill("B","CvsB_1", CvsB_1 ); + // Eventtrainer_->Fill("B","CvsL_2", CvsL[1] ); + // Eventtrainer_->Fill("B","CvsB_2", CvsB[1] ); + Eventtrainer_->Fill("B","pt_electron_1", pt_electron_1 ); + // Eventtrainer_->Fill("B","pt_electron_2", pt_electron_2 ); + // Eventtrainer_->Fill("B","pt_electron_3", pt_electron_3 ); + Eventtrainer_->Fill("B","pt_muon_1", pt_muon_1 ); + // Eventtrainer_->Fill("B","pt_muon_2", pt_muon_2 ); + // Eventtrainer_->Fill("B","pt_muon_3", pt_muon_3 ); + Eventtrainer_->Fill("B","pt_jet_1", pt_jet_1 ); + // Eventtrainer_->Fill("B","pt_jet_2", pt_jet_2 ); + Eventtrainer_->Fill("B","topMass", topMass ); + // Eventtrainer_->Fill("B","nCSVL", nCSVL); + Eventtrainer_->Fill("B","nCSVM", nCSVM); + // Eventtrainer_->Fill("B","nCSVT", nCSVT); + Eventtrainer_->Fill("B","bdis_1", bDisc[0]); + Eventtrainer_->Fill("B","bdis_2", bDisc[1]); + Eventtrainer_->Fill("B","FCNCtopmass",FCNCtopmass); + Eventtrainer_->Fill("B","Pt_cjet",Pt_cjet); + Eventtrainer_->Fill("B","deltaPhiSMFCNCtop",deltaPhiSMFCNCtop); + Eventtrainer_->Fill("B","deltaPhiWlepb",deltaPhiWlepb); +// Eventtrainer_->Fill("B","deltaPhiWlepc",deltaPhiWlepc); + Eventtrainer_->Fill("B","deltaPhiZc",deltaPhiZc); + Eventtrainer_->Fill("B","deltaPhiZb",deltaPhiZb); + Eventtrainer_->Fill("B","deltaRSMFCNCtop",deltaRSMFCNCtop); + Eventtrainer_->Fill("B","deltaRWlepb",deltaRWlepb); + Eventtrainer_->Fill("B","deltaRWlepc",deltaRWlepc); + Eventtrainer_->Fill("B","deltaRZc",deltaRZc); + Eventtrainer_->Fill("B","deltaRZb",deltaRZb); + Eventtrainer_->Fill("B","MassWlepB",MassWlepB); + + } + }//for-loop events + + }//If-statement doTraining + else if(!doTraining) //not training but computing + { + double BDTscore; + TBranch *newb = ttree[(dataSetName).c_str()]->Branch("BDTscore",&BDTscore,"BDTscore/D");; + for (int j = 0; jGetEntry(j); + if(doScaling){ + if(!PassedMET){continue;} + if(debug) cout << "MET SF " << endl; + //electron + for(unsigned int iEl = 0; iEl < NumberOfElectrons ; iEl ++) + { + //cout << "entry " << j << " electron " << iEl << " SF " << electronSF[iEl]<< endl; + ScaleFactor *= electronSF[iEl]; + } + if(debug) cout << "electron SF " << endl; + //muon + for(unsigned int iMu = 0; iMu < NumberOfMuons ; iMu ++) + { + ScaleFactor *= muonID[iMu]*muonIso[iMu]; + + } + if(debug) cout << "muon SF " << endl; + //PU + ScaleFactor *= puSF; + if(debug) cout << "PU SF " << endl; + //btag + ScaleFactor *= BSF; + if(debug) cout << "btag SF " << endl; + //AMC + ScaleFactor *= nloSF * nloW; + if(debug) cout << "amc SF " << endl; + + if(dataSetName.find("NP")!=string::npos){ ScaleFactor = 1.;} + } + NormFactor = DataLumi / datasets[d]->EquivalentLumi(); //data->NormFactor*Lumi + ScaleFactor *= NormFactor; + if(debug) cout << "normalisation SF " << endl; + + if (Eventcomputer_ == 0) cout <<"null computer...." <FillVar("Weight", ScaleFactor); + + Eventcomputer_->FillVar("pt_electron_1", pt_electron_1 ); + + Eventcomputer_->FillVar("pt_muon_1", pt_muon_1 ); + Eventcomputer_->FillVar("topMass", topMass ); + // Eventcomputer_->FillVar("nCSVL", nCSVL); + Eventcomputer_->FillVar("nCSVM", nCSVM); + // Eventcomputer_->FillVar("nCSVT", nCSVT); + // Eventcomputer_->FillVar("bdis_1", bDisc[0]); + Eventcomputer_->FillVar("bdis_2", bDisc[1]); + Eventcomputer_->FillVar("FCNCtopmass",FCNCtopmass); + // Eventcomputer_->FillVar("Pt_cjet",Pt_cjet); + // Eventcomputer_->FillVar("deltaPhiSMFCNCtop",deltaPhiSMFCNCtop); + // Eventcomputer_->FillVar("deltaPhiWlepb",deltaPhiWlepb); + // Eventcomputer_->FillVar("deltaPhiWlepc",deltaPhiWlepc); + // Eventcomputer_->FillVar("deltaPhiZc",deltaPhiZc); + Eventcomputer_->FillVar("deltaPhiZb",deltaPhiZb); + // Eventcomputer_->FillVar("deltaRSMFCNCtop",deltaRSMFCNCtop); + Eventcomputer_->FillVar("deltaRWlepb",deltaRWlepb); + // Eventcomputer_->FillVar("deltaRWlepc",deltaRWlepc); + // Eventcomputer_->FillVar("deltaRZc",deltaRZc); + Eventcomputer_->FillVar("deltaRZb",deltaRZb); + Eventcomputer_->FillVar("MassWlepB",MassWlepB); + + + + std::map MVAVals = Eventcomputer_->GetMVAValues(); + + for (std::map::const_iterator it = MVAVals.begin(); it != MVAVals.end(); ++it) + { + if(fabs(it->second > 1)) cout <<"MVA Method : "<< it->first <<" Score: "<< it->second <second; + } + // cout << "BDT score " << BDTscore << endl; + newb->Fill(); + // if(isData) MSPlot[MVAmethod.c_str()]->Fill(BDTscore, datasets[d], true, 1.); + // else MSPlot[MVAmethod.c_str()]->Fill(BDTscore, datasets[d], true, ScaleFactor); + } + + } + ttree[(dataSetName).c_str()]->Write(); + + }//for-loop datasets + std::string mycutS = ""; + std::string mycutB = ""; + if(doTraining) Eventtrainer_->TrainMVA("Random",mycutS,0,0,mycutB,0,0,"test",false); + + delete Eventtrainer_; + delete Eventcomputer_; +} + + + + + + + + + +string ConvertIntToString(int Number, bool pad) +{ + ostringstream convert; + convert.clear(); + if ( pad && Number < 10 ) { convert << std::setw(2) << std::setfill('0');} + convert << Number; + return convert.str(); +}; + + +string MakeTimeStamp() +{ + time_t t = time(0); // get time now + struct tm * now = localtime( & t ); + + int year = now->tm_year - 100; /// + 1900 to get current year + int month = now->tm_mon + 1; + int day = now->tm_mday; + int hour = now->tm_hour; + int min = now->tm_min; + int sec = now->tm_sec; + + string year_str = ConvertIntToString(year, true); + string month_str = ConvertIntToString(month, true); + string day_str = ConvertIntToString(day, true); + string hour_str = ConvertIntToString(hour, true); + string min_str = ConvertIntToString(min, true); + //string sec_str = ConvertIntToString(sec, true); + + string date_str = year_str + month_str + day_str; //+ "_" + hour_str + min_str; + return date_str; +}; diff --git a/Ntupler.cc b/Ntupler.cc new file mode 100644 index 0000000..00e771a --- /dev/null +++ b/Ntupler.cc @@ -0,0 +1,2376 @@ +////////////////////////////////////////////////////////////////////////////// +//// Analysis code for search for FCNC tZq //// +////////////////////////////////////////////////////////////////////////////// + + +#define _USE_MATH_DEFINES +#include "TStyle.h" +#include "TPaveText.h" +#include "TTree.h" +#include "TNtuple.h" +#include "TNtuple.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include "TRandom3.h" +#include "TRandom.h" +#include "TProfile.h" +#include +#include +#include + +//user code +#include "TopTreeProducer/interface/TRootRun.h" +#include "TopTreeProducer/interface/TRootEvent.h" +#include "TopTreeAnalysisBase/Selection/interface/Run2Selection.h" + +#include "TopTreeAnalysisBase/Content/interface/AnalysisEnvironment.h" +#include "TopTreeAnalysisBase/Content/interface/Dataset.h" +#include "TopTreeAnalysisBase/Tools/interface/JetTools.h" +#include "TopTreeAnalysisBase/Tools/interface/PlottingTools.h" +#include "TopTreeAnalysisBase/Tools/interface/TTreeLoader.h" +#include "TopTreeAnalysisBase/Tools/interface/AnalysisEnvironmentLoader.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/JetCorrectorParameters.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/JetCorrectionUncertainty.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MakeBinning.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MEzCalculator.h" +#include "TopTreeAnalysisBase/MCInformation/interface/LumiReWeighting.h" +#include "TopTreeAnalysisBase/MCInformation/interface/JetPartonMatching.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MEzCalculator.h" +#include "TopTreeAnalysisBase/Tools/interface/LeptonTools.h" +#include "TopTreeAnalysisBase/Tools/interface/SourceDate.h" +#include "TopTreeAnalysisBase/Tools/interface/Trigger.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/TTreeObservables.h" + +//This header file is taken directly from the BTV wiki. It contains +// to correctly apply an event level Btag SF. It is not yet on CVS +// as I hope to merge the functionality into BTagWeigtTools.h + +//#include "TopTreeAnalysisBase/Tools/interface/BTagSFUtil.h" +#include "TopTreeAnalysisBase/Tools/interface/BTagWeightTools.h" +#include "TopTreeAnalysisBase/Tools/interface/BTagCalibrationStandalone.h" + +#include "TopTreeAnalysisBase/Tools/interface/JetCombiner.h" +#include "TopTreeAnalysisBase/Tools/interface/MVATrainer.h" +#include "TopTreeAnalysisBase/Tools/interface/MVAComputer.h" + + + + +using namespace std; +using namespace TopTree; +using namespace reweight; + + +/// TH1F +map histo1D; +map histo2D; + + + +struct HighestCSVBtag +{ + bool operator()( TRootJet* j1, TRootJet* j2 ) const + { + return j1->btag_combinedInclusiveSecondaryVertexV2BJetTags() > j2->btag_combinedInclusiveSecondaryVertexV2BJetTags(); + } +}; + +//Initializing CSVv2 b-tag WP +float workingpointvalue_Loose = 0.460;//working points updated to 2015 BTV-POG recommendations. +float workingpointvalue_Medium = 0.800;//working points updated to 2015 BTV-POG recommendations. +float workingpointvalue_Tight = 0.935;//working points updated to 2015 BTV-POG recommendations. + + +TLorentzVector FCNCjetCalculator(std::vector nonBJets,std::vector BJets, TLorentzVector recoZ ,int verb); +double MEtz(bool mu, bool el, TLorentzVector Wlep, double MetPx, double MetPy); +float EffectiveAreaRho(TRootElectron *el, float _rho) ; +float EffectiveArea(TRootElectron *el) ; +float relPfIsoEl(TRootElectron *el, float _rho); +float IsoDBeta(TRootMuon *mu); + +string ConvertIntToString(int Number, bool pad) +{ + ostringstream convert; + convert.clear(); + if ( pad && Number < 10 ) { convert << std::setw(2) << std::setfill('0');} + convert << Number; + return convert.str(); +}; + + +string MakeTimeStamp() +{ + time_t t = time(0); // get time now + struct tm * now = localtime( & t ); + + int year = now->tm_year - 100; /// + 1900 to get current year + int month = now->tm_mon + 1; + int day = now->tm_mday; + int hour = now->tm_hour; + int min = now->tm_min; + //int sec = now->tm_sec; + + string year_str = ConvertIntToString(year, true); + string month_str = ConvertIntToString(month, true); + string day_str = ConvertIntToString(day, true); + string hour_str = ConvertIntToString(hour, true); + string min_str = ConvertIntToString(min, true); + //string sec_str = ConvertIntToString(sec, true); + + string date_str = year_str + month_str + day_str; //+ "_" + hour_str + min_str; + return date_str; +}; + + + +int main (int argc, char *argv[]) +{ + string dateString = MakeTimeStamp(); + cout << "***********************************" << endl; + cout << "*** Beginning of program: tZq FCNC ***" << endl; + cout << "***********************************" << endl; + cout << "Current time: " << dateString << endl; + + clock_t start = clock(); + + /////////////////////////// + /// Configuration /// + ////////////////////////// + int verbose = 1; // 0 = cout alll + bool eventSelected = false; + int nbTrig = 0; + int nbBaseline = 0; + int nbGPV = 0; + int nbSelectedEvents = 0; + int nbEvents = 0; + double dataLumi = 0; //pb + bool eee = false; + bool eemu = false; + bool mumue = false; + bool mumumu =false; + bool all = false; + bool runHLT = true; + bool hasMu = false; + bool hasEl = false; + bool dilep =false; + bool singlelep = false; + bool applyJetCleaning =false; + bool applyJetLeptonCleaning = true; + bool fillBtagHisto = false; + bool printTrigger = false; + bool printLeptonSF = false; + bool applyJER = false; + bool applyJES = false; + bool applyNegWeightCorrection = false; + bool applyPU = false; + bool applyLeptonSF = false; + bool btagShape = true; + string Channel = ""; + string xmlFileName = ""; + + + ////////////////////////////////////////////// + /// Set up everything for local submission //// + /////////////////////////////////////////////// + // check the arguments passed + if(verbose == 0) + { + cout << " The list of arguments are: " << endl; + for (int n_arg=1; n_arg vecfileNames; + for(int args = 11; args < argc-7; args++) + { + vecfileNames.push_back(argv[args]); + } + + if (verbose==0) + { + cout << "The list of file to run over will be printed..." << endl; + for ( int nfiles = 0; nfiles < vecfileNames.size(); nfiles++) + { + cout << "file number " << nfiles << " is " << vecfileNames[nfiles] << endl; + } + } + /// define channels + // + if(chanName.find("mumumu")!=string::npos) mumumu = true; + if(chanName.find("eemu")!=string::npos) eemu = true; + if(chanName.find("mumue")!=string::npos) mumue = true; + if(chanName.find("eee")!=string::npos) eee = true; + if(chanName.find("all")!=string::npos) all = true; + if(mumumu) + { + cout << " --> Using the TriMuon channel <-- " << endl; + Channel = "MuMuMu"; + xmlFileName = "config/Run2TriLepton.xml" ; + dataLumi = 2700; //pb + hasMu = true; + hasEl = false; + dilep = true; + singlelep = false; + } + else if(eee) + { + cout << " --> Using the TriElectron channel <-- " << endl; + Channel = "ElElEl"; + xmlFileName = "config/Run2TriLepton.xml" ; + dataLumi = 2700; //pb + hasMu = false; + hasEl = true; + dilep = true; + singlelep =false; + } + else if(mumue) + { + cout << " --> Using the MuMuEl channel <-- " << endl; + Channel = "MuMuEl"; + xmlFileName = "config/Run2TriLepton.xml" ; + dataLumi = 2700; //pb + hasMu = true; + hasEl = true; + dilep = true; + singlelep =false; + } + else if(eemu) + { + cout << " --> Using the ElElMu channel <-- " << endl; + Channel = "ElElMu"; + xmlFileName = "config/Run2TriLepton.xml" ; + dataLumi = 2700; //pb + hasMu = true; + hasEl = true; + dilep = true; + singlelep =false; + } + else if(all) + { + cout << " --> Using the all channel <-- " << endl; + Channel = "All"; + xmlFileName = "config/Run2TriLepton.xml" ; + dataLumi = 2700; //pb + hasMu = true; + hasEl = true; + dilep = true; + singlelep = true; + } + else + { + cerr << " ERROR: no channel specified " << endl; + exit(1); + } + + // Print information to a textfile + ofstream infoFile; + ofstream isoFile; + ofstream jetFile; + ofstream jetJECFile; + ofstream jetSelFile; + ofstream topFile; + ofstream mWtFile; + ofstream muSelFile; + ofstream muIniFile; + string info_dir = "Information/"+Channel +"/"; + string iso_dir = "Isolation/"+Channel +"/"; + + string info_date_dir = info_dir + dateString +"/"; + string iso_date_dir = iso_dir + dateString +"/"; + cout << "info dir " << info_dir.c_str() << endl; + mkdir(info_dir.c_str(),0777); + mkdir(info_date_dir.c_str(),0777); + mkdir(iso_dir.c_str(),0777); + mkdir(iso_date_dir.c_str(),0777); + string infoName = info_date_dir + "information"; + infoName += "_"+ Channel; + infoName += "_" + dName; + infoName += "_" + JobNum; + infoName += ".txt"; + infoFile.open(infoName.c_str()); + infoFile.precision(3); + string isoName = iso_date_dir + "isolation"; + isoName += "_"+ Channel; + isoName += "_" + dName; + isoName += "_" + JobNum; + isoName += ".txt"; + isoFile.open(isoName.c_str()); +// isoFile.precision(3); + string jetName = info_date_dir + "jetinfo"; + jetName += "_"+ Channel; + jetName += "_" + dName; + jetName += "_" + JobNum; + jetName += ".txt"; + jetFile.open(jetName.c_str()); + string jetJECName = info_date_dir + "jetinfoJEC"; + jetJECName += "_"+ Channel; + jetJECName += "_" + dName; + jetJECName += "_" + JobNum; + jetJECName += ".txt"; + jetJECFile.open(jetJECName.c_str()); + string jetSelName = info_date_dir + "jetinfoSel"; + jetSelName += "_"+ Channel; + jetSelName += "_" + dName; + jetSelName += "_" + JobNum; + jetSelName += ".txt"; + jetSelFile.open(jetSelName.c_str()); + string topName = info_date_dir + "topinfo"; + topName += "_"+ Channel; + topName += "_" + dName; + topName += "_" + JobNum; + topName += ".txt"; + topFile.open(topName.c_str()); + string mWtName = info_date_dir + "mWtinfo"; + mWtName += "_"+ Channel; + mWtName += "_" + dName; + mWtName += "_" + JobNum; + mWtName += ".txt"; + mWtFile.open(mWtName.c_str()); + string muSelName = info_date_dir + "muSelinfo"; + muSelName += "_"+ Channel; + muSelName += "_" + dName; + muSelName += "_" + JobNum; + muSelName += ".txt"; + muSelFile.open(muSelName.c_str()); + string muIniName = info_date_dir + "muIniinfo"; + muIniName += "_"+ Channel; + muIniName += "_" + dName; + muIniName += "_" + JobNum; + muIniName += ".txt"; + muIniFile.open(muIniName.c_str()); + cout << "---Dataset accepted from command line---" << endl; + cout << "Dataset Name: " << dName << endl; + cout << "Dataset Title: " << dTitle << endl; + cout << "Dataset color: " << color << endl; + cout << "Dataset ls: " << ls << endl; + cout << "Dataset lw: " << lw << endl; + cout << "Dataset normf: " << normf << endl; + cout << "Dataset EqLumi: " << EqLumi << endl; + cout << "Dataset xSect: " << xSect << endl; + cout << "Dataset File Name: " << vecfileNames[0] << endl; + cout << "Beginning Event: " << startEvent << endl; + cout << "Ending Event: " << endEvent << endl; + cout << "JobNum: " << JobNum << endl; + bool isData= false; + if(dName.find("Data")!=string::npos || dName.find("data")!=string::npos || dName.find("DATA")!=string::npos){ + isData = true; + cout << "running on data !!!!" << endl; + cout << "luminosity is " << dataLumi << endl; + } + cout << "----------------------------------------" << endl; + + + ///////////////////////////////// + // Set up AnalysisEnvironment + ///////////////////////////////// + + AnalysisEnvironment anaEnv; + cout<<" - Creating environment ..."< datasets; + Dataset* theDataset = new Dataset(dName, dTitle, true, color, ls, lw, normf, xSect, vecfileNames); + theDataset->SetEquivalentLuminosity(EqLumi); + datasets.push_back(theDataset); + int ndatasets = datasets.size() - 1 ; + + //////////////////////////// + /// Initialise trigger /// + //////////////////////////// + + if(verbose == 0) cout << "Initializing trigger" << endl; + Trigger* trigger_mumu = new Trigger(1, 0, 0, 1); + Trigger* trigger_ee = new Trigger(0, 1, 0, 1); + Trigger* trigger_emu = new Trigger(1, 1, 0, 1) ; + + /////////////////////// + // MET calculator /// + ///////////////////// + MEzCalculator* MEzCalculator; + + + //////////////////////// + // intialize Calibrations // + /////////////////////// + BTagCalibration *btagcalib; + BTagCalibrationReader *btagreader; + BTagWeightTools *btwt; + BTagCalibrationReader * reader_csvv2; + // for pu + LumiReWeighting LumiWeights; + + // JER / JEC + vector vCorrParam; + string pathCalJEC = "../TopTreeAnalysisBase/Calibrations/JECFiles/"; + + + /////////////////////////////// + // Set up Output ROOT file /// + ////////////////////////////// + stringstream ss; + ss << JobNum; + string strJobNum = ss.str(); + string histo_dir = "NtupleMakerOutput/TriLepton_histos_"+ Channel; + string histo_dir_date = histo_dir+"/TriLepton_histos_" + dateString +"/"; + mkdir(histo_dir.c_str(),0777); + mkdir(histo_dir_date.c_str(),0777); + + string rootFileName (histo_dir_date+"/FCNC_3L_"+Channel+"_"+dName+".root"); + if (strJobNum != "0") + { + if(verbose == 0) cout << "strJobNum is " << strJobNum << endl; + rootFileName = histo_dir_date+"/FCNC_3L_"+Channel+"_"+dName + "_"+strJobNum+".root"; + } + cout << "Histofile: " << rootFileName << endl; + TFile *fout = new TFile (rootFileName.c_str(), "RECREATE"); + + /////////////////////////// + /// Global variables //// + ////////////////////////// + TRootEvent* event = 0; + // TRootRun *runInfos = new TRootRun(); + + ///////////////////////////// + /// Object ID /// + ///////////////////////////// + // electron + float el_pt_cut =20.; // 42 + float el_eta_cut = 2.5; + float el_iso_cone = 0.3; + // reliso cut fabs(eta supercluster) <= 1.479 --> 0.107587 // (fabs(eta supercluster) > 1.479 && fabs(eta supercluster) < 2.5) --> 0.113254 + // muon + float mu_pt_cut = 20.; // 40 + float mu_eta_cut = 2.4; + float mu_iso_cut = 0.15; + //jets + float jet_pt_cut = 30.; + float jet_eta_cut = 2.4; + + // convert into string + + std::ostringstream el_pt_cut_strs, el_eta_cut_strs, mu_pt_cut_strs, mu_eta_cut_strs, mu_iso_cut_strs, jet_pt_cut_strs, jet_eta_cut_strs; + std::string el_pt_cut_str, el_eta_cut_str, mu_pt_cut_str, mu_eta_cut_str, mu_iso_cut_str, jet_pt_cut_str, jet_eta_cut_str; + el_pt_cut_strs << el_pt_cut; + el_eta_cut_strs << el_eta_cut; + mu_pt_cut_strs << mu_pt_cut; + mu_eta_cut_strs << mu_eta_cut; + mu_iso_cut_strs << mu_iso_cut; + jet_pt_cut_strs << jet_pt_cut; + jet_eta_cut_strs << jet_eta_cut; + el_pt_cut_str = el_pt_cut_strs.str(); + el_eta_cut_str = el_eta_cut_strs.str(); + mu_pt_cut_str = mu_pt_cut_strs.str(); + mu_eta_cut_str = mu_eta_cut_strs.str(); + mu_iso_cut_str = mu_iso_cut_strs.str(); + jet_pt_cut_str = jet_pt_cut_strs.str(); + jet_eta_cut_str = jet_eta_cut_strs.str(); + + + + + //////////////////////////////////////////////////////////////////// + ////////////////// 1D plots ////////////////////////////// + //////////////////////////////////////////////////////////////////// + histo1D["NbOfVertices"] = new TH1F("NbOfVertices", "Nb. of vertices", 60, 0, 60); + histo1D["cutFlow"] = new TH1F( "cutFlow", "cutFlow", 15, -0.5, 14.5); + histo1D["weightIndex"] = new TH1F("weightIndex", "weightIndex", 5, -2.5,2.5); // 0: None; 1: scale_variation 1; 2: Central scale variation 1 + histo1D["nloweight"] = new TH1F("nloweight", "nloweight", 200, -2.0, 2.0); + histo1D["init_nPVs_before"] = new TH1F("init_nPVs_before", "init_nPVs_before", 41,-0.5,40.5); + histo1D["init_nPVs_after"] = new TH1F("init_nPVs_after", "init_nPVs_after", 41,-0.5,40.5); + + histo1D["nbMuons"] = new TH1F("nbMuons","nbMuons",10,-0.5,9.5); + histo1D["nbElectrons"] = new TH1F("nbElectrons","nbElectrons",10,-0.5,9.5); + histo1D["nbJets"] = new TH1F("nbJets","nbJets",10,-0.5,9.5); + ///////////////////////////////// + // Loop on datasets // + ///////////////////////////////// + cout << " - Loop over datasets ... " << datasets.size () << " datasets !" << endl; + bool nlo = false; + for (unsigned int d = 0; d < datasets.size(); d++) + { + cout<<"Load Dataset"<Name(); + float normfactor = datasets[d]->NormFactor(); + cout <<"found sample " << daName.c_str() << " with equivalent lumi "<< theDataset->EquivalentLumi() < depending on JES up/Down andother reader is needed + + + } + + LumiWeights = LumiReWeighting("../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_MC_RunIIFall15DR76-Asympt25ns.root", "../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_2015Data76X_25ns-Run246908-260627Cert.root", "pileup", "pileup"); + + //MuonSFWeight (const string &sfFile, const string &dataOverMC, const bool &extendRange, const bool &debug, const bool &printWarning) + + MuonSFWeight* muonSFWeightID_T = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonID_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_TightIDandIPCut_DEN_genTracks_PAR_pt_spliteta_bin1/abseta_pt_ratio",true, printLeptonSF,printLeptonSF); + MuonSFWeight* muonSFWeightID_M = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonID_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_MediumID_DEN_genTracks_PAR_pt_spliteta_bin1/abseta_pt_ratio",true, printLeptonSF, printLeptonSF); + MuonSFWeight* muonSFWeightID_L = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonID_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_LooseID_DEN_genTracks_PAR_pt_spliteta_bin1/abseta_pt_ratio", true, printLeptonSF, printLeptonSF); + MuonSFWeight* muonSFWeightIso_TT = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_TightRelIso_DEN_TightID_PAR_pt_spliteta_bin1/abseta_pt_ratio",true, printLeptonSF,printLeptonSF); // Tight RelIso, Tight ID + MuonSFWeight* muonSFWeightIso_TM = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_TightRelIso_DEN_MediumID_PAR_pt_spliteta_bin1/abseta_pt_ratio", true,printLeptonSF, printLeptonSF); // Tight RelIso, Medium ID + MuonSFWeight* muonSFWeightIso_LT = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_LooseRelIso_DEN_TightID_PAR_pt_spliteta_bin1/abseta_pt_ratio", true,printLeptonSF, printLeptonSF); // Loose RelIso, Tight ID + MuonSFWeight* muonSFWeightIso_LM = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_LooseRelIso_DEN_MediumID_PAR_pt_spliteta_bin1/abseta_pt_ratio", true,printLeptonSF, printLeptonSF); // Loose RelIso, Medium ID +// double weightMuonHLTv2, weightMuonHLTv3 ; // for run C should also something like this be done +// MuonSFWeight *muonSFWeightTrigHLTv4p2 = new MuonSFWeight(CaliPath+"LeptonSF/"+"SingleMuonTrigger_Z_RunCD_Reco76X_Dec1.root", "runD_IsoMu20_OR_IsoTkMu20_HLTv4p2_PtEtaBins/abseta_pt_ratio", true, false, false); +// MuonSFWeight *muonSFWeightTrigHLTv4p3 = new MuonSFWeight(CaliPath+"LeptonSF/"+"SingleMuonTrigger_Z_RunCD_Reco76X_Dec1.root", "runD_IsoMu20_OR_IsoTkMu20_HLTv4p3_PtEtaBins/abseta_pt_ratio", true, false, false); + + + + + string electronFile= "Elec_SF_TopEA.root"; + ElectronSFWeight* electronSFWeight = new ElectronSFWeight (CaliPath+"LeptonSF/"+electronFile,"GlobalSF", true,printLeptonSF, printLeptonSF); // (... , ... , debug, print warning) + + vCorrParam.clear(); + if (isData) + { + JetCorrectorParameters *L1JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L1FastJet_AK4PFchs.txt"); + vCorrParam.push_back(*L1JetCorPar); + JetCorrectorParameters *L2JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L2Relative_AK4PFchs.txt"); + vCorrParam.push_back(*L2JetCorPar); + JetCorrectorParameters *L3JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L3Absolute_AK4PFchs.txt"); + vCorrParam.push_back(*L3JetCorPar); + JetCorrectorParameters *L2L3ResJetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L2L3Residual_AK4PFchs.txt"); + vCorrParam.push_back(*L2L3ResJetCorPar); + } + else + { + JetCorrectorParameters *L1JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_MC_L1FastJet_AK4PFchs.txt"); + vCorrParam.push_back(*L1JetCorPar); + JetCorrectorParameters *L2JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_MC_L2Relative_AK4PFchs.txt"); + vCorrParam.push_back(*L2JetCorPar); + JetCorrectorParameters *L3JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_MC_L3Absolute_AK4PFchs.txt"); + vCorrParam.push_back(*L3JetCorPar); + } + JetCorrectionUncertainty *jecUnc = new JetCorrectionUncertainty(pathCalJEC+"Fall15_25nsV2_MC_Uncertainty_AK4PFchs.txt"); + + JetTools *jetTools = new JetTools(vCorrParam, jecUnc, true); //true means redo also L1 + + //////////////////////////////////////////////////////////// + // Setup Date string and nTuple for output + /////////////////////////////////////////////////////////// + + string channel_dir = "NtupleMakerOutput/Ntuples_"+Channel; + string date_dir = channel_dir+"/Ntuples_" + dateString +"/"; + mkdir(channel_dir.c_str(),0777); + mkdir(date_dir.c_str(),0777); + + + string Ntupname = date_dir +"FCNC_3L_" +Channel + "_" + dName + "_"+ strJobNum + ".root"; + + TFile * tupfile = new TFile(Ntupname.c_str(),"RECREATE"); + tupfile->cd(); + TTree* myTree = new TTree("tree","tree"); + TTree* baselineTree = new TTree("baselinetree","baselinetree"); + TTree* globalTree = new TTree("globaltree","globaltree"); + /////////////////////////// + /// output tree + /////////////////////////// + // event related variables + Int_t run_num; + Int_t evt_num; + Int_t lumi_num; + Int_t nvtx; + Int_t npu; + Int_t PassedMETFilter; + Double_t cutstep[10]; + Int_t nCuts; + Double_t puSF; + Double_t btagSF; + Double_t MuonIDSF[10]; + Double_t MuonIsoSF[10]; + Double_t MuonTrigSFv2[10]; + Double_t MuonTrigSFv3[10]; + Double_t ElectronSF[10]; + Int_t nofPosWeights; + Int_t nofNegWeights; + Int_t sumW; + Int_t nEv; + Double_t nloWeight; // for amc@nlo samples + Int_t JERon; + Int_t JESon; + Double_t WPb_L; + Double_t WPb_M; + Double_t WPb_T; + + + Double_t pt_electron_1; + Double_t pt_electron_2; + Double_t pt_electron_3; + Double_t pt_muon_1; + Double_t pt_muon_2; + Double_t pt_muon_3; + Double_t pt_jet_1; + Double_t pt_jet_2; + Double_t pt_jet_3; + + + Int_t nLeptons; + // variables for electrons + Int_t nElectrons; + Double_t pt_electron[10]; + Double_t phi_electron[10]; + Double_t eta_electron[10]; + Double_t eta_superCluster_electron[10]; + Double_t E_electron[10]; + Double_t d0_electron[10]; + Double_t d0BeamSpot_electron[10]; + Double_t chargedHadronIso_electron[10]; + Double_t neutralHadronIso_electron[10]; + Double_t photonIso_electron[10]; + Double_t pfIso_electron[10]; + Int_t charge_electron[10]; + + Double_t sigmaIEtaIEta_electron[10]; + Double_t deltaEtaIn_electron[10]; + Double_t deltaPhiIn_electron[10]; + Double_t hadronicOverEm_electron[10]; + Int_t missingHits_electron[10]; + Bool_t passConversion_electron[10]; + Bool_t isId_electron[10]; + Bool_t isIso_electron[10]; + + Bool_t isEBEEGap[10]; + Double_t sf_electron[10]; + + //variable for muons + Int_t nMuons; + Double_t pt_muon[10]; + Double_t phi_muon[10]; + Double_t eta_muon[10]; + Double_t E_muon[10]; + Double_t d0_muon[10]; + Double_t d0BeamSpot_muon[10]; + Double_t chargedHadronIso_muon[10]; + Double_t neutralHadronIso_muon[10]; + Double_t photonIso_muon[10]; + Double_t relIso_muon[10]; + Bool_t isId_muon[10]; + Bool_t isIso_muon[10]; + Double_t pfIso_muon[10]; + Double_t sf_muon[10]; + Int_t charge_muon[10]; + + //variable for jets + Int_t nJets; + Int_t nJets_CSVL; + Int_t nJets_CSVM; + Int_t nJets_CSVT; + Double_t pt_jet[20]; + Double_t phi_jet[20]; + Double_t eta_jet[20]; + Double_t E_jet[20]; + Int_t charge_jet[20]; + Double_t bdisc_jet[20]; + Double_t cdiscCvsL_jet[20]; + Double_t cdiscCvsB_jet[20]; + + + // variables for Zboson + Double_t Zboson_M; +/* Double_t Zboson_Px; + Double_t Zboson_Py; + Double_t Zboson_Pz; + Double_t Zboson_Energy; +*/ + // met + Double_t met_Pt; + Double_t met_Phi; + Double_t met_Eta; + + Double_t mWt; + Double_t FCNCtop_M; + Double_t SMtop_M; + // global data set variables + Int_t nofEventsHLTv2; + Int_t nofEventsHLTv3; + globalTree->Branch("nofEventsHLTv2",&nofEventsHLTv2,"nofEventsHLTv2/I"); + globalTree->Branch("nofEventsHLTv3",&nofEventsHLTv3,"nofEventsHLTv3/I"); + globalTree->Branch("nofPosWeights",&nofPosWeights,"nofPosWeights/I"); + globalTree->Branch("nofNegWeights",&nofNegWeights,"nofNegWeights/I"); + globalTree->Branch("nEv" , &nEv, "nEv/I"); + globalTree->Branch("sumW", &sumW, "sumW/I"); + globalTree->Branch("nCuts",&nCuts, "nCuts/I"); + globalTree->Branch("cutstep",&cutstep,"cutstep[nCuts]/D"); + globalTree->Branch("JERon",&JERon,"JERon/I"); + globalTree->Branch("JESon", &JESon, "JESon/I"); + globalTree->Branch("WPb_L", &WPb_L, "WPb_L/D"); + globalTree->Branch("WPb_M", &WPb_M, "WPb_M/D"); + globalTree->Branch("WPb_T", &WPb_T, "WPb_T/D"); + + // event related variables + myTree->Branch("nloWeight",&nloWeight,"nloWeight/D"); + myTree->Branch("run_num",&run_num,"run_num/I"); + myTree->Branch("evt_num",&evt_num,"evt_num/I"); + myTree->Branch("lumi_num",&lumi_num,"lumi_num/I"); + myTree->Branch("nvtx",&nvtx,"nvtx/I"); + myTree->Branch("npu",&npu,"npu/I"); + myTree->Branch("puSF",&puSF,"puSF/D"); + myTree->Branch("btagSF",&btagSF,"btagSF/D"); + myTree->Branch("nLeptons",&nLeptons, "nLeptons/I");// + myTree->Branch("PassedMETFilter", &PassedMETFilter,"PassedMETFilter/I"); + + baselineTree->Branch("PassedMETFilter", &PassedMETFilter,"PassedMETFilter/I"); + baselineTree->Branch("nloWeight",&nloWeight,"nloWeight/D"); + baselineTree->Branch("run_num",&run_num,"run_num/I"); + baselineTree->Branch("evt_num",&evt_num,"evt_num/I"); + baselineTree->Branch("lumi_num",&lumi_num,"lumi_num/I"); + baselineTree->Branch("nvtx",&nvtx,"nvtx/I"); + baselineTree->Branch("npu",&npu,"npu/I"); + baselineTree->Branch("puSF",&puSF,"puSF/D"); + baselineTree->Branch("btagSF",&btagSF,"btagSF/D"); + baselineTree->Branch("nLeptons",&nLeptons, "nLeptons/I");// + // electrons + myTree->Branch("nElectrons",&nElectrons, "nElectrons/I");// + myTree->Branch("ElectronSF",&ElectronSF,"ElectronSF[nElectrons]/D"); + myTree->Branch("pt_electron",pt_electron,"pt_electron[nElectrons]/D"); + myTree->Branch("phi_electron",phi_electron,"phi_electron[nElectrons]/D"); + myTree->Branch("eta_electron",eta_electron,"eta_electron[nElectrons]/D"); + myTree->Branch("eta_superCluster_electron",eta_superCluster_electron,"eta_superCluster_electron[nElectrons]/D"); + myTree->Branch("E_electron",E_electron,"E_electron[nElectrons]/D"); + myTree->Branch("chargedHadronIso_electron",chargedHadronIso_electron,"chargedHadronIso_electron[nElectrons]/D"); + myTree->Branch("neutralHadronIso_electron",neutralHadronIso_electron,"neutralHadronIso_electron[nElectrons]/D"); + myTree->Branch("photonIso_electron",photonIso_electron,"photonIso_electron[nElectrons]/D"); + myTree->Branch("pfIso_electron",pfIso_electron,"pfIso_electron[nElectrons]/D"); + myTree->Branch("charge_electron",charge_electron,"charge_electron[nElectrons]/I"); + myTree->Branch("d0_electron",d0_electron,"d0_electron[nElectrons]/D"); + myTree->Branch("d0BeamSpot_electron",d0BeamSpot_electron,"d0BeamSpot_electron[nElectrons]/D"); + myTree->Branch("sigmaIEtaIEta_electron",sigmaIEtaIEta_electron,"sigmaIEtaIEta_electron[nElectrons]/D"); + myTree->Branch("deltaEtaIn_electron",deltaEtaIn_electron,"deltaEtaIn_electron[nElectrons]/D"); + myTree->Branch("deltaPhiIn_electron",deltaPhiIn_electron,"deltaPhiIn_electron[nElectrons]/D"); + myTree->Branch("hadronicOverEm_electron",hadronicOverEm_electron,"hadronicOverEm_electron[nElectrons]/D"); + myTree->Branch("missingHits_electron",missingHits_electron,"missingHits_electron[nElectrons]/I"); + myTree->Branch("passConversion_electron",passConversion_electron,"passConversion_electron[nElectrons]/O)"); + myTree->Branch("isId_electron",isId_electron,"isId_electron[nElectrons]/O)"); + myTree->Branch("isIso_electron",isIso_electron,"isIso_electron[nElectrons]/O)"); + myTree->Branch("isEBEEGap",isEBEEGap,"isEBEEGap[nElectrons]/O)"); + myTree->Branch("sf_electron",sf_electron,"sf_electron[nElectrons]/D"); + myTree->Branch("pt_electron_1",&pt_electron_1,"pt_electron_1/D"); + myTree->Branch("pt_electron_2",&pt_electron_2,"pt_electron_2/D"); + myTree->Branch("pt_electron_3",&pt_electron_3,"pt_electron_3/D"); + + + baselineTree->Branch("nElectrons",&nElectrons, "nElectrons/I");// + baselineTree->Branch("ElectronSF",&ElectronSF,"ElectronSF[nElectrons]/D"); + baselineTree->Branch("pt_electron",pt_electron,"pt_electron[nElectrons]/D"); + baselineTree->Branch("phi_electron",phi_electron,"phi_electron[nElectrons]/D"); + baselineTree->Branch("eta_electron",eta_electron,"eta_electron[nElectrons]/D"); + baselineTree->Branch("eta_superCluster_electron",eta_superCluster_electron,"eta_superCluster_electron[nElectrons]/D"); + baselineTree->Branch("E_electron",E_electron,"E_electron[nElectrons]/D"); + baselineTree->Branch("chargedHadronIso_electron",chargedHadronIso_electron,"chargedHadronIso_electron[nElectrons]/D"); + baselineTree->Branch("neutralHadronIso_electron",neutralHadronIso_electron,"neutralHadronIso_electron[nElectrons]/D"); + baselineTree->Branch("photonIso_electron",photonIso_electron,"photonIso_electron[nElectrons]/D"); + baselineTree->Branch("pfIso_electron",pfIso_electron,"pfIso_electron[nElectrons]/D"); + baselineTree->Branch("charge_electron",charge_electron,"charge_electron[nElectrons]/I"); + baselineTree->Branch("d0_electron",d0_electron,"d0_electron[nElectrons]/D"); + baselineTree->Branch("d0BeamSpot_electron",d0BeamSpot_electron,"d0BeamSpot_electron[nElectrons]/D"); + baselineTree->Branch("sigmaIEtaIEta_electron",sigmaIEtaIEta_electron,"sigmaIEtaIEta_electron[nElectrons]/D"); + baselineTree->Branch("deltaEtaIn_electron",deltaEtaIn_electron,"deltaEtaIn_electron[nElectrons]/D"); + baselineTree->Branch("deltaPhiIn_electron",deltaPhiIn_electron,"deltaPhiIn_electron[nElectrons]/D"); + baselineTree->Branch("hadronicOverEm_electron",hadronicOverEm_electron,"hadronicOverEm_electron[nElectrons]/D"); + baselineTree->Branch("missingHits_electron",missingHits_electron,"missingHits_electron[nElectrons]/I"); + baselineTree->Branch("passConversion_electron",passConversion_electron,"passConversion_electron[nElectrons]/O)"); + baselineTree->Branch("isId_electron",isId_electron,"isId_electron[nElectrons]/O)"); + baselineTree->Branch("isIso_electron",isIso_electron,"isIso_electron[nElectrons]/O)"); + baselineTree->Branch("isEBEEGap",isEBEEGap,"isEBEEGap[nElectrons]/O)"); + baselineTree->Branch("sf_electron",sf_electron,"sf_electron[nElectrons]/D"); + baselineTree->Branch("pt_electron_1",&pt_electron_1,"pt_electron_1/D"); + baselineTree->Branch("pt_electron_2",&pt_electron_2,"pt_electron_2/D"); + baselineTree->Branch("pt_electron_3",&pt_electron_3,"pt_electron_3/D"); + + // muons + myTree->Branch("nMuons",&nMuons, "nMuons/I"); + myTree->Branch("MuonIDSF",&MuonIDSF,"MuonIDSF[nMuons]/D"); + myTree->Branch("MuonIsoSF",&MuonIsoSF, "MuonIsoSF[nMuons]/D"); + myTree->Branch("MuonTrigSFv2",&MuonTrigSFv2,"MuonTrigSFv2[nMuons]/D"); + myTree->Branch("MuonTrigSFv3",&MuonTrigSFv3,"MuonTrigSFv3[nMuons]/D"); + myTree->Branch("pt_muon",pt_muon,"pt_muon[nMuons]/D"); + myTree->Branch("phi_muon",phi_muon,"phi_muon[nMuons]/D"); + myTree->Branch("eta_muon",eta_muon,"eta_muon[nMuons]/D"); + myTree->Branch("E_muon",E_muon,"E_muon[nMuons]/D"); + myTree->Branch("chargedHadronIso_muon",chargedHadronIso_muon,"chargedHadronIso_muon[nMuons]/D"); + myTree->Branch("neutralHadronIso_muon",neutralHadronIso_muon,"neutralHadronIso_muon[nMuons]/D"); + myTree->Branch("photonIso_muon",photonIso_muon,"photonIso_muon[nMuons]/D"); + myTree->Branch("isId_muon",isId_muon,"isId_muon[nMuons]/O"); + myTree->Branch("isIso_muon",isIso_muon,"isIso_muon[nMuons]/O"); + myTree->Branch("pfIso_muon",pfIso_muon,"pfIso_muon[nMuons]/D"); + myTree->Branch("charge_muon",charge_muon,"charge_muon[nMuons]/I"); + myTree->Branch("d0_muon",d0_muon,"d0_muon[nMuons]/D"); + myTree->Branch("d0BeamSpot_muon",d0BeamSpot_muon,"d0BeamSpot_muon[nMuons]/D"); + myTree->Branch("sf_muon",sf_muon,"sf_muon[nMuons]/D"); + myTree->Branch("pt_muon_1",&pt_muon_1,"pt_muon_1/D"); + myTree->Branch("pt_muon_2",&pt_muon_2,"pt_muon_2/D"); + myTree->Branch("pt_muon_3",&pt_muon_3,"pt_muon_3/D"); + + baselineTree->Branch("nMuons",&nMuons, "nMuons/I"); + baselineTree->Branch("MuonIDSF",&MuonIDSF,"MuonIDSF[nMuons]/D"); + baselineTree->Branch("MuonIsoSF",&MuonIsoSF, "MuonIsoSF[nMuons]/D"); + baselineTree->Branch("MuonTrigSFv2",&MuonTrigSFv2,"MuonTrigSFv2[nMuons]/D"); + baselineTree->Branch("MuonTrigSFv3",&MuonTrigSFv3,"MuonTrigSFv3[nMuons]/D"); + baselineTree->Branch("pt_muon",pt_muon,"pt_muon[nMuons]/D"); + baselineTree->Branch("phi_muon",phi_muon,"phi_muon[nMuons]/D"); + baselineTree->Branch("eta_muon",eta_muon,"eta_muon[nMuons]/D"); + baselineTree->Branch("E_muon",E_muon,"E_muon[nMuons]/D"); + baselineTree->Branch("chargedHadronIso_muon",chargedHadronIso_muon,"chargedHadronIso_muon[nMuons]/D"); + baselineTree->Branch("neutralHadronIso_muon",neutralHadronIso_muon,"neutralHadronIso_muon[nMuons]/D"); + baselineTree->Branch("photonIso_muon",photonIso_muon,"photonIso_muon[nMuons]/D"); + baselineTree->Branch("isId_muon",isId_muon,"isId_muon[nMuons]/O"); + baselineTree->Branch("isIso_muon",isIso_muon,"isIso_muon[nMuons]/O"); + baselineTree->Branch("pfIso_muon",pfIso_muon,"pfIso_muon[nMuons]/D"); + baselineTree->Branch("charge_muon",charge_muon,"charge_muon[nMuons]/I"); + baselineTree->Branch("d0_muon",d0_muon,"d0_muon[nMuons]/D"); + baselineTree->Branch("d0BeamSpot_muon",d0BeamSpot_muon,"d0BeamSpot_muon[nMuons]/D"); + baselineTree->Branch("sf_muon",sf_muon,"sf_muon[nMuons]/D"); + baselineTree->Branch("pt_muon_1",&pt_muon_1,"pt_muon_1/D"); + baselineTree->Branch("pt_muon_2",&pt_muon_2,"pt_muon_2/D"); + baselineTree->Branch("pt_muon_3",&pt_muon_3,"pt_muon_3/D"); + + // jets + myTree->Branch("nJets",&nJets,"nJets/I"); + myTree->Branch("nJets_CSVL",&nJets_CSVL,"nJets_CSVL/I"); + myTree->Branch("nJets_CSVM",&nJets_CSVM,"nJets_CSVM/I"); + myTree->Branch("nJets_CSVT",&nJets_CSVT,"nJets_CSVT/I"); + myTree->Branch("pt_jet",pt_jet,"pt_jet[nJets]/D"); + myTree->Branch("phi_jet",phi_jet,"phi_jet[nJets]/D"); + myTree->Branch("eta_jet",eta_jet,"eta_jet[nJets]/D"); + myTree->Branch("E_jet",E_jet,"E_jet[nJets]/D"); + myTree->Branch("charge_jet",charge_jet,"charge_jet[nJets]/I"); + myTree->Branch("bdisc_jet",bdisc_jet,"bdisc_jet[nJets]/D"); + myTree->Branch("cdiscCvsL_jet",cdiscCvsL_jet,"cdiscCvsL_jet[nJets]/D"); + myTree->Branch("cdiscCvsB_jet",cdiscCvsB_jet,"cdiscCvsB_jet[nJets]/D"); + myTree->Branch("pt_jet_1",&pt_jet_1,"pt_jet_1/D"); + myTree->Branch("pt_jet_2",&pt_jet_2,"pt_jet_2/D"); + myTree->Branch("pt_jet_3",&pt_jet_3,"pt_jet_3/D"); + + baselineTree->Branch("nJets",&nJets,"nJets/I"); + baselineTree->Branch("nJets_CSVL",&nJets_CSVL,"nJets_CSVL/I"); + baselineTree->Branch("nJets_CSVM",&nJets_CSVM,"nJets_CSVM/I"); + baselineTree->Branch("nJets_CSVT",&nJets_CSVT,"nJets_CSVT/I"); + baselineTree->Branch("pt_jet",pt_jet,"pt_jet[nJets]/D"); + baselineTree->Branch("phi_jet",phi_jet,"phi_jet[nJets]/D"); + baselineTree->Branch("eta_jet",eta_jet,"eta_jet[nJets]/D"); + baselineTree->Branch("E_jet",E_jet,"E_jet[nJets]/D"); + baselineTree->Branch("charge_jet",charge_jet,"charge_jet[nJets]/I"); + baselineTree->Branch("bdisc_jet",bdisc_jet,"bdisc_jet[nJets]/D"); + baselineTree->Branch("cdiscCvsL_jet",cdiscCvsL_jet,"cdiscCvsL_jet[nJets]/D"); + baselineTree->Branch("cdiscCvsB_jet",cdiscCvsB_jet,"cdiscCvsB_jet[nJets]/D"); + baselineTree->Branch("pt_jet_1",&pt_jet_1,"pt_jet_1/D"); + baselineTree->Branch("pt_jet_2",&pt_jet_2,"pt_jet_2/D"); + baselineTree->Branch("pt_jet_3",&pt_jet_3,"pt_jet_3/D"); + + // Zboson + myTree->Branch("Zboson_M",&Zboson_M,"Zboson_M/D"); + baselineTree->Branch("Zboson_M",&Zboson_M,"Zboson_M/D"); + myTree->Branch("mWt",&mWt,"mWt/D"); + baselineTree->Branch("mWt",&mWt,"mWt/D"); + myTree->Branch("FCNCtop_M",&FCNCtop_M,"FCNCtop_M/D"); + myTree->Branch("SMtop_M",&SMtop_M, "SMtop_M/D"); + baselineTree->Branch("SMtop_M",&SMtop_M, "SMtop_M/D"); + /* myTree->Branch("Zboson_Px",&Zboson_Px,"Zboson_Px/D"); + myTree->Branch("Zboson_Py",&Zboson_Py,"Zboson_Py/D"); + myTree->Branch("Zboson_Pz",&Zboson_Pz,"Zboson_Pz/D"); + myTree->Branch("Zboson_Energy",&Zboson_Energy,"Zboson_Energy/D"); +*/ + + // met + myTree->Branch("met_Pt", &met_Pt, "met_Pt/D"); + myTree->Branch("met_Eta", &met_Eta,"met_Eta/D"); + myTree->Branch("met_Phi", &met_Phi, "met_Phi/D"); + + baselineTree->Branch("met_Pt", &met_Pt, "met_Pt/D"); + baselineTree->Branch("met_Eta", &met_Eta,"met_Eta/D"); + baselineTree->Branch("met_Phi", &met_Phi, "met_Phi/D"); + + + + ///////////////////////// + //// Corrections/trigger /// + /////////////////////////// + + /// book triggers + trigger_mumu->bookTriggers(isData); + trigger_ee->bookTriggers(isData); + trigger_emu->bookTriggers(isData); + + + + + ////////////////////////////////////////////////// + // Pre-event loop definitions + ///////////////////////////////////////////////// + + int itrigger = -1, previousRun = -1, start = 0; + int currentRun; + int iFile = -1; + unsigned int ending = datasets[d]->NofEvtsToRunOver(); + cout <<"Number of events = "<< ending < ending) + end_d = ending; + else + end_d = endEvent; + + int nEvents = end_d - event_start; + cout <<"Will run over "<< (end_d - event_start) << " events..."< vertex; + vector < TRootMuon* > init_muons; + vector < TRootElectron* > init_electrons; + vector < TRootJet* > init_jets; + vector < TRootJet* > init_jets_corrected; + vector < TRootGenJet* > genjets; + vector < TRootMET* > mets; + vector selectedElectrons; + vector selectedLooseElectrons; + vector selectedJets; + vector PreselectedJets; + vector selectedMuons; + vector selectedLooseMuons; + vector selectedCSVLBJets; + vector selectedCSVMBJets; + vector selectedCSVTBJets; + vector selectedCSVLLJets; + vector selectedCSVMLJets; + vector selectedCSVTLJets; + vector mcParticles; + vector selectednonCSVLJets; + + TLorentzVector Zboson; + TLorentzVector Zlep0; + TLorentzVector Zlep1; + TLorentzVector Wlep; + TLorentzVector SMbjet; + TLorentzVector cjet; + ////////////////////////////////////// + // Begin Event Loop + ////////////////////////////////////// + nbEvents = 0; + nofEventsHLTv2 = 0; + nofEventsHLTv3 = 0; + nofPosWeights = 0; + nofNegWeights = 0; + float eventweight = 1; + bool continueFlow ; + nbSelectedEvents = 0; + int nbEvents_0 = 0; + int nbEvents_test = 0; + int nbEvents_1 = 0; + int nbEvents_1m = 0; + int nbEvents_2m = 0; + int nbEvents_2 = 0; + int nbEvents_3 = 0; + int nbEvents_4 = 0; + int nbEvents_5 = 0; + int nbEvents_6 = 0; + int nbEvents_7 = 0; + int nbEvents_8 = 0; + int nbEvents_9 = 0; + bool debug = false; + vector selections; + std::ostringstream selectionsnb; + bool passedMET = false; + bool HBHEnoise = false; + bool HBHEIso = false; + bool CSCTight = false; + bool EcalDead = false; + bool eeBad = false; + bool Wmu = false; + bool Wel = false; + bool lep3 = false; + TLorentzVector metTLV; + string TriggBits; + string channel; + float pt_lept1; + float pt_lept2; + float pt_lept3; + float iso_lept1; + float iso_lept2; + float iso_lept3; + bool id_lept1 = 1; + bool id_lept2 = 1; + bool id_lept3 = 1; + float leading_jet_btagDiscr; + float leading_jetPt; + float met; + for (unsigned int ievt = event_start; ievt < end_d; ievt++) + { + continueFlow = true; + lep3 = false; + leading_jetPt = 0.; + met = 0.; + leading_jet_btagDiscr = 0.; + TriggBits = ""; + channel = ""; + pt_lept1 = pt_lept2 = pt_lept3 = 0. ; + metTLV.Clear(); + metTLV.SetPxPyPzE(0,0,0,0); + selections.clear(); + + selectionsnb.clear(); + selectionsnb.str(std::string()); + nCuts = 0; + Wmu = false; + Wel = false; + passedMET = false; + HBHEnoise = false; + HBHEIso = false; + CSCTight = false; + EcalDead = false; + eeBad = false; + eventweight = 1; + if(verbose == 0 ) cout << "new event " << ievt << endl; + double ievt_d = ievt; + debug = false; + if (verbose == 0 ) debug = true; + currentfrac = ievt_d/end_d; + if (debug)cout << endl << endl << "Starting a new event loop!"<3) + { + cout <<"Number of Electrons Loaded: " << init_electrons.size() <eventTree()->LoadTree(ievt); + string currentFilename = datasets[d]->eventTree()->GetFile()->GetName(); + int currentRun = event->runId(); + run_num = event->runId(); + evt_num = event->eventId(); + // to be applied from 76X v1 in our ttp + HBHEnoise = event->getHBHENoiseFilter(); + HBHEIso = event->getHBHENoiseIsoFilter(); + CSCTight = event->getCSCTightHalo2015Filter(); + EcalDead = event->getEcalDeadCellTriggerPrimitiveFilter(); + eeBad = event->getEEBadScFilter(); + + for(int iEl = 0 ; iEl < init_electrons.size() ; iEl ++){ + isoFile << evt_num << " sumChargedHadronPt=" << init_electrons[iEl]->chargedHadronIso(3) << ", sumNeutralHadronEt=" << init_electrons[iEl]->neutralHadronIso(3) << ", sumPhotonEt=" << init_electrons[iEl]->photonIso(3)<< ", effArea=" << EffectiveArea(init_electrons[iEl]) << endl; + } + for(int iJet = 0; iJet < init_jets.size(); iJet++){ + TRootPFJet* tempJet = (TRootPFJet*) init_jets[iJet]; + double ptTemp = sqrt(tempJet->Px()*tempJet->Px()+tempJet->Py()*tempJet->Py()); +// jetFile << "EvtNb="<< evt_num << " jet_pt=" << tempJet->Pt() << " " << ptTemp << endl; + jetFile << "EvtNb="<< evt_num << " jet_pt=" << tempJet->Pt() <<" jet_eta=" << tempJet->Eta() << " jet_phi=" << tempJet->Phi() << " NEMfraction=" << tempJet->neutralEmEnergyFraction() << " CEMfraction=" << tempJet->chargedEmEnergyFraction() << " NHfraction=" << tempJet->neutralHadronEnergyFraction() << " CHfraction=" << tempJet->chargedHadronEnergyFraction() << " Cmult=" << tempJet->chargedMultiplicity() << " nConst=" << tempJet->nConstituents() << endl; + +// jetFile << "EvtNb="<< evt_num << " jet_pt=" << tempJet->Pt() << " jet_eta=" << tempJet->Eta() << " jet_phi=" << tempJet->Phi() << endl; +// jetFile << "EvtNb="<< evt_num << " jet_pt=" << tempJet->Pt() << " jet_eta=" << init_jets[iJet]->Eta() << " jet_phi=" << init_jets[iJet]->Phi() << endl; + } +// cout << "eeBadSc " << eeBadSc << endl; + lumi_num=event->lumiBlockId(); + nvtx = vertex.size(); + npu = (int) event->nTruePU(); + +/* if(isData) // run C should be added as third counter + { + if(currentRun >= 256630 && currentRun <= 257819 ) // run nbrs need to be checked + { + nofEventsHLTv2++; + } + else + { + nofEventsHLTv3++; + } + + } + +*/ + ///////////////////////////////////// + // fix negative weights for amc@nlo/// + ///////////////////////////////////// + double hasNegWeight = false; + double mc_baseweight = 1; + if(!isData && (event->getWeight(1001) != -9999.)) + { + mc_baseweight = event->getWeight(1001)/abs(event->originalXWGTUP()); + //mc_scaleupweight = event->getWeight(1005)/abs(event->originalXWGTUP()); + //mc_scaledownweight = event->getWeight(1009)/abs(event->originalXWGTUP()); + if(mc_baseweight >= 0) + { + nofPosWeights++; + histo1D["weightIndex"]->Fill(1.,1.); + + } + else + { + if(nlo) hasNegWeight = true; + nofNegWeights++; + histo1D["weightIndex"]->Fill(-1.,1.); + } + } + if( !isData && (event->getWeight(1) != -9999. )) + { + mc_baseweight = event->getWeight(1)/abs(event->originalXWGTUP()); + //mc_scaleupweight = event->getWeight(5)/abs(event->originalXWGTUP()); + //mc_scaledownweight = event->getWeight(9)/abs(event->originalXWGTUP()); + if(mc_baseweight >= 0) + { + nofPosWeights++; + histo1D["weightIndex"]->Fill(2.,1.); + + } + else + { + if(nlo) hasNegWeight = true; + nofNegWeights++; + histo1D["weightIndex"]->Fill(-2.,1.); + } + + + } + if(!isData) + { + if ( event->getWeight(1001) == -9999. && event->getWeight(1) == -9999. ) + { + cout << "WARNING: No weight found for event " << ievt << " in dataset " << dName << endl; + cout << " Event Id: " << event->eventId() << " Run Id: " << event->runId() << " Lumi block Id: " << event->lumiBlockId() << endl; + cout << " Weight type is different from 'scale_variation' (1001) or 'Central scale variation' (1)." << endl; + } + if ( event->getWeight(1001) != -9999. && event->getWeight(1) != -9999. ) + { + cout << "WARNING: Two weight types found for event " << ievt << " in dataset " << dName << endl; + cout << " Event Id: " << event->eventId() << " Run Id: " << event->runId() << " Lumi block Id: " << event->lumiBlockId() << endl; + cout << " Check which weight type should be used when." << endl; + } + + nloWeight = mc_baseweight; + histo1D["nloweight"]->Fill(mc_baseweight, 1.); + sumWeights += mc_baseweight; + + + } + /////////////////////////////////////////// + // Trigger + /////////////////////////////////////////// + + bool trigged = false; + bool trigged_mumu = false; + bool trigged_ee = false; + bool trigged_emu = false; + bool filechanged = false; + bool runchanged = false; + + if(runHLT) + { + trigger_mumu->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_mumu = trigger_mumu->checkIfFired(); + trigger_ee->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_ee = trigger_ee->checkIfFired(); + trigger_emu->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_emu = trigger_emu->checkIfFired(); + if((trigged_emu || trigged_ee || trigged_mumu) && (all)) trigged = true; + if( trigged_ee && eee) trigged = true; + if( trigged_mumu && mumumu ) {trigged = true; nbTrig++;} + if( trigged_emu && !trigged_ee && !trigged_mumu && (eemu || mumue)) trigged = true; + if(trigged_emu && trigged_ee && trigged_mumu) TriggBits = "111"; + else if(!trigged_emu && !trigged_ee && !trigged_mumu) TriggBits = "000"; + else if(!trigged_emu && !trigged_ee && trigged_mumu) TriggBits = "100"; + else if(!trigged_emu && trigged_ee && !trigged_mumu) TriggBits = "010"; + else if(trigged_emu && !trigged_ee && !trigged_mumu) TriggBits = "001"; + else if(!trigged_emu && trigged_ee && trigged_mumu) TriggBits = "110"; + else if(trigged_emu && trigged_ee && !trigged_mumu) TriggBits = "011"; + else if(trigged_emu && !trigged_ee && trigged_mumu) TriggBits = "101"; + } + else if(!runHLT && previousFilename != currentFilename) + { + filechanged = true; + previousFilename = currentFilename; + iFile++; + cout << "File changed!!! => iFile = " << iFile << endl; + trigged = true; + + } + else if(!runHLT) + { + trigged = true; + } + if(dName.find("NP")!=string::npos) trigged = true; + + if(verbose==0) cout << "Apply trigger? " << runHLT << " trigged? " << trigged << endl; + + //////////////////////////// + ///// JES - JER smearing //// + ////////////////////////// + JERon = 0; + if(applyJER && !isData) + { + jetTools->correctJetJER(init_jets_corrected, genjets, mets[0], "nominal", false); + JERon = 1; + } + JESon = 0; + if(applyJES && !isData) + { + jetTools->correctJets(init_jets_corrected,event->fixedGridRhoFastjetAll() ,false); + JESon = 1; + } + for(int iJet = 0; iJet < init_jets_corrected.size(); iJet++){ + TRootPFJet* tempJ = (TRootPFJet*) init_jets_corrected[iJet]; +// jetJECFile << "EvtNb="<< evt_num << " jet_pt=" << tempJ->Pt() <<" jet_eta=" << tempJ->Eta() << " jet_phi=" << tempJ->Phi() << " NEMfraction=" << tempJ->neutralEmEnergyFraction() << " CEMfraction=" << tempJ->chargedEmEnergyFraction() << " NHfraction=" << tempJ->neutralHadronEnergyFraction() << " CHfraction=" << tempJ->chargedHadronEnergyFraction() << " Cmult=" << tempJ->chargedMultiplicity() << " nConst=" << tempJ->nConstituents() << endl; + jetJECFile << "EvtNb="<< evt_num << " jet_pt=" << tempJ->Pt() <<" jet_eta=" << tempJ->Eta() << " jet_phi=" << tempJ->Phi() << " jet_bDis=" << tempJ->btag_combinedInclusiveSecondaryVertexV2BJetTags() << endl; + + } + /////////////////////////////////////////////////////////// + // Event selection + /////////////////////////////////////////////////////////// + + // Declare selection instance + Run2Selection selection(init_jets_corrected, init_muons, init_electrons, mets,event->fixedGridRhoFastjetAll()); + PreselectedJets.clear(); + PreselectedJets = selection.GetSelectedJets(jet_pt_cut,jet_eta_cut, true, "Loose"); + selectedMuons.clear(); + selectedLooseMuons.clear(); + selectedMuons = selection.GetSelectedMuons(mu_pt_cut, mu_eta_cut, mu_iso_cut, "Tight", "Spring15"); + selectedLooseMuons = selection.GetSelectedMuons(mu_pt_cut, mu_eta_cut,0.2, "Loose", "Spring15"); + // pt, eta, iso // run normally + selectedElectrons.clear(); + selectedLooseElectrons.clear(); + selectedElectrons = selection.GetSelectedElectrons(el_pt_cut, el_eta_cut, "Tight","Spring15_25ns",true);// pt, eta + selectedLooseElectrons = selection.GetSelectedElectrons(el_pt_cut, el_eta_cut, "Veto","Spring15_25ns",true);// pt, eta + /// For MC Information + mcParticles.clear(); + treeLoader.LoadMCEvent(ievt, 0, mcParticles, false); + sort(mcParticles.begin(),mcParticles.end(),HighestPt()); + // void TTreeLoader::LoadMCEvent(int, TopTree::TRootNPGenEvent*, std::vector&, bool) + if (verbose>4) cout <<"Number of Muons, Electrons, Jets ===> " << endl << selectedMuons.size() <<" " << selectedElectrons.size()<<" "<< PreselectedJets.size() << endl; + selectedJets.clear(); + if(applyJetLeptonCleaning){ + bool PushBack = true; + for(int iJ = 0; iJ < PreselectedJets.size() ; iJ++) + { + PushBack = true; + for(int iM = 0; iM < selectedMuons.size(); iM++){ + if( PreselectedJets[iJ]->DeltaR(*selectedMuons[iM]) < 0.4) { + PushBack = false; + break; + } + } + if(!PushBack) continue; + for(int iE = 0; iE < selectedElectrons.size(); iE++){ + if( PreselectedJets[iJ]->DeltaR(*selectedElectrons[iE]) < 0.3) { + PushBack = false; + break; + } + } + if(PushBack) selectedJets.push_back(PreselectedJets[iJ]); + } + } + else if(!applyJetLeptonCleaning) selectedJets = PreselectedJets; + cout << evt_num << " init " << init_jets_corrected.size() << " sel " << selectedJets.size() << " bf cleaning " << PreselectedJets.size() << endl; + + //////////////////////////////////////////////// + // Pre cut operations + //////////////////////////////////////////////// + // Apply primary vertex selection + bool isGoodPV = selection.isPVSelected(vertex, 4, 24., 2); + // Met filters + if(HBHEnoise && HBHEIso && CSCTight && EcalDead && eeBad && isGoodPV) passedMET = true; + PassedMETFilter = passedMET; + + for(int iJet = 0; iJet < selectedJets.size(); iJet++){ + TRootPFJet* tempJ = (TRootPFJet*) selectedJets[iJet]; + jetSelFile << "EvtNb="<< evt_num << " jet_pt=" << tempJ->Pt() <<" jet_eta=" << tempJ->Eta() << " jet_phi=" << tempJ->Phi() << " jet_bDis=" << tempJ->btag_combinedInclusiveSecondaryVertexV2BJetTags() << endl; + } + for(int iMu = 0; iMu < selectedMuons.size(); iMu++){ + muSelFile << "EvtNb="<< evt_num << " mu_pt=" << selectedMuons[iMu]->Pt() <<" mu_eta=" << selectedMuons[iMu]->Eta() << " mu_phi=" << selectedMuons[iMu]->Phi() << " mu_iso=" << IsoDBeta(selectedMuons[iMu]) << endl; + } + for(int iMu = 0; iMu < init_muons.size(); iMu++){ + muIniFile << "EvtNb="<< evt_num << " mu_pt=" << init_muons[iMu]->Pt() <<" mu_eta=" << init_muons[iMu]->Eta() << " mu_phi=" << init_muons[iMu]->Phi() << " mu_iso=" << IsoDBeta(init_muons[iMu]) << endl; + } + ////////////////////////////////////// + // B jet selection //// + /////////////////////////////////////// + + selectedCSVLBJets.clear(); + selectedCSVMBJets.clear(); + selectedCSVTBJets.clear(); + selectedCSVLLJets.clear(); + selectedCSVMLJets.clear(); + selectedCSVTLJets.clear(); + selectednonCSVLJets.clear(); + for(unsigned int iJ = 0; iJ < selectedJets.size(); iJ++) + { + if(selectedJets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() > workingpointvalue_Loose) selectedCSVLBJets.push_back(selectedJets[iJ]); + else selectedCSVLLJets.push_back(selectedJets[iJ]); + if(selectedJets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() > workingpointvalue_Medium) selectedCSVMBJets.push_back(selectedJets[iJ]); + else selectedCSVMLJets.push_back(selectedJets[iJ]); + if(selectedJets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() > workingpointvalue_Tight) selectedCSVTBJets.push_back(selectedJets[iJ]); + else selectedCSVTLJets.push_back(selectedJets[iJ]); + + } + WPb_L = workingpointvalue_Loose; + WPb_M = workingpointvalue_Medium; + WPb_T = workingpointvalue_Tight; + + //////////////////////////////////// + // Event Weights /// + /////////////////////////////////// + float btagWeight = 1.; + float bTagEff = 1.; + if( fillBtagHisto && !isData && !btagShape) + { + btwt->FillMCEfficiencyHistos(selectedJets); + + } + else if( !fillBtagHisto && !isData && !btagShape) + { + btagWeight = btwt->getMCEventWeight(selectedJets); + + } + else if( !isData && btagShape) + { + for(int intJet = 0; intJet < selectedJets.size(); intJet++) + { + float jetpt = selectedJets[intJet]->Pt(); + if(jetpt > 1000.) jetpt = 999.; + float jeteta = selectedJets[intJet]->Eta(); + float jetdisc = selectedJets[intJet]->btag_combinedInclusiveSecondaryVertexV2BJetTags(); + BTagEntry::JetFlavor jflav; + int jetpartonflav = std::abs(selectedJets[intJet]->partonFlavour()); + if(debug) cout<<"parton flavour: "<eval(jflav, jeteta, jetpt, jetdisc); + btagWeight *= bTagEff; + + } + + } + + + + + + + + + + + + + float PUweight = 1; + if(!isData) + { + PUweight = LumiWeights.ITweight((int)event->nTruePU()); + + + } + + //////////////////////////////////// + // Determine eventweight /// + ///////////////////////////////// + if(hasNegWeight && applyNegWeightCorrection && !isData) eventweight *= -1.; + histo1D["init_nPVs_before"]->Fill(vertex.size(), eventweight); + if(applyPU && !isData) eventweight *= PUweight; + histo1D["init_nPVs_after"]->Fill(vertex.size(), eventweight); + + ////////////////////////////////////////////////////// + // determine channels for synch + ////////////////////////////////////////////////////// + if(selectedJets.size() > 0){ + leading_jetPt = selectedJets[0]->Pt(); + leading_jet_btagDiscr = selectedJets[0]->btag_combinedInclusiveSecondaryVertexV2BJetTags(); + } + + if(selectedMuons.size() > 2 && selectedElectrons.size() <= 2) { + channel = "mmm"; + pt_lept1 = selectedMuons[0]->Pt(); + pt_lept2 = selectedMuons[1]->Pt(); + pt_lept3 = selectedMuons[2]->Pt(); + iso_lept1 = IsoDBeta( selectedMuons[0]); + iso_lept2 = IsoDBeta(selectedMuons[1]); + iso_lept3 = IsoDBeta(selectedMuons[2]); + } + else if(selectedElectrons.size() > 2 && selectedMuons.size() <= 2){ + channel = "eee"; + pt_lept1 = selectedElectrons[0]->Pt(); + pt_lept2 = selectedElectrons[1]->Pt(); + pt_lept3 = selectedElectrons[2]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept2 = relPfIsoEl(selectedElectrons[1],event->fixedGridRhoFastjetAll()); + iso_lept3 = relPfIsoEl(selectedElectrons[2],event->fixedGridRhoFastjetAll()); + + } + else if(selectedElectrons.size() > 2 && selectedMuons.size() > 2){ + cout << "SOMETHING IS WRONG " << endl; + } + else if(selectedElectrons.size() == 2 && selectedMuons.size() == 1){ + channel = "eem"; + if(selectedMuons[0]->Pt() > selectedElectrons[0]->Pt()){ + pt_lept1 = selectedMuons[0]->Pt(); + pt_lept2 = selectedElectrons[0]->Pt(); + pt_lept3 = selectedElectrons[1]->Pt(); + iso_lept1 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept2 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept3 = relPfIsoEl(selectedElectrons[1],event->fixedGridRhoFastjetAll()); + } + else if(selectedMuons[0]->Pt() < selectedElectrons[1]->Pt()){ + pt_lept3 = selectedMuons[0]->Pt(); + pt_lept1 = selectedElectrons[0]->Pt(); + pt_lept2 = selectedElectrons[1]->Pt(); + iso_lept3 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept2 = relPfIsoEl(selectedElectrons[1],event->fixedGridRhoFastjetAll()); + } + else { + pt_lept2 = selectedMuons[0]->Pt(); + pt_lept1 = selectedElectrons[0]->Pt(); + pt_lept3 = selectedElectrons[1]->Pt(); + iso_lept2 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept3 = relPfIsoEl(selectedElectrons[1],event->fixedGridRhoFastjetAll()); + } + + } + else if(selectedElectrons.size() == 1 && selectedMuons.size() == 2){ + channel = "mme"; + if(selectedElectrons[0]->Pt() > selectedMuons[0]->Pt()){ + pt_lept1 = selectedElectrons[0]->Pt(); + pt_lept2 = selectedMuons[0]->Pt(); + pt_lept3 = selectedMuons[1]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept2 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept3 = (selectedMuons[1]->chargedHadronIso(4) + std::max(0.0, selectedMuons[1]->neutralHadronIso(4) + selectedMuons[1]->photonIso(4) - 0.5*selectedMuons[1]->puChargedHadronIso(4)))/selectedMuons[1]->Pt(); + + + } + else if(selectedElectrons[0]->Pt() < selectedMuons[1]->Pt()){ + pt_lept3 = selectedElectrons[0]->Pt(); + pt_lept1 = selectedMuons[0]->Pt(); + pt_lept2 = selectedMuons[1]->Pt(); + iso_lept3 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept1 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept2 = (selectedMuons[1]->chargedHadronIso(4) + std::max(0.0, selectedMuons[1]->neutralHadronIso(4) + selectedMuons[1]->photonIso(4) - 0.5*selectedMuons[1]->puChargedHadronIso(4)))/selectedMuons[1]->Pt(); + } + else { + pt_lept2 = selectedElectrons[0]->Pt(); + pt_lept1 = selectedMuons[0]->Pt(); + pt_lept3 = selectedMuons[1]->Pt(); + iso_lept2 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept1 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept3 = (selectedMuons[1]->chargedHadronIso(4) + std::max(0.0, selectedMuons[1]->neutralHadronIso(4) + selectedMuons[1]->photonIso(4) - 0.5*selectedMuons[1]->puChargedHadronIso(4)))/selectedMuons[1]->Pt(); + } + } + else{ + if(selectedMuons.size() == 2) + { + id_lept3 = 0; + pt_lept1 = selectedMuons[0]->Pt(); + pt_lept2 = selectedMuons[1]->Pt(); + iso_lept1 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); // TO BE CHECKED + iso_lept2 = (selectedMuons[1]->chargedHadronIso(4) + std::max(0.0, selectedMuons[1]->neutralHadronIso(4) + selectedMuons[1]->photonIso(4) - 0.5*selectedMuons[1]->puChargedHadronIso(4)))/selectedMuons[1]->Pt(); + } + else if(selectedElectrons.size() == 2){ + id_lept3 = 0; + pt_lept1 = selectedElectrons[0]->Pt(); + pt_lept2 = selectedElectrons[1]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); // TO BE CHECKED + iso_lept2 = relPfIsoEl(selectedElectrons[1],event->fixedGridRhoFastjetAll()); + } + else if(selectedMuons.size() == 1 && selectedElectrons.size() == 1){ + id_lept3 = 0; + if(selectedMuons[0]->Pt() > selectedElectrons[0]->Pt()){ + pt_lept1 = selectedMuons[0]->Pt(); + pt_lept2 = selectedElectrons[0]->Pt(); + iso_lept1 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept2 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + } + else{ + pt_lept2 = selectedMuons[0]->Pt(); + pt_lept1 = selectedElectrons[0]->Pt(); + iso_lept2 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0], event->fixedGridRhoFastjetAll()); + } + } + else if(selectedMuons.size() == 1){ + id_lept3 = 0; + id_lept2 = 0; + pt_lept1 = selectedMuons[0]->Pt(); + iso_lept1 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + } + else if(selectedElectrons.size() == 1 && selectedMuons.size()==0){ + id_lept3 = 0; + id_lept2 = 0; + pt_lept1 = selectedElectrons[0]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0], event->fixedGridRhoFastjetAll()); + + } + channel = "nan"; + } + + ////////////////////////////////////////////////////// + // Applying baseline selection + ////////////////////////////////////////////////////// + continueFlow = true; + nbEvents++; + eventweight = 1.; + if(trigged){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(0., eventweight); + nCuts++; + nbEvents_0++; + } + } + else{ + selections.push_back(0); + continueFlow = false; + // continue; + } + + if(all && ((selectedMuons.size() + selectedElectrons.size()) != 3)){ + selections.push_back(0); + continueFlow = false; + } + + else if(all && ((selectedMuons.size() + selectedElectrons.size()) == 3)){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(1., eventweight); + nCuts++; + nbEvents_1++; + } + lep3 = true; + } + else if(mumumu && (selectedMuons.size() != 3)){ + selections.push_back(0); + continueFlow = false; + } + else if(mumumu && (selectedMuons.size() == 3)){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(1., eventweight); + nCuts++; + nbEvents_1++; + } + lep3 = true; + } + if(mumumu && (selectedMuons.size() > 1)){ nbEvents_test++ ;} + else if(eee && (selectedElectrons.size() != 3)){ + selections.push_back(0); + continueFlow = false; + } + else if(eee && (selectedElectrons.size() == 3)){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(1., eventweight); + nCuts++; + nbEvents_1++; + } + lep3 = true; + } + else if(eemu && (selectedMuons.size() != 1|| selectedElectrons.size() != 2)){ + selections.push_back(0); + continueFlow = false; + } + else if(eemu && (selectedMuons.size() == 1 && selectedElectrons.size() == 2)){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(1., eventweight); + nCuts++; + nbEvents_1++; + } + lep3 = true; + } + else if(mumue && (selectedMuons.size() != 2 || selectedElectrons.size() != 1)){ + selections.push_back(0); + continueFlow = false; + } + else if(mumue && (selectedMuons.size() == 2 && selectedElectrons.size() == 1)){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(1., eventweight); + nCuts++; + nbEvents_1++; + } + lep3 = true; + } + + + + if(selectedMuons.size() == selectedLooseMuons.size() && continueFlow) nbEvents_1m++; + else continueFlow = false; + if(selectedLooseElectrons.size() == selectedElectrons.size() && continueFlow) nbEvents_2m++; + else continueFlow = false; + if((selectedMuons.size() != selectedLooseMuons.size()) || (selectedLooseElectrons.size() != selectedElectrons.size())){ + selections.push_back(0); + // continue; + continueFlow = false; + } + else{ + selections.push_back(1); + } + + double met_px = mets[0]->Px(); + double met_py = mets[0]->Py(); + met_Pt = sqrt(met_px*met_px + met_py*met_py); + met = met_Pt; + met_Phi = mets[0]->Phi(); + met_Eta = mets[0]->Eta(); + +// puSF = PUweight; +// btagSF = btagWeight; + + + Zlep0.Clear(); + Zlep1.Clear(); + Wlep.Clear(); + Wlep.SetPxPyPzE(0,0,0,0); + + // check sign + bool OS = false; + if(selectedElectrons.size() == 2){ + if(selectedElectrons[0]->charge() == selectedElectrons[1]->charge()){ OS = false; } + else { + OS = true; + Zlep0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + if(lep3) { + Wlep.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + Wmu = true ; + + } + } + } + else if(selectedMuons.size() == 2){ + if(selectedMuons[0]->charge() == selectedMuons[1]->charge()){ OS = false; } + else{ + OS = true; + Zlep0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + if(lep3) { + Wlep.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + Wel = true; + } + } + } + else if(selectedMuons.size()==3) + { + Wmu = true; + bool first = false; + bool second = false; + bool third = false; + if(selectedMuons[0]->charge() != selectedMuons[1]->charge()) first = true; + if(selectedMuons[2]->charge() != selectedMuons[1]->charge()) second = true; + if(selectedMuons[0]->charge() != selectedMuons[2]->charge()) third = true; + if(first || second || third) OS = true; + else OS = false; ; + if(first && !second && !third){ + Zlep0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + } + else if(third && !second && !first){ + OS = true; + Zlep0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + } + else if(second && !first && !third){ + Zlep0.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + } + else if(OS) + { + TLorentzVector tempMu0; + tempMu0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + TLorentzVector tempMu1; + tempMu1.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + TLorentzVector tempMu2; + tempMu2.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + double mass01 = (tempMu0 + tempMu1).M(); + double mass02 = (tempMu0 + tempMu2).M(); + double mass12 = (tempMu2 + tempMu1).M(); + if(first && second && !third){ + if(fabs(mass01-90.0) < fabs(mass12-90.0) ){ + Zlep0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + } + else{ + Zlep0.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + } + } + else if(first && third && !second) + { + if(fabs(mass01-90.0) < fabs(mass02-90.0) ){ + Zlep0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + } + else{ + Zlep0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + } + } + else if(third && second && !first) + { + if(fabs(mass02-90.0) < fabs(mass12-90.0) ){ + Zlep0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + } + else{ + Zlep0.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + } + } + else if (first && second && third){ + if(fabs(mass01-90.0) < fabs(mass12-90.0) && fabs(mass01-90.0) < fabs(mass02-90.0) ){ + Zlep0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + } + else if( fabs(mass12-90.0) < fabs(mass01-90.0) && fabs(mass12-90.0) < fabs(mass02-90.0) ){ + Zlep0.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + } + else{ + Zlep0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + } + } + } + } + else if(selectedElectrons.size()==3) + { + Wel = true; + bool first = false; + bool second = false; + bool third = false; + if(selectedElectrons[0]->charge() != selectedElectrons[1]->charge()) first = true; + if(selectedElectrons[2]->charge() != selectedElectrons[1]->charge()) second = true; + if(selectedElectrons[0]->charge() != selectedElectrons[2]->charge()) third = true; + if(first || second || third) OS = true; + else continue; + if(first && !second && !third){ + Zlep0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + } + else if(third && !second && !first){ + OS = true; + Zlep0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + } + else if(second && !first && !third){ + Zlep0.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + } + else if(OS) + { + TLorentzVector tempMu0; + tempMu0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + TLorentzVector tempMu1; + tempMu1.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + TLorentzVector tempMu2; + tempMu2.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + double mass01 = (tempMu0 + tempMu1).M(); + double mass02 = (tempMu0 + tempMu2).M(); + double mass12 = (tempMu2 + tempMu1).M(); + if(first && second && !third){ + if(fabs(mass01-90.0) < fabs(mass12-90.0) ){ + Zlep0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + } + else{ + Zlep0.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + } + } + else if(first && third && !second) + { + if(fabs(mass01-90.0) < fabs(mass02-90.0) ){ + Zlep0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + } + else{ + Zlep0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + } + } + else if(third && second && !first) + { + if(fabs(mass02-90.0) < fabs(mass12-90.0) ){ + Zlep0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + } + else{ + Zlep0.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + } + } + else if (first && second && third){ + if(fabs(mass01-90.0) < fabs(mass12-90.0) && fabs(mass01-90.0) < fabs(mass02-90.0) ){ + Zlep0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + } + else if( fabs(mass12-90.0) < fabs(mass01-90.0) && fabs(mass12-90.0) < fabs(mass02-90.0) ){ + Zlep0.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + } + else{ + Zlep0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + } + } + } + } + + if(!OS){ + continueFlow = false; + //coninue; + } + else if(continueFlow){ + histo1D["cutFlow"]->Fill(2., eventweight); + nCuts++; + nbEvents_2++; + } + Zboson.Clear(); + if(OS) Zboson.SetPxPyPzE(( Zlep0 + Zlep1).Px() ,( Zlep0 + Zlep1).Py(),( Zlep0 + Zlep1).Py(),( Zlep0 + Zlep1).Energy()) ; + if(OS) Zboson_M = (Zlep0+Zlep1).M(); + else if(!OS) Zboson_M = 0; +// cout << " Zmass" << Zboson_M << endl; + if(Zboson_M < 76 || Zboson_M > 106) + { + selections.push_back(0); + continueFlow = false; + eventSelected = false; + // continue; + } + else{ + selections.push_back(1); + if(continueFlow){ + nCuts++; + nbEvents_3++; + histo1D["cutFlow"]->Fill(3., eventweight); + eventSelected = true; + } + } + if(selectedJets.size() == 0){ + selections.push_back(0); + continueFlow = false; + // continue; + } + else{ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(4., eventweight); + nCuts++; + nbEvents_4++; + } + } +// cout << " after " << nCuts << " " << nbEvents_3 << endl; + if(selectedCSVLBJets.size() != 1){ + selections.push_back(0); + continueFlow = false; + //continue; + } + else{ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(5., eventweight); + nCuts++; + nbEvents_5++; + } + } + //double mWtsecond = 0.; + + if(Wel|| Wmu){ + //double phis = Wlep.Phi() - mets[0]->Phi(); + //double cosphis = TMath::Cos(phis); + mWt = TMath::Sqrt((Wlep.Pt() + met_Pt)*(Wlep.Pt() +met_Pt)-(Wlep.Px() + met_px)*(Wlep.Px() + met_px) - (Wlep.Py() + met_py)* (Wlep.Py() + met_py)); + //mWtsecond = TMath::Sqrt(2*Wlep.Pt() * met_Pt*(1-cosphis)); + } + + else mWt = 0.; + mWtFile << "EvtNb="<< evt_num << " mWt=" << mWt << " met_Pt=" << met_Pt << " WlepPt=" << Wlep.Pt() << "CosPhi=" << TMath::Cos(Wlep.Phi() - met_Phi) << endl; //" second=" << mWtsecond << endl; + if(mWt < 20){ + selections.push_back(0); + continueFlow = false; +// continue; + } + else{ + + selections.push_back(1); + if(continueFlow){ +// mWtFile << evt_num << endl; + histo1D["cutFlow"]->Fill(6., eventweight); + nCuts++; + nbEvents_6++; + } + } +// double met_pz = MEtz(Wmu, Wel, Wlep, met_px, met_py); + double met_pz = 0.; // has to be adapted !!! + metTLV.SetPxPyPzE(met_px,met_py,met_pz,TMath::Sqrt(met_px*met_px+met_py*met_py+met_pz*met_pz)); + SMbjet.Clear(); + if(selectedCSVLBJets.size() > 0){ + SMbjet.SetPxPyPzE(selectedCSVLBJets[0]->Px(),selectedCSVLBJets[0]->Py(),selectedCSVLBJets[0]->Pz(),selectedCSVLBJets[0]->Energy()); + if(Wel|| Wmu) SMtop_M = (Wlep+SMbjet+metTLV).M(); + else SMtop_M = 0.; + } + else SMtop_M = 0. ; + if(continueFlow) topFile << "EvtNb="<< evt_num << " Bjet_pt=" << SMbjet.Pt() <<" Bjet_px=" << SMbjet.Px() << " Bjet_py=" << SMbjet.Py() << " Bjet_pz()=" << SMbjet.Pz() << " Bjet_Energy=" << SMbjet.Energy() << " Wlep_pt=" << Wlep.Pt() <<" Wlep_px=" << Wlep.Px() << " Wlep_py=" << Wlep.Py() << " Wlep_pz()=" << Wlep.Pz() << " Wlep_Energy=" << Wlep.Energy() << " met_Pt=" << metTLV.Pt() <<" met_px=" << metTLV.Px() << " met_py=" << metTLV.Py() << " met_pz()=" << metTLV.Pz() << " met_Energy=" << metTLV.Energy() << " topmass= " << SMtop_M << endl; + +// cjet.Clear(); +// cjet = FCNCjetCalculator(selectedCSVLLJets,selectedCSVLBJets, Zboson ,3); + + // FCNCtop_M = (Zboson+cjet).M(); + + if(SMtop_M < 95 || SMtop_M > 200 ){ + selections.push_back(0); + continueFlow = false; +// continue; + } + else{ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(7., eventweight); + nCuts++; + nbEvents_7++; + } + } + +// if(continueFlow) eventSelected = true; +// else eventSelected = false; + if(isGoodPV && passedMET && continueFlow){ + histo1D["cutFlow"]->Fill(8., eventweight); + nCuts++; + nbEvents_8++; + } + ////////////////////////////////////// + // DO STUFF WITH SELECTED EVENTS //// + ////////////////////////////////////// + if(eventSelected){ + nbSelectedEvents++; + myTree->Fill(); + } + if(selections.size() != 8) cout << "ERROR SOMETHING WENT WRONG WITH THE SELECTIONS " << endl; + for(int inb = 0; inb 0 jet: " << nbEvents_4 << endl; + cout << "nbEvents_5 1 bjet: " << nbEvents_5 << endl; + cout << "nbEvents_6 mWt: " << nbEvents_6 << endl; + cout << "nbEvents_7 SMtop: " << nbEvents_7 << endl; + cout << "nbEvents_8 MET: " << nbEvents_8 << endl; + // for(int j = 0; j < 9; j++){ cout << cutstep[j] << endl; } + sumW = (int) sumWeights; + nEv = (int) nEvents; + globalTree->Fill(); + if(verbose == 0) cout << "end eventloop" << endl; + +/* infoFile << nbSelectedEvents << " events out of initial " << nbEvents << " selected " << endl; + infoFile << nbSelectedEvents << " events out of trigged " << nbTrig << " selected " << endl; + infoFile << nbBaseline << " baseline events out of trigged " << nbTrig << " selected " << endl; + infoFile << setprecision(2) << ((double)nbGPV/(double)nbEvents)*100 << " % of the initial events stay after Good PV" << endl; + nfoFile << setprecision(2) << ((double)nbTrig/(double)nbEvents)*100 << " % of the initial events stay after Trigger" << endl; + infoFile << setprecision(2) << ((double)nbTrig/(double)nbGPV)*100 << " % of the GPV events stay after Trigger" << endl; +*/ cout << nbSelectedEvents << " events out of initial " << nbEvents << " selected " << endl; + cout << nbSelectedEvents << " events out of trigged " << nbTrig << " selected " << endl; + // cout << nbBaseline << " baseline events out of trigged " << nbTrig << " selected " << endl; + // cout << setprecision(2) << ((double)nbGPV/(double)nbEvents)*100 << " % of the initial events stay after Good PV" << endl; + cout << setprecision(2) << ((double)nbTrig/(double)nbEvents)*100 << " % of the initial events stay after Trigger" << endl; + // cout << setprecision(2) << ((double)nbTrig/(double)nbGPV)*100 << " % of the GPV events stay after Trigger" << endl; + if (! isData ) + { + cout << "Data set " << datasets[d]->Title() << " has " << nofPosWeights << " events with positive weights and " << nofNegWeights << " events with negative weights." << endl; + cout << " Pos - neg is " << nofPosWeights - nofNegWeights << ", pos + neg is " << nofPosWeights + nofNegWeights << endl; + cout << "The sum of the weights is " << ((int)sumWeights) << ", whereas the total number of events is " << ((int)nEvents) << endl; + + // Determine scale factor due to negative weights + nloSF = ((double) (nofPosWeights - nofNegWeights))/((double) (nofPosWeights + nofNegWeights)); + cout << "This corresponds to an event scale factor of " << nloSF << endl; + } + infoFile.close(); + isoFile.close(); + topFile.close(); + jetFile.close(); + jetJECFile.close(); + jetSelFile.close(); + muSelFile.close(); + mWtFile.close(); + muIniFile.close(); + tupfile->Write(); + tupfile->Close(); + delete tupfile; + if(!isData && !btagShape) delete btwt; + treeLoader.UnLoadDataset(); + } //End Loop on Datasets + + + + ///////////// + // Writing // + ///////////// + + cout << " - Writing outputs to the files ..." << endl; + + + + fout-> cd(); + for (map::const_iterator it = histo1D.begin(); it != histo1D.end(); it++) + { + cout << "1D Plot: " << it->first << endl; + TCanvas *ctemp = new TCanvas(); + ctemp->cd(); + TH1F *temp = it->second; + temp->Draw(); + delete ctemp; + } + for (map::const_iterator it = histo2D.begin(); it != histo2D.end(); it++) + { + cout << "2D Plot: " << it->first << endl; + TCanvas *ctemp = new TCanvas(); + ctemp->cd(); + TH2F *temp = it->second; + temp->Draw(); + delete ctemp; + } + fout->Write(); + fout->Close(); + delete fout; + + + cout << "It took us " << ((double)clock() - start) / CLOCKS_PER_SEC << " to run the program" << endl; + cout << "********************************************" << endl; + cout << " End of the program !! " << endl; + cout << "********************************************" << endl; + + return 0; +}; + + +double MEtz(bool mu, bool el, TLorentzVector Wlep, double MetPx, double MetPy) +{ + double M_W = 80.4; + double M_mu = 0.10566; // 105.66 MeV/c^2 + double M_el = 0.000510999; // 0.510998910 Mev/c^2 + double emu = Wlep.E(); + double pxmu = Wlep.Px(); + double pymu = Wlep.Py(); + double pzmu = Wlep.Pz(); + double pxnu = MetPx; + double pynu = MetPy; + double pznu = 0.; + if(el && ! mu) M_mu = M_el; + + double a = M_W*M_W - M_mu*M_mu + 2.0*pxmu*pxnu + 2.0*pymu*pynu; + double A = 4.0*(emu*emu - pzmu*pzmu); + double B = -4.0*a*pzmu; + double C = 4.0*emu*emu*(pxnu*pxnu + pynu*pynu) - a*a; + + + bool isComplex_ = false; + double tmproot = B*B - 4.0*A*C; + + if (tmproot<0) { + isComplex_= true; + pznu = - B/(2*A); // take real part of complex roots + } + else { + isComplex_ = false; + double tmpsol1 = (-B + TMath::Sqrt(tmproot))/(2.0*A); + double tmpsol2 = (-B - TMath::Sqrt(tmproot))/(2.0*A); + + if (TMath::Abs(tmpsol2-pzmu) < TMath::Abs(tmpsol1-pzmu)) { pznu = tmpsol2;} + else pznu = tmpsol1; + + + } + return pznu; + +} +; + +TLorentzVector FCNCjetCalculator(std::vector nonBJets,std::vector BJets, TLorentzVector recoZ ,int verb) +{ + TLorentzVector FCNCjet; + FCNCjet.Clear(); + + + double TempMinMass = 100000.00; + double TopMass = 172.9; + TLorentzVector Jetcandidate; + int NbInColl = -1; + if(nonBJets.size() != 0){ + + for(unsigned int iJ = 0; iJ < nonBJets.size(); iJ++) + { + TLorentzVector Jet; + Jet.SetPxPyPzE(nonBJets[iJ]->Px(),nonBJets[iJ]->Py(),nonBJets[iJ]->Pz(),nonBJets[iJ]->Energy()); + + if(fabs((recoZ+Jet).M() - TopMass) < TempMinMass) + { + TempMinMass = fabs((recoZ+Jet).M() - TopMass); + Jetcandidate.SetPxPyPzE(Jet.Px(), Jet.Py(), Jet.Pz(), Jet.E()); + NbInColl = iJ; + + } + + + } + FCNCjet.SetPxPyPzE(nonBJets[NbInColl]->Px(),nonBJets[NbInColl]->Py(),nonBJets[NbInColl]->Pz(),nonBJets[NbInColl]->Energy()); + } + else { + for(unsigned int iJ = 1; iJ < BJets.size(); iJ++) + { + TLorentzVector Jet; + Jet.SetPxPyPzE(BJets[iJ]->Px(),BJets[iJ]->Py(),BJets[iJ]->Pz(),BJets[iJ]->Energy()); + + if(fabs((recoZ+Jet).M() - TopMass) < TempMinMass) + { + TempMinMass = fabs((recoZ+Jet).M() - TopMass); + Jetcandidate.SetPxPyPzE(Jet.Px(), Jet.Py(), Jet.Pz(), Jet.E()); + NbInColl = iJ; + + } + + } + + FCNCjet.SetPxPyPzE(BJets[NbInColl]->Px(),BJets[NbInColl]->Py(),BJets[NbInColl]->Pz(),BJets[NbInColl]->Energy()); + } + + + return FCNCjet; +}; + + +float EffectiveAreaRho(TRootElectron *el, float rho_) +{ + double EffectiveArea = 0.; + // Updated to Spring 2015 EA from https://github.com/cms-sw/cmssw/blob/CMSSW_7_4_14/RecoEgamma/ElectronIdentification/data/Spring15/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_25ns.txt#L8 + if (fabs(el->superClusterEta()) >= 0.0 && fabs(el->superClusterEta()) < 1.0 ) EffectiveArea = 0.1752; + if (fabs(el->superClusterEta()) >= 1.0 && fabs(el->superClusterEta()) < 1.479 ) EffectiveArea = 0.1862; + if (fabs(el->superClusterEta()) >= 1.479 && fabs(el->superClusterEta()) < 2.0 ) EffectiveArea = 0.1411; + if (fabs(el->superClusterEta()) >= 2.0 && fabs(el->superClusterEta()) < 2.2 ) EffectiveArea = 0.1534; + if (fabs(el->superClusterEta()) >= 2.2 && fabs(el->superClusterEta()) < 2.3 ) EffectiveArea = 0.1903; + if (fabs(el->superClusterEta()) >= 2.3 && fabs(el->superClusterEta()) < 2.4 ) EffectiveArea = 0.2243; + if (fabs(el->superClusterEta()) >= 2.4 && fabs(el->superClusterEta()) < 5.0 ) EffectiveArea = 0.2687; + if (fabs(el->superClusterEta()) >= 5.0) EffectiveArea = -9999; + + double isocorr = 0; + + isocorr = rho_*EffectiveArea; + + return isocorr; +}; +float EffectiveArea(TRootElectron *el) +{ + double EffectiveArea = 0.; + + if (fabs(el->superClusterEta()) >= 0.0 && fabs(el->superClusterEta()) < 1.0 ) EffectiveArea = 0.1752; + if (fabs(el->superClusterEta()) >= 1.0 && fabs(el->superClusterEta()) < 1.479 ) EffectiveArea = 0.1862; + if (fabs(el->superClusterEta()) >= 1.479 && fabs(el->superClusterEta()) < 2.0 ) EffectiveArea = 0.1411; + if (fabs(el->superClusterEta()) >= 2.0 && fabs(el->superClusterEta()) < 2.2 ) EffectiveArea = 0.1534; + if (fabs(el->superClusterEta()) >= 2.2 && fabs(el->superClusterEta()) < 2.3 ) EffectiveArea = 0.1903; + if (fabs(el->superClusterEta()) >= 2.3 && fabs(el->superClusterEta()) < 2.4 ) EffectiveArea = 0.2243; + if (fabs(el->superClusterEta()) >= 2.4 && fabs(el->superClusterEta()) < 5.0 ) EffectiveArea = 0.2687; + if (fabs(el->superClusterEta()) >= 5.0) EffectiveArea = -9999; + + + return EffectiveArea; +}; + + +float relPfIsoEl(TRootElectron *el, float _rho) +{ + float isoCorr = (el->neutralHadronIso(3) + el->photonIso(3) - EffectiveAreaRho(el,_rho)); +// float isolation = (el->chargedHadronIso(3) + (isoCorr > 0.0 ? isoCorr : 0.0))/(el->Pt()); + float isolation = (el->chargedHadronIso(3) + std::max(el->neutralHadronIso(3)+el->photonIso(3)-EffectiveAreaRho(el,_rho),float(0.)))/(el->Pt()); + return isolation; + +}; + + +float IsoDBeta(TRootMuon *mu) +{ + float iso = (mu->chargedHadronIso(4) + std::max(0.0, mu->neutralHadronIso(4) + mu->photonIso(4) - 0.5*mu->puChargedHadronIso(4)))/mu->Pt(); + + return iso; + +} + + diff --git a/NtuplerMerger.py b/NtuplerMerger.py new file mode 100644 index 0000000..d413d2c --- /dev/null +++ b/NtuplerMerger.py @@ -0,0 +1,114 @@ +from ROOT import TChain +import ROOT +import glob +import xml.etree.cElementTree as ET +import os +from datetime import datetime + + +# Define time variable +now = datetime.now() +dd = str(now.day) +mm = str(now.month) +yyyy = str(now.year) +# pick one of the two above +date = "160705" +#date = "17_1_2016" + +#channels = ["_MuMu","_ElEl"] +#channels = ["_ElEl"] +channels = ["_All"] #,"_ElElEl"] + +for chan in channels: + + #Define path where ntuples are stored + pathNonMerged = "NtupleMakerOutput/Ntuples"+chan+"/Ntuples_"+date+"/" + if "MuMuMu" in chan: + pathMerged = "NtupleMakerOutput/MergedTuples/mumumu/"+"160530"+"/" + if "ElElEl" in chan: + pathMerged = "NtupleMakerOutput/MergedTuples/eee/"+"160530"+"/" + if "All" in chan: + pathMerged = "NtupleMakerOutput/MergedTuples/all/"+date+"/" + + if not os.path.exists(pathMerged): + os.makedirs(pathMerged) + + # get filenames from the xml!!! + if "MuMuMu" in chan: + tree = ET.ElementTree(file='config/Run2TriLepton_samples_extra.xml') + elif "ElEl" in chan: + tree = ET.ElementTree(file='config/Run2TriLepton_samples_eee.xml') + elif "ElMu" in chan: + tree = ET.ElementTree(file='config/FullSamplesElMuV0.xml') + elif "All" in chan: + tree = ET.ElementTree(file='config/Run2TriLepton_samples.xml') + else: + print "No tree has been loaded!!! Make sure the correct xml file are in the right directories!!!" + sys.exit() + + #tree = ET.ElementTree(file='config/FullMcBkgdSamplesV9.xml') + #tree = ET.ElementTree(file='config/DisplacedTopsSignal.xml') + #tree = ET.ElementTree(file='config/DataSamples.xml') + + # get the list of dataset + root = tree.getroot() + datasets = root.find('datasets') + print "found " + str(len(datasets)) + " datasets" + datasetNames = [] + + print "" + # loop over the datasets to be added and fill the "topTrees" vector + for d in datasets: + if d.attrib['add'] == '1': + print "found dataset to be added..." + str(d.attrib['name']) + + # select a subset of the existing root file + if not "over" in str(d.attrib['name']) : + datasetNames.append(str(d.attrib['name'])) + print str(d.attrib['name']) + + + listOfZombie= [] + + # loop over data set to search root files + for n in datasetNames: + filenames = glob.glob(pathNonMerged + "/*" + chan + "*" + n + "*.root") + hadd = "hadd -f " + pathMerged + "/"+ n + ".root" + + if (len(filenames) == 0): + print "no root files found in directory" , pathNonMerged , " for dataset " , n , " !!" + else : + # loop over root files + for f in filenames: + file=ROOT.TFile(f,"read") + # check if the file is a zombie + if (file.IsZombie()): + print "File" , f, "is a Zombie.... Skipping" + listOfZombie.append(f) + else: + print f + hadd = hadd + " " + f + print "Merging ntuples for " + n + os.system(hadd) + + print "\n\n" + + # print the list of zombies + print "The total number of zombie file is ", len(listOfZombie) + if (len(listOfZombie) > 0): + outfile = open (pathMerged+"/Zombie"+chan+".txt", 'a') + print "And the list of the zombie is put in "+pathMerged+"/Zombie"+chan+".txt " + for zombie in listOfZombie: + print >> outfile, zombie + + mergeData=True + + if (mergeData): + # combining all the Data in one + dataList=glob.glob(pathMerged+"*Data*.root") + + cmd = "hadd " + pathMerged + "/"+ "Data.root" + for data in dataList: + cmd = cmd + " " + data + os.system(cmd) + diff --git a/Ntupler_an.cc b/Ntupler_an.cc new file mode 100644 index 0000000..394dc45 --- /dev/null +++ b/Ntupler_an.cc @@ -0,0 +1,2797 @@ +////////////////////////////////////////////////////////////////////////////// +//// Analysis code for search for FCNC tZq //// +////////////////////////////////////////////////////////////////////////////// + + +#define _USE_MATH_DEFINES +#include "TStyle.h" +#include "TPaveText.h" +#include "TTree.h" +#include "TNtuple.h" +#include "TNtuple.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include "TRandom3.h" +#include "TRandom.h" +#include "TProfile.h" +#include +#include +#include + +//user code +#include "TopTreeProducer/interface/TRootRun.h" +#include "TopTreeProducer/interface/TRootEvent.h" +#include "TopTreeAnalysisBase/Selection/interface/Run2Selection.h" + +#include "TopTreeAnalysisBase/Content/interface/AnalysisEnvironment.h" +#include "TopTreeAnalysisBase/Content/interface/Dataset.h" +#include "TopTreeAnalysisBase/Tools/interface/JetTools.h" +#include "TopTreeAnalysisBase/Tools/interface/PlottingTools.h" +#include "TopTreeAnalysisBase/Tools/interface/TTreeLoader.h" +#include "TopTreeAnalysisBase/Tools/interface/AnalysisEnvironmentLoader.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/JetCorrectorParameters.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/JetCorrectionUncertainty.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MakeBinning.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MEzCalculator.h" +#include "TopTreeAnalysisBase/MCInformation/interface/LumiReWeighting.h" +#include "TopTreeAnalysisBase/MCInformation/interface/JetPartonMatching.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MEzCalculator.h" +#include "TopTreeAnalysisBase/Tools/interface/LeptonTools.h" +#include "TopTreeAnalysisBase/Tools/interface/SourceDate.h" +#include "TopTreeAnalysisBase/Tools/interface/Trigger.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/TTreeObservables.h" + +//This header file is taken directly from the BTV wiki. It contains +// to correctly apply an event level Btag SF. It is not yet on CVS +// as I hope to merge the functionality into BTagWeigtTools.h + +//#include "TopTreeAnalysisBase/Tools/interface/BTagSFUtil.h" +#include "TopTreeAnalysisBase/Tools/interface/BTagWeightTools.h" +#include "TopTreeAnalysisBase/Tools/interface/BTagCalibrationStandalone.h" + +#include "TopTreeAnalysisBase/Tools/interface/JetCombiner.h" +#include "TopTreeAnalysisBase/Tools/interface/MVATrainer.h" +#include "TopTreeAnalysisBase/Tools/interface/MVAComputer.h" + + + + +using namespace std; +using namespace TopTree; +using namespace reweight; + + +/// TH1F +map histo1D; +map histo2D; + + + +struct HighestCSVBtag +{ + bool operator()( TRootJet* j1, TRootJet* j2 ) const + { + return j1->btag_combinedInclusiveSecondaryVertexV2BJetTags() > j2->btag_combinedInclusiveSecondaryVertexV2BJetTags(); + } +}; + +//Initializing CSVv2 b-tag WP +float workingpointvalue_Loose = 0.460;//working points updated to 2015 BTV-POG recommendations. +float workingpointvalue_Medium = 0.800;//working points updated to 2015 BTV-POG recommendations. +float workingpointvalue_Tight = 0.935;//working points updated to 2015 BTV-POG recommendations. + +bool synchex = true; +bool Assigned = false; + +TLorentzVector FCNCjetCalculator(std::vector nonBJets,std::vector BJets, TLorentzVector recoZ ,int verb); +double MEtz(bool mu, bool el, TLorentzVector Wlep, double MetPx, double MetPy); +float EffectiveAreaRho(TRootElectron *el, float _rho) ; +float EffectiveArea(TRootElectron *el) ; +float relPfIsoEl(TRootElectron *el, float _rho); +float IsoDBeta(TRootMuon *mu); +vector LeptonAssigner(std::vector electrons,std::vector muons); +TLorentzVector MetzCalculator(TLorentzVector leptW, TLorentzVector v_met); +vector< pair > JetPartonPair; +int nMatched = 0; +int nNonMatched = 0; +bool matching = false; + +string ConvertIntToString(int Number, bool pad) +{ + ostringstream convert; + convert.clear(); + if ( pad && Number < 10 ) { convert << std::setw(2) << std::setfill('0');} + convert << Number; + return convert.str(); +}; + + +string MakeTimeStamp() +{ + time_t t = time(0); // get time now + struct tm * now = localtime( & t ); + + int year = now->tm_year - 100; /// + 1900 to get current year + int month = now->tm_mon + 1; + int day = now->tm_mday; + int hour = now->tm_hour; + int min = now->tm_min; + //int sec = now->tm_sec; + + string year_str = ConvertIntToString(year, true); + string month_str = ConvertIntToString(month, true); + string day_str = ConvertIntToString(day, true); + string hour_str = ConvertIntToString(hour, true); + string min_str = ConvertIntToString(min, true); + //string sec_str = ConvertIntToString(sec, true); + + string date_str = year_str + month_str + day_str; //+ "_" + hour_str + min_str; + return date_str; +}; + + + +int main (int argc, char *argv[]) +{ + string dateString = MakeTimeStamp(); + cout << "***********************************" << endl; + cout << "*** Beginning of program: tZq FCNC ***" << endl; + cout << "***********************************" << endl; + cout << "Current time: " << dateString << endl; + + clock_t start = clock(); + + /////////////////////////// + /// Configuration /// + ////////////////////////// + int verbose = 1; // 0 = cout alll + bool eventSelected = false; + bool baseSelected = false; + int nbTrig = 0; + int nbBaseline = 0; + int nbGPV = 0; + int nbSelectedEvents = 0; + int nbEvents = 0; + double dataLumi = 0; //pb + bool eee = false; + bool eemu = false; + bool mumue = false; + bool mumumu =false; + bool all = false; + bool runHLT = true; + bool hasMu = false; + bool hasEl = false; + bool dilep =false; + bool singlelep = false; + bool applyJetLeptonCleaning = true; + bool fillBtagHisto = false; + bool printTrigger = false; + bool printLeptonSF = false; + bool applyJER = false; + bool applyJES = false; + bool applyNegWeightCorrection = false; + bool applyPU = false; + bool applyLeptonSF = false; + bool btagShape = true; + string Channel = ""; + string xmlFileName = ""; + int maxMCParticles = -1; + + ////////////////////////////////////////////// + /// Set up everything for local submission //// + /////////////////////////////////////////////// + // check the arguments passed + if(verbose == 0) + { + cout << " The list of arguments are: " << endl; + for (int n_arg=1; n_arg vecfileNames; + for(int args = 11; args < argc-7; args++) + { + vecfileNames.push_back(argv[args]); + } + + if (verbose==0) + { + cout << "The list of file to run over will be printed..." << endl; + for ( int nfiles = 0; nfiles < vecfileNames.size(); nfiles++) + { + cout << "file number " << nfiles << " is " << vecfileNames[nfiles] << endl; + } + } + /// define channels + // + if(chanName.find("mumumu")!=string::npos) mumumu = true; + if(chanName.find("eemu")!=string::npos) eemu = true; + if(chanName.find("mumue")!=string::npos) mumue = true; + if(chanName.find("eee")!=string::npos) eee = true; + if(chanName.find("all")!=string::npos) all = true; + if(mumumu) + { + cout << " --> Using the TriMuon channel <-- " << endl; + Channel = "MuMuMu"; + xmlFileName = "config/Run2TriLepton.xml" ; + dataLumi = 2700; //pb + hasMu = true; + hasEl = false; + dilep = true; + singlelep = false; + } + if(eee) + { + cout << " --> Using the TriElectron channel <-- " << endl; + Channel = "ElElEl"; + xmlFileName = "config/Run2TriLepton.xml" ; + dataLumi = 2700; //pb + hasMu = false; + hasEl = true; + dilep = true; + singlelep =false; + } + if(mumue) + { + cout << " --> Using the MuMuEl channel <-- " << endl; + Channel = "MuMuEl"; + xmlFileName = "config/Run2TriLepton.xml" ; + dataLumi = 2700; //pb + hasMu = true; + hasEl = true; + dilep = true; + singlelep =false; + } + if(eemu) + { + cout << " --> Using the ElElMu channel <-- " << endl; + Channel = "ElElMu"; + xmlFileName = "config/Run2TriLepton.xml" ; + dataLumi = 2700; //pb + hasMu = true; + hasEl = true; + dilep = true; + singlelep =false; + } + if(all) + { + cout << " --> Using the all channel <-- " << endl; + Channel = "All"; + xmlFileName = "config/Run2TriLepton.xml" ; + dataLumi = 2700; //pb + hasMu = true; + hasEl = true; + dilep = true; + singlelep = true; + } + + + // Print information to a textfile + ofstream infoFile; + ofstream isoFile; + ofstream jetFile; + ofstream jetJECFile; + ofstream jetSelFile; + ofstream topFile; + ofstream mWtFile; + ofstream muSelFile; + ofstream muIniFile; + string info_dir = "Information/"+Channel +"/"; + string iso_dir = "Isolation/"+Channel +"/"; + + string info_date_dir = info_dir + dateString +"/"; + string iso_date_dir = iso_dir + dateString +"/"; + cout << "info dir " << info_dir.c_str() << endl; + if(synchex){ + mkdir(info_dir.c_str(),0777); + mkdir(info_date_dir.c_str(),0777); + mkdir(iso_dir.c_str(),0777); + mkdir(iso_date_dir.c_str(),0777); + string infoName = info_date_dir + "information"; + infoName += "_"+ Channel; + infoName += "_" + dName; + infoName += "_" + JobNum; + infoName += ".txt"; + infoFile.open(infoName.c_str()); + infoFile.precision(3); + string isoName = iso_date_dir + "isolation"; + isoName += "_"+ Channel; + isoName += "_" + dName; + isoName += "_" + JobNum; + isoName += ".txt"; + isoFile.open(isoName.c_str()); + // isoFile.precision(3); + string jetName = info_date_dir + "jetinfo"; + jetName += "_"+ Channel; + jetName += "_" + dName; + jetName += "_" + JobNum; + jetName += ".txt"; + jetFile.open(jetName.c_str()); + string jetJECName = info_date_dir + "jetinfoJEC"; + jetJECName += "_"+ Channel; + jetJECName += "_" + dName; + jetJECName += "_" + JobNum; + jetJECName += ".txt"; + jetJECFile.open(jetJECName.c_str()); + string jetSelName = info_date_dir + "jetinfoSel"; + jetSelName += "_"+ Channel; + jetSelName += "_" + dName; + jetSelName += "_" + JobNum; + jetSelName += ".txt"; + jetSelFile.open(jetSelName.c_str()); + string topName = info_date_dir + "topinfo"; + topName += "_"+ Channel; + topName += "_" + dName; + topName += "_" + JobNum; + topName += ".txt"; + topFile.open(topName.c_str()); + string mWtName = info_date_dir + "mWtinfo"; + mWtName += "_"+ Channel; + mWtName += "_" + dName; + mWtName += "_" + JobNum; + mWtName += ".txt"; + mWtFile.open(mWtName.c_str()); + string muSelName = info_date_dir + "muSelinfo"; + muSelName += "_"+ Channel; + muSelName += "_" + dName; + muSelName += "_" + JobNum; + muSelName += ".txt"; + muSelFile.open(muSelName.c_str()); + string muIniName = info_date_dir + "muIniinfo"; + muIniName += "_"+ Channel; + muIniName += "_" + dName; + muIniName += "_" + JobNum; + muIniName += ".txt"; + muIniFile.open(muIniName.c_str()); } + cout << "---Dataset accepted from command line---" << endl; + cout << "Dataset Name: " << dName << endl; + cout << "Dataset Title: " << dTitle << endl; + cout << "Dataset color: " << color << endl; + cout << "Dataset ls: " << ls << endl; + cout << "Dataset lw: " << lw << endl; + cout << "Dataset normf: " << normf << endl; + cout << "Dataset EqLumi: " << EqLumi << endl; + cout << "Dataset xSect: " << xSect << endl; + cout << "Dataset File Name: " << vecfileNames[0] << endl; + cout << "Beginning Event: " << startEvent << endl; + cout << "Ending Event: " << endEvent << endl; + cout << "JobNum: " << JobNum << endl; + bool isData= false; + if(dName.find("Data")!=string::npos || dName.find("data")!=string::npos || dName.find("DATA")!=string::npos){ + isData = true; + cout << "running on data !!!!" << endl; + cout << "luminosity is " << dataLumi << endl; + } + cout << "----------------------------------------" << endl; + + + ///////////////////////////////// + // Set up AnalysisEnvironment + ///////////////////////////////// + + AnalysisEnvironment anaEnv; + cout<<" - Creating environment ..."< datasets; + Dataset* theDataset = new Dataset(dName, dTitle, true, color, ls, lw, normf, xSect, vecfileNames); + theDataset->SetEquivalentLuminosity(EqLumi); + datasets.push_back(theDataset); + int ndatasets = datasets.size() - 1 ; + + //////////////////////////// + /// Initialise trigger /// + //////////////////////////// + + if(verbose == 0) cout << "Initializing trigger" << endl; + Trigger* trigger_mumu = new Trigger(1, 0, 0, 1,0); // mu , el, single, double, tri + Trigger* trigger_ee = new Trigger(0, 1, 0, 1,0); + Trigger* trigger_emu = new Trigger(1, 1, 0, 1,0) ; + Trigger* trigger_mumumu = new Trigger(1, 0, 0, 0,1); + Trigger* trigger_eee = new Trigger(0, 1, 0, 0,1); + Trigger* trigger_emumu_mumue = new Trigger(1, 1, 0, 0,1) ; + Trigger* trigger_mu = new Trigger(1, 0, 1, 0,0); + Trigger* trigger_e = new Trigger(0, 1, 1, 0,0); + + /////////////////////// + // MET calculator /// + ///////////////////// + MEzCalculator* MEzCalculator; + + + //////////////////////// + // intialize Calibrations // + /////////////////////// + BTagCalibration *btagcalib; + BTagCalibrationReader *btagreader; + BTagWeightTools *btwt; + BTagCalibrationReader * reader_csvv2; + // for pu + LumiReWeighting LumiWeights; + + // JER / JEC + vector vCorrParam; + string pathCalJEC = "../TopTreeAnalysisBase/Calibrations/JECFiles/"; + + + /////////////////////////////// + // Set up Output ROOT file /// + ////////////////////////////// + stringstream ss; + ss << JobNum; + string strJobNum = ss.str(); + string histo_dir = "NtupleMakerOutput/TriLepton_histos_"+ Channel; + string histo_dir_date = histo_dir+"/TriLepton_histos_" + dateString +"/"; + mkdir(histo_dir.c_str(),0777); + mkdir(histo_dir_date.c_str(),0777); + + string rootFileName (histo_dir_date+"/FCNC_3L_"+Channel+"_"+dName+".root"); + if (strJobNum != "0") + { + if(verbose == 0) cout << "strJobNum is " << strJobNum << endl; + rootFileName = histo_dir_date+"/FCNC_3L_"+Channel+"_"+dName + "_"+strJobNum+".root"; + } + cout << "Histofile: " << rootFileName << endl; + TFile *fout = new TFile (rootFileName.c_str(), "RECREATE"); + + /////////////////////////// + /// Global variables //// + ////////////////////////// + TRootEvent* event = 0; + // TRootRun *runInfos = new TRootRun(); + + ///////////////////////////// + /// Object ID /// + ///////////////////////////// + // electron + float el_pt_cut =20.; // 42 + float el_eta_cut = 2.5; + float el_iso_cone = 0.3; + // reliso cut fabs(eta supercluster) <= 1.479 --> 0.107587 // (fabs(eta supercluster) > 1.479 && fabs(eta supercluster) < 2.5) --> 0.113254 + // muon + float mu_pt_cut = 20.; // 40 + float mu_eta_cut = 2.4; + float mu_iso_cut = 0.15; + //jets + float jet_pt_cut = 30.; + float jet_eta_cut = 2.4; + + // convert into string + + std::ostringstream el_pt_cut_strs, el_eta_cut_strs, mu_pt_cut_strs, mu_eta_cut_strs, mu_iso_cut_strs, jet_pt_cut_strs, jet_eta_cut_strs; + std::string el_pt_cut_str, el_eta_cut_str, mu_pt_cut_str, mu_eta_cut_str, mu_iso_cut_str, jet_pt_cut_str, jet_eta_cut_str; + el_pt_cut_strs << el_pt_cut; + el_eta_cut_strs << el_eta_cut; + mu_pt_cut_strs << mu_pt_cut; + mu_eta_cut_strs << mu_eta_cut; + mu_iso_cut_strs << mu_iso_cut; + jet_pt_cut_strs << jet_pt_cut; + jet_eta_cut_strs << jet_eta_cut; + el_pt_cut_str = el_pt_cut_strs.str(); + el_eta_cut_str = el_eta_cut_strs.str(); + mu_pt_cut_str = mu_pt_cut_strs.str(); + mu_eta_cut_str = mu_eta_cut_strs.str(); + mu_iso_cut_str = mu_iso_cut_strs.str(); + jet_pt_cut_str = jet_pt_cut_strs.str(); + jet_eta_cut_str = jet_eta_cut_strs.str(); + + + + + //////////////////////////////////////////////////////////////////// + ////////////////// 1D plots ////////////////////////////// + //////////////////////////////////////////////////////////////////// + histo1D["NbOfVertices"] = new TH1F("NbOfVertices", "Nb. of vertices", 60, 0, 60); + histo1D["cutFlow"] = new TH1F( "cutFlow", "cutFlow", 15, -0.5, 14.5); + histo1D["weightIndex"] = new TH1F("weightIndex", "weightIndex", 5, -2.5,2.5); // 0: None; 1: scale_variation 1; 2: Central scale variation 1 + histo1D["nloweight"] = new TH1F("nloweight", "nloweight", 200, -2.0, 2.0); + histo1D["init_nPVs_before"] = new TH1F("init_nPVs_before", "init_nPVs_before", 41,-0.5,40.5); + histo1D["init_nPVs_after"] = new TH1F("init_nPVs_after", "init_nPVs_after", 41,-0.5,40.5); + + histo1D["nbMuons"] = new TH1F("nbMuons","nbMuons",10,-0.5,9.5); + histo1D["nbElectrons"] = new TH1F("nbElectrons","nbElectrons",10,-0.5,9.5); + histo1D["nbJets"] = new TH1F("nbJets","nbJets",10,-0.5,9.5); + + + + ///////////////////////////////// + /// Matching + /////////////////////////////// + vector mcParticlesTLV, selectedJetsTLV; + // TLorentzVector cQuark, anticQuark; + + + + + ///////////////////////////////// + // Loop on datasets // + ///////////////////////////////// + cout << " - Loop over datasets ... " << datasets.size () << " datasets !" << endl; + bool nlo = false; + for (unsigned int d = 0; d < datasets.size(); d++) + { + cout<<"Load Dataset"<Name(); + float normfactor = datasets[d]->NormFactor(); + cout <<"found sample " << daName.c_str() << " with equivalent lumi "<< theDataset->EquivalentLumi() < depending on JES up/Down andother reader is needed + + + } + + LumiWeights = LumiReWeighting("../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_MC_RunIIFall15DR76-Asympt25ns.root", "../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_2015Data76X_25ns-Run246908-260627Cert.root", "pileup", "pileup"); + + //MuonSFWeight (const string &sfFile, const string &dataOverMC, const bool &extendRange, const bool &debug, const bool &printWarning) + + MuonSFWeight* muonSFWeightID_T = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonID_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_TightIDandIPCut_DEN_genTracks_PAR_pt_spliteta_bin1/abseta_pt_ratio",true, printLeptonSF,printLeptonSF); + MuonSFWeight* muonSFWeightID_M = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonID_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_MediumID_DEN_genTracks_PAR_pt_spliteta_bin1/abseta_pt_ratio",true, printLeptonSF, printLeptonSF); + MuonSFWeight* muonSFWeightID_L = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonID_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_LooseID_DEN_genTracks_PAR_pt_spliteta_bin1/abseta_pt_ratio", true, printLeptonSF, printLeptonSF); + MuonSFWeight* muonSFWeightIso_TT = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_TightRelIso_DEN_TightID_PAR_pt_spliteta_bin1/abseta_pt_ratio",true, printLeptonSF,printLeptonSF); // Tight RelIso, Tight ID + MuonSFWeight* muonSFWeightIso_TM = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_TightRelIso_DEN_MediumID_PAR_pt_spliteta_bin1/abseta_pt_ratio", true,printLeptonSF, printLeptonSF); // Tight RelIso, Medium ID + MuonSFWeight* muonSFWeightIso_LT = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_LooseRelIso_DEN_TightID_PAR_pt_spliteta_bin1/abseta_pt_ratio", true,printLeptonSF, printLeptonSF); // Loose RelIso, Tight ID + MuonSFWeight* muonSFWeightIso_LM = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_LooseRelIso_DEN_MediumID_PAR_pt_spliteta_bin1/abseta_pt_ratio", true,printLeptonSF, printLeptonSF); // Loose RelIso, Medium ID + + + + + string electronFile= "CutBasedID_TightWP_76X_18Feb.txt_SF2D.root"; + string electronRecoFile = "eleRECO.txt.egamma_SF2D.root"; + string elecHistName = "EGamma_SF2D"; + ElectronSFWeight* electronSFWeight = new ElectronSFWeight (CaliPath+"LeptonSF/"+electronFile,elecHistName, true,printLeptonSF, printLeptonSF); // (... , ... , debug, print warning) i + ElectronSFWeight* electronSFWeightReco = new ElectronSFWeight(CaliPath+"LeptonSF/"+electronRecoFile,elecHistName, true,printLeptonSF, printLeptonSF); + + vCorrParam.clear(); + if (isData) + { + JetCorrectorParameters *L1JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L1FastJet_AK4PFchs.txt"); + vCorrParam.push_back(*L1JetCorPar); + JetCorrectorParameters *L2JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L2Relative_AK4PFchs.txt"); + vCorrParam.push_back(*L2JetCorPar); + JetCorrectorParameters *L3JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L3Absolute_AK4PFchs.txt"); + vCorrParam.push_back(*L3JetCorPar); + JetCorrectorParameters *L2L3ResJetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L2L3Residual_AK4PFchs.txt"); + vCorrParam.push_back(*L2L3ResJetCorPar); + } + else + { + JetCorrectorParameters *L1JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_MC_L1FastJet_AK4PFchs.txt"); + vCorrParam.push_back(*L1JetCorPar); + JetCorrectorParameters *L2JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_MC_L2Relative_AK4PFchs.txt"); + vCorrParam.push_back(*L2JetCorPar); + JetCorrectorParameters *L3JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_MC_L3Absolute_AK4PFchs.txt"); + vCorrParam.push_back(*L3JetCorPar); + } + JetCorrectionUncertainty *jecUnc = new JetCorrectionUncertainty(pathCalJEC+"Fall15_25nsV2_MC_Uncertainty_AK4PFchs.txt"); + + JetTools *jetTools = new JetTools(vCorrParam, jecUnc, true); //true means redo also L1 + + //////////////////////////////////////////////////////////// + // Setup Date string and nTuple for output + /////////////////////////////////////////////////////////// + + string channel_dir = "NtupleMakerOutput/Ntuples_"+Channel; + string date_dir = channel_dir+"/Ntuples_" + dateString +"/"; + mkdir(channel_dir.c_str(),0777); + mkdir(date_dir.c_str(),0777); + + + string Ntupname = date_dir +"FCNC_3L_" +Channel + "_" + dName + "_"+ strJobNum + ".root"; + + TFile * tupfile = new TFile(Ntupname.c_str(),"RECREATE"); + tupfile->cd(); + TTree* myTree = new TTree("tree","tree"); + TTree* baselineTree = new TTree("baselinetree","baselinetree"); + TTree* globalTree = new TTree("globaltree","globaltree"); + /////////////////////////// + /// output tree + /////////////////////////// + // event related variables + Int_t run_num; + Long64_t evt_num; + Int_t lumi_num; + Int_t nvtx; + Int_t npu; + Int_t PassedMETFilter; + Int_t PassedGoodPV; + Double_t cutstep[10]; + Int_t nCuts; + Double_t puSF; + Double_t btagSF; + Double_t MuonIDSF[10]; + Double_t MuonIsoSF[10]; + Double_t MuonTrigSFv2[10]; + Double_t MuonTrigSFv3[10]; + Double_t ElectronSF[10]; + Int_t nofPosWeights; + Int_t nofNegWeights; + Int_t sumW; + Int_t nEv; + Double_t nloWeight; // for amc@nlo samples + Int_t JERon; + Int_t JESon; + Double_t WPb_L; + Double_t WPb_M; + Double_t WPb_T; + Int_t PassedMET; + + Double_t pt_electron_1; + Double_t pt_electron_2; + Double_t pt_electron_3; + Double_t pt_muon_1; + Double_t pt_muon_2; + Double_t pt_muon_3; + Double_t pt_jet_1; + Double_t pt_jet_2; + Double_t pt_jet_3; + + + Int_t nLeptons; + // variables for electrons + Int_t nElectrons; + Double_t pt_electron[10]; + Double_t phi_electron[10]; + Double_t eta_electron[10]; + Double_t eta_superCluster_electron[10]; + Double_t E_electron[10]; + Double_t d0_electron[10]; + Double_t d0BeamSpot_electron[10]; + Double_t chargedHadronIso_electron[10]; + Double_t neutralHadronIso_electron[10]; + Double_t photonIso_electron[10]; + Double_t pfIso_electron[10]; + Int_t charge_electron[10]; + + Double_t sigmaIEtaIEta_electron[10]; + Double_t deltaEtaIn_electron[10]; + Double_t deltaPhiIn_electron[10]; + Double_t hadronicOverEm_electron[10]; + Int_t missingHits_electron[10]; + Bool_t passConversion_electron[10]; + Bool_t isId_electron[10]; + Bool_t isIso_electron[10]; + + Bool_t isEBEEGap[10]; + + //variable for muons + Int_t nMuons; + Double_t pt_muon[10]; + Double_t phi_muon[10]; + Double_t eta_muon[10]; + Double_t E_muon[10]; + Double_t d0_muon[10]; + Double_t d0BeamSpot_muon[10]; + Double_t chargedHadronIso_muon[10]; + Double_t neutralHadronIso_muon[10]; + Double_t photonIso_muon[10]; + Double_t relIso_muon[10]; + Bool_t isId_muon[10]; + Bool_t isIso_muon[10]; + Double_t pfIso_muon[10]; + Int_t charge_muon[10]; + + //variable for jets + Int_t nJets; + Int_t nJets_CSVL; + Int_t nJets_CSVM; + Int_t nJets_CSVT; + Double_t pt_jet[20]; + Double_t phi_jet[20]; + Double_t eta_jet[20]; + Double_t E_jet[20]; + Int_t charge_jet[20]; + Double_t bdisc_jet[20]; + Double_t cdiscCvsL_jet[20]; + Double_t cdiscCvsL_jet_1; + Double_t cdiscCvsB_jet_1; + Double_t cdiscCvsB_jet[20]; + + + // variables for Zboson + Double_t Zboson_M; + Double_t Zboson_Px; + Double_t Zboson_Py; + Double_t Zboson_Pz; + Double_t Zboson_Energy; + + // met + Double_t met_Pt; + Double_t met_Px; + Double_t met_Py; + Double_t met_Pz; + Double_t met_Phi; + Double_t met_Eta; + + Double_t mWt; + Double_t FCNCtop_M; + Double_t SMtop_M; + Double_t cjet_Pt; + Double_t mlb; + Double_t dRWlepc; + Double_t dRZb; + Double_t dRZc; + Double_t dRWlepb; + Double_t dRSMFCNCtop; + Double_t dPhiSMFCNCtop; + Double_t dPhiWlepb; + Double_t dPhiWlepc; + Double_t dPhiZb; + Double_t dPhiZc; + + // mcparicles + Int_t nMCParticles; + Int_t mc_status[200]; + Int_t mc_pdgId[200]; + Int_t mc_mother[200]; + Int_t mc_granny[200]; + Double_t mc_pt[200]; + Double_t mc_phi[200]; + Double_t mc_eta[200]; + Double_t mc_E[200]; + Double_t mc_M[200]; + + if(dName.find("NP_overlay_FCNC_TT")!=string::npos || dName.find("tZq")!=string::npos ) + { + globalTree->Branch("nMatched",&nMatched,"nMatched/I"); + globalTree->Branch("nNonMatched",&nNonMatched,"nNonMatched/I"); + + myTree->Branch("nMCParticles",&nMCParticles,"nMCParticles/I"); + myTree->Branch("mc_status",&mc_status,"mc_status[nMCParticles]/I"); + myTree->Branch("mc_pdgId",&mc_pdgId,"mc_pdgId[nMCParticles]/I"); + myTree->Branch("mc_mother",&mc_mother,"mc_mother[nMCParticles]/I"); + myTree->Branch("mc_granny",&mc_granny,"mc_granny[nMCParticles]/I"); + myTree->Branch("mc_pt",&mc_pt,"mc_pt[nMCParticles]/D"); + myTree->Branch("mc_phi",&mc_phi,"mc_phi[nMCParticles]/D"); + myTree->Branch("mc_eta",&mc_eta,"mc_eta[nMCParticles]/D"); + myTree->Branch("mc_E",&mc_E,"mc_E[nMCParticles]/D"); + myTree->Branch("mc_M",&mc_M,"mc_M[nMCParticles]/D"); + + baselineTree->Branch("nMCParticles",&nMCParticles,"nMCParticles/I"); + baselineTree->Branch("mc_status",&mc_status,"mc_status[nMCParticles]/I"); + baselineTree->Branch("mc_pdgId",&mc_pdgId,"mc_pdgId[nMCParticles]/I"); + baselineTree->Branch("mc_mother",&mc_mother,"mc_mother[nMCParticles]/I"); + baselineTree->Branch("mc_granny",&mc_granny,"mc_granny[nMCParticles]/I"); + baselineTree->Branch("mc_pt",&mc_pt,"mc_pt[nMCParticles]/D"); + baselineTree->Branch("mc_phi",&mc_phi,"mc_phi[nMCParticles]/D"); + baselineTree->Branch("mc_eta",&mc_eta,"mc_eta[nMCParticles]/D"); + baselineTree->Branch("mc_E",&mc_E,"mc_E[nMCParticles]/D"); + baselineTree->Branch("mc_M",&mc_M,"mc_M[nMCParticles]/D"); + } + + + + + // global data set variables + Int_t nofEventsHLTv2; + Int_t nofEventsHLTv3; + int nTrigg; + int n3lep; + int nVetoMu; + int nVetoEl; + int nOS; + int nZmass; + int nJet; + int nBJet; + int nMWT; + int nSMtop; + int nMET; + globalTree->Branch("nofEventsHLTv2",&nofEventsHLTv2,"nofEventsHLTv2/I"); + globalTree->Branch("nofEventsHLTv3",&nofEventsHLTv3,"nofEventsHLTv3/I"); + globalTree->Branch("nofPosWeights",&nofPosWeights,"nofPosWeights/I"); + globalTree->Branch("nofNegWeights",&nofNegWeights,"nofNegWeights/I"); + globalTree->Branch("nEv" , &nEv, "nEv/I"); + globalTree->Branch("sumW", &sumW, "sumW/I"); + globalTree->Branch("nCuts",&nCuts, "nCuts/I"); + globalTree->Branch("cutstep",&cutstep,"cutstep[nCuts]/D"); + globalTree->Branch("JERon",&JERon,"JERon/I"); + globalTree->Branch("JESon", &JESon, "JESon/I"); + globalTree->Branch("WPb_L", &WPb_L, "WPb_L/D"); + globalTree->Branch("WPb_M", &WPb_M, "WPb_M/D"); + globalTree->Branch("WPb_T", &WPb_T, "WPb_T/D"); + + globalTree->Branch("nTrigg", &nTrigg, "nTrigg/I"); + globalTree->Branch("n3lep", &n3lep, "n3lep/I"); + globalTree->Branch("nVetoMu", &nVetoMu, "nVetoMu/I"); + globalTree->Branch("nVetoEl", &nVetoEl, "nVetoEl/I"); + globalTree->Branch("nOS", &nOS, "nOS/I"); + globalTree->Branch("nZmass",&nZmass, "nZmass/I"); + globalTree->Branch("nJet", &nJet, "nJet/I"); + globalTree->Branch("nBJet",&nBJet, "nBJet/I"); + globalTree->Branch("nMWT", &nMWT, "nMWT/I"); + globalTree->Branch("nSMtop",&nSMtop, "nSMtop/I"); + globalTree->Branch("nMET",&nMET, "nMET/I"); + + + + + + // event related variables + myTree->Branch("nloWeight",&nloWeight,"nloWeight/D"); + myTree->Branch("run_num",&run_num,"run_num/I"); + myTree->Branch("evt_num",&evt_num,"evt_num/L"); + myTree->Branch("lumi_num",&lumi_num,"lumi_num/I"); + myTree->Branch("nvtx",&nvtx,"nvtx/I"); + myTree->Branch("npu",&npu,"npu/I"); + myTree->Branch("puSF",&puSF,"puSF/D"); + myTree->Branch("btagSF",&btagSF,"btagSF/D"); + myTree->Branch("nLeptons",&nLeptons, "nLeptons/I");// + myTree->Branch("PassedMETFilter", &PassedMETFilter,"PassedMETFilter/I"); + myTree->Branch("PassedGoodPV", &PassedGoodPV,"PassedGoodPV/I"); + + baselineTree->Branch("PassedMETFilter", &PassedMETFilter,"PassedMETFilter/I"); + baselineTree->Branch("PassedGoodPV", &PassedGoodPV,"PassedGoodPV/I"); + baselineTree->Branch("nloWeight",&nloWeight,"nloWeight/D"); + baselineTree->Branch("run_num",&run_num,"run_num/I"); + baselineTree->Branch("evt_num",&evt_num,"evt_num/I"); + baselineTree->Branch("lumi_num",&lumi_num,"lumi_num/I"); + baselineTree->Branch("nvtx",&nvtx,"nvtx/I"); + baselineTree->Branch("npu",&npu,"npu/I"); + baselineTree->Branch("puSF",&puSF,"puSF/D"); + baselineTree->Branch("btagSF",&btagSF,"btagSF/D"); + baselineTree->Branch("nLeptons",&nLeptons, "nLeptons/I");// + // electrons + myTree->Branch("nElectrons",&nElectrons, "nElectrons/I");// + myTree->Branch("ElectronSF",&ElectronSF,"ElectronSF[nElectrons]/D"); + myTree->Branch("pt_electron",pt_electron,"pt_electron[nElectrons]/D"); + myTree->Branch("phi_electron",phi_electron,"phi_electron[nElectrons]/D"); + myTree->Branch("eta_electron",eta_electron,"eta_electron[nElectrons]/D"); + myTree->Branch("eta_superCluster_electron",eta_superCluster_electron,"eta_superCluster_electron[nElectrons]/D"); + myTree->Branch("E_electron",E_electron,"E_electron[nElectrons]/D"); + myTree->Branch("chargedHadronIso_electron",chargedHadronIso_electron,"chargedHadronIso_electron[nElectrons]/D"); + myTree->Branch("neutralHadronIso_electron",neutralHadronIso_electron,"neutralHadronIso_electron[nElectrons]/D"); + myTree->Branch("photonIso_electron",photonIso_electron,"photonIso_electron[nElectrons]/D"); + myTree->Branch("pfIso_electron",pfIso_electron,"pfIso_electron[nElectrons]/D"); + myTree->Branch("charge_electron",charge_electron,"charge_electron[nElectrons]/I"); + myTree->Branch("d0_electron",d0_electron,"d0_electron[nElectrons]/D"); + myTree->Branch("d0BeamSpot_electron",d0BeamSpot_electron,"d0BeamSpot_electron[nElectrons]/D"); + myTree->Branch("sigmaIEtaIEta_electron",sigmaIEtaIEta_electron,"sigmaIEtaIEta_electron[nElectrons]/D"); + myTree->Branch("deltaEtaIn_electron",deltaEtaIn_electron,"deltaEtaIn_electron[nElectrons]/D"); + myTree->Branch("deltaPhiIn_electron",deltaPhiIn_electron,"deltaPhiIn_electron[nElectrons]/D"); + myTree->Branch("hadronicOverEm_electron",hadronicOverEm_electron,"hadronicOverEm_electron[nElectrons]/D"); + myTree->Branch("missingHits_electron",missingHits_electron,"missingHits_electron[nElectrons]/I"); + myTree->Branch("passConversion_electron",passConversion_electron,"passConversion_electron[nElectrons]/O)"); + myTree->Branch("isId_electron",isId_electron,"isId_electron[nElectrons]/O)"); + myTree->Branch("isIso_electron",isIso_electron,"isIso_electron[nElectrons]/O)"); + myTree->Branch("isEBEEGap",isEBEEGap,"isEBEEGap[nElectrons]/O)"); + myTree->Branch("pt_electron_1",&pt_electron_1,"pt_electron_1/D"); + myTree->Branch("pt_electron_2",&pt_electron_2,"pt_electron_2/D"); + myTree->Branch("pt_electron_3",&pt_electron_3,"pt_electron_3/D"); + + + baselineTree->Branch("nElectrons",&nElectrons, "nElectrons/I");// + baselineTree->Branch("ElectronSF",&ElectronSF,"ElectronSF[nElectrons]/D"); + baselineTree->Branch("pt_electron",pt_electron,"pt_electron[nElectrons]/D"); + baselineTree->Branch("phi_electron",phi_electron,"phi_electron[nElectrons]/D"); + baselineTree->Branch("eta_electron",eta_electron,"eta_electron[nElectrons]/D"); + baselineTree->Branch("eta_superCluster_electron",eta_superCluster_electron,"eta_superCluster_electron[nElectrons]/D"); + baselineTree->Branch("E_electron",E_electron,"E_electron[nElectrons]/D"); + baselineTree->Branch("chargedHadronIso_electron",chargedHadronIso_electron,"chargedHadronIso_electron[nElectrons]/D"); + baselineTree->Branch("neutralHadronIso_electron",neutralHadronIso_electron,"neutralHadronIso_electron[nElectrons]/D"); + baselineTree->Branch("photonIso_electron",photonIso_electron,"photonIso_electron[nElectrons]/D"); + baselineTree->Branch("pfIso_electron",pfIso_electron,"pfIso_electron[nElectrons]/D"); + baselineTree->Branch("charge_electron",charge_electron,"charge_electron[nElectrons]/I"); + baselineTree->Branch("d0_electron",d0_electron,"d0_electron[nElectrons]/D"); + baselineTree->Branch("d0BeamSpot_electron",d0BeamSpot_electron,"d0BeamSpot_electron[nElectrons]/D"); + baselineTree->Branch("sigmaIEtaIEta_electron",sigmaIEtaIEta_electron,"sigmaIEtaIEta_electron[nElectrons]/D"); + baselineTree->Branch("deltaEtaIn_electron",deltaEtaIn_electron,"deltaEtaIn_electron[nElectrons]/D"); + baselineTree->Branch("deltaPhiIn_electron",deltaPhiIn_electron,"deltaPhiIn_electron[nElectrons]/D"); + baselineTree->Branch("hadronicOverEm_electron",hadronicOverEm_electron,"hadronicOverEm_electron[nElectrons]/D"); + baselineTree->Branch("missingHits_electron",missingHits_electron,"missingHits_electron[nElectrons]/I"); + baselineTree->Branch("passConversion_electron",passConversion_electron,"passConversion_electron[nElectrons]/O)"); + baselineTree->Branch("isId_electron",isId_electron,"isId_electron[nElectrons]/O)"); + baselineTree->Branch("isIso_electron",isIso_electron,"isIso_electron[nElectrons]/O)"); + baselineTree->Branch("isEBEEGap",isEBEEGap,"isEBEEGap[nElectrons]/O)"); + baselineTree->Branch("pt_electron_1",&pt_electron_1,"pt_electron_1/D"); + baselineTree->Branch("pt_electron_2",&pt_electron_2,"pt_electron_2/D"); + baselineTree->Branch("pt_electron_3",&pt_electron_3,"pt_electron_3/D"); + + // muons + myTree->Branch("nMuons",&nMuons, "nMuons/I"); + myTree->Branch("MuonIDSF",&MuonIDSF,"MuonIDSF[nMuons]/D"); + myTree->Branch("MuonIsoSF",&MuonIsoSF, "MuonIsoSF[nMuons]/D"); + myTree->Branch("MuonTrigSFv2",&MuonTrigSFv2,"MuonTrigSFv2[nMuons]/D"); + myTree->Branch("MuonTrigSFv3",&MuonTrigSFv3,"MuonTrigSFv3[nMuons]/D"); + myTree->Branch("pt_muon",pt_muon,"pt_muon[nMuons]/D"); + myTree->Branch("phi_muon",phi_muon,"phi_muon[nMuons]/D"); + myTree->Branch("eta_muon",eta_muon,"eta_muon[nMuons]/D"); + myTree->Branch("E_muon",E_muon,"E_muon[nMuons]/D"); + myTree->Branch("chargedHadronIso_muon",chargedHadronIso_muon,"chargedHadronIso_muon[nMuons]/D"); + myTree->Branch("neutralHadronIso_muon",neutralHadronIso_muon,"neutralHadronIso_muon[nMuons]/D"); + myTree->Branch("photonIso_muon",photonIso_muon,"photonIso_muon[nMuons]/D"); + myTree->Branch("isId_muon",isId_muon,"isId_muon[nMuons]/O"); + myTree->Branch("isIso_muon",isIso_muon,"isIso_muon[nMuons]/O"); + myTree->Branch("pfIso_muon",pfIso_muon,"pfIso_muon[nMuons]/D"); + myTree->Branch("charge_muon",charge_muon,"charge_muon[nMuons]/I"); + myTree->Branch("d0_muon",d0_muon,"d0_muon[nMuons]/D"); + myTree->Branch("d0BeamSpot_muon",d0BeamSpot_muon,"d0BeamSpot_muon[nMuons]/D"); + myTree->Branch("pt_muon_1",&pt_muon_1,"pt_muon_1/D"); + myTree->Branch("pt_muon_2",&pt_muon_2,"pt_muon_2/D"); + myTree->Branch("pt_muon_3",&pt_muon_3,"pt_muon_3/D"); + + baselineTree->Branch("nMuons",&nMuons, "nMuons/I"); + baselineTree->Branch("MuonIDSF",&MuonIDSF,"MuonIDSF[nMuons]/D"); + baselineTree->Branch("MuonIsoSF",&MuonIsoSF, "MuonIsoSF[nMuons]/D"); + baselineTree->Branch("MuonTrigSFv2",&MuonTrigSFv2,"MuonTrigSFv2[nMuons]/D"); + baselineTree->Branch("MuonTrigSFv3",&MuonTrigSFv3,"MuonTrigSFv3[nMuons]/D"); + baselineTree->Branch("pt_muon",pt_muon,"pt_muon[nMuons]/D"); + baselineTree->Branch("phi_muon",phi_muon,"phi_muon[nMuons]/D"); + baselineTree->Branch("eta_muon",eta_muon,"eta_muon[nMuons]/D"); + baselineTree->Branch("E_muon",E_muon,"E_muon[nMuons]/D"); + baselineTree->Branch("chargedHadronIso_muon",chargedHadronIso_muon,"chargedHadronIso_muon[nMuons]/D"); + baselineTree->Branch("neutralHadronIso_muon",neutralHadronIso_muon,"neutralHadronIso_muon[nMuons]/D"); + baselineTree->Branch("photonIso_muon",photonIso_muon,"photonIso_muon[nMuons]/D"); + baselineTree->Branch("isId_muon",isId_muon,"isId_muon[nMuons]/O"); + baselineTree->Branch("isIso_muon",isIso_muon,"isIso_muon[nMuons]/O"); + baselineTree->Branch("pfIso_muon",pfIso_muon,"pfIso_muon[nMuons]/D"); + baselineTree->Branch("charge_muon",charge_muon,"charge_muon[nMuons]/I"); + baselineTree->Branch("d0_muon",d0_muon,"d0_muon[nMuons]/D"); + baselineTree->Branch("d0BeamSpot_muon",d0BeamSpot_muon,"d0BeamSpot_muon[nMuons]/D"); + baselineTree->Branch("pt_muon_1",&pt_muon_1,"pt_muon_1/D"); + baselineTree->Branch("pt_muon_2",&pt_muon_2,"pt_muon_2/D"); + baselineTree->Branch("pt_muon_3",&pt_muon_3,"pt_muon_3/D"); + + // jets + myTree->Branch("nJets",&nJets,"nJets/I"); + myTree->Branch("nJets_CSVL",&nJets_CSVL,"nJets_CSVL/I"); + myTree->Branch("nJets_CSVM",&nJets_CSVM,"nJets_CSVM/I"); + myTree->Branch("nJets_CSVT",&nJets_CSVT,"nJets_CSVT/I"); + myTree->Branch("pt_jet",pt_jet,"pt_jet[nJets]/D"); + myTree->Branch("phi_jet",phi_jet,"phi_jet[nJets]/D"); + myTree->Branch("eta_jet",eta_jet,"eta_jet[nJets]/D"); + myTree->Branch("E_jet",E_jet,"E_jet[nJets]/D"); + myTree->Branch("charge_jet",charge_jet,"charge_jet[nJets]/I"); + myTree->Branch("bdisc_jet",bdisc_jet,"bdisc_jet[nJets]/D"); + myTree->Branch("cdiscCvsL_jet",cdiscCvsL_jet,"cdiscCvsL_jet[nJets]/D"); + myTree->Branch("cdiscCvsB_jet",cdiscCvsB_jet,"cdiscCvsB_jet[nJets]/D"); + myTree->Branch("cdiscCvsL_jet_1",&cdiscCvsL_jet_1,"cdiscCvsL_jet_1/D"); + myTree->Branch("cdiscCvsB_jet_1",&cdiscCvsB_jet_1,"cdiscCvsB_jet_1/D"); + myTree->Branch("pt_jet_1",&pt_jet_1,"pt_jet_1/D"); + myTree->Branch("pt_jet_2",&pt_jet_2,"pt_jet_2/D"); + myTree->Branch("pt_jet_3",&pt_jet_3,"pt_jet_3/D"); + + baselineTree->Branch("nJets",&nJets,"nJets/I"); + baselineTree->Branch("cdiscCvsL_jet_1",&cdiscCvsL_jet_1,"cdiscCvsL_jet_1/D"); + baselineTree->Branch("cdiscCvsB_jet_1",&cdiscCvsB_jet_1,"cdiscCvsB_jet_1/D"); + baselineTree->Branch("nJets_CSVL",&nJets_CSVL,"nJets_CSVL/I"); + baselineTree->Branch("nJets_CSVM",&nJets_CSVM,"nJets_CSVM/I"); + baselineTree->Branch("nJets_CSVT",&nJets_CSVT,"nJets_CSVT/I"); + baselineTree->Branch("pt_jet",pt_jet,"pt_jet[nJets]/D"); + baselineTree->Branch("phi_jet",phi_jet,"phi_jet[nJets]/D"); + baselineTree->Branch("eta_jet",eta_jet,"eta_jet[nJets]/D"); + baselineTree->Branch("E_jet",E_jet,"E_jet[nJets]/D"); + baselineTree->Branch("charge_jet",charge_jet,"charge_jet[nJets]/I"); + baselineTree->Branch("bdisc_jet",bdisc_jet,"bdisc_jet[nJets]/D"); + baselineTree->Branch("cdiscCvsL_jet",cdiscCvsL_jet,"cdiscCvsL_jet[nJets]/D"); + baselineTree->Branch("cdiscCvsB_jet",cdiscCvsB_jet,"cdiscCvsB_jet[nJets]/D"); + baselineTree->Branch("pt_jet_1",&pt_jet_1,"pt_jet_1/D"); + baselineTree->Branch("pt_jet_2",&pt_jet_2,"pt_jet_2/D"); + baselineTree->Branch("pt_jet_3",&pt_jet_3,"pt_jet_3/D"); + + // Zboson + myTree->Branch("Zboson_M",&Zboson_M,"Zboson_M/D"); + baselineTree->Branch("Zboson_M",&Zboson_M,"Zboson_M/D"); + myTree->Branch("mWt",&mWt,"mWt/D"); + baselineTree->Branch("mWt",&mWt,"mWt/D"); + myTree->Branch("FCNCtop_M",&FCNCtop_M,"FCNCtop_M/D"); + myTree->Branch("SMtop_M",&SMtop_M, "SMtop_M/D"); + baselineTree->Branch("SMtop_M",&SMtop_M, "SMtop_M/D"); + myTree->Branch("Zboson_Px",&Zboson_Px,"Zboson_Px/D"); + myTree->Branch("Zboson_Py",&Zboson_Py,"Zboson_Py/D"); + myTree->Branch("Zboson_Pz",&Zboson_Pz,"Zboson_Pz/D"); + myTree->Branch("Zboson_Energy",&Zboson_Energy,"Zboson_Energy/D"); + myTree->Branch("cjet_Pt",&cjet_Pt,"cjet_Pt/D"); + baselineTree->Branch("cjet_Pt",&cjet_Pt,"cjet_Pt/D"); + myTree->Branch("mlb",&mlb,"mlb/D"); + baselineTree->Branch("mlb",&mlb,"mlb/D"); + myTree->Branch("dRSMFCNCtop",&dRSMFCNCtop,"dRSMFCNCtop/D"); + myTree->Branch("dRWlepb",&dRWlepb,"dRWlepb/D"); + myTree->Branch("dRWlepc",&dRWlepc,"dRWlepc/D"); + myTree->Branch("dRZb",&dRZb,"dRZb/D"); + myTree->Branch("dRZc",&dRZc,"dRZc/D"); + myTree->Branch("dPhiSMFCNCtop",&dPhiSMFCNCtop,"dPhiSMFCNCtop/D"); + myTree->Branch("dPhiWlepb",&dPhiWlepb,"dPhiWlepb/D"); + myTree->Branch("dPhiWlepc",&dPhiWlepc,"dPhiWlepc/D"); + myTree->Branch("dPhiZb",&dPhiZb,"dPhiZb/D"); + myTree->Branch("dPhiZc",&dPhiZc,"dPhiZc/D"); + baselineTree->Branch("dRSMFCNCtop",&dRSMFCNCtop,"dRSMFCNCtop/D"); + baselineTree->Branch("dRWlepb",&dRWlepb,"dRWlepb/D"); + baselineTree->Branch("dRWlepc",&dRWlepc,"dRWlepc/D"); + baselineTree->Branch("dRZb",&dRZb,"dRZb/D"); + baselineTree->Branch("dRZc",&dRZc,"dRZc/D"); + baselineTree->Branch("dPhiSMFCNCtop",&dPhiSMFCNCtop,"dPhiSMFCNCtop/D"); + baselineTree->Branch("dPhiWlepb",&dPhiWlepb,"dPhiWlepb/D"); + baselineTree->Branch("dPhiWlepc",&dPhiWlepc,"dPhiWlepc/D"); + baselineTree->Branch("dPhiZb",&dPhiZb,"dPhiZb/D"); + baselineTree->Branch("dPhiZc",&dPhiZc,"dPhiZc/D"); + + // met + myTree->Branch("met_Pt", &met_Pt, "met_Pt/D"); + myTree->Branch("met_Eta", &met_Eta,"met_Eta/D"); + myTree->Branch("met_Phi", &met_Phi, "met_Phi/D"); + myTree->Branch("met_Px", &met_Px, "met_Px/D"); + myTree->Branch("met_Py", &met_Py, "met_Py/D"); + myTree->Branch("met_Pz", &met_Pz, "met_Pz/D"); + + baselineTree->Branch("met_Pt", &met_Pt, "met_Pt/D"); + baselineTree->Branch("met_Px", &met_Px, "met_Px/D"); + baselineTree->Branch("met_Py", &met_Py, "met_Py/D"); + baselineTree->Branch("met_Pz", &met_Pz, "met_Pz/D"); + baselineTree->Branch("met_Eta", &met_Eta,"met_Eta/D"); + baselineTree->Branch("met_Phi", &met_Phi, "met_Phi/D"); + + + + ///////////////////////// + //// Corrections/trigger /// + /////////////////////////// + + /// book triggers + trigger_mumu->bookTriggers(isData); + trigger_ee->bookTriggers(isData); + trigger_emu->bookTriggers(isData); + trigger_mumumu->bookTriggers(isData); + trigger_eee->bookTriggers(isData); + trigger_emumu_mumue->bookTriggers(isData); + trigger_mu->bookTriggers(isData); + trigger_e->bookTriggers(isData); + + + + ////////////////////////////////////////////////// + // Pre-event loop definitions + ///////////////////////////////////////////////// + + int itrigger = -1, previousRun = -1, start = 0; + int currentRun; + int iFile = -1; + unsigned int ending = datasets[d]->NofEvtsToRunOver(); + cout <<"Number of events = "<< ending < ending) + end_d = ending; + else + end_d = endEvent; + + int nEvents = end_d - event_start; + cout <<"Will run over "<< (end_d - event_start) << " events..."< vertex; + vector < TRootMuon* > init_muons; + vector < TRootElectron* > init_electrons; + vector < TRootJet* > init_jets; + vector < TRootJet* > init_jets_corrected; + vector < TRootGenJet* > genjets; + vector < TRootMET* > mets; + vector selectedElectrons; + vector selectedLooseElectrons; + vector selectedJets; + vector PreselectedJets; + vector selectedMuons; + vector selectedLooseMuons; + vector selectedCSVLBJets; + vector selectedCSVMBJets; + vector selectedCSVTBJets; + vector selectedCSVLLJets; + vector selectedCSVMLJets; + vector selectedCSVTLJets; + vector mcParticles; + vector selectednonCSVLJets; + + TLorentzVector Zboson; + TLorentzVector Zlep0; + TLorentzVector Zlep1; + TLorentzVector Wlep; + TLorentzVector SMbjet; + TLorentzVector cjet; + TLorentzVector SMtop; + TLorentzVector FCNCtop; + vector AssignedLeptons; + ////////////////////////////////////// + // Begin Event Loop + ////////////////////////////////////// + nbEvents = 0; + nofEventsHLTv2 = 0; + nofEventsHLTv3 = 0; + nofPosWeights = 0; + nofNegWeights = 0; + float eventweight = 1; + bool continueFlow ; + nbSelectedEvents = 0; + int nbEvents_0 = 0; + int nbEvents_test = 0; + int nbEvents_1 = 0; + int nbEvents_1m = 0; + int nbEvents_2m = 0; + int nbEvents_2 = 0; + int nbEvents_3 = 0; + int nbEvents_4 = 0; + int nbEvents_5 = 0; + int nbEvents_6 = 0; + int nbEvents_7 = 0; + int nbEvents_8 = 0; + int nbEvents_9 = 0; + bool debug = false; + vector selections; + std::ostringstream selectionsnb; + bool passedMET = false; + bool HBHEnoise = false; + bool HBHEIso = false; + bool CSCTight = false; + bool EcalDead = false; + bool eeBad = false; + bool lep3 = false; + TLorentzVector metTLV; + TLorentzVector metTLVbf; + string TriggBits; + string channel; + float pt_lept1; + float pt_lept2; + float pt_lept3; + float iso_lept1; + float iso_lept2; + float iso_lept3; + bool id_lept1 = 1; + bool id_lept2 = 1; + bool id_lept3 = 1; + float leading_jet_btagDiscr; + float leading_jetPt; + float met; + nMatched = 0; + nNonMatched = 0; + for (unsigned int ievt = event_start; ievt < end_d; ievt++) + { + + eventSelected = false; + baseSelected = false; + continueFlow = true; + lep3 = false; + AssignedLeptons.clear(); + leading_jetPt = 0.; + met = 0.; + leading_jet_btagDiscr = 0.; + TriggBits = ""; + channel = ""; + pt_lept1 = pt_lept2 = pt_lept3 = 0. ; + metTLV.Clear(); + metTLVbf.Clear(); + metTLV.SetPxPyPzE(0,0,0,0); + selections.clear(); + bool lepsel = false; + selectionsnb.clear(); + selectionsnb.str(std::string()); + mcParticles.clear(); + /// mcparticles + nMCParticles = -1; + for (Int_t i = 0; i < 200; i++) + { + mc_status[i] = -1; + mc_pdgId[i] = 0; + mc_mother[i] = 0; + mc_granny[i] = 0; + mc_pt[i] = 0.; + mc_phi[i] = 0.; + mc_eta[i] = 0.; + mc_E[i] = 0.; + mc_M[i] = 0.; + } + nCuts = 0; + passedMET = false; + HBHEnoise = false; + HBHEIso = false; + CSCTight = false; + EcalDead = false; + eeBad = false; + eventweight = 1; + if(verbose == 0 ) cout << "new event " << ievt << endl; + double ievt_d = ievt; + debug = false; + if (verbose == 0 ) debug = true; + currentfrac = ievt_d/end_d; + if (debug)cout << endl << endl << "Starting a new event loop!"<eventTree()->LoadTree(ievt); + string currentFilename = datasets[d]->eventTree()->GetFile()->GetName(); + int currentRun = event->runId(); + run_num = event->runId(); + evt_num = event->eventId(); + // if(evt_num != 2087984682 ) continue; + // else { cout << "FOUND IT" << endl;} + HBHEnoise = event->getHBHENoiseFilter(); + HBHEIso = event->getHBHENoiseIsoFilter(); + CSCTight = event->getCSCTightHalo2015Filter(); + EcalDead = event->getEcalDeadCellTriggerPrimitiveFilter(); + eeBad = event->getEEBadScFilter(); + /* if(synchex){ + for(int iEl = 0 ; iEl < init_electrons.size() ; iEl ++){ + // isoFile + cout << evt_num << " sumChargedHadronPt=" << init_electrons[iEl]->chargedHadronIso(3) << ", sumNeutralHadronEt=" << init_electrons[iEl]->neutralHadronIso(3) << ", sumPhotonEt=" << init_electrons[iEl]->photonIso(3)<< ", effArea=" << EffectiveArea(init_electrons[iEl]) << " electron_Pt=" << init_electrons[iEl]->Pt() << " electron_Eta=" << init_electrons[iEl]->Eta() << endl; + } + }*/ + lumi_num=event->lumiBlockId(); + nvtx = vertex.size(); + npu = (int) event->nTruePU(); + + ///////////////////////////////////// + // fix negative weights for amc@nlo/// + ///////////////////////////////////// + if(debug) cout << "amc fixing" << endl; + double hasNegWeight = false; + double mc_baseweight = 1; + if((!isData && dName.find("NP")==string::npos) && (event->getWeight(1001) != -9999.)) + { + mc_baseweight = event->getWeight(1001)/abs(event->originalXWGTUP()); + //mc_scaleupweight = event->getWeight(1005)/abs(event->originalXWGTUP()); + //mc_scaledownweight = event->getWeight(1009)/abs(event->originalXWGTUP()); + if(mc_baseweight >= 0) + { + nofPosWeights++; + histo1D["weightIndex"]->Fill(1.,1.); + + } + else + { + if(nlo) hasNegWeight = true; + nofNegWeights++; + histo1D["weightIndex"]->Fill(-1.,1.); + } + } + if( (!isData && dName.find("NP")==string::npos) && (event->getWeight(1) != -9999. )) + { + mc_baseweight = event->getWeight(1)/abs(event->originalXWGTUP()); + //mc_scaleupweight = event->getWeight(5)/abs(event->originalXWGTUP()); + //mc_scaledownweight = event->getWeight(9)/abs(event->originalXWGTUP()); + if(mc_baseweight >= 0) + { + nofPosWeights++; + histo1D["weightIndex"]->Fill(2.,1.); + + } + else + { + if(nlo) hasNegWeight = true; + nofNegWeights++; + histo1D["weightIndex"]->Fill(-2.,1.); + } + + + } + if((!isData && dName.find("FCNC")==string::npos)) + { + if ( event->getWeight(1001) == -9999. && event->getWeight(1) == -9999. ) + { + cout << "WARNING: No weight found for event " << ievt << " in dataset " << dName << endl; + cout << " Event Id: " << event->eventId() << " Run Id: " << event->runId() << " Lumi block Id: " << event->lumiBlockId() << endl; + cout << " Weight type is different from 'scale_variation' (1001) or 'Central scale variation' (1)." << endl; + } + if ( event->getWeight(1001) != -9999. && event->getWeight(1) != -9999. ) + { + cout << "WARNING: Two weight types found for event " << ievt << " in dataset " << dName << endl; + cout << " Event Id: " << event->eventId() << " Run Id: " << event->runId() << " Lumi block Id: " << event->lumiBlockId() << endl; + cout << " Check which weight type should be used when." << endl; + } + + nloWeight = mc_baseweight; + histo1D["nloweight"]->Fill(mc_baseweight, 1.); + sumWeights += mc_baseweight; + + + } + /////////////////////////////////////////// + // Trigger + /////////////////////////////////////////// + + bool trigged = false; + bool trigged_mumu = false; + bool trigged_ee = false; + bool trigged_emu = false; + bool trigged_mumumu = false; + bool trigged_eee = false; + bool trigged_emumu_mumue = false; + bool trigged_mu = false; + bool trigged_e = false; + bool filechanged = false; + bool runchanged = false; + + if(runHLT) + { + trigger_mumu->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_mumu = trigger_mumu->checkIfFired(); + trigger_ee->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_ee = trigger_ee->checkIfFired(); + trigger_emu->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_emu = trigger_emu->checkIfFired(); + trigger_mumumu->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_mumumu = trigger_mumumu->checkIfFired(); + trigger_eee->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_eee = trigger_eee->checkIfFired(); + trigger_emumu_mumue->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_emumu_mumue = trigger_emumu_mumue->checkIfFired(); + trigger_mu->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_mu = trigger_mu->checkIfFired(); + trigger_e->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged_e = trigger_e->checkIfFired(); + + + bool emdataset = dName.find("MuonEG")!=string::npos; + bool mmdataset = dName.find("DoubleM")!=string::npos; + bool eedataset = dName.find("DoubleE")!=string::npos; + bool mdataset = dName.find("SingleM")!=string::npos; + bool edataset = dName.find("SingleE")!=string::npos; + + bool EM = false; + bool MM = false; + bool EE = false; + bool E = false; + bool M = false; + int result_trigger = 0; + + + if(isData){ + EM = (trigged_emumu_mumue|| trigged_emu); + MM = (trigged_mumu || trigged_mumumu ) ; + EE = (trigged_ee || trigged_eee ); + M = ( trigged_mu ); + E = (trigged_e); + } + else if(synchex && !isData){ + EM = (trigged_emu); + MM = trigged_mumu; + EE = trigged_ee; + } + else{ + EM = (trigged_emumu_mumue|| trigged_emu); + MM = (trigged_mumu || trigged_mumumu ) ; + EE = (trigged_ee || trigged_eee ); + M = ( trigged_mu ); + E = (trigged_e); + } + if ( EM && (emdataset) ) result_trigger = 1; + if ( MM && !EM && (mmdataset) ) result_trigger = 1; + if ( EE && !EM && !MM && (eedataset) ) result_trigger = 1; + if ( M && !EM && !MM && !EE && (mdataset ) ) result_trigger = 1; + if ( E && !EM && !MM && !EE && !M && (edataset ) ) result_trigger = 1; + if(!synchex){ + if ( EM && !isData ) result_trigger = 1; + if ( MM && !EM && !isData ) result_trigger = 1; + if ( EE && !EM && !MM && !isData ) result_trigger = 1; + if ( M && !EM && !MM && !EE && !isData ) result_trigger = 1; + if ( E && !EM && !MM && !EE && !M && !isData ) result_trigger = 1; + } + if(synchex && !isData){ + if(EE && eee) result_trigger = 1; + if(EM && (eemu || mumue) ) result_trigger = 1; + if(MM && mumumu) result_trigger = 1; + if( (EE||MM||EM) && all ) result_trigger = 1; + } + + + + trigged = result_trigger; + if(dName.find("NP")!=string::npos) trigged = true; + + + } + else if(!runHLT && previousFilename != currentFilename) + { + filechanged = true; + previousFilename = currentFilename; + iFile++; + cout << "File changed!!! => iFile = " << iFile << endl; + trigged = true; + + } + else if(!runHLT) + { + trigged = true; + } + + if(verbose == 0) cout << "Apply trigger? " << runHLT << " trigged? " << trigged << endl; + + //////////////////////////// + ///// JES - JER smearing //// + ////////////////////////// + JERon = 0; + if(applyJER && !isData) + { + jetTools->correctJetJER(init_jets_corrected, genjets, mets[0], "nominal", false); + JERon = 1; + } + JESon = 0; + if(applyJES && !isData) + { + jetTools->correctJets(init_jets_corrected,event->fixedGridRhoFastjetAll() ,false); + JESon = 1; + } + + /////////////////////////////////////////////////////////// + // Event selection + /////////////////////////////////////////////////////////// + + // Declare selection instance + Run2Selection selection(init_jets_corrected, init_muons, init_electrons, mets,event->fixedGridRhoFastjetAll()); + PreselectedJets.clear(); + PreselectedJets = selection.GetSelectedJets(jet_pt_cut,jet_eta_cut, true, "Loose"); + selectedMuons.clear(); + selectedLooseMuons.clear(); + selectedMuons = selection.GetSelectedMuons(mu_pt_cut, mu_eta_cut, mu_iso_cut, "Tight", "Spring15"); + selectedLooseMuons = selection.GetSelectedMuons(mu_pt_cut, mu_eta_cut,0.2, "Loose", "Spring15"); + // pt, eta, iso // run normally + selectedElectrons.clear(); + selectedLooseElectrons.clear(); + selectedElectrons = selection.GetSelectedElectrons(el_pt_cut, el_eta_cut, "Tight","Spring15_25ns",true);// pt, eta + selectedLooseElectrons = selection.GetSelectedElectrons(el_pt_cut, el_eta_cut, "Veto","Spring15_25ns",true);// pt, eta + /// For MC Information + mcParticles.clear(); + if(!isData) treeLoader.LoadMCEvent(ievt, 0, mcParticles, false); + if(!isData) sort(mcParticles.begin(),mcParticles.end(),HighestPt()); + if (dName.find("NP_overlay_FCNC_TT")!=string::npos || dName.find("tZq")!=string::npos ) + { + nMCParticles = mcParticles.size(); + if (nMCParticles > maxMCParticles) maxMCParticles = nMCParticles; + for (Int_t iMC = 0; iMC < nMCParticles; iMC++) + { + mc_status[iMC] = mcParticles[iMC]->status(); + mc_pdgId[iMC] = mcParticles[iMC]->type(); + mc_mother[iMC] = mcParticles[iMC]->motherType(); + mc_granny[iMC] = mcParticles[iMC]->grannyType(); + mc_pt[iMC] = mcParticles[iMC]->Pt(); + mc_phi[iMC] = mcParticles[iMC]->Phi(); + mc_eta[iMC] = mcParticles[iMC]->Eta(); + mc_E[iMC] = mcParticles[iMC]->E(); + mc_M[iMC] = mcParticles[iMC]->M(); + } + } + // void TTreeLoader::LoadMCEvent(int, TopTree::TRootNPGenEvent*, std::vector&, bool) + if (verbose==0) cout <<"Number of Muons, Electrons, Jets ===> " << endl << selectedMuons.size() <<" " << selectedElectrons.size()<<" "<< PreselectedJets.size() << endl; + selectedJets.clear(); + if(applyJetLeptonCleaning){ + bool PushBack = true; + for(int iJ = 0; iJ < PreselectedJets.size() ; iJ++) + { + PushBack = true; + for(int iM = 0; iM < selectedMuons.size(); iM++){ + if( PreselectedJets[iJ]->DeltaR(*selectedMuons[iM]) < 0.4) { + PushBack = false; + break; + } + } + if(!PushBack) continue; + for(int iE = 0; iE < selectedElectrons.size(); iE++){ + if( PreselectedJets[iJ]->DeltaR(*selectedElectrons[iE]) < 0.3) { + PushBack = false; + break; + } + } + if(PushBack) selectedJets.push_back(PreselectedJets[iJ]); + } + } + else if(!applyJetLeptonCleaning) selectedJets = PreselectedJets; + if(debug) cout << evt_num << " init " << init_jets_corrected.size() << " sel " << selectedJets.size() << " bf cleaning " << PreselectedJets.size() << endl; + + //////////////////////////////////////////////// + // Pre cut operations + //////////////////////////////////////////////// + // Apply primary vertex selection + bool isGoodPV = selection.isPVSelected(vertex, 4, 24., 2); + // Met filters + if(HBHEnoise && HBHEIso && CSCTight && EcalDead && eeBad && isGoodPV) passedMET = true; + PassedMETFilter = passedMET; + + ////////////////////////////////////// + // B jet selection //// + /////////////////////////////////////// + + selectedCSVLBJets.clear(); + selectedCSVMBJets.clear(); + selectedCSVTBJets.clear(); + selectedCSVLLJets.clear(); + selectedCSVMLJets.clear(); + selectedCSVTLJets.clear(); + selectednonCSVLJets.clear(); + for(unsigned int iJ = 0; iJ < selectedJets.size(); iJ++) + { + if(selectedJets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() > workingpointvalue_Loose) selectedCSVLBJets.push_back(selectedJets[iJ]); + else selectedCSVLLJets.push_back(selectedJets[iJ]); + if(selectedJets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() > workingpointvalue_Medium) selectedCSVMBJets.push_back(selectedJets[iJ]); + else selectedCSVMLJets.push_back(selectedJets[iJ]); + if(selectedJets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() > workingpointvalue_Tight) selectedCSVTBJets.push_back(selectedJets[iJ]); + else selectedCSVTLJets.push_back(selectedJets[iJ]); + + } + WPb_L = workingpointvalue_Loose; + WPb_M = workingpointvalue_Medium; + WPb_T = workingpointvalue_Tight; + + //////////////////////////////////// + // Event Weights /// + /////////////////////////////////// + float btagWeight = 1.; + float bTagEff = 1.; + if( fillBtagHisto && !isData && !btagShape) + { + btwt->FillMCEfficiencyHistos(selectedJets); + + } + else if( !fillBtagHisto && !isData && !btagShape) + { + btagWeight = btwt->getMCEventWeight(selectedJets,false); + + } + else if( !isData && btagShape) + { + for(int intJet = 0; intJet < selectedJets.size(); intJet++) + { + float jetpt = selectedJets[intJet]->Pt(); + if(jetpt > 1000.) jetpt = 999.; + float jeteta = selectedJets[intJet]->Eta(); + float jetdisc = selectedJets[intJet]->btag_combinedInclusiveSecondaryVertexV2BJetTags(); + BTagEntry::JetFlavor jflav; + int jetpartonflav = std::abs(selectedJets[intJet]->partonFlavour()); + if(debug) cout<<"parton flavour: "<eval(jflav, jeteta, jetpt, jetdisc); + btagWeight *= bTagEff; + + } + + } + float PUweight = 1; + if(!isData) + { + PUweight = LumiWeights.ITweight((int)event->nTruePU()); + + + } + + + /////////////////////////////// + //// Matching + ////////////////////////////// + if(dName.find("NP_overlay_FCNC_TT")!=string::npos || dName.find("tZq")!=string::npos) matching = true; + //cout << "matching " << matching << endl; + + if(matching){ + //cout << "in matching" << endl; + int pdgID_charm = 4; + vector mcParticlesMatching_; + + if(dName.find("NP_overlay_FCNC_TT")!=string::npos || dName.find("tZq")!=string::npos){ + mcParticlesTLV.clear(); selectedJetsTLV.clear(); + + for (unsigned int i = 0; i < mcParticles.size(); i++) + { + if(verbose>3) cout << setw(3) << right << i << " Status: " << setw(2) << mcParticles[i]->status() << " pdgId: " << setw(3) << mcParticles[i]->type() << " Mother: " << setw(4) << mcParticles[i]->motherType() << " Granny: " << setw(4) << mcParticles[i]->grannyType() << " Pt: " << setw(7) << left << mcParticles[i]->Pt() << " Eta: " << mcParticles[i]->Eta() << endl; + + if ( (mcParticles[i]->status() > 1 && mcParticles[i]->status() <= 20) || mcParticles[i]->status() >= 30 ) continue; /// Final state particle or particle from hardest process + //if(fabs(mcParticles[i]->motherType()) == 23) cout << setw(3) << right << i << " Status: " << setw(2) << mcParticles[i]->status() << " pdgId: " << setw(3) << mcParticles[i]->type() << " Mother: " << setw(4) << mcParticles[i]->motherType() << " Granny: " << setw(4) << mcParticles[i]->grannyType() << " Pt: " << setw(7) << left << mcParticles[i]->Pt() << " Eta: " << mcParticles[i]->Eta() << endl; + + + // if ( fabs(mcParticles[i]->type()) == pdgID_charm && fabs(mcParticles[i]->motherType()) == 6) + // cQuark = *mcParticles[i]; + + + + if ( fabs(mcParticles[i]->type()) == pdgID_charm && fabs(mcParticles[i]->motherType()) == 6){ + mcParticlesTLV.push_back(*mcParticles[i]); + //mcParticlesMatching_.push_back(mcParticles[i]); + + } + + + } + } + + + + // take all the selectedJets_ to study the radiation stuff, selectedJets_ are already ordened in decreasing Pt() + for (unsigned int i = 0; i < selectedCSVLLJets.size(); i++) + { + selectedJetsTLV.push_back(*selectedCSVLLJets[i]); + } + //cout << "selectedJetsTLV.size() = " << selectedJetsTLV.size() << endl; + + JetPartonMatching matching = JetPartonMatching(mcParticlesTLV, selectedJetsTLV, 2, true, true, 0.3); // partons, jets, choose algorithm, use maxDist, use dR, set maxDist=0.3 + + if (matching.getNumberOfAvailableCombinations() != 1) + cerr << "matching.getNumberOfAvailableCombinations() = " << matching.getNumberOfAvailableCombinations() << " . This should be equal to 1 !!!" << endl; + + JetPartonPair.clear(); // First one is jet number, second one is mcParticle number + //cout << "mcParticlesTLV.size() " << mcParticlesTLV.size() << endl; + + for (unsigned int i = 0; i < mcParticlesTLV.size(); i++) + { + + int matchedJetNumber = matching.getMatchForParton(i, 0); + if (matchedJetNumber > -1){ + JetPartonPair.push_back( pair (matchedJetNumber, i) ); + //cout << "Matched Jet number " << matchedJetNumber << endl; + } + } + + + } + + //////////////////////////////////// + // Determine eventweight /// + ///////////////////////////////// + + histo1D["init_nPVs_before"]->Fill(vertex.size(), eventweight); + if(applyPU && !isData) eventweight *= PUweight; + histo1D["init_nPVs_after"]->Fill(vertex.size(), eventweight); + + ////////////////////////////////////////////////////// + // determine channels for synch + ////////////////////////////////////////////////////// + /* if(selectedJets.size() > 0){ + leading_jetPt = selectedJets[0]->Pt(); + leading_jet_btagDiscr = selectedJets[0]->btag_combinedInclusiveSecondaryVertexV2BJetTags(); + } + + if(selectedMuons.size() > 2 && selectedElectrons.size() <= 2) { + channel = "mmm"; + pt_lept1 = selectedMuons[0]->Pt(); + pt_lept2 = selectedMuons[1]->Pt(); + pt_lept3 = selectedMuons[2]->Pt(); + iso_lept1 = IsoDBeta( selectedMuons[0]); + iso_lept2 = IsoDBeta(selectedMuons[1]); + iso_lept3 = IsoDBeta(selectedMuons[2]); + } + else if(selectedElectrons.size() > 2 && selectedMuons.size() <= 2){ + channel = "eee"; + pt_lept1 = selectedElectrons[0]->Pt(); + pt_lept2 = selectedElectrons[1]->Pt(); + pt_lept3 = selectedElectrons[2]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept2 = relPfIsoEl(selectedElectrons[1],event->fixedGridRhoFastjetAll()); + iso_lept3 = relPfIsoEl(selectedElectrons[2],event->fixedGridRhoFastjetAll()); + + } + else if(selectedElectrons.size() > 2 && selectedMuons.size() > 2){ + cout << "SOMETHING IS WRONG " << endl; + } + else if(selectedElectrons.size() == 2 && selectedMuons.size() == 1){ + channel = "eem"; + if(selectedMuons[0]->Pt() > selectedElectrons[0]->Pt()){ + pt_lept1 = selectedMuons[0]->Pt(); + pt_lept2 = selectedElectrons[0]->Pt(); + pt_lept3 = selectedElectrons[1]->Pt(); + iso_lept1 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept2 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept3 = relPfIsoEl(selectedElectrons[1],event->fixedGridRhoFastjetAll()); + } + else if(selectedMuons[0]->Pt() < selectedElectrons[1]->Pt()){ + pt_lept3 = selectedMuons[0]->Pt(); + pt_lept1 = selectedElectrons[0]->Pt(); + pt_lept2 = selectedElectrons[1]->Pt(); + iso_lept3 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept2 = relPfIsoEl(selectedElectrons[1],event->fixedGridRhoFastjetAll()); + } + else { + pt_lept2 = selectedMuons[0]->Pt(); + pt_lept1 = selectedElectrons[0]->Pt(); + pt_lept3 = selectedElectrons[1]->Pt(); + iso_lept2 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept3 = relPfIsoEl(selectedElectrons[1],event->fixedGridRhoFastjetAll()); + } + + } + else if(selectedElectrons.size() == 1 && selectedMuons.size() == 2){ + channel = "mme"; + if(selectedElectrons[0]->Pt() > selectedMuons[0]->Pt()){ + pt_lept1 = selectedElectrons[0]->Pt(); + pt_lept2 = selectedMuons[0]->Pt(); + pt_lept3 = selectedMuons[1]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept2 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept3 = (selectedMuons[1]->chargedHadronIso(4) + std::max(0.0, selectedMuons[1]->neutralHadronIso(4) + selectedMuons[1]->photonIso(4) - 0.5*selectedMuons[1]->puChargedHadronIso(4)))/selectedMuons[1]->Pt(); + + + } + else if(selectedElectrons[0]->Pt() < selectedMuons[1]->Pt()){ + pt_lept3 = selectedElectrons[0]->Pt(); + pt_lept1 = selectedMuons[0]->Pt(); + pt_lept2 = selectedMuons[1]->Pt(); + iso_lept3 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept1 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept2 = (selectedMuons[1]->chargedHadronIso(4) + std::max(0.0, selectedMuons[1]->neutralHadronIso(4) + selectedMuons[1]->photonIso(4) - 0.5*selectedMuons[1]->puChargedHadronIso(4)))/selectedMuons[1]->Pt(); + } + else { + pt_lept2 = selectedElectrons[0]->Pt(); + pt_lept1 = selectedMuons[0]->Pt(); + pt_lept3 = selectedMuons[1]->Pt(); + iso_lept2 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + iso_lept1 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept3 = (selectedMuons[1]->chargedHadronIso(4) + std::max(0.0, selectedMuons[1]->neutralHadronIso(4) + selectedMuons[1]->photonIso(4) - 0.5*selectedMuons[1]->puChargedHadronIso(4)))/selectedMuons[1]->Pt(); + } + } + else{ + if(selectedMuons.size() == 2) + { + id_lept3 = 0; + pt_lept1 = selectedMuons[0]->Pt(); + pt_lept2 = selectedMuons[1]->Pt(); + iso_lept1 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); // TO BE CHECKED + iso_lept2 = (selectedMuons[1]->chargedHadronIso(4) + std::max(0.0, selectedMuons[1]->neutralHadronIso(4) + selectedMuons[1]->photonIso(4) - 0.5*selectedMuons[1]->puChargedHadronIso(4)))/selectedMuons[1]->Pt(); + } + else if(selectedElectrons.size() == 2){ + id_lept3 = 0; + pt_lept1 = selectedElectrons[0]->Pt(); + pt_lept2 = selectedElectrons[1]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); // TO BE CHECKED + iso_lept2 = relPfIsoEl(selectedElectrons[1],event->fixedGridRhoFastjetAll()); + } + else if(selectedMuons.size() == 1 && selectedElectrons.size() == 1){ + id_lept3 = 0; + if(selectedMuons[0]->Pt() > selectedElectrons[0]->Pt()){ + pt_lept1 = selectedMuons[0]->Pt(); + pt_lept2 = selectedElectrons[0]->Pt(); + iso_lept1 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept2 = relPfIsoEl(selectedElectrons[0],event->fixedGridRhoFastjetAll()); + } + else{ + pt_lept2 = selectedMuons[0]->Pt(); + pt_lept1 = selectedElectrons[0]->Pt(); + iso_lept2 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0], event->fixedGridRhoFastjetAll()); + } + } + else if(selectedMuons.size() == 1){ + id_lept3 = 0; + id_lept2 = 0; + pt_lept1 = selectedMuons[0]->Pt(); + iso_lept1 = (selectedMuons[0]->chargedHadronIso(4) + std::max(0.0, selectedMuons[0]->neutralHadronIso(4) + selectedMuons[0]->photonIso(4) - 0.5*selectedMuons[0]->puChargedHadronIso(4)))/selectedMuons[0]->Pt(); + } + else if(selectedElectrons.size() == 1 && selectedMuons.size()==0){ + id_lept3 = 0; + id_lept2 = 0; + pt_lept1 = selectedElectrons[0]->Pt(); + iso_lept1 = relPfIsoEl(selectedElectrons[0], event->fixedGridRhoFastjetAll()); + + } + channel = "nan"; + } */ + + ////////////////////////////////////////////////////// + // Applying baseline selection + ////////////////////////////////////////////////////// + continueFlow = true; + nbEvents++; + eventweight = 1.; + if(trigged){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(0., eventweight); + nCuts++; + nbEvents_0++; + for(int iMu = 0; iMu < init_muons.size(); iMu++){ + muIniFile << "EvtNb="<< evt_num << " mu_pt=" << init_muons[iMu]->Pt() <<" mu_eta=" << init_muons[iMu]->Eta() << " mu_phi=" << init_muons[iMu]->Phi() << " mu_iso=" << IsoDBeta(init_muons[iMu]) << endl; + } + } + } + else{ + selections.push_back(0); + continueFlow = false; + } + if(dName.find("DoubleEG")!=string::npos && selectedElectrons.size() < 2) { continueFlow = false; } + else if(dName.find("DoubleEG")!=string::npos) { nbEvents_test++ ;} + if(dName.find("DoubleMu")!=string::npos && selectedMuons.size() < 2) { continueFlow = false; } + else if(dName.find("DoubleMu")!=string::npos) { nbEvents_test++ ;} + if(dName.find("MuonEG")!=string::npos && (selectedElectrons.size() < 1 || selectedMuons.size() < 1)) { continueFlow = false; } + else if(dName.find("MuonEG")!=string::npos){ nbEvents_test++ ;} + + if(all && ((selectedMuons.size() + selectedElectrons.size()) != 3)){ + selections.push_back(0); + continueFlow = false; + } + else if(all && ((selectedMuons.size() + selectedElectrons.size()) == 3)){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(1., eventweight); + nCuts++; + nbEvents_1++; + } + lep3 = true; + } + if(mumumu && (selectedMuons.size() != 3 || selectedElectrons.size() != 0)){ + selections.push_back(0); + continueFlow = false; + } + else if(mumumu && (selectedMuons.size() == 3)){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(1., eventweight); + nCuts++; + nbEvents_1++; + } + lep3 = true; + } + if(eee && (selectedElectrons.size() != 3 || selectedMuons.size() != 0)){ + selections.push_back(0); + continueFlow = false; + } + else if(eee && (selectedElectrons.size() == 3)){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(1., eventweight); + nCuts++; + nbEvents_1++; + } + lep3 = true; + } + if(eemu && (selectedMuons.size() != 1|| selectedElectrons.size() != 2)){ + selections.push_back(0); + continueFlow = false; + } + else if(eemu && (selectedMuons.size()+ selectedElectrons.size() != 3)){ + selections.push_back(0); + continueFlow = false; + + } + else if(eemu && (selectedMuons.size() == 1 && selectedElectrons.size() == 2)){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(1., eventweight); + nCuts++; + nbEvents_1++; + } + lep3 = true; + } + if(mumue && (selectedMuons.size() != 2 || selectedElectrons.size() != 1)){ + selections.push_back(0); + continueFlow = false; + } + else if(mumue && (selectedMuons.size()+ selectedElectrons.size() != 3)){ + selections.push_back(0); + continueFlow = false; + + } + else if(mumue && (selectedMuons.size() == 2 && selectedElectrons.size() == 1)){ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(1., eventweight); + nCuts++; + nbEvents_1++; + } + lep3 = true; + } + + + + if(selectedMuons.size() == selectedLooseMuons.size() && continueFlow) nbEvents_1m++; + else continueFlow = false; + if(selectedLooseElectrons.size() == selectedElectrons.size() && continueFlow) nbEvents_2m++; + else continueFlow = false; + if((selectedMuons.size() != selectedLooseMuons.size()) || (selectedLooseElectrons.size() != selectedElectrons.size())){ + selections.push_back(0); + continueFlow = false; + } + else { + selections.push_back(1); + /* for(int iMu = 0; iMu < selectedMuons.size(); iMu++){ + muSelFile << "EvtNb="<< evt_num << " mu_pt=" << selectedMuons[iMu]->Pt() <<" mu_eta=" << selectedMuons[iMu]->Eta() << " mu_phi=" << selectedMuons[iMu]->Phi() << " mu_iso=" << IsoDBeta(selectedMuons[iMu]) << endl; + }*/ + } + if(continueFlow) lepsel = true; + double met_px = mets[0]->Px(); + double met_py = mets[0]->Py(); + met_Pt = sqrt(met_px*met_px + met_py*met_py); + met = met_Pt; + met_Phi = mets[0]->Phi(); + met_Eta = mets[0]->Eta(); + + puSF = PUweight; + if(!isData) btagSF = btagWeight; + if(isData) btagSF = 1.; + + Zlep0.Clear(); + Zlep1.Clear(); + Wlep.Clear(); + Wlep.SetPxPyPzE(0,0,0,0); + + // check sign + bool OS = false; + if(lep3){ AssignedLeptons = LeptonAssigner(selectedElectrons, selectedMuons); } + if(Assigned){ + OS = true; + + Zlep0.SetPxPyPzE(AssignedLeptons[0].Px(), AssignedLeptons[0].Py(), AssignedLeptons[0].Pz(), AssignedLeptons[0].Energy()); + Zlep1.SetPxPyPzE(AssignedLeptons[1].Px(), AssignedLeptons[1].Py(), AssignedLeptons[1].Pz(), AssignedLeptons[1].Energy()); + Wlep.SetPxPyPzE(AssignedLeptons[2].Px(), AssignedLeptons[2].Py(), AssignedLeptons[2].Pz(), AssignedLeptons[2].Energy()); + } + if(!OS){ + continueFlow = false; + //coninue; + } + else if(continueFlow){ + histo1D["cutFlow"]->Fill(2., eventweight); + nCuts++; + nbEvents_2++; + } + Zboson.Clear(); + if(OS && continueFlow){ + Zboson.SetPxPyPzE(( Zlep0 + Zlep1).Px() ,( Zlep0 + Zlep1).Py(),( Zlep0 + Zlep1).Pz(),( Zlep0 + Zlep1).Energy()) ; + Zboson_M = (Zlep0+Zlep1).M(); + Zboson_Px = ( Zlep0 + Zlep1).Px(); + Zboson_Py = ( Zlep0 + Zlep1).Py(); + Zboson_Pz = ( Zlep0 + Zlep1).Pz(); + Zboson_Energy = ( Zlep0 + Zlep1).Energy(); + } + else { + Zboson_M = 0; + Zboson_Px = -5; + Zboson_Py = -5; + Zboson_Pz = -5; + Zboson_Energy = -5; + } + // cout << " Zmass" << Zboson_M << endl; + + + //if((Zlep0+Zlep1).M() < 0) cout << "evtnr " << evt_num << " - mass " << (Zlep0+Zlep1).M() << endl; + //if(Zboson.M() < 0) cout << "evtnr " << evt_num << " - mass " << Zboson.M() << endl; + + if(Zboson_M < 76 || Zboson_M > 106) + { + selections.push_back(0); + continueFlow = false; + eventSelected = false; + // continue; + } + else{ + selections.push_back(1); + if(continueFlow){ + nCuts++; + nbEvents_3++; + histo1D["cutFlow"]->Fill(3., eventweight); + baseSelected = true; + } + } + + // if((Zlep0+Zlep1).M() < 0) cout << "continueFlow " << continueFlow << endl; + // if(Zboson.M() != (Zlep0+Zlep1).M() && continueFlow ) cout << "evt " << evt_num << " " << (Zlep0+Zlep1).M() << " vs " << (double) Zboson.M() << endl; + + if(selectedJets.size() ==0){ //synch selectedJets.size() == 0 + selections.push_back(0); + continueFlow = false; + // continue; + } + else{ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(4., eventweight); + nCuts++; + nbEvents_4++; + } + } + // cout << " after " << nCuts << " " << nbEvents_3 << endl; + if(selectedCSVLBJets.size() != 1){ + selections.push_back(0); + continueFlow = false; + //continue; + } + else{ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(5., eventweight); + nCuts++; + nbEvents_5++; + } + } + //double mWtsecond = 0.; + + if(lepsel && synchex){ + for(int iJet = 0; iJet < selectedJets.size(); iJet++){ + TRootPFJet* tempJet = (TRootPFJet*) selectedJets[iJet]; + double ptTemp = sqrt(tempJet->Px()*tempJet->Px()+tempJet->Py()*tempJet->Py()); + jetFile << "EvtNb="<< evt_num << " jet_pt=" << tempJet->Pt() <<" jet_eta=" << tempJet->Eta() << " jet_phi=" << tempJet->Phi() << " jet_bdis=" << tempJet->btag_combinedInclusiveSecondaryVertexV2BJetTags() << " NEMfraction=" << tempJet->neutralEmEnergyFraction() << " CEMfraction=" << tempJet->chargedEmEnergyFraction() << " NHfraction=" << tempJet->neutralHadronEnergyFraction() << " CHfraction=" << tempJet->chargedHadronEnergyFraction() << " Cmult=" << tempJet->chargedMultiplicity() << " nConst=" << tempJet->nConstituents() << endl; + } + } + + + if(Assigned){ + //double phis = Wlep.Phi() - mets[0]->Phi(); + //double cosphis = TMath::Cos(phis); + mWt = TMath::Sqrt((Wlep.Pt() + met_Pt)*(Wlep.Pt() +met_Pt)-(Wlep.Px() + met_px)*(Wlep.Px() + met_px) - (Wlep.Py() + met_py)* (Wlep.Py() + met_py)); + //mWtsecond = TMath::Sqrt(2*Wlep.Pt() * met_Pt*(1-cosphis)); + } + + else mWt = 0.; + if(synchex && lepsel) mWtFile << "EvtNb="<< evt_num << " wLep_pt=" << Wlep.Pt() << " wLep_eta=" << Wlep.Eta() << " wLep_phi=" << Wlep.Phi() << endl; + if(mWt < 20){ + selections.push_back(0); + continueFlow = false; + } + else{ + + selections.push_back(1); + if(continueFlow){ + // mWtFile << evt_num << endl; + histo1D["cutFlow"]->Fill(6., eventweight); + nCuts++; + nbEvents_6++; + } + } + // double met_pz = MEtz(Wmu, Wel, Wlep, met_px, met_py); + double met_pz = 0.; // has to be adapted !!! + metTLVbf.SetPxPyPzE(met_px,met_py,met_pz,TMath::Sqrt(met_px*met_px+met_py*met_py+met_pz*met_pz)); + metTLV = MetzCalculator(Wlep, metTLVbf); + met_Px = metTLV.Px(); + met_Py = metTLV.Py(); + met_Pz = metTLV.Pz(); + SMbjet.Clear(); + SMtop.Clear(); + if(selectedCSVLBJets.size() ==1 ){ + SMbjet.SetPxPyPzE(selectedCSVLBJets[0]->Px(),selectedCSVLBJets[0]->Py(),selectedCSVLBJets[0]->Pz(),selectedCSVLBJets[0]->Energy()); + if(Assigned) { + SMtop_M = (Wlep+SMbjet+metTLV).M(); + + SMtop.SetPxPyPzE((SMbjet.Px()+Wlep.Px()+metTLV.Px()),(SMbjet.Py()+Wlep.Py()+metTLV.Py()),(SMbjet.Pz()+Wlep.Pz()+metTLV.Pz()),(SMbjet.Energy()+Wlep.Energy()+metTLV.Energy())); + mlb = (Wlep+SMbjet).M(); + dRWlepb = Wlep.DeltaR(SMbjet); + dRZb = Zboson.DeltaR(SMbjet); + dPhiWlepb = Wlep.DeltaPhi(SMbjet); + dPhiZb = Zboson.DeltaPhi(SMbjet); + } + else { + SMtop_M = 0.; + mlb = 0.; + dRWlepb = -5; + dRZb = -5; + } + } + else SMtop_M = 0. ; + /* if(continueFlow && synchex) topFile << "EvtNb="<< evt_num << " Bjet_pt=" << SMbjet.Pt() <<" Bjet_px=" << SMbjet.Px() << " Bjet_py=" << SMbjet.Py() << " Bjet_pz()=" << SMbjet.Pz() << " Bjet_Energy=" << SMbjet.Energy() << " Wlep_pt=" << Wlep.Pt() <<" Wlep_px=" << Wlep.Px() << " Wlep_py=" << Wlep.Py() << " Wlep_pz()=" << Wlep.Pz() << " Wlep_Energy=" << Wlep.Energy() << " met_Pt=" << metTLV.Pt() <<" met_px=" << metTLV.Px() << " met_py=" << metTLV.Py() << " met_pz()=" << metTLV.Pz() << " met_Energy=" << metTLV.Energy() << " topmass= " << SMtop_M << endl; + */ + cjet.Clear(); + FCNCtop.Clear(); + if(Assigned && continueFlow && selectedJets.size()>1) { + cjet = FCNCjetCalculator(selectedCSVLLJets,selectedCSVLBJets, Zboson ,3); + FCNCtop.SetPxPyPzE((cjet+Zboson).Px(), (cjet+Zboson).Py(), (cjet+Zboson).Pz(), (cjet+Zboson).Energy()); + //if((Zboson+cjet).M() <0 ) cout << "event: " << evt_num << " - Zboson.M()= " << Zboson.M() << " - cjet.M()= " << cjet.M() << " - top.M()= " << (Zboson+cjet).M() << endl; + FCNCtop_M = (Zlep0+Zlep1+cjet).M(); + cjet_Pt = TMath::Sqrt(cjet.Px()*cjet.Px()+cjet.Py()*cjet.Py()); + dRZc = Zboson.DeltaR(cjet); + dRWlepc = Wlep.DeltaR(cjet); + dPhiZc = Zboson.DeltaPhi(cjet); + dPhiWlepc = Wlep.DeltaPhi(cjet); + dRSMFCNCtop = SMtop.DeltaR(FCNCtop); + dPhiSMFCNCtop = SMtop.DeltaPhi(FCNCtop); + + } + else { + FCNCtop_M = 0.; + // cout << "event: " << evt_num << " - Zboson.M()= " << Zboson.M() << " - cjet.M()= " << cjet.M() << " - top.M()= " << (Zboson+cjet).M() << endl; + dRZc = -5; + dRWlepc = -5; + dPhiWlepc = -5; + dPhiZc = -5; + dRSMFCNCtop = -5 ; + dPhiSMFCNCtop = -5; + cjet_Pt = -5; + } + + + + if(SMtop_M < 95 || SMtop_M > 200 ){ + selections.push_back(0); + continueFlow = false; + // continue; + } + else{ + selections.push_back(1); + if(continueFlow){ + histo1D["cutFlow"]->Fill(7., eventweight); + nCuts++; + nbEvents_7++; + eventSelected = true; + } + } + + // if(continueFlow) eventSelected = true; + // else eventSelected = false; + if(passedMET && continueFlow){ + histo1D["cutFlow"]->Fill(8., eventweight); + nCuts++; + nbEvents_8++; + } + ////////////////////////////////////// + // DO STUFF WITH SELECTED EVENTS //// + ////////////////////////////////////// + // fill the tree + if(eventSelected || baseSelected){ + nJets = 0; + for(Int_t seljet = 0; seljet < selectedJets.size(); seljet++) + { + + pt_jet[nJets]=selectedJets[seljet]->Pt(); + phi_jet[nJets]=selectedJets[seljet]->Phi(); + eta_jet[nJets]=selectedJets[seljet]->Eta(); + E_jet[nJets]=selectedJets[seljet]->E(); + charge_jet[nJets]=selectedJets[seljet]->charge(); + bdisc_jet[nJets]=selectedJets[seljet]->btag_combinedInclusiveSecondaryVertexV2BJetTags() ; + cdiscCvsB_jet[nJets]=selectedJets[seljet]->ctag_pfCombinedCvsBJetTags() ; + cdiscCvsL_jet[nJets]=selectedJets[seljet]->ctag_pfCombinedCvsLJetTags() ; + nJets++; + } + if(selectedJets.size()>0) cdiscCvsB_jet_1 = selectedJets[0]->ctag_pfCombinedCvsBJetTags(); + if(selectedJets.size()>0) cdiscCvsL_jet_1 = selectedJets[0]->ctag_pfCombinedCvsLJetTags(); + if(selectedJets.size()>0) pt_jet_1 = selectedJets[0]->Pt(); + if(selectedJets.size()>1) pt_jet_2 = selectedJets[1]->Pt(); + if(selectedJets.size()>2) pt_jet_3 = selectedJets[2]->Pt(); + nJets_CSVT = selectedCSVTBJets.size(); + nJets_CSVM = selectedCSVMBJets.size(); + nJets_CSVL = selectedCSVLBJets.size(); + nMuons = 0; + for (Int_t selmu =0; selmu < selectedMuons.size() ; selmu++ ) + { + + pt_muon[nMuons]=selectedMuons[selmu]->Pt(); + phi_muon[nMuons]=selectedMuons[selmu]->Phi(); + eta_muon[nMuons]=selectedMuons[selmu]->Eta(); + E_muon[nMuons]=selectedMuons[selmu]->E(); + + pfIso_muon[nMuons]=selectedMuons[selmu]->relPfIso(4,0); + if(!isData) + { + MuonIDSF[nMuons] = muonSFWeightID_T->at(selectedMuons[selmu]->Eta(), selectedMuons[selmu]->Pt(), 0); + MuonIsoSF[nMuons] = muonSFWeightIso_TT->at(selectedMuons[selmu]->Eta(), selectedMuons[selmu]->Pt(), 0); + } + else + { + MuonIDSF[nMuons] = 1.; + MuonIsoSF[nMuons] = 1.; + } + charge_muon[nMuons]=selectedMuons[selmu]->charge(); + nMuons++; + } + if(selectedMuons.size()>0) pt_muon_1 = selectedMuons[0]->Pt(); + if(selectedMuons.size()>1) pt_muon_2 = selectedMuons[1]->Pt(); + if(selectedMuons.size()>2) pt_muon_3 = selectedMuons[2]->Pt(); + nElectrons=0; + for (Int_t selel =0; selel < selectedElectrons.size() ; selel++ ) + { + + pt_electron[nElectrons]=selectedElectrons[selel]->Pt(); + phi_electron[nElectrons]=selectedElectrons[selel]->Phi(); + eta_electron[nElectrons]=selectedElectrons[selel]->Eta(); + eta_superCluster_electron[nElectrons]=selectedElectrons[selel]->superClusterEta(); + E_electron[nElectrons]=selectedElectrons[selel]->E(); + pfIso_electron[nElectrons]=selectedElectrons[selel]->relPfIso(3,0); + charge_electron[nElectrons]=selectedElectrons[selel]->charge(); + if(!isData) ElectronSF[nElectrons] = electronSFWeight->at(selectedElectrons[selel]->Eta(),selectedElectrons[selel]->Pt(),0)*electronSFWeightReco->at(selectedElectrons[selel]->Eta(),selectedElectrons[selel]->Pt(),0); + else ElectronSF[nElectrons] = 1.; + + nElectrons++; + } + if(selectedElectrons.size()>0) pt_electron_1 = selectedElectrons[0]->Pt(); + if(selectedElectrons.size()>1) pt_electron_2 = selectedElectrons[1]->Pt(); + if(selectedElectrons.size()>2) pt_electron_3 = selectedElectrons[2]->Pt(); + + + nLeptons = nMuons + nElectrons; + + } + + if(eventSelected){ + nbSelectedEvents++; + myTree->Fill(); + } + if(baseSelected){ baselineTree->Fill(); } + if(selections.size() != 8) cout << "ERROR SOMETHING WENT WRONG WITH THE SELECTIONS " << endl; + for(int inb = 0; inb 0 jet: " << nbEvents_4 << endl; + cout << "nbEvents_5 1 bjet: " << nbEvents_5 << endl; + cout << "nbEvents_6 mWt: " << nbEvents_6 << endl; + cout << "nbEvents_7 SMtop: " << nbEvents_7 << endl; + cout << "nbEvents_8 MET: " << nbEvents_8 << endl; + + + nTrigg = nbEvents_0; + n3lep = nbEvents_1; + nVetoMu = nbEvents_1m; + nVetoEl = nbEvents_2m; + nOS = nbEvents_2; + nZmass = nbEvents_3; + nJet = nbEvents_4; + nBJet = nbEvents_5; + nMWT = nbEvents_6; + nSMtop = nbEvents_7; + nMET= nbEvents_8; + + + + + + if(matching) cout << "Percentage matched: " << (double) nMatched / (nMatched + nNonMatched) << endl; + // for(int j = 0; j < 9; j++){ cout << cutstep[j] << endl; } + sumW = (int) sumWeights; + nEv = (int) nEvents; + + globalTree->Fill(); + if(verbose == 0) cout << "end eventloop" << endl; + + cout << nbSelectedEvents << " events out of initial " << nbEvents << " selected " << endl; + cout << nbSelectedEvents << " events out of trigged " << nbTrig << " selected " << endl; + cout << setprecision(2) << ((double)nbTrig/(double)nbEvents)*100 << " % of the initial events stay after Trigger" << endl; + + if (! isData ) + { + cout << "Data set " << datasets[d]->Title() << " has " << nofPosWeights << " events with positive weights and " << nofNegWeights << " events with negative weights." << endl; + cout << " Pos - neg is " << nofPosWeights - nofNegWeights << ", pos + neg is " << nofPosWeights + nofNegWeights << endl; + cout << "The sum of the weights is " << ((int)sumWeights) << ", whereas the total number of events is " << ((int)nEvents) << endl; + + // Determine scale factor due to negative weights + nloSF = ((double) (nofPosWeights - nofNegWeights))/((double) (nofPosWeights + nofNegWeights)); + cout << "This corresponds to an event scale factor of " << nloSF << endl; + } + if(synchex){ + infoFile.close(); + isoFile.close(); + topFile.close(); + jetFile.close(); + jetJECFile.close(); + jetSelFile.close(); + muSelFile.close(); + mWtFile.close(); + muIniFile.close(); + } + tupfile->cd(); + myTree->Write(); + globalTree->Write(); + baselineTree->Write(); + tupfile->Close(); + delete tupfile; + if(!isData && !btagShape) delete btwt; + // if(!isData && fillBtagHisto) delete btwt; + treeLoader.UnLoadDataset(); + } //End Loop on Datasets + + + + ///////////// + // Writing // + ///////////// + + cout << " - Writing outputs to the files ..." << endl; + + + + fout-> cd(); + for (map::const_iterator it = histo1D.begin(); it != histo1D.end(); it++) + { + cout << "1D Plot: " << it->first << endl; + TCanvas *ctemp = new TCanvas(); + ctemp->cd(); + TH1F *temp = it->second; + temp->Draw(); + delete ctemp; + } + for (map::const_iterator it = histo2D.begin(); it != histo2D.end(); it++) + { + cout << "2D Plot: " << it->first << endl; + TCanvas *ctemp = new TCanvas(); + ctemp->cd(); + TH2F *temp = it->second; + temp->Draw(); + delete ctemp; + } + fout->Write(); + fout->Close(); + delete fout; + + + cout << "It took us " << ((double)clock() - start) / CLOCKS_PER_SEC << " to run the program" << endl; + cout << "********************************************" << endl; + cout << " End of the program !! " << endl; + cout << "********************************************" << endl; + + return 0; +}; + + +double MEtz(bool mu, bool el, TLorentzVector Wlep, double MetPx, double MetPy) +{ + double M_W = 80.4; + double M_mu = 0.10566; // 105.66 MeV/c^2 + double M_el = 0.000510999; // 0.510998910 Mev/c^2 + double emu = Wlep.E(); + double pxmu = Wlep.Px(); + double pymu = Wlep.Py(); + double pzmu = Wlep.Pz(); + double pxnu = MetPx; + double pynu = MetPy; + double pznu = 0.; + if(el && ! mu) M_mu = M_el; + + double a = M_W*M_W - M_mu*M_mu + 2.0*pxmu*pxnu + 2.0*pymu*pynu; + double A = 4.0*(emu*emu - pzmu*pzmu); + double B = -4.0*a*pzmu; + double C = 4.0*emu*emu*(pxnu*pxnu + pynu*pynu) - a*a; + + + bool isComplex_ = false; + double tmproot = B*B - 4.0*A*C; + + if (tmproot<0) { + isComplex_= true; + pznu = - B/(2*A); // take real part of complex roots + } + else { + isComplex_ = false; + double tmpsol1 = (-B + TMath::Sqrt(tmproot))/(2.0*A); + double tmpsol2 = (-B - TMath::Sqrt(tmproot))/(2.0*A); + + if (TMath::Abs(tmpsol2-pzmu) < TMath::Abs(tmpsol1-pzmu)) { pznu = tmpsol2;} + else pznu = tmpsol1; + + + } + return pznu; + +} +; + +TLorentzVector FCNCjetCalculator(std::vector nonBJets,std::vector BJets, TLorentzVector recoZ ,int verb) +{ + TLorentzVector FCNCjet; + FCNCjet.Clear(); + + + double TempMinMass = 100000.00; + double TopMass = 172.9; + TLorentzVector Jetcandidate; + int NbInColl = -1; + if(nonBJets.size() != 0){ + //cout << " non bjets: " << nonBJets.size() << " possibilities " <Px(),nonBJets[iJ]->Py(),nonBJets[iJ]->Pz(),nonBJets[iJ]->Energy()); + //cout << iJ << " tempMinM " << TempMinMass << " newmass " << (recoZ+Jet).M() ; + if(fabs((recoZ+Jet).M() - TopMass) < TempMinMass) + { + TempMinMass = fabs((recoZ+Jet).M() - TopMass); + Jetcandidate.SetPxPyPzE(Jet.Px(), Jet.Py(), Jet.Pz(), Jet.E()); + NbInColl = iJ; + + } + //cout << " NbInColl is " << iJ << endl; + + } + FCNCjet.SetPxPyPzE(nonBJets[NbInColl]->Px(),nonBJets[NbInColl]->Py(),nonBJets[NbInColl]->Pz(),nonBJets[NbInColl]->Energy()); + if(matching && JetPartonPair.size()>0) { + if(JetPartonPair[0].first == NbInColl) nMatched++; + else nNonMatched++; + } + } + /*else if(BJets.size() > 1){ // due to selection criteria, this possibility is never there + //cout << " bjets: " << BJets.size()-1 << " possibilities " << endl; + for(unsigned int iJ = 1; iJ < BJets.size(); iJ++) + { + TLorentzVector Jet; + Jet.SetPxPyPzE(BJets[iJ]->Px(),BJets[iJ]->Py(),BJets[iJ]->Pz(),BJets[iJ]->Energy()); + //cout << iJ << " tempMinM " << TempMinMass << " newmass " << (recoZ+Jet).M() ; + if(fabs((recoZ+Jet).M() - TopMass) < TempMinMass) + { + TempMinMass = fabs((recoZ+Jet).M() - TopMass); + Jetcandidate.SetPxPyPzE(Jet.Px(), Jet.Py(), Jet.Pz(), Jet.E()); + NbInColl = iJ; + + } + //cout << " NbInColl is " << iJ << endl; + } + + FCNCjet.SetPxPyPzE(BJets[NbInColl]->Px(),BJets[NbInColl]->Py(),BJets[NbInColl]->Pz(),BJets[NbInColl]->Energy()); + }*/ + else{ + FCNCjet.SetPxPyPzE(0.,0.,0.,0.); + cout << "no cjets available" << endl; + } + return FCNCjet; +}; + + +float EffectiveAreaRho(TRootElectron *el, float rho_) +{ + double EffectiveArea = 0.; + // Updated to Spring 2015 EA from https://github.com/cms-sw/cmssw/blob/CMSSW_7_4_14/RecoEgamma/ElectronIdentification/data/Spring15/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_25ns.txt#L8 + if (fabs(el->superClusterEta()) >= 0.0 && fabs(el->superClusterEta()) < 1.0 ) EffectiveArea = 0.1752; + if (fabs(el->superClusterEta()) >= 1.0 && fabs(el->superClusterEta()) < 1.479 ) EffectiveArea = 0.1862; + if (fabs(el->superClusterEta()) >= 1.479 && fabs(el->superClusterEta()) < 2.0 ) EffectiveArea = 0.1411; + if (fabs(el->superClusterEta()) >= 2.0 && fabs(el->superClusterEta()) < 2.2 ) EffectiveArea = 0.1534; + if (fabs(el->superClusterEta()) >= 2.2 && fabs(el->superClusterEta()) < 2.3 ) EffectiveArea = 0.1903; + if (fabs(el->superClusterEta()) >= 2.3 && fabs(el->superClusterEta()) < 2.4 ) EffectiveArea = 0.2243; + if (fabs(el->superClusterEta()) >= 2.4 && fabs(el->superClusterEta()) < 5.0 ) EffectiveArea = 0.2687; + if (fabs(el->superClusterEta()) >= 5.0) EffectiveArea = -9999; + + double isocorr = 0; + + isocorr = rho_*EffectiveArea; + + return isocorr; +}; +float EffectiveArea(TRootElectron *el) +{ + double EffectiveArea = 0.; + + if (fabs(el->superClusterEta()) >= 0.0 && fabs(el->superClusterEta()) < 1.0 ) EffectiveArea = 0.1752; + if (fabs(el->superClusterEta()) >= 1.0 && fabs(el->superClusterEta()) < 1.479 ) EffectiveArea = 0.1862; + if (fabs(el->superClusterEta()) >= 1.479 && fabs(el->superClusterEta()) < 2.0 ) EffectiveArea = 0.1411; + if (fabs(el->superClusterEta()) >= 2.0 && fabs(el->superClusterEta()) < 2.2 ) EffectiveArea = 0.1534; + if (fabs(el->superClusterEta()) >= 2.2 && fabs(el->superClusterEta()) < 2.3 ) EffectiveArea = 0.1903; + if (fabs(el->superClusterEta()) >= 2.3 && fabs(el->superClusterEta()) < 2.4 ) EffectiveArea = 0.2243; + if (fabs(el->superClusterEta()) >= 2.4 && fabs(el->superClusterEta()) < 5.0 ) EffectiveArea = 0.2687; + if (fabs(el->superClusterEta()) >= 5.0) EffectiveArea = -9999; + + + return EffectiveArea; +}; + + +float relPfIsoEl(TRootElectron *el, float _rho) +{ + float isoCorr = (el->neutralHadronIso(3) + el->photonIso(3) - EffectiveAreaRho(el,_rho)); + // float isolation = (el->chargedHadronIso(3) + (isoCorr > 0.0 ? isoCorr : 0.0))/(el->Pt()); + float isolation = (el->chargedHadronIso(3) + std::max(el->neutralHadronIso(3)+el->photonIso(3)-EffectiveAreaRho(el,_rho),float(0.)))/(el->Pt()); + return isolation; + +}; + + +float IsoDBeta(TRootMuon *mu) +{ + float iso = (mu->chargedHadronIso(4) + std::max(0.0, mu->neutralHadronIso(4) + mu->photonIso(4) - 0.5*mu->puChargedHadronIso(4)))/mu->Pt(); + + return iso; + +} + +vector LeptonAssigner(std::vector electrons,std::vector muons) +{ + // cout << " in assigner " << endl; + vector ReturnColl; + Assigned = false; + + if(electrons.size() + muons.size() != 3){ + cout << " WARNING: not 3 leptons " << endl; + cout << "muons " << muons.size() << " electrons " << electrons.size() << endl; + return ReturnColl; + } + + // cout << " in 3 lep " << endl; + + TLorentzVector Zlepcan0; + Zlepcan0.SetPxPyPzE(0.,0.,0.,0.); + TLorentzVector Zlepcan1; + Zlepcan1.SetPxPyPzE(0.,0.,0.,0.); + TLorentzVector Wlepcan; + Wlepcan.SetPxPyPzE(0.,0.,0.,0.); + + if(electrons.size() == 2){ + //cout << "2 electr " << electrons[0]->charge() << " " << electrons[1]->charge() << endl; + if(electrons[0]->charge() != electrons[1]->charge()){ + Zlepcan0.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Zlepcan1.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + Wlepcan.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Assigned = true; + } + } + else if(muons.size() == 2){ + // cout << "2 muons" << endl; + if(muons[0]->charge() != muons[1]->charge()){ + Zlepcan0.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Zlepcan1.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + Wlepcan.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Assigned = true; + } + } + else if(electrons.size() ==3){ + // cout << " 3 electrons " << endl; + bool can01 = false; + bool can02= false; + bool can12 = false; + + if(electrons[0]->charge() != electrons[1]->charge()) can01 = true; + if(electrons[0]->charge() != electrons[2]->charge()) can02 = true; + if(electrons[2]->charge() != electrons[1]->charge()) can12 = true; + + double mass01 = 9999.; + double mass02 = 9999.; + double mass12 = 9999.; + TLorentzVector temp0; + temp0.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + TLorentzVector temp1; + temp1.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + TLorentzVector temp2; + temp2.SetPxPyPzE(electrons[2]->Px(), electrons[2]->Py(),electrons[2]->Pz(),electrons[2]->Energy()); + if(can01) mass01 = fabs(91.1-(temp1+temp0).M()); + if(can02) mass02 = fabs(91.1-(temp2+temp0).M()); + if(can12) mass12 = fabs(91.1-(temp1+temp2).M()); + if(mass01 <= mass02 && mass01 <= mass12){ + Zlepcan0.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Zlepcan1.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + Wlepcan.SetPxPyPzE(electrons[2]->Px(), electrons[2]->Py(),electrons[2]->Pz(),electrons[2]->Energy()); + Assigned = true; + } + else if(mass02 <= mass12 && mass02 < mass01){ + Zlepcan0.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Zlepcan1.SetPxPyPzE(electrons[2]->Px(), electrons[2]->Py(),electrons[2]->Pz(),electrons[2]->Energy()); + Wlepcan.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + Assigned = true; + + } + else if(mass12 < mass01 && mass12 < mass02){ + Zlepcan0.SetPxPyPzE(electrons[1]->Px(), electrons[1]->Py(),electrons[1]->Pz(),electrons[1]->Energy()); + Zlepcan1.SetPxPyPzE(electrons[2]->Px(), electrons[2]->Py(),electrons[2]->Pz(),electrons[2]->Energy()); + Wlepcan.SetPxPyPzE(electrons[0]->Px(), electrons[0]->Py(),electrons[0]->Pz(),electrons[0]->Energy()); + Assigned = true; + } + } + else if(muons.size() == 3){ + bool can01 = false; + bool can02= false; + bool can12 = false; + if(muons[0]->charge() != muons[1]->charge()) can01 = true; + if(muons[0]->charge() != muons[2]->charge()) can02 = true; + if(muons[2]->charge() != muons[1]->charge()) can12 = true; + + double mass01 = 9999.; + double mass02 = 9999.; + double mass12 = 9999.; + TLorentzVector temp0; + temp0.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + TLorentzVector temp1; + temp1.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + TLorentzVector temp2; + temp2.SetPxPyPzE(muons[2]->Px(), muons[2]->Py(),muons[2]->Pz(),muons[2]->Energy()); + if(can01) mass01 = fabs(91.1-(temp1+temp0).M()); + if(can02) mass02 = fabs(91.1-(temp2+temp0).M()); + if(can12) mass12 = fabs(91.1-(temp1+temp2).M()); + if(mass01 <= mass02 && mass01 <= mass12){ + Zlepcan0.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Zlepcan1.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + Wlepcan.SetPxPyPzE(muons[2]->Px(), muons[2]->Py(),muons[2]->Pz(),muons[2]->Energy()); + Assigned = true; + } + else if(mass02 <= mass12 && mass02 < mass01){ + Zlepcan0.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Zlepcan1.SetPxPyPzE(muons[2]->Px(), muons[2]->Py(),muons[2]->Pz(),muons[2]->Energy()); + Wlepcan.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + Assigned = true; + + } + else if(mass12 < mass01 && mass12 < mass02){ + Zlepcan0.SetPxPyPzE(muons[1]->Px(), muons[1]->Py(),muons[1]->Pz(),muons[1]->Energy()); + Zlepcan1.SetPxPyPzE(muons[2]->Px(), muons[2]->Py(),muons[2]->Pz(),muons[2]->Energy()); + Wlepcan.SetPxPyPzE(muons[0]->Px(), muons[0]->Py(),muons[0]->Pz(),muons[0]->Energy()); + Assigned = true; + } + } + if(Assigned){ + ReturnColl.push_back(Zlepcan0); + ReturnColl.push_back(Zlepcan1); + ReturnColl.push_back(Wlepcan); + } + if(!Assigned){ + // cout << " WARNING: leptons not set for assignment " << endl; + return ReturnColl; + } + + + return ReturnColl; +} + +TLorentzVector MetzCalculator(TLorentzVector leptW, TLorentzVector v_met) +{ + + double term1 = leptW.Pz() * ( leptW.Px()* v_met.Px() + leptW.Py()*v_met.Py() + pow(80.399, 2)/2.); + + double det = pow(leptW.Px() * v_met.Px() + leptW.Py() * v_met.Py() + pow(80.399, 2)/2., 2) - v_met.Pt()*v_met.Pt() * (leptW.E()*leptW.E() - leptW.Pz()*leptW.Pz() ); + + if(det<0) det=0; + + double term2 = leptW.E() * pow(det, 0.5); + double denom = leptW.E()*leptW.E() - leptW.Pz()*leptW.Pz(); + double sol1 = (term1 - term2) / denom; + //double sol2 = (term1 + term2) / denom; + double nu_E = 0; + + TLorentzVector neutrino; + + nu_E = pow( pow(v_met.Px(),2) + pow(v_met.Py(),2) + pow(sol1,2), 0.5);//neglecting neutrino mass + neutrino.SetPxPyPzE( v_met.Px(), v_met.Py(), sol1, nu_E); + + return neutrino; + + +} + + + diff --git a/Ntupler_localgrid.cc b/Ntupler_localgrid.cc new file mode 100644 index 0000000..c59a3d4 --- /dev/null +++ b/Ntupler_localgrid.cc @@ -0,0 +1,1804 @@ +////////////////////////////////////////////////////////////////////////////// +//// Analysis code for search for FCNC tZq //// +////////////////////////////////////////////////////////////////////////////// + + +#define _USE_MATH_DEFINES +#include "TStyle.h" +#include "TPaveText.h" +#include "TTree.h" +#include "TNtuple.h" +#include "TNtuple.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include "TRandom3.h" +#include "TRandom.h" +#include "TProfile.h" +#include +#include +#include + +//user code +#include "TopTreeProducer/interface/TRootRun.h" +#include "TopTreeProducer/interface/TRootEvent.h" +#include "TopTreeAnalysisBase/Selection/interface/Run2Selection.h" + +#include "TopTreeAnalysisBase/Content/interface/AnalysisEnvironment.h" +#include "TopTreeAnalysisBase/Content/interface/Dataset.h" +#include "TopTreeAnalysisBase/Tools/interface/JetTools.h" +#include "TopTreeAnalysisBase/Tools/interface/PlottingTools.h" +#include "TopTreeAnalysisBase/Tools/interface/TTreeLoader.h" +#include "TopTreeAnalysisBase/Tools/interface/AnalysisEnvironmentLoader.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/JetCorrectorParameters.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/JetCorrectionUncertainty.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MakeBinning.h" +#include "TopTreeAnalysisBase/MCInformation/interface/LumiReWeighting.h" +#include "TopTreeAnalysisBase/MCInformation/interface/JetPartonMatching.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/MEzCalculator.h" +#include "TopTreeAnalysisBase/Tools/interface/LeptonTools.h" +#include "TopTreeAnalysisBase/Tools/interface/SourceDate.h" +#include "TopTreeAnalysisBase/Tools/interface/Trigger.h" +#include "TopTreeAnalysisBase/Reconstruction/interface/TTreeObservables.h" + +//This header file is taken directly from the BTV wiki. It contains +// to correctly apply an event level Btag SF. It is not yet on CVS +// as I hope to merge the functionality into BTagWeigtTools.h + +//#include "TopTreeAnalysisBase/Tools/interface/BTagSFUtil.h" +#include "TopTreeAnalysisBase/Tools/interface/BTagWeightTools.h" +#include "TopTreeAnalysisBase/Tools/interface/BTagCalibrationStandalone.h" + +#include "TopTreeAnalysisBase/Tools/interface/JetCombiner.h" +#include "TopTreeAnalysisBase/Tools/interface/MVATrainer.h" +#include "TopTreeAnalysisBase/Tools/interface/MVAComputer.h" + + + + +using namespace std; +using namespace TopTree; +using namespace reweight; + + +/// TH1F +map histo1D; +map histo2D; + + + +struct HighestCSVBtag +{ + bool operator()( TRootJet* j1, TRootJet* j2 ) const + { + return j1->btag_combinedInclusiveSecondaryVertexV2BJetTags() > j2->btag_combinedInclusiveSecondaryVertexV2BJetTags(); + } +}; + +//Initializing CSVv2 b-tag WP +float workingpointvalue_Loose = 0.460;//working points updated to 2015 BTV-POG recommendations. +float workingpointvalue_Medium = 0.800;//working points updated to 2015 BTV-POG recommendations. +float workingpointvalue_Tight = 0.935;//working points updated to 2015 BTV-POG recommendations. + + +TLorentzVector FCNCjetCalculator(std::vector nonBJets,std::vector BJets, TLorentzVector recoZ ,int verb); + +string ConvertIntToString(int Number, bool pad) +{ + ostringstream convert; + convert.clear(); + if ( pad && Number < 10 ) { convert << std::setw(2) << std::setfill('0');} + convert << Number; + return convert.str(); +}; + + +string MakeTimeStamp() +{ + time_t t = time(0); // get time now + struct tm * now = localtime( & t ); + + int year = now->tm_year - 100; /// + 1900 to get current year + int month = now->tm_mon + 1; + int day = now->tm_mday; + int hour = now->tm_hour; + int min = now->tm_min; + //int sec = now->tm_sec; + + string year_str = ConvertIntToString(year, true); + string month_str = ConvertIntToString(month, true); + string day_str = ConvertIntToString(day, true); + string hour_str = ConvertIntToString(hour, true); + string min_str = ConvertIntToString(min, true); + //string sec_str = ConvertIntToString(sec, true); + + string date_str = year_str + month_str + day_str; //+ "_" + hour_str + min_str; + return date_str; +}; + + + +int main (int argc, char *argv[]) +{ + string dateString = MakeTimeStamp(); + cout << "***********************************" << endl; + cout << "*** Beginning of program: tZq FCNC ***" << endl; + cout << "***********************************" << endl; + cout << "Current time: " << dateString << endl; + + clock_t start = clock(); + + /////////////////////////// + /// Configuration /// + ////////////////////////// + int verbose = 1; // 0 = cout alll + bool eventSelected = false; + int nbTrig = 0; + int nbBaseline = 0; + int nbGPV = 0; + int nbSelectedEvents = 0; + int nbEvents = 0; + double dataLumi = 0; //pb + bool eee = false; + bool eemu = false; + bool mumue = false; + bool mumumu = true; + bool runHLT = true; + bool hasMu = false; + bool hasEl = false; + bool dilep =false; + bool singlelep = false; + bool applyJetCleaning = true; + bool fillBtagHisto = false; + bool printTrigger = false; + bool printLeptonSF = false; + bool applyJER = false; + bool applyJES = false; + bool applyNegWeightCorrection = false; + bool applyPU = true; + bool applyLeptonSF = false; + bool btagShape = true; + string Channel = ""; + string xmlFileName = ""; + if(mumumu) + { + cout << " --> Using the TriMuon channel <-- " << endl; + Channel = "MuMuMu"; + xmlFileName = "config/Run2TriLepton_MuMuMu.xml" ; + dataLumi = 2700; //pb + hasMu = true; + dilep = true; + } + else + { + cerr << " ERROR: no channel specified " << endl; + exit(1); + } + + + ////////////////////////////////////////////// + /// Set up everything for local submission //// + /////////////////////////////////////////////// + // check the arguments passed + if(verbose == 0) + { + cout << " The list of arguments are: " << endl; + for (int n_arg=1; n_arg vecfileNames; + for(int args = 11; args < argc-7; args++) + { + vecfileNames.push_back(argv[args]); + } + + if (verbose==0) + { + cout << "The list of file to run over will be printed..." << endl; + for ( int nfiles = 0; nfiles < vecfileNames.size(); nfiles++) + { + cout << "file number " << nfiles << " is " << vecfileNames[nfiles] << endl; + } + } + + // Print information to a textfile + ofstream infoFile; + string info_dir = "Information/"+Channel +"/"; + string info_date_dir = info_dir + dateString +"/"; + mkdir(info_dir.c_str(),0777); + mkdir(info_date_dir.c_str(),0777); + string infoName = info_date_dir + "information"; + infoName += "_"+ Channel; + infoName += "_" + dName; + infoName += "_" + JobNum; + infoName += ".txt"; + infoFile.open(infoName.c_str()); + + cout << "---Dataset accepted from command line---" << endl; + cout << "Dataset Name: " << dName << endl; + cout << "Dataset Title: " << dTitle << endl; + cout << "Dataset color: " << color << endl; + cout << "Dataset ls: " << ls << endl; + cout << "Dataset lw: " << lw << endl; + cout << "Dataset normf: " << normf << endl; + cout << "Dataset EqLumi: " << EqLumi << endl; + cout << "Dataset xSect: " << xSect << endl; + cout << "Dataset File Name: " << vecfileNames[0] << endl; + cout << "Beginning Event: " << startEvent << endl; + cout << "Ending Event: " << endEvent << endl; + cout << "JobNum: " << JobNum << endl; + bool isData= false; + if(dName.find("Data")!=string::npos || dName.find("data")!=string::npos || dName.find("DATA")!=string::npos){ + isData = true; + cout << "running on data !!!!" << endl; + cout << "luminosity is " << dataLumi << endl; + } + cout << "----------------------------------------" << endl; + + + infoFile << "---Dataset accepted from command line---" << endl; + infoFile << "Dataset Name: " << dName << " data? " << isData << endl; + infoFile << "Dataset Title: " << dTitle << endl; + infoFile << "Dataset color: " << color << endl; + infoFile << "Dataset ls: " << ls << endl; + infoFile << "Dataset lw: " << lw << endl; + infoFile << "Dataset normf: " << normf << endl; + infoFile << "Dataset EqLumi: " << EqLumi << endl; + infoFile << "Dataset xSect: " << xSect << endl; + infoFile << "Dataset File Name: " << vecfileNames[0] << endl; + infoFile << "Beginning Event: " << startEvent << endl; + infoFile << "Ending Event: " << endEvent << endl; + infoFile << "JobNum: " << JobNum << endl; + infoFile << "Trigger: " << runHLT << " mu/e/single/di " << hasMu << "/"<< hasEl << "/"<< singlelep << "/" << dilep << endl; + infoFile << "Channel: mumumu/mumue/eee/eemu " << mumumu << "/" << mumue << "/" << eee << "/" << + eemu << endl; + infoFile << "xmlfile: " << xmlFileName.c_str() << endl; + infoFile << "Jetcleaning on? " << applyJetCleaning << endl; + infoFile << "BtagReweighting FillHisto? " << fillBtagHisto << endl; + infoFile << "JES? " << applyJES << " JER? " << applyJER << endl; + infoFile << "Neg Weight correction? " << applyNegWeightCorrection << endl; + infoFile << "Lepton SF? " << applyLeptonSF << endl; + + ///////////////////////////////// + // Set up AnalysisEnvironment + ///////////////////////////////// + + AnalysisEnvironment anaEnv; + cout<<" - Creating environment ..."< datasets; + Dataset* theDataset = new Dataset(dName, dTitle, true, color, ls, lw, normf, xSect, vecfileNames); + theDataset->SetEquivalentLuminosity(EqLumi); + datasets.push_back(theDataset); + int ndatasets = datasets.size() - 1 ; + + //////////////////////////// + /// Initialise trigger /// + //////////////////////////// + + if(verbose == 0) cout << "Initializing trigger" << endl; + Trigger* trigger = new Trigger(hasMu, hasEl, singlelep, dilep); + + //////////////////////// + // intialize Calibrations // + /////////////////////// + BTagCalibration *btagcalib; + BTagCalibrationReader *btagreader; + BTagWeightTools *btwt; + BTagCalibrationReader * reader_csvv2; + // for pu + LumiReWeighting LumiWeights; + + // JER / JEC + vector vCorrParam; + string pathCalJEC = "../TopTreeAnalysisBase/Calibrations/JECFiles/"; + + + /////////////////////////////// + // Set up Output ROOT file /// + ////////////////////////////// + stringstream ss; + ss << JobNum; + string strJobNum = ss.str(); + string histo_dir = "NtupleMakerOutput/TriLepton_histos_"+ Channel; + string histo_dir_date = histo_dir+"/TriLepton_histos_" + dateString +"/"; + mkdir(histo_dir.c_str(),0777); + mkdir(histo_dir_date.c_str(),0777); + + string rootFileName (histo_dir_date+"/FCNC_3L_"+Channel+"_"+dName+".root"); + if (strJobNum != "0") + { + if(verbose == 0) cout << "strJobNum is " << strJobNum << endl; + rootFileName = histo_dir_date+"/FCNC_3L_"+Channel+"_"+dName + "_"+strJobNum+".root"; + } + cout << "Histofile: " << rootFileName << endl; + TFile *fout = new TFile (rootFileName.c_str(), "RECREATE"); + + /////////////////////////// + /// Global variables //// + ////////////////////////// + TRootEvent* event = 0; + // TRootRun *runInfos = new TRootRun(); + + ///////////////////////////// + /// Object ID /// + ///////////////////////////// + // electron + float el_pt_cut =20.; // 42 + float el_eta_cut = 2.5; + bool TightEl = false; + bool MediumEl = true; + bool LooseEl = false; + // muon + float mu_pt_cut = 20.; // 40 + float mu_eta_cut = 2.4; + float mu_iso_cut = 0.15; + bool TightMu = false; + bool MediumMu = false; + bool LooseMu = true; + //jets + float jet_pt_cut = 30.; + float jet_eta_cut = 2.4; + + // convert into string + + std::ostringstream el_pt_cut_strs, el_eta_cut_strs, mu_pt_cut_strs, mu_eta_cut_strs, mu_iso_cut_strs, jet_pt_cut_strs, jet_eta_cut_strs; + std::string el_pt_cut_str, el_eta_cut_str, mu_pt_cut_str, mu_eta_cut_str, mu_iso_cut_str, jet_pt_cut_str, jet_eta_cut_str; + el_pt_cut_strs << el_pt_cut; + el_eta_cut_strs << el_eta_cut; + mu_pt_cut_strs << mu_pt_cut; + mu_eta_cut_strs << mu_eta_cut; + mu_iso_cut_strs << mu_iso_cut; + jet_pt_cut_strs << jet_pt_cut; + jet_eta_cut_strs << jet_eta_cut; + el_pt_cut_str = el_pt_cut_strs.str(); + el_eta_cut_str = el_eta_cut_strs.str(); + mu_pt_cut_str = mu_pt_cut_strs.str(); + mu_eta_cut_str = mu_eta_cut_strs.str(); + mu_iso_cut_str = mu_iso_cut_strs.str(); + jet_pt_cut_str = jet_pt_cut_strs.str(); + jet_eta_cut_str = jet_eta_cut_strs.str(); + + infoFile << "El: pt = " << el_pt_cut_str << " - eta = " << el_eta_cut_str << " tight/medium/loose " << TightEl << "/" << MediumEl << "/" << LooseEl << endl; + infoFile << "Mu: pt = " << mu_pt_cut_str << " - eta = " << mu_eta_cut_str << " - iso " << mu_iso_cut_str << " tight/medium/loose " << TightMu << "/" << MediumMu<< "/" << LooseMu << endl; + infoFile << "Jet: pt = " << jet_pt_cut_str << " - eta = " << jet_eta_cut_str << endl; + + + + + //////////////////////////////////////////////////////////////////// + ////////////////// 1D plots ////////////////////////////// + //////////////////////////////////////////////////////////////////// + histo1D["NbOfVertices"] = new TH1F("NbOfVertices", "Nb. of vertices", 60, 0, 60); + histo1D["cutFlow"] = new TH1F( "cutFlow", "cutFlow", 15, -0.5, 14.5); + histo1D["weightIndex"] = new TH1F("weightIndex", "weightIndex", 5, -2.5,2.5); // 0: None; 1: scale_variation 1; 2: Central scale variation 1 + histo1D["nloweight"] = new TH1F("nloweight", "nloweight", 200, -2.0, 2.0); + histo1D["init_nPVs_before"] = new TH1F("init_nPVs_before", "init_nPVs_before", 41,-0.5,40.5); + histo1D["init_nPVs_after"] = new TH1F("init_nPVs_after", "init_nPVs_after", 41,-0.5,40.5); + + histo1D["nbMuons"] = new TH1F("nbMuons","nbMuons",10,-0.5,9.5); + histo1D["nbElectrons"] = new TH1F("nbElectrons","nbElectrons",10,-0.5,9.5); + histo1D["nbJets"] = new TH1F("nbJets","nbJets",10,-0.5,9.5); +/* + //Muons + histo1D["MuonPt"] = new TH1F( "MuonPt", "PT_{#mu}", 30, 0, 300); + histo1D["LeptonPt"] = new TH1F( "LeptonPt", "PT_{lep}", 30, 0, 300); + histo1D["MuonRelIsolation"] = new TH1F( "MuonRelIsolation", "RelIso", 10, 0, .25); + //Electrons + histo1D["ElectronRelIsolation"] = new TH1F( "ElectronRelIsolation", "RelIso", 10, 0, .25); + histo1D["ElectronPt"] = new TH1F( "ElectronPt", "PT_{e}", 30, 0, 300); + //Init Electron Plots + + histo1D["InitElectronPt"] = new TH1F( "InitElectronPt", "PT_{e}", 30, 0, 300); + histo1D["InitElectronEta"] = new TH1F( "InitElectronEta", "#eta", 40, -4, 4); + histo1D["NbOfElectronsInit"] = new TH1F( "NbOfElectronsInit", "Nb. of electrons", 10, 0, 10); + histo1D["InitElectronRelIsolation"] = new TH1F( "InitElectronRelIsolation", "RelIso", 10, 0, .25); + histo1D["InitElectronSuperClusterEta"] = new TH1F( "InitElectronSuperClusterEta", "#eta", 10, 0, 2.5); + histo1D["InitElectrondEtaI"] = new TH1F( "InitElectrondEtaI", "#eta", 20, 0, .05); + histo1D["InitElectrondPhiI"] = new TH1F( "InitElectrondPhiI", "#phi", 20, 0, .2); + histo1D["InitElectronHoverE"] = new TH1F( "InitElectronHoverE", "H/E", 10, 0, .15); + histo1D["InitElectrond0"] = new TH1F( "InitElectrond0", "d0", 20, 0, .1); + histo1D["InitElectrondZ"] = new TH1F( "InitElectrondZ", "dZ", 10, 0, .25); + histo1D["InitElectronEminusP"] = new TH1F( "InitElectronEminusP", "1/GeV", 10, 0, .25); + histo1D["InitElectronConversion"] = new TH1F( "InitElectronConversion", "Conversion Pass", 2, 0, 2); + histo1D["InitElectronMissingHits"] = new TH1F( "InitElectronMissingHits", "MissingHits", 10, 0, 10); + histo1D["InitElectronCutFlow"] = new TH1F( "InitElectronCutFlow", "CutNumber", 12, 0, 12); + + //B-tagging discriminators + histo1D["Bdisc_CSV_jet1"] = new TH1F( "Bdisc_CSV_jet1", "CSV b-disc._{jet1}", 30, 0, 1); + histo1D["Bdisc_CSV_jet2"] = new TH1F( "Bdisc_CSV_jet2", "CSV b-disc._{jet2}", 30, 0, 1); + histo1D["Bdisc_CSV_jet3"] = new TH1F( "Bdisc_CSV_jet3", "CSV b-disc._{jet3}", 30, 0, 1); + histo1D["Bdisc_CSV_Bjet1"] = new TH1F( "Bdisc_CSV_Bjet1", "CSV b-disc._{bjet1}", 30, 0, 1); + histo1D["Bdisc_CSV_Bjet2"] = new TH1F( "Bdisc_CSV_Bjet2", "CSV b-disc._{bjet2}", 30, 0, 1); + histo1D["Bdisc_CSV_Bjet3"] = new TH1F( "Bdisc_CSV_Bjet3", "CSV b-disc._{bjet3}", 30, 0, 1); + //Jets + histo1D["JetEta"] = new TH1F( "JetEta", "Jet #eta", 40,-4, 4); + histo1D["NbJets"] = new TH1F( "NbJets", "nb. jets", 15,-0.5, 14.5); + histo1D["NbCSVLJets"] = new TH1F( "NbCSVLJets", "nb. CSVL tags", 15,-0.5, 14.5); + histo1D["NbCSVMJets"] = new TH1F( "NbCSVMJets", "nb. CSVM tags", 15,-0.5, 14.5); + histo1D["NbCSVTJets"] = new TH1F( "NbCSVTJets", "nb. CSVT tags", 15,-0.5, 14.5); + histo1D["1stJetPt"] = new TH1F( "1stJetPt", "PT_{jet1}", 30, 0, 300); + histo1D["2ndJetPt"] = new TH1F( "2ndJetPt", "PT_{jet2}", 30, 0, 300); + histo1D["3rdJetPt"] = new TH1F( "3rdJetPt", "PT_{jet3}", 30, 0, 300); + histo1D["1stBJetPt"] = new TH1F( "1stBJetPt", "PT_{bjet1}", 30, 0, 300); + histo1D["2ndBJetPt"] = new TH1F( "2ndBJetPt", "PT_{bjet2}", 30, 0, 300); + histo1D["3rdBJetPt"] = new TH1F( "3rdBJetPt", "PT_{bjet3}", 30, 0, 300); + histo1D["HT_SelectedJets"] = new TH1F( "HT_SelectedJets", "HT", 30, 0, 1500); + //MET + histo1D["MET_preCut"] = new TH1F( "MET_preCut", "MET", 70, 0, 700); + histo1D["MT_LepMET_preCut"] = new TH1F( "MET_LepMET_preCut", "MT(lep,MET)", 70, 0, 700); + histo1D["MET"] = new TH1F( "MET", "MET", 70, 0, 700); + histo1D["MT_LepMET"] = new TH1F( "MT_LepMET", "MT(lep,MET)", 70, 0, 700); + + /////////////////// + // 2D histograms // + /////////////////// + histo2D["NJet_vs_Nbjet"] = new TH2F("NJet_vs_Nbjet","NJet:Nbjet",12,-0.5,11.5, 61, -0.5,11.5); + histo2D["JetID_vs_pdgID"] = new TH2F("JetID_vs_pdgID","parton pdgID:jet number",12,-0.5,11.5, 61, -30.5,30.5); +*/ + + + ///////////////////////////////// + // Loop on datasets // + ///////////////////////////////// + cout << " - Loop over datasets ... " << datasets.size () << " datasets !" << endl; + bool nlo = false; + for (unsigned int d = 0; d < datasets.size(); d++) + { + cout<<"Load Dataset"<Name(); + float normfactor = datasets[d]->NormFactor(); + cout <<"found sample " << daName.c_str() << " with equivalent lumi "<< theDataset->EquivalentLumi() <EquivalentLumi() < depending on JES up/Down andother reader is needed + + + } +// LumiWeights = LumiReWeighting("../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_MC_RunIIFall15DR76-Asympt25ns.root", "../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_2015Data74X_25ns-Run246908-260627Cert.root", "pileup", "pileup"); + + LumiWeights = LumiReWeighting("../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_MC_RunIIFall15DR76-Asympt25ns.root", "../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_2015Data76X_25ns-Run246908-260627Cert.root", "pileup", "pileup"); +// LumiWeights = LumiReWeighting("../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_MC_RunIIFall15DR76-Asympt25ns.root", "../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_2015Data76X_25ns-Run246908-260627Cert.root", "pileup", "pileup"); + + //MuonSFWeight (const string &sfFile, const string &dataOverMC, const bool &extendRange, const bool &debug, const bool &printWarning) + + MuonSFWeight* muonSFWeightID_T = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonID_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_TightIDandIPCut_DEN_genTracks_PAR_pt_spliteta_bin1/abseta_pt_ratio",true, printLeptonSF,printLeptonSF); + MuonSFWeight* muonSFWeightID_M = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonID_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_MediumID_DEN_genTracks_PAR_pt_spliteta_bin1/abseta_pt_ratio",true, printLeptonSF, printLeptonSF); + MuonSFWeight* muonSFWeightID_L = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonID_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_LooseID_DEN_genTracks_PAR_pt_spliteta_bin1/abseta_pt_ratio", true, printLeptonSF, printLeptonSF); + MuonSFWeight* muonSFWeightIso_TT = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_TightRelIso_DEN_TightID_PAR_pt_spliteta_bin1/abseta_pt_ratio",true, printLeptonSF,printLeptonSF); // Tight RelIso, Tight ID + MuonSFWeight* muonSFWeightIso_TM = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_TightRelIso_DEN_MediumID_PAR_pt_spliteta_bin1/abseta_pt_ratio", true,printLeptonSF, printLeptonSF); // Tight RelIso, Medium ID + MuonSFWeight* muonSFWeightIso_LT = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_LooseRelIso_DEN_TightID_PAR_pt_spliteta_bin1/abseta_pt_ratio", true,printLeptonSF, printLeptonSF); // Loose RelIso, Tight ID + MuonSFWeight* muonSFWeightIso_LM = new MuonSFWeight(CaliPath+"LeptonSF/"+"MuonIso_Z_RunCD_Reco76X_Feb15.root", "MC_NUM_LooseRelIso_DEN_MediumID_PAR_pt_spliteta_bin1/abseta_pt_ratio", true,printLeptonSF, printLeptonSF); // Loose RelIso, Medium ID +// double weightMuonHLTv2, weightMuonHLTv3 ; // for run C should also something like this be done +// MuonSFWeight *muonSFWeightTrigHLTv4p2 = new MuonSFWeight(CaliPath+"LeptonSF/"+"SingleMuonTrigger_Z_RunCD_Reco76X_Dec1.root", "runD_IsoMu20_OR_IsoTkMu20_HLTv4p2_PtEtaBins/abseta_pt_ratio", true, false, false); +// MuonSFWeight *muonSFWeightTrigHLTv4p3 = new MuonSFWeight(CaliPath+"LeptonSF/"+"SingleMuonTrigger_Z_RunCD_Reco76X_Dec1.root", "runD_IsoMu20_OR_IsoTkMu20_HLTv4p3_PtEtaBins/abseta_pt_ratio", true, false, false); + + + + + string electronFile= "Elec_SF_TopEA.root"; + ElectronSFWeight* electronSFWeight = new ElectronSFWeight (CaliPath+"LeptonSF/"+electronFile,"GlobalSF", true,printLeptonSF, printLeptonSF); // (... , ... , debug, print warning) + + vCorrParam.clear(); + if (isData) + { + JetCorrectorParameters *L1JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L1FastJet_AK4PFchs.txt"); + vCorrParam.push_back(*L1JetCorPar); + JetCorrectorParameters *L2JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L2Relative_AK4PFchs.txt"); + vCorrParam.push_back(*L2JetCorPar); + JetCorrectorParameters *L3JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L3Absolute_AK4PFchs.txt"); + vCorrParam.push_back(*L3JetCorPar); + JetCorrectorParameters *L2L3ResJetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_DATA_L2L3Residual_AK4PFchs.txt"); + vCorrParam.push_back(*L2L3ResJetCorPar); + } + else + { + JetCorrectorParameters *L1JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_MC_L1FastJet_AK4PFchs.txt"); + vCorrParam.push_back(*L1JetCorPar); + JetCorrectorParameters *L2JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_MC_L2Relative_AK4PFchs.txt"); + vCorrParam.push_back(*L2JetCorPar); + JetCorrectorParameters *L3JetCorPar = new JetCorrectorParameters(pathCalJEC+"Fall15_25nsV2_MC_L3Absolute_AK4PFchs.txt"); + vCorrParam.push_back(*L3JetCorPar); + } + JetCorrectionUncertainty *jecUnc = new JetCorrectionUncertainty(pathCalJEC+"Fall15_25nsV2_MC_Uncertainty_AK4PFchs.txt"); + + JetTools *jetTools = new JetTools(vCorrParam, jecUnc, true); //true means redo also L1 + + //////////////////////////////////////////////////////////// + // Setup Date string and nTuple for output + /////////////////////////////////////////////////////////// + + string channel_dir = "NtupleMakerOutput/Ntuples_"+Channel; + string date_dir = channel_dir+"/Ntuples_" + dateString +"/"; + mkdir(channel_dir.c_str(),0777); + mkdir(date_dir.c_str(),0777); + + + string Ntupname = date_dir +"FCNC_3L_" +Channel + "_" + dName + "_"+ strJobNum + ".root"; + + TFile * tupfile = new TFile(Ntupname.c_str(),"RECREATE"); + tupfile->cd(); + TTree* myTree = new TTree("tree","tree"); + TTree* baselineTree = new TTree("baselinetree","baselinetree"); + TTree* globalTree = new TTree("globaltree","globaltree"); + /////////////////////////// + /// output tree + /////////////////////////// + // event related variables + Int_t run_num; + Int_t evt_num; + Int_t lumi_num; + Int_t nvtx; + Int_t npu; + Int_t PassedMETFilter; + Double_t cutstep[10]; + Int_t nCuts; + Double_t puSF; + Double_t btagSF; + Double_t MuonIDSF[10]; + Double_t MuonIsoSF[10]; + Double_t MuonTrigSFv2[10]; + Double_t MuonTrigSFv3[10]; + Double_t ElectronSF[10]; + Int_t nofPosWeights; + Int_t nofNegWeights; + Int_t sumW; + Int_t nEv; + Double_t nloWeight; // for amc@nlo samples + Int_t JERon; + Int_t JESon; + Double_t WPb_L; + Double_t WPb_M; + Double_t WPb_T; + + + Double_t pt_electron_1; + Double_t pt_electron_2; + Double_t pt_electron_3; + Double_t pt_muon_1; + Double_t pt_muon_2; + Double_t pt_muon_3; + Double_t pt_jet_1; + Double_t pt_jet_2; + Double_t pt_jet_3; + + + Int_t nLeptons; + // variables for electrons + Int_t nElectrons; + Double_t pt_electron[10]; + Double_t phi_electron[10]; + Double_t eta_electron[10]; + Double_t eta_superCluster_electron[10]; + Double_t E_electron[10]; + Double_t d0_electron[10]; + Double_t d0BeamSpot_electron[10]; + Double_t chargedHadronIso_electron[10]; + Double_t neutralHadronIso_electron[10]; + Double_t photonIso_electron[10]; + Double_t pfIso_electron[10]; + Int_t charge_electron[10]; + + Double_t sigmaIEtaIEta_electron[10]; + Double_t deltaEtaIn_electron[10]; + Double_t deltaPhiIn_electron[10]; + Double_t hadronicOverEm_electron[10]; + Int_t missingHits_electron[10]; + Bool_t passConversion_electron[10]; + Bool_t isId_electron[10]; + Bool_t isIso_electron[10]; + + Bool_t isEBEEGap[10]; + Double_t sf_electron[10]; + + //variable for muons + Int_t nMuons; + Double_t pt_muon[10]; + Double_t phi_muon[10]; + Double_t eta_muon[10]; + Double_t E_muon[10]; + Double_t d0_muon[10]; + Double_t d0BeamSpot_muon[10]; + Double_t chargedHadronIso_muon[10]; + Double_t neutralHadronIso_muon[10]; + Double_t photonIso_muon[10]; + Double_t relIso_muon[10]; + Bool_t isId_muon[10]; + Bool_t isIso_muon[10]; + Double_t pfIso_muon[10]; + Double_t sf_muon[10]; + Int_t charge_muon[10]; + + //variable for jets + Int_t nJets; + Int_t nJets_CSVL; + Int_t nJets_CSVM; + Int_t nJets_CSVT; + Double_t pt_jet[20]; + Double_t phi_jet[20]; + Double_t eta_jet[20]; + Double_t E_jet[20]; + Int_t charge_jet[20]; + Double_t bdisc_jet[20]; + Double_t cdiscCvsL_jet[20]; + Double_t cdiscCvsB_jet[20]; + + + // variables for Zboson + Double_t Zboson_M; +/* Double_t Zboson_Px; + Double_t Zboson_Py; + Double_t Zboson_Pz; + Double_t Zboson_Energy; +*/ + // met + Double_t met_Pt; + Double_t met_Phi; + Double_t met_Eta; + + Double_t mWt; + Double_t FCNCtop_M; + Double_t SMtop_M; + // global data set variables + Int_t nofEventsHLTv2; + Int_t nofEventsHLTv3; + globalTree->Branch("nofEventsHLTv2",&nofEventsHLTv2,"nofEventsHLTv2/I"); + globalTree->Branch("nofEventsHLTv3",&nofEventsHLTv3,"nofEventsHLTv3/I"); + globalTree->Branch("nofPosWeights",&nofPosWeights,"nofPosWeights/I"); + globalTree->Branch("nofNegWeights",&nofNegWeights,"nofNegWeights/I"); + globalTree->Branch("nEv" , &nEv, "nEv/I"); + globalTree->Branch("sumW", &sumW, "sumW/I"); + globalTree->Branch("nCuts",&nCuts, "nCuts/I"); + globalTree->Branch("cutstep",&cutstep,"cutstep[nCuts]/D"); + globalTree->Branch("JERon",&JERon,"JERon/I"); + globalTree->Branch("JESon", &JESon, "JESon/I"); + globalTree->Branch("WPb_L", &WPb_L, "WPb_L/D"); + globalTree->Branch("WPb_M", &WPb_M, "WPb_M/D"); + globalTree->Branch("WPb_T", &WPb_T, "WPb_T/D"); + + // event related variables + myTree->Branch("nloWeight",&nloWeight,"nloWeight/D"); + myTree->Branch("run_num",&run_num,"run_num/I"); + myTree->Branch("evt_num",&evt_num,"evt_num/I"); + myTree->Branch("lumi_num",&lumi_num,"lumi_num/I"); + myTree->Branch("nvtx",&nvtx,"nvtx/I"); + myTree->Branch("npu",&npu,"npu/I"); + myTree->Branch("puSF",&puSF,"puSF/D"); + myTree->Branch("btagSF",&btagSF,"btagSF/D"); + myTree->Branch("nLeptons",&nLeptons, "nLeptons/I");// + myTree->Branch("PassedMETFilter", &PassedMETFilter,"PassedMETFilter/I"); + + baselineTree->Branch("PassedMETFilter", &PassedMETFilter,"PassedMETFilter/I"); + baselineTree->Branch("nloWeight",&nloWeight,"nloWeight/D"); + baselineTree->Branch("run_num",&run_num,"run_num/I"); + baselineTree->Branch("evt_num",&evt_num,"evt_num/I"); + baselineTree->Branch("lumi_num",&lumi_num,"lumi_num/I"); + baselineTree->Branch("nvtx",&nvtx,"nvtx/I"); + baselineTree->Branch("npu",&npu,"npu/I"); + baselineTree->Branch("puSF",&puSF,"puSF/D"); + baselineTree->Branch("btagSF",&btagSF,"btagSF/D"); + baselineTree->Branch("nLeptons",&nLeptons, "nLeptons/I");// + // electrons + myTree->Branch("nElectrons",&nElectrons, "nElectrons/I");// + myTree->Branch("ElectronSF",&ElectronSF,"ElectronSF[nElectrons]/D"); + myTree->Branch("pt_electron",pt_electron,"pt_electron[nElectrons]/D"); + myTree->Branch("phi_electron",phi_electron,"phi_electron[nElectrons]/D"); + myTree->Branch("eta_electron",eta_electron,"eta_electron[nElectrons]/D"); + myTree->Branch("eta_superCluster_electron",eta_superCluster_electron,"eta_superCluster_electron[nElectrons]/D"); + myTree->Branch("E_electron",E_electron,"E_electron[nElectrons]/D"); + myTree->Branch("chargedHadronIso_electron",chargedHadronIso_electron,"chargedHadronIso_electron[nElectrons]/D"); + myTree->Branch("neutralHadronIso_electron",neutralHadronIso_electron,"neutralHadronIso_electron[nElectrons]/D"); + myTree->Branch("photonIso_electron",photonIso_electron,"photonIso_electron[nElectrons]/D"); + myTree->Branch("pfIso_electron",pfIso_electron,"pfIso_electron[nElectrons]/D"); + myTree->Branch("charge_electron",charge_electron,"charge_electron[nElectrons]/I"); + myTree->Branch("d0_electron",d0_electron,"d0_electron[nElectrons]/D"); + myTree->Branch("d0BeamSpot_electron",d0BeamSpot_electron,"d0BeamSpot_electron[nElectrons]/D"); + myTree->Branch("sigmaIEtaIEta_electron",sigmaIEtaIEta_electron,"sigmaIEtaIEta_electron[nElectrons]/D"); + myTree->Branch("deltaEtaIn_electron",deltaEtaIn_electron,"deltaEtaIn_electron[nElectrons]/D"); + myTree->Branch("deltaPhiIn_electron",deltaPhiIn_electron,"deltaPhiIn_electron[nElectrons]/D"); + myTree->Branch("hadronicOverEm_electron",hadronicOverEm_electron,"hadronicOverEm_electron[nElectrons]/D"); + myTree->Branch("missingHits_electron",missingHits_electron,"missingHits_electron[nElectrons]/I"); + myTree->Branch("passConversion_electron",passConversion_electron,"passConversion_electron[nElectrons]/O)"); + myTree->Branch("isId_electron",isId_electron,"isId_electron[nElectrons]/O)"); + myTree->Branch("isIso_electron",isIso_electron,"isIso_electron[nElectrons]/O)"); + myTree->Branch("isEBEEGap",isEBEEGap,"isEBEEGap[nElectrons]/O)"); + myTree->Branch("sf_electron",sf_electron,"sf_electron[nElectrons]/D"); + myTree->Branch("pt_electron_1",&pt_electron_1,"pt_electron_1/D"); + myTree->Branch("pt_electron_2",&pt_electron_2,"pt_electron_2/D"); + myTree->Branch("pt_electron_3",&pt_electron_3,"pt_electron_3/D"); + + + baselineTree->Branch("nElectrons",&nElectrons, "nElectrons/I");// + baselineTree->Branch("ElectronSF",&ElectronSF,"ElectronSF[nElectrons]/D"); + baselineTree->Branch("pt_electron",pt_electron,"pt_electron[nElectrons]/D"); + baselineTree->Branch("phi_electron",phi_electron,"phi_electron[nElectrons]/D"); + baselineTree->Branch("eta_electron",eta_electron,"eta_electron[nElectrons]/D"); + baselineTree->Branch("eta_superCluster_electron",eta_superCluster_electron,"eta_superCluster_electron[nElectrons]/D"); + baselineTree->Branch("E_electron",E_electron,"E_electron[nElectrons]/D"); + baselineTree->Branch("chargedHadronIso_electron",chargedHadronIso_electron,"chargedHadronIso_electron[nElectrons]/D"); + baselineTree->Branch("neutralHadronIso_electron",neutralHadronIso_electron,"neutralHadronIso_electron[nElectrons]/D"); + baselineTree->Branch("photonIso_electron",photonIso_electron,"photonIso_electron[nElectrons]/D"); + baselineTree->Branch("pfIso_electron",pfIso_electron,"pfIso_electron[nElectrons]/D"); + baselineTree->Branch("charge_electron",charge_electron,"charge_electron[nElectrons]/I"); + baselineTree->Branch("d0_electron",d0_electron,"d0_electron[nElectrons]/D"); + baselineTree->Branch("d0BeamSpot_electron",d0BeamSpot_electron,"d0BeamSpot_electron[nElectrons]/D"); + baselineTree->Branch("sigmaIEtaIEta_electron",sigmaIEtaIEta_electron,"sigmaIEtaIEta_electron[nElectrons]/D"); + baselineTree->Branch("deltaEtaIn_electron",deltaEtaIn_electron,"deltaEtaIn_electron[nElectrons]/D"); + baselineTree->Branch("deltaPhiIn_electron",deltaPhiIn_electron,"deltaPhiIn_electron[nElectrons]/D"); + baselineTree->Branch("hadronicOverEm_electron",hadronicOverEm_electron,"hadronicOverEm_electron[nElectrons]/D"); + baselineTree->Branch("missingHits_electron",missingHits_electron,"missingHits_electron[nElectrons]/I"); + baselineTree->Branch("passConversion_electron",passConversion_electron,"passConversion_electron[nElectrons]/O)"); + baselineTree->Branch("isId_electron",isId_electron,"isId_electron[nElectrons]/O)"); + baselineTree->Branch("isIso_electron",isIso_electron,"isIso_electron[nElectrons]/O)"); + baselineTree->Branch("isEBEEGap",isEBEEGap,"isEBEEGap[nElectrons]/O)"); + baselineTree->Branch("sf_electron",sf_electron,"sf_electron[nElectrons]/D"); + baselineTree->Branch("pt_electron_1",&pt_electron_1,"pt_electron_1/D"); + baselineTree->Branch("pt_electron_2",&pt_electron_2,"pt_electron_2/D"); + baselineTree->Branch("pt_electron_3",&pt_electron_3,"pt_electron_3/D"); + + // muons + myTree->Branch("nMuons",&nMuons, "nMuons/I"); + myTree->Branch("MuonIDSF",&MuonIDSF,"MuonIDSF[nMuons]/D"); + myTree->Branch("MuonIsoSF",&MuonIsoSF, "MuonIsoSF[nMuons]/D"); + myTree->Branch("MuonTrigSFv2",&MuonTrigSFv2,"MuonTrigSFv2[nMuons]/D"); + myTree->Branch("MuonTrigSFv3",&MuonTrigSFv3,"MuonTrigSFv3[nMuons]/D"); + myTree->Branch("pt_muon",pt_muon,"pt_muon[nMuons]/D"); + myTree->Branch("phi_muon",phi_muon,"phi_muon[nMuons]/D"); + myTree->Branch("eta_muon",eta_muon,"eta_muon[nMuons]/D"); + myTree->Branch("E_muon",E_muon,"E_muon[nMuons]/D"); + myTree->Branch("chargedHadronIso_muon",chargedHadronIso_muon,"chargedHadronIso_muon[nMuons]/D"); + myTree->Branch("neutralHadronIso_muon",neutralHadronIso_muon,"neutralHadronIso_muon[nMuons]/D"); + myTree->Branch("photonIso_muon",photonIso_muon,"photonIso_muon[nMuons]/D"); + myTree->Branch("isId_muon",isId_muon,"isId_muon[nMuons]/O"); + myTree->Branch("isIso_muon",isIso_muon,"isIso_muon[nMuons]/O"); + myTree->Branch("pfIso_muon",pfIso_muon,"pfIso_muon[nMuons]/D"); + myTree->Branch("charge_muon",charge_muon,"charge_muon[nMuons]/I"); + myTree->Branch("d0_muon",d0_muon,"d0_muon[nMuons]/D"); + myTree->Branch("d0BeamSpot_muon",d0BeamSpot_muon,"d0BeamSpot_muon[nMuons]/D"); + myTree->Branch("sf_muon",sf_muon,"sf_muon[nMuons]/D"); + myTree->Branch("pt_muon_1",&pt_muon_1,"pt_muon_1/D"); + myTree->Branch("pt_muon_2",&pt_muon_2,"pt_muon_2/D"); + myTree->Branch("pt_muon_3",&pt_muon_3,"pt_muon_3/D"); + + baselineTree->Branch("nMuons",&nMuons, "nMuons/I"); + baselineTree->Branch("MuonIDSF",&MuonIDSF,"MuonIDSF[nMuons]/D"); + baselineTree->Branch("MuonIsoSF",&MuonIsoSF, "MuonIsoSF[nMuons]/D"); + baselineTree->Branch("MuonTrigSFv2",&MuonTrigSFv2,"MuonTrigSFv2[nMuons]/D"); + baselineTree->Branch("MuonTrigSFv3",&MuonTrigSFv3,"MuonTrigSFv3[nMuons]/D"); + baselineTree->Branch("pt_muon",pt_muon,"pt_muon[nMuons]/D"); + baselineTree->Branch("phi_muon",phi_muon,"phi_muon[nMuons]/D"); + baselineTree->Branch("eta_muon",eta_muon,"eta_muon[nMuons]/D"); + baselineTree->Branch("E_muon",E_muon,"E_muon[nMuons]/D"); + baselineTree->Branch("chargedHadronIso_muon",chargedHadronIso_muon,"chargedHadronIso_muon[nMuons]/D"); + baselineTree->Branch("neutralHadronIso_muon",neutralHadronIso_muon,"neutralHadronIso_muon[nMuons]/D"); + baselineTree->Branch("photonIso_muon",photonIso_muon,"photonIso_muon[nMuons]/D"); + baselineTree->Branch("isId_muon",isId_muon,"isId_muon[nMuons]/O"); + baselineTree->Branch("isIso_muon",isIso_muon,"isIso_muon[nMuons]/O"); + baselineTree->Branch("pfIso_muon",pfIso_muon,"pfIso_muon[nMuons]/D"); + baselineTree->Branch("charge_muon",charge_muon,"charge_muon[nMuons]/I"); + baselineTree->Branch("d0_muon",d0_muon,"d0_muon[nMuons]/D"); + baselineTree->Branch("d0BeamSpot_muon",d0BeamSpot_muon,"d0BeamSpot_muon[nMuons]/D"); + baselineTree->Branch("sf_muon",sf_muon,"sf_muon[nMuons]/D"); + baselineTree->Branch("pt_muon_1",&pt_muon_1,"pt_muon_1/D"); + baselineTree->Branch("pt_muon_2",&pt_muon_2,"pt_muon_2/D"); + baselineTree->Branch("pt_muon_3",&pt_muon_3,"pt_muon_3/D"); + + // jets + myTree->Branch("nJets",&nJets,"nJets/I"); + myTree->Branch("nJets_CSVL",&nJets_CSVL,"nJets_CSVL/I"); + myTree->Branch("nJets_CSVM",&nJets_CSVM,"nJets_CSVM/I"); + myTree->Branch("nJets_CSVT",&nJets_CSVT,"nJets_CSVT/I"); + myTree->Branch("pt_jet",pt_jet,"pt_jet[nJets]/D"); + myTree->Branch("phi_jet",phi_jet,"phi_jet[nJets]/D"); + myTree->Branch("eta_jet",eta_jet,"eta_jet[nJets]/D"); + myTree->Branch("E_jet",E_jet,"E_jet[nJets]/D"); + myTree->Branch("charge_jet",charge_jet,"charge_jet[nJets]/I"); + myTree->Branch("bdisc_jet",bdisc_jet,"bdisc_jet[nJets]/D"); + myTree->Branch("cdiscCvsL_jet",cdiscCvsL_jet,"cdiscCvsL_jet[nJets]/D"); + myTree->Branch("cdiscCvsB_jet",cdiscCvsB_jet,"cdiscCvsB_jet[nJets]/D"); + myTree->Branch("pt_jet_1",&pt_jet_1,"pt_jet_1/D"); + myTree->Branch("pt_jet_2",&pt_jet_2,"pt_jet_2/D"); + myTree->Branch("pt_jet_3",&pt_jet_3,"pt_jet_3/D"); + + baselineTree->Branch("nJets",&nJets,"nJets/I"); + baselineTree->Branch("nJets_CSVL",&nJets_CSVL,"nJets_CSVL/I"); + baselineTree->Branch("nJets_CSVM",&nJets_CSVM,"nJets_CSVM/I"); + baselineTree->Branch("nJets_CSVT",&nJets_CSVT,"nJets_CSVT/I"); + baselineTree->Branch("pt_jet",pt_jet,"pt_jet[nJets]/D"); + baselineTree->Branch("phi_jet",phi_jet,"phi_jet[nJets]/D"); + baselineTree->Branch("eta_jet",eta_jet,"eta_jet[nJets]/D"); + baselineTree->Branch("E_jet",E_jet,"E_jet[nJets]/D"); + baselineTree->Branch("charge_jet",charge_jet,"charge_jet[nJets]/I"); + baselineTree->Branch("bdisc_jet",bdisc_jet,"bdisc_jet[nJets]/D"); + baselineTree->Branch("cdiscCvsL_jet",cdiscCvsL_jet,"cdiscCvsL_jet[nJets]/D"); + baselineTree->Branch("cdiscCvsB_jet",cdiscCvsB_jet,"cdiscCvsB_jet[nJets]/D"); + baselineTree->Branch("pt_jet_1",&pt_jet_1,"pt_jet_1/D"); + baselineTree->Branch("pt_jet_2",&pt_jet_2,"pt_jet_2/D"); + baselineTree->Branch("pt_jet_3",&pt_jet_3,"pt_jet_3/D"); + + // Zboson + myTree->Branch("Zboson_M",&Zboson_M,"Zboson_M/D"); + baselineTree->Branch("Zboson_M",&Zboson_M,"Zboson_M/D"); + myTree->Branch("mWt",&mWt,"mWt/D"); + baselineTree->Branch("mWt",&mWt,"mWt/D"); + myTree->Branch("FCNCtop_M",&FCNCtop_M,"FCNCtop_M/D"); + myTree->Branch("SMtop_M",&SMtop_M, "SMtop_M/D"); + baselineTree->Branch("SMtop_M",&SMtop_M, "SMtop_M/D"); + /* myTree->Branch("Zboson_Px",&Zboson_Px,"Zboson_Px/D"); + myTree->Branch("Zboson_Py",&Zboson_Py,"Zboson_Py/D"); + myTree->Branch("Zboson_Pz",&Zboson_Pz,"Zboson_Pz/D"); + myTree->Branch("Zboson_Energy",&Zboson_Energy,"Zboson_Energy/D"); +*/ + + // met + myTree->Branch("met_Pt", &met_Pt, "met_Pt/D"); + myTree->Branch("met_Eta", &met_Eta,"met_Eta/D"); + myTree->Branch("met_Phi", &met_Phi, "met_Phi/D"); + + baselineTree->Branch("met_Pt", &met_Pt, "met_Pt/D"); + baselineTree->Branch("met_Eta", &met_Eta,"met_Eta/D"); + baselineTree->Branch("met_Phi", &met_Phi, "met_Phi/D"); + + + + ///////////////////////// + //// Corrections/trigger /// + /////////////////////////// + + /// book triggers + if (runHLT) { trigger->bookTriggers(isData);} + + + + + + ////////////////////////////////////////////////// + // Pre-event loop definitions + ///////////////////////////////////////////////// + + int itrigger = -1, previousRun = -1, start = 0; + int currentRun; + int iFile = -1; + unsigned int ending = datasets[d]->NofEvtsToRunOver(); + cout <<"Number of events = "<< ending < ending) + end_d = ending; + else + end_d = endEvent; + + int nEvents = end_d - event_start; + cout <<"Will run over "<< (end_d - event_start) << " events..."< vertex; + vector < TRootMuon* > init_muons; + vector < TRootElectron* > init_electrons; + vector < TRootJet* > init_jets; + vector < TRootJet* > init_fatjets; + vector < TRootJet* > init_jets_corrected; + vector < TRootGenJet* > genjets; + vector < TRootMET* > mets; + vector selectedElectrons; + vector selectedJets; + vector selectedMuons; + vector selectedCSVLBJets; + vector selectedCSVMBJets; + vector selectedCSVTBJets; + vector selectedCSVLLJets; + vector selectedCSVMLJets; + vector selectedCSVTLJets; + vector mcParticles; + vector selectednonCSVLJets; + + TLorentzVector Zboson; + TLorentzVector Zlep0; + TLorentzVector Zlep1; + TLorentzVector Wlep; + TLorentzVector SMbjet; + TLorentzVector cjet; + ////////////////////////////////////// + // Begin Event Loop + ////////////////////////////////////// + nbEvents = 0; + nofEventsHLTv2 = 0; + nofEventsHLTv3 = 0; + nofPosWeights = 0; + nofNegWeights = 0; + float eventweight = 1; + int nbEvents_0 = 0; + int nbEvents_1 = 0; + int nbEvents_2 = 0; + int nbEvents_3 = 0; + int nbEvents_4 = 0; + int nbEvents_5 = 0; + int nbEvents_6 = 0; + int nbEvents_7 = 0; + int nbEvents_8 = 0; + int nbEvents_9 = 0; + bool debug = false; + + bool passedMET = false; + bool HBHEnoise = false; + bool HBHEIso = false; + bool CSCTight = false; + bool EcalDead = false; + bool eeBad = false; + for (unsigned int ievt = event_start; ievt < end_d; ievt++) + { + nCuts = 0; + passedMET = false; + HBHEnoise = false; + HBHEIso = false; + CSCTight = false; + EcalDead = false; + eeBad = false; + eventweight = 1; + if(verbose == 0 ) cout << "new event " << ievt << endl; + double ievt_d = ievt; + debug = false; + if (verbose == 0 ) debug = true; + currentfrac = ievt_d/end_d; + if (debug)cout << endl << endl << "Starting a new event loop!"<eventTree()->LoadTree(ievt); + string currentFilename = datasets[d]->eventTree()->GetFile()->GetName(); + int currentRun = event->runId(); + run_num = event->runId(); + evt_num = event->eventId(); +/* // to be applied from 76X v1 in our ttp + HBHEnoise = event->getHBHENoiseFilter(); + HBHEIso = event->getHBHENoiseIsoFilter(); + CSCTight = event->getCSCTightHalo2015Filter(); + EcalDead = event->getEcalDeadCellTriggerPrimitiveFilter(); + eeBad = event->getEEBadScFilter(); +*/ + +// cout << "eeBadSc " << eeBadSc << endl; + lumi_num=event->lumiBlockId(); + nvtx = vertex.size(); + npu = (int) event->nTruePU(); + +/* if(isData) // run C should be added as third counter + { + if(currentRun >= 256630 && currentRun <= 257819 ) // run nbrs need to be checked + { + nofEventsHLTv2++; + } + else + { + nofEventsHLTv3++; + } + + } + +*/ + ///////////////////////////////////// + // fix negative weights for amc@nlo/// + ///////////////////////////////////// + double hasNegWeight = false; + double mc_baseweight = 1; + if(!isData && (event->getWeight(1001) != -9999.)) + { + mc_baseweight = event->getWeight(1001)/abs(event->originalXWGTUP()); + //mc_scaleupweight = event->getWeight(1005)/abs(event->originalXWGTUP()); + //mc_scaledownweight = event->getWeight(1009)/abs(event->originalXWGTUP()); + if(mc_baseweight >= 0) + { + nofPosWeights++; + histo1D["weightIndex"]->Fill(1.,1.); + + } + else + { + if(nlo) hasNegWeight = true; + nofNegWeights++; + histo1D["weightIndex"]->Fill(-1.,1.); + } + } + if( !isData && (event->getWeight(1) != -9999. )) + { + mc_baseweight = event->getWeight(1)/abs(event->originalXWGTUP()); + //mc_scaleupweight = event->getWeight(5)/abs(event->originalXWGTUP()); + //mc_scaledownweight = event->getWeight(9)/abs(event->originalXWGTUP()); + if(mc_baseweight >= 0) + { + nofPosWeights++; + histo1D["weightIndex"]->Fill(2.,1.); + + } + else + { + if(nlo) hasNegWeight = true; + nofNegWeights++; + histo1D["weightIndex"]->Fill(-2.,1.); + } + + + } + if(!isData) + { + if ( event->getWeight(1001) == -9999. && event->getWeight(1) == -9999. ) + { + cout << "WARNING: No weight found for event " << ievt << " in dataset " << dName << endl; + cout << " Event Id: " << event->eventId() << " Run Id: " << event->runId() << " Lumi block Id: " << event->lumiBlockId() << endl; + cout << " Weight type is different from 'scale_variation' (1001) or 'Central scale variation' (1)." << endl; + } + if ( event->getWeight(1001) != -9999. && event->getWeight(1) != -9999. ) + { + cout << "WARNING: Two weight types found for event " << ievt << " in dataset " << dName << endl; + cout << " Event Id: " << event->eventId() << " Run Id: " << event->runId() << " Lumi block Id: " << event->lumiBlockId() << endl; + cout << " Check which weight type should be used when." << endl; + } + + nloWeight = mc_baseweight; + histo1D["nloweight"]->Fill(mc_baseweight, 1.); + sumWeights += mc_baseweight; + + + } + /////////////////////////////////////////// + // Trigger + /////////////////////////////////////////// + + bool trigged = false; + bool filechanged = false; + bool runchanged = false; + + if(runHLT) + { + trigger->checkAvail(currentRun, datasets, d, &treeLoader, event, printTrigger); + trigged = trigger->checkIfFired(); + + } + else if(!runHLT && previousFilename != currentFilename) + { + filechanged = true; + previousFilename = currentFilename; + iFile++; + cout << "File changed!!! => iFile = " << iFile << endl; + trigged = true; + + } + else if(!runHLT) + { + trigged = true; + } + if(dName.find("NP")!=string::npos) trigged = true; + + if(verbose==0) cout << "Apply trigger? " << runHLT << " trigged? " << trigged << endl; + + //////////////////////////// + ///// JES - JER smearing //// + ////////////////////////// + JERon = 0; + if(applyJER && !isData) + { + jetTools->correctJetJER(init_jets_corrected, genjets, mets[0], "nominal", false); + JERon = 1; + } + JESon = 0; + if(applyJES && !isData) + { + jetTools->correctJets(init_jets_corrected,event->fixedGridRhoFastjetAll() ,false); + JESon = 1; + } + + /////////////////////////////////////////////////////////// + // Event selection + /////////////////////////////////////////////////////////// + + // Declare selection instance + Run2Selection selection(init_jets,init_fatjets, init_muons, init_electrons, mets,event->fixedGridRhoFastjetAll()); + selectedJets.clear(); + selectedJets = selection.GetSelectedJets(jet_pt_cut,jet_eta_cut, true, "Tight"); + selectedMuons.clear(); + if(TightMu) selectedMuons = selection.GetSelectedMuons(mu_pt_cut, mu_eta_cut, mu_iso_cut, "Tight", "Spring15"); + if(MediumMu) selectedMuons = selection.GetSelectedMuons(mu_pt_cut, mu_eta_cut, mu_iso_cut, "Medium", "Spring15"); + if(LooseMu) selectedMuons = selection.GetSelectedMuons(mu_pt_cut, mu_eta_cut, mu_iso_cut, "Loose", "Spring15"); + // pt, eta, iso // run normally + selectedElectrons.clear(); + if(TightEl) selectedElectrons = selection.GetSelectedElectrons(el_pt_cut, el_eta_cut, "Tight","Spring15_25ns",true);// pt, eta + if(MediumEl) selectedElectrons = selection.GetSelectedElectrons(el_pt_cut, el_eta_cut, "Medium","Spring15_25ns",true);// pt, eta + if(LooseEl) selectedElectrons = selection.GetSelectedElectrons(el_pt_cut, el_eta_cut, "Loose","Spring15_25ns",true);// pt, eta + /// For MC Information + mcParticles.clear(); + treeLoader.LoadMCEvent(ievt, 0, mcParticles, false); + sort(mcParticles.begin(),mcParticles.end(),HighestPt()); + // void TTreeLoader::LoadMCEvent(int, TopTree::TRootNPGenEvent*, std::vector&, bool) + if (verbose == 0) cout <<"Number of Muons, Electrons, Jets ===> " << endl << selectedMuons.size() <<" " << selectedElectrons.size()<<" "<< selectedJets.size() << endl; + + + //////////////////////////////////////////////// + // Pre cut operations + //////////////////////////////////////////////// + // Apply primary vertex selection + bool isGoodPV = selection.isPVSelected(vertex, 4, 24., 2); + // Met filters if(HBHEnoise && HBHEIso && CSCTight && EcalDead && eeBad && isGoodPV) passedMET = true; + passedMET = true; + PassedMETFilter = passedMET; + + if(applyJetCleaning){ + if(verbose == 0) cout << "Applying jet cleaning " << endl; + int OrigSize = selectedJets.size(); + for (int origJets=0; origJets0){ + if(selectedJets[origJets]->DeltaR(*selectedMuons[0])<0.4){ selectedJets.erase(selectedJets.begin()+origJets); erased = true;} + } + if(selectedMuons.size()>1 && !erased){ + if(selectedJets[origJets]->DeltaR(*selectedMuons[1])<0.4){ selectedJets.erase(selectedJets.begin()+origJets); erased = true;} + } + if(selectedMuons.size()>2 && !erased){ + if(selectedJets[origJets]->DeltaR(*selectedMuons[2])<0.4){ selectedJets.erase(selectedJets.begin()+origJets); erased = true;} + } + if(selectedElectrons.size()>0 && !erased){ + if(selectedJets[origJets]->DeltaR(*selectedElectrons[0])<0.4){ selectedJets.erase(selectedJets.begin()+origJets); erased = true;} + } + if(selectedElectrons.size()>1 && !erased){ + if(selectedJets[origJets]->DeltaR(*selectedElectrons[1])<0.4){ selectedJets.erase(selectedJets.begin()+origJets); erased = true;} + } + if(selectedElectrons.size()>2 && !erased){ + if(selectedJets[origJets]->DeltaR(*selectedElectrons[2])<0.4){ selectedJets.erase(selectedJets.begin()+origJets); erased = true;} + } + } + if(verbose == 0){ + if( OrigSize != selectedJets.size()) cout << "--> original = " << OrigSize << " after cleaning = " << selectedJets.size() << endl; + else cout << "--> no change" << endl; + } + } + + + ////////////////////////////////////// + // B jet selection //// + /////////////////////////////////////// + + selectedCSVLBJets.clear(); + selectedCSVMBJets.clear(); + selectedCSVTBJets.clear(); + selectedCSVLLJets.clear(); + selectedCSVMLJets.clear(); + selectedCSVTLJets.clear(); + selectednonCSVLJets.clear(); + for(unsigned int iJ = 0; iJ < selectedJets.size(); iJ++) + { + if(selectedJets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() > workingpointvalue_Loose) selectedCSVLBJets.push_back(selectedJets[iJ]); + else selectedCSVLLJets.push_back(selectedJets[iJ]); + if(selectedJets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() > workingpointvalue_Medium) selectedCSVMBJets.push_back(selectedJets[iJ]); + else selectedCSVMLJets.push_back(selectedJets[iJ]); + if(selectedJets[iJ]->btag_combinedInclusiveSecondaryVertexV2BJetTags() > workingpointvalue_Tight) selectedCSVTBJets.push_back(selectedJets[iJ]); + else selectedCSVTLJets.push_back(selectedJets[iJ]); + + } + WPb_L = workingpointvalue_Loose; + WPb_M = workingpointvalue_Medium; + WPb_T = workingpointvalue_Tight; + + //////////////////////////////////// + // Event Weights /// + /////////////////////////////////// + float btagWeight = 1.; + float bTagEff = 1.; + if( fillBtagHisto && !isData && !btagShape) + { + btwt->FillMCEfficiencyHistos(selectedJets); + + } + else if( !fillBtagHisto && !isData && !btagShape) + { + btagWeight = btwt->getMCEventWeight(selectedJets); + + } + else if( !isData && btagShape) + { + for(int intJet = 0; intJet < selectedJets.size(); intJet++) + { + float jetpt = selectedJets[intJet]->Pt(); + if(jetpt > 1000.) jetpt = 999.; + float jeteta = selectedJets[intJet]->Eta(); + float jetdisc = selectedJets[intJet]->btag_combinedInclusiveSecondaryVertexV2BJetTags(); + BTagEntry::JetFlavor jflav; + int jetpartonflav = std::abs(selectedJets[intJet]->partonFlavour()); + if(debug) cout<<"parton flavour: "<eval(jflav, jeteta, jetpt, jetdisc); + btagWeight *= bTagEff; + + } + + } + + + + + + + + + + + + + float PUweight = 1; + if(!isData) + { + PUweight = LumiWeights.ITweight((int)event->nTruePU()); + + + } + + //////////////////////////////////// + // Determine eventweight /// + ///////////////////////////////// + if(hasNegWeight && applyNegWeightCorrection && !isData) eventweight *= -1.; + histo1D["init_nPVs_before"]->Fill(vertex.size(), eventweight); + if(applyPU && !isData) eventweight *= PUweight; + histo1D["init_nPVs_after"]->Fill(vertex.size(), eventweight); + + ////////////////////////////////////////////////////// + // Applying baseline selection + ////////////////////////////////////////////////////// + nbEvents++; + eventweight = 1.; + if(!isGoodPV) continue; + nbGPV++; + if(verbose == 0) cout << "good pv" << endl; + if(!passedMET) continue; + if(!trigged) continue; + nbTrig++; + if(verbose == 0 ) cout << "trigger" << endl; + histo1D["cutFlow"]->Fill(0., eventweight); + nCuts++; + nbEvents_0++; +// cout << " after " << nCuts << " " << nbEvents_0 << endl; + if(mumumu && selectedMuons.size() < 2) continue; + if(mumue && selectedMuons.size() < 2) continue; + if(eemu && selectedElectrons.size() < 2) continue; + if(eee && selectedElectrons.size() < 2) continue; + if(verbose == 0 ) cout << "baseline" << endl; + histo1D["cutFlow"]->Fill(1., eventweight); + nCuts++; + nbEvents_1++; + + nElectrons=0; + for (Int_t selel =0; selel < selectedElectrons.size() ; selel++ ) + { + + pt_electron[nElectrons]=selectedElectrons[selel]->Pt(); + phi_electron[nElectrons]=selectedElectrons[selel]->Phi(); + eta_electron[nElectrons]=selectedElectrons[selel]->Eta(); + eta_superCluster_electron[nElectrons]=selectedElectrons[selel]->superClusterEta(); + E_electron[nElectrons]=selectedElectrons[selel]->E(); + d0_electron[nElectrons]=selectedElectrons[selel]->d0(); + d0BeamSpot_electron[nElectrons]=selectedElectrons[selel]->d0BeamSpot(); + chargedHadronIso_electron[nElectrons]=selectedElectrons[selel]->chargedHadronIso(3); + neutralHadronIso_electron[nElectrons]=selectedElectrons[selel]->neutralHadronIso(3); + photonIso_electron[nElectrons]=selectedElectrons[selel]->photonIso(3); + pfIso_electron[nElectrons]=selectedElectrons[selel]->relPfIso(3,0); + charge_electron[nElectrons]=selectedElectrons[selel]->charge(); + sigmaIEtaIEta_electron[nElectrons]=selectedElectrons[selel]->sigmaIEtaIEta(); + deltaEtaIn_electron[nElectrons]=selectedElectrons[selel]->deltaEtaIn(); + deltaPhiIn_electron[nElectrons]=selectedElectrons[selel]->deltaPhiIn(); + hadronicOverEm_electron[nElectrons]=selectedElectrons[selel]->hadronicOverEm(); + missingHits_electron[nElectrons]=selectedElectrons[selel]->missingHits(); + passConversion_electron[nElectrons]=selectedElectrons[selel]->passConversion(); + isEBEEGap[nElectrons]=selectedElectrons[selel]->isEBEEGap(); + if(!isData) sf_electron[nElectrons]=electronSFWeight->at(selectedElectrons[selel]->Eta(),selectedElectrons[selel]->Pt(),0); + else sf_electron[nElectrons] = 1.; + if(!isData) ElectronSF[nElectrons] = electronSFWeight->at(selectedElectrons[selel]->Eta(),selectedElectrons[selel]->Pt(),0); + else ElectronSF[nElectrons] = 1.; + + nElectrons++; + } + if(selectedElectrons.size()>0) pt_electron_1 = selectedElectrons[0]->Pt(); + if(selectedElectrons.size()>1) pt_electron_2 = selectedElectrons[1]->Pt(); + if(selectedElectrons.size()>2) pt_electron_3 = selectedElectrons[2]->Pt(); + + ////////////////////// + // Muon Based Plots // + ////////////////////// + nMuons = 0; + for (Int_t selmu =0; selmu < selectedMuons.size() ; selmu++ ) + { + + pt_muon[nMuons]=selectedMuons[selmu]->Pt(); + phi_muon[nMuons]=selectedMuons[selmu]->Phi(); + eta_muon[nMuons]=selectedMuons[selmu]->Eta(); + E_muon[nMuons]=selectedMuons[selmu]->E(); + d0_muon[nMuons]=selectedMuons[selmu]->d0(); + d0BeamSpot_muon[nMuons]=selectedMuons[selmu]->d0BeamSpot(); + chargedHadronIso_muon[nMuons]=selectedMuons[selmu]->chargedHadronIso(4); + neutralHadronIso_muon[nMuons]=selectedMuons[selmu]->neutralHadronIso(4); + photonIso_muon[nMuons]=selectedMuons[selmu]->photonIso(4); + pfIso_muon[nMuons]=selectedMuons[selmu]->relPfIso(4,0); + charge_muon[nMuons]=selectedMuons[selmu]->charge(); + if(!isData) sf_muon[nMuons]= muonSFWeightIso_TT->at(selectedMuons[selmu]->Eta(), selectedMuons[selmu]->Pt(), 0)* muonSFWeightID_T->at(selectedMuons[selmu]->Eta(), selectedMuons[selmu]->Pt(), 0); + else sf_muon[nMuons] = 1.; + if(!isData) + { + MuonIDSF[nMuons] = muonSFWeightID_T->at(selectedMuons[selmu]->Eta(), selectedMuons[selmu]->Pt(), 0); + MuonIsoSF[nMuons] = muonSFWeightIso_TT->at(selectedMuons[selmu]->Eta(), selectedMuons[selmu]->Pt(), 0); +// MuonTrigSFv2[nMuons] = muonSFWeightTrigHLTv4p2->at(selectedMuons[selmu]->Eta(), selectedMuons[selmu]->Pt(), 0); +// MuonTrigSFv3[nMuons] = muonSFWeightTrigHLTv4p3->at(selectedMuons[selmu]->Eta(), selectedMuons[selmu]->Pt(), 0); + } + else + { + MuonIDSF[nMuons] = 1.; + MuonIsoSF[nMuons] = 1.; +// MuonTrigSFv2[nMuons] = 1.; +// MuonTrigSFv3[nMuons] = 1.; + } + nMuons++; + } + if(selectedMuons.size()>0) pt_muon_1 = selectedMuons[0]->Pt(); + if(selectedMuons.size()>1) pt_muon_2 = selectedMuons[1]->Pt(); + if(selectedMuons.size()>2) pt_muon_3 = selectedMuons[2]->Pt(); + nLeptons = nMuons + nElectrons; + /////////////////////// + // Jet based plots // + ////////////////////// + nJets = 0; + for(Int_t seljet = 0; seljet < selectedJets.size(); seljet++) + { + + pt_jet[nJets]=selectedJets[seljet]->Pt(); + phi_jet[nJets]=selectedJets[seljet]->Phi(); + eta_jet[nJets]=selectedJets[seljet]->Eta(); + E_jet[nJets]=selectedJets[seljet]->E(); + charge_jet[nJets]=selectedJets[seljet]->charge(); + bdisc_jet[nJets]=selectedJets[seljet]->btag_combinedInclusiveSecondaryVertexV2BJetTags() ; + cdiscCvsB_jet[nJets]=selectedJets[seljet]->ctag_pfCombinedCvsBJetTags() ; + cdiscCvsL_jet[nJets]=selectedJets[seljet]->ctag_pfCombinedCvsLJetTags() ; + nJets++; + + } + if(selectedJets.size()>0) pt_jet_1 = selectedJets[0]->Pt(); + if(selectedJets.size()>1) pt_jet_2 = selectedJets[1]->Pt(); + if(selectedJets.size()>2) pt_jet_3 = selectedJets[2]->Pt(); + nJets_CSVT = selectedCSVTBJets.size(); + nJets_CSVM = selectedCSVMBJets.size(); + nJets_CSVL = selectedCSVLBJets.size(); + double met_px = mets[0]->Px(); + double met_py = mets[0]->Py(); + met_Pt = sqrt(met_px*met_px + met_py*met_py); + met_Phi = mets[0]->Phi(); + met_Eta = mets[0]->Eta(); + puSF = PUweight; + btagSF = btagWeight; + + histo1D["cutFlow"]->Fill(2., eventweight); + nCuts++; + nbEvents_2++; +// cout << " after " << nCuts << " " << nbEvents_2 << endl; + if(selectedJets.size() < 2) continue; + histo1D["cutFlow"]->Fill(3., eventweight); + nCuts++; + nbEvents_3++; +// cout << " after " << nCuts << " " << nbEvents_3 << endl; +// if(selectedCSVLBJets.size() < 1) continue; + histo1D["cutFlow"]->Fill(4., eventweight); + nCuts++; + nbEvents_4++; +// cout << " after " << nCuts << " " << nbEvents_4 << endl; + if(selectedMuons.size() + selectedElectrons.size() <3) baselineTree->Fill(); + if(selectedMuons.size() +selectedElectrons.size() <3) nbBaseline++; + //check flavour + histo1D["nbMuons"]->Fill(selectedMuons.size(), eventweight); + histo1D["nbElectrons"]->Fill(selectedElectrons.size(), eventweight); + histo1D["nbJets"]->Fill(selectedJets.size(), eventweight); + + if(selectedElectrons.size() + selectedMuons.size() <3) continue; + histo1D["cutFlow"]->Fill(5., eventweight); + nCuts++; + nbEvents_5++; + + if(mumumu && selectedMuons.size() <3) continue; + histo1D["cutFlow"]->Fill(6., eventweight); + nCuts++; + nbEvents_6++; +// cout << " after " << nCuts << " " << nbEvents_5 << endl; + if(selectedCSVLBJets.size() > 0) continue; + Zlep0.Clear(); + Zlep1.Clear(); + Wlep.Clear(); + + // check sign + bool OS = false; + if(eemu && (selectedElectrons[0]->charge() == selectedElectrons[1]->charge())) continue; + if(mumue && (selectedMuons[0]->charge() == selectedMuons[1]->charge())) continue; + if(mumumu) + { + if(selectedMuons[0]->charge() != selectedMuons[1]->charge()){ + OS = true; + Zlep0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + if(selectedMuons.size() > 2) Wlep.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + else Wlep.SetPxPyPzE(selectedElectrons[0]->Px(),selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + } + if(selectedMuons.size() > 2) { + if(selectedMuons[2]->charge() != selectedMuons[1]->charge()){ + OS = true; + Zlep0.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + } + else if(selectedMuons[0]->charge() != selectedMuons[2]->charge()){ + OS = true; + Zlep0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedMuons[2]->Px(), selectedMuons[2]->Py(), selectedMuons[2]->Pz(), selectedMuons[2]->Energy()); + Wlep.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + } + } + } + if(eee) + { + if(selectedElectrons[0]->charge() != selectedElectrons[1]->charge()){ + OS = true; + Zlep0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + if(selectedElectrons.size() > 2) Wlep.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + else Wlep.SetPxPyPzE(selectedElectrons[0]->Px(),selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + } + if(selectedElectrons.size() > 2) { + if(selectedElectrons[2]->charge() != selectedElectrons[1]->charge()){ + OS = true; + Zlep0.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + } + else if(selectedElectrons[0]->charge() != selectedElectrons[2]->charge()){ + OS = true; + Zlep0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + Zlep1.SetPxPyPzE(selectedElectrons[2]->Px(), selectedElectrons[2]->Py(), selectedElectrons[2]->Pz(), selectedElectrons[2]->Energy()); + Wlep.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + } + } + } + + + eventSelected = true; + if(mumue) Zlep0.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + if(mumue) Zlep1.SetPxPyPzE(selectedMuons[1]->Px(), selectedMuons[1]->Py(), selectedMuons[1]->Pz(), selectedMuons[1]->Energy()); + if(mumue) Wlep.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + + if(eemu) Zlep0.SetPxPyPzE(selectedElectrons[0]->Px(), selectedElectrons[0]->Py(), selectedElectrons[0]->Pz(), selectedElectrons[0]->Energy()); + if(eemu) Zlep1.SetPxPyPzE(selectedElectrons[1]->Px(), selectedElectrons[1]->Py(), selectedElectrons[1]->Pz(), selectedElectrons[1]->Energy()); + if(eemu) Wlep.SetPxPyPzE(selectedMuons[0]->Px(), selectedMuons[0]->Py(), selectedMuons[0]->Pz(), selectedMuons[0]->Energy()); + if(mumumu && !OS) continue; + if(eee && !OS) continue; + histo1D["cutFlow"]->Fill(7., eventweight); + nCuts++; + nbEvents_7++; + eventSelected = true; + + + //Make event variables + Zboson.Clear(); + Zboson.SetPxPyPzE(( Zlep0 + Zlep1).Px() ,( Zlep0 + Zlep1).Py(),( Zlep0 + Zlep1).Py(),( Zlep0 + Zlep1).Energy()) ; + Zboson_M = (Zlep0+Zlep1).M(); + + SMbjet.Clear(); + SMbjet.SetPxPyPzE(selectedCSVLBJets[0]->Px(),selectedCSVLBJets[0]->Py(),selectedCSVLBJets[0]->Pz(),selectedCSVLBJets[0]->Energy()); + + cjet.Clear(); + cjet = FCNCjetCalculator(selectedCSVLLJets,selectedCSVLBJets, Zboson ,3); + + FCNCtop_M = (Zboson+cjet).M(); + SMtop_M = (Wlep+SMbjet).M(); + + mWt = TMath::Sqrt((Wlep.Pt() + met_Pt)*(Wlep.Pt() +met_Pt)-(Wlep.Px() + met_px)*(Wlep.Px() + met_px) - (Wlep.Py() + met_py)* (Wlep.Py() + met_py)); + + if(fabs((Zlep0+Zlep1).M() - 90.0 ) > 15) continue; + histo1D["cutFlow"]->Fill(8., eventweight); + nCuts++; + nbEvents_8++; + if(fabs((Wlep+SMbjet).M() - 173.0) > 35 ) continue; + histo1D["cutFlow"]->Fill(9., eventweight); + nCuts++; + nbEvents_9++; + ////////////////////////////////////// + // DO STUFF WITH SELECTED EVENTS //// + ////////////////////////////////////// + if(!eventSelected) continue; + nbSelectedEvents++; + myTree->Fill(); + + + } // end eventloop + cutstep[0] = nbEvents_0; + cutstep[1] = nbEvents_1; + cutstep[2] = nbEvents_2; + cutstep[3] = nbEvents_3; + cutstep[4] = nbEvents_4; + cutstep[5] = nbEvents_5; + cutstep[6] = nbEvents_6; + cutstep[7] = nbEvents_7; + cutstep[8] = nbEvents_8; + cutstep[9] = nbEvents_9; + if(debug) for(int j = 0; j < 7; j++){ cout << cutstep[j] << endl; } + sumW = (int) sumWeights; + nEv = (int) nEvents; + globalTree->Fill(); + if(verbose == 0) cout << "end eventloop" << endl; + infoFile << nbSelectedEvents << " events out of initial " << nbEvents << " selected " << endl; + infoFile << nbSelectedEvents << " events out of trigged " << nbTrig << " selected " << endl; + infoFile << nbBaseline << " baseline events out of trigged " << nbTrig << " selected " << endl; + infoFile << setprecision(2) << ((double)nbGPV/(double)nbEvents)*100 << " % of the initial events stay after Good PV" << endl; + infoFile << setprecision(2) << ((double)nbTrig/(double)nbEvents)*100 << " % of the initial events stay after Trigger" << endl; + infoFile << setprecision(2) << ((double)nbTrig/(double)nbGPV)*100 << " % of the GPV events stay after Trigger" << endl; + cout << nbSelectedEvents << " events out of initial " << nbEvents << " selected " << endl; + cout << nbSelectedEvents << " events out of trigged " << nbTrig << " selected " << endl; + cout << nbBaseline << " baseline events out of trigged " << nbTrig << " selected " << endl; + cout << setprecision(2) << ((double)nbGPV/(double)nbEvents)*100 << " % of the initial events stay after Good PV" << endl; + cout << setprecision(2) << ((double)nbTrig/(double)nbEvents)*100 << " % of the initial events stay after Trigger" << endl; + cout << setprecision(2) << ((double)nbTrig/(double)nbGPV)*100 << " % of the GPV events stay after Trigger" << endl; + if (! isData ) + { + cout << "Data set " << datasets[d]->Title() << " has " << nofPosWeights << " events with positive weights and " << nofNegWeights << " events with negative weights." << endl; + cout << " Pos - neg is " << nofPosWeights - nofNegWeights << ", pos + neg is " << nofPosWeights + nofNegWeights << endl; + cout << "The sum of the weights is " << ((int)sumWeights) << ", whereas the total number of events is " << ((int)nEvents) << endl; + + // Determine scale factor due to negative weights + nloSF = ((double) (nofPosWeights - nofNegWeights))/((double) (nofPosWeights + nofNegWeights)); + cout << "This corresponds to an event scale factor of " << nloSF << endl; + } + infoFile.close(); + tupfile->Write(); + tupfile->Close(); + delete tupfile; + if(!isData && !btagShape) delete btwt; + treeLoader.UnLoadDataset(); + } //End Loop on Datasets + + + + ///////////// + // Writing // + ///////////// + + cout << " - Writing outputs to the files ..." << endl; + + + + fout-> cd(); + for (map::const_iterator it = histo1D.begin(); it != histo1D.end(); it++) + { + cout << "1D Plot: " << it->first << endl; + TCanvas *ctemp = new TCanvas(); + ctemp->cd(); + TH1F *temp = it->second; + temp->Draw(); + delete ctemp; + } + for (map::const_iterator it = histo2D.begin(); it != histo2D.end(); it++) + { + cout << "2D Plot: " << it->first << endl; + TCanvas *ctemp = new TCanvas(); + ctemp->cd(); + TH2F *temp = it->second; + temp->Draw(); + delete ctemp; + } + fout->Write(); + fout->Close(); + delete fout; + + + cout << "It took us " << ((double)clock() - start) / CLOCKS_PER_SEC << " to run the program" << endl; + cout << "********************************************" << endl; + cout << " End of the program !! " << endl; + cout << "********************************************" << endl; + + return 0; +}; + + + + +TLorentzVector FCNCjetCalculator(std::vector nonBJets,std::vector BJets, TLorentzVector recoZ ,int verb) +{ + TLorentzVector FCNCjet; + FCNCjet.Clear(); + + + double TempMinMass = 100000.00; + double TopMass = 172.9; + TLorentzVector Jetcandidate; + int NbInColl = -1; + if(nonBJets.size() != 0){ + + for(unsigned int iJ = 0; iJ < nonBJets.size(); iJ++) + { + TLorentzVector Jet; + Jet.SetPxPyPzE(nonBJets[iJ]->Px(),nonBJets[iJ]->Py(),nonBJets[iJ]->Pz(),nonBJets[iJ]->Energy()); + + if(fabs((recoZ+Jet).M() - TopMass) < TempMinMass) + { + TempMinMass = fabs((recoZ+Jet).M() - TopMass); + Jetcandidate.SetPxPyPzE(Jet.Px(), Jet.Py(), Jet.Pz(), Jet.E()); + NbInColl = iJ; + + } + + + } + FCNCjet.SetPxPyPzE(nonBJets[NbInColl]->Px(),nonBJets[NbInColl]->Py(),nonBJets[NbInColl]->Pz(),nonBJets[NbInColl]->Energy()); + } + else { + for(unsigned int iJ = 1; iJ < BJets.size(); iJ++) + { + TLorentzVector Jet; + Jet.SetPxPyPzE(BJets[iJ]->Px(),BJets[iJ]->Py(),BJets[iJ]->Pz(),BJets[iJ]->Energy()); + + if(fabs((recoZ+Jet).M() - TopMass) < TempMinMass) + { + TempMinMass = fabs((recoZ+Jet).M() - TopMass); + Jetcandidate.SetPxPyPzE(Jet.Px(), Jet.Py(), Jet.Pz(), Jet.E()); + NbInColl = iJ; + + } + + } + + FCNCjet.SetPxPyPzE(BJets[NbInColl]->Px(),BJets[NbInColl]->Py(),BJets[NbInColl]->Pz(),BJets[NbInColl]->Energy()); + } + + + return FCNCjet; +} diff --git a/bin/BuildFile.xml b/bin/BuildFile.xml deleted file mode 100644 index 3832a12..0000000 --- a/bin/BuildFile.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/bin/ntuplizer.cc b/bin/ntuplizer.cc deleted file mode 100644 index b2b5ab1..0000000 --- a/bin/ntuplizer.cc +++ /dev/null @@ -1,534 +0,0 @@ -#include -#include -#include -#include "TDCacheFile.h" -#include "TH1.h" -#include "TFile.h" -#include "TTree.h" -#include "TChain.h" -#include "TClonesArray.h" - -#include "FWCore/FWLite/interface/AutoLibraryLoader.h" -#include "TopBrussels/TopTreeProducer/interface/TRootRun.h" -#include "TopBrussels/TopTreeProducer/interface/TRootEvent.h" -#include "TopBrussels/TopTreeProducer/interface/TRootLepton.h" -#include "TopBrussels/TopTreeProducer/interface/TRootMuon.h" -#include "TopBrussels/TopTreeProducer/interface/TRootElectron.h" -#include "TopBrussels/TopTreeProducer/interface/TRootPhoton.h" -#include "TopBrussels/TopTreeProducer/interface/TRootJet.h" -#include "TopBrussels/TopTreeProducer/interface/TRootPFJet.h" -#include "TopBrussels/TopTreeProducer/interface/TRootMET.h" - -using namespace std; -using namespace TopTree; - -struct HighestCSVBtag{ - bool operator()( TRootJet* j1, TRootJet* j2 ) const{ - return j1->btag_combinedSecondaryVertexBJetTags() > j2->btag_combinedSecondaryVertexBJetTags(); - } -}; - -int main (int argc, char *argv[]) -{ - gSystem->Load("pluginTopBrusselsTopTreeProducer.so"); - AutoLibraryLoader::enable(); - - double nevents = 0; - - TChain * t = new TChain("eventTree"); - TChain * r = new TChain("runTree"); - - t->Add(argv[1]); - r->Add(argv[1]); - - //t->Add("dcap://maite.iihe.ac.be/pnfs/iihe/cms/store/user/tjkim/DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/V5_0_2/28102013_230503/TOPTREE/TOPTREE_10_*.root"); - //r->Add("dcap://maite.iihe.ac.be/pnfs/iihe/cms/store/user/tjkim/DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/Summer12_DR53X-PU_S10_START53_V7A-v1/V5_0_2/28102013_230503/TOPTREE/TOPTREE_10_*.root"); - - TBranch* run_br = 0; - TRootRun* runInfos = 0; - run_br = (TBranch *) r->GetBranch("runInfos"); - run_br->SetAddress(&runInfos); - int ntotal = runInfos->nHLTEvents(); - - double nevt = t->GetEntries(); - - TFile *fout = new TFile (argv[2], "RECREATE"); - - ///////////////////// - // My tree // - //////////////////// - int prePathCounter; - double diel1_pt; - double diel1_eta; - double diel1_phi; - double diel2_pt; - double diel2_eta; - double diel2_phi; - double diel_mass; - double dimu1_pt; - double dimu1_eta; - double dimu1_phi; - double dimu2_pt; - double dimu2_eta; - double dimu2_phi; - double dimu_mass; - double emu1_pt; - double emu1_eta; - double emu1_phi; - double emu2_pt; - double emu2_eta; - double emu2_phi; - double emu_mass; - - double photon1_pt; - double photon1_eta; - double photon1_phi; - double photon1_chIso; - double photon1_phIso; - double photon1_nhIso; - double photon1_relIso; - double photon2_pt; - double photon2_eta; - double photon2_phi; - double photon2_chIso; - double photon2_phIso; - double photon2_nhIso; - double photon2_relIso; - double diphoton_mass; - int nphotons; - - double jet1_pt; - double jet1_eta; - double jet1_phi; - double jet1_csv; - double jet2_pt; - double jet2_eta; - double jet2_phi; - double jet2_csv; - double jet3_pt; - double jet3_eta; - double jet3_phi; - double jet3_csv; - double jet4_pt; - double jet4_eta; - double jet4_phi; - double jet4_csv; - - int njets; - int nbjets_CSVL; - int nbjets_CSVM; - int nbjets_CSVT; - double met; - - TTree* myTree = new TTree("tree","tree"); - - myTree->Branch("prePathCounter", &prePathCounter, "prePathCounter/I"); - - //dileptons - myTree->Branch("diel1_pt", &diel1_pt, "diel1_pt/D"); - myTree->Branch("diel1_eta", &diel1_eta, "diel1_eta/D"); - myTree->Branch("diel1_phi", &diel1_phi, "diel1_phi/D"); - myTree->Branch("diel2_pt", &diel2_pt, "diel2_pt/D"); - myTree->Branch("diel2_eta", &diel2_eta, "diel2_eta/D"); - myTree->Branch("diel2_phi", &diel2_phi, "diel2_phi/D"); - myTree->Branch("diel_mass", &diel_mass, "diel_mass/D"); - myTree->Branch("dimu1_pt", &dimu1_pt, "dimu1_pt/D"); - myTree->Branch("dimu1_eta", &dimu1_eta, "dimu1_eta/D"); - myTree->Branch("dimu1_phi", &dimu1_phi, "dimu1_phi/D"); - myTree->Branch("dimu2_pt", &dimu2_pt, "dimu2_pt/D"); - myTree->Branch("dimu2_eta", &dimu2_eta, "dimu2_eta/D"); - myTree->Branch("dimu2_phi", &dimu2_phi, "dimu2_phi/D"); - myTree->Branch("dimu_mass", &dimu_mass, "dimu_mass/D"); - myTree->Branch("emu1_pt", &emu1_pt, "emu1_pt/D"); - myTree->Branch("emu1_eta", &emu1_eta, "emu1_eta/D"); - myTree->Branch("emu1_phi", &emu1_phi, "emu1_phi/D"); - myTree->Branch("emu2_pt", &emu2_pt, "emu2_pt/D"); - myTree->Branch("emu2_eta", &emu2_eta, "emu2_eta/D"); - myTree->Branch("emu2_phi", &emu2_phi, "emu2_phi/D"); - myTree->Branch("emu_mass", &emu_mass, "emu_mass/D"); - - //photon - myTree->Branch("nphotons", &nphotons, "nphotons/I"); - myTree->Branch("photon1_pt", &photon1_pt, "photon1_pt/D"); - myTree->Branch("photon1_eta", &photon1_eta, "photon1_eta/D"); - myTree->Branch("photon1_phi", &photon1_phi, "photon1_phi/D"); - myTree->Branch("photon1_chIso", &photon1_chIso, "photon1_chIso/D"); - myTree->Branch("photon1_phIso", &photon1_phIso, "photon1_phIso/D"); - myTree->Branch("photon1_nhIso", &photon1_nhIso, "photon1_nhIso/D"); - myTree->Branch("photon1_relIso", &photon1_relIso, "photon1_relIso/D"); - myTree->Branch("photon2_pt", &photon2_pt, "photon2_pt/D"); - myTree->Branch("photon2_eta", &photon2_eta, "photon2_eta/D"); - myTree->Branch("photon2_phi", &photon2_phi, "photon2_phi/D"); - myTree->Branch("photon2_chIso", &photon2_chIso, "photon2_chIso/D"); - myTree->Branch("photon2_phIso", &photon2_phIso, "photon2_phIso/D"); - myTree->Branch("photon2_nhIso", &photon2_nhIso, "photon2_nhIso/D"); - myTree->Branch("photon2_relIso", &photon2_relIso, "photon2_relIso/D"); - myTree->Branch("diphoton_mass", &diphoton_mass, "diphoton_mass/D"); - - //jets - myTree->Branch("jet1_pt", &jet1_pt, "jet1_pt/D"); - myTree->Branch("jet1_eta", &jet1_eta, "jet1_eta/D"); - myTree->Branch("jet1_phi", &jet1_phi, "jet1_phi/D"); - myTree->Branch("jet1_csv", &jet1_csv, "jet1_csv/D"); - myTree->Branch("jet2_pt", &jet2_pt, "jet2_pt/D"); - myTree->Branch("jet2_eta", &jet2_eta, "jet2_eta/D"); - myTree->Branch("jet2_phi", &jet2_phi, "jet2_phi/D"); - myTree->Branch("jet2_csv", &jet2_csv, "jet2_csv/D"); - myTree->Branch("jet3_pt", &jet3_pt, "jet3_pt/D"); - myTree->Branch("jet3_eta", &jet3_eta, "jet3_eta/D"); - myTree->Branch("jet3_phi", &jet3_phi, "jet3_phi/D"); - myTree->Branch("jet3_csv", &jet3_csv, "jet3_csv/D"); - myTree->Branch("jet4_pt", &jet4_pt, "jet4_pt/D"); - myTree->Branch("jet4_eta", &jet4_eta, "jet4_eta/D"); - myTree->Branch("jet4_phi", &jet4_phi, "jet4_phi/D"); - myTree->Branch("jet4_csv", &jet4_csv, "jet4_csv/D"); - myTree->Branch("njets", &njets, "njets/I"); - myTree->Branch("nbjets_CSVL", &nbjets_CSVL, "nbjets_CSVL/I"); - myTree->Branch("nbjets_CSVM", &nbjets_CSVM, "nbjets_CSVM/I"); - myTree->Branch("nbjets_CSVT", &nbjets_CSVT, "nbjets_CSVT/I"); - - //met - myTree->Branch("met", &met, "met/D"); - - TClonesArray *tcmuons = new TClonesArray ("TopTree::TRootMuon", 0); - t->SetBranchAddress("Muons_selectedPatMuonsPF2PAT",&tcmuons); - TClonesArray *tcelectrons = new TClonesArray ("TopTree::TRootElectron", 0); - t->SetBranchAddress("Electrons_selectedPatElectronsPF2PAT",&tcelectrons); - TClonesArray *tcphotons = new TClonesArray ("TopTree::TRootPhoton", 0); - t->SetBranchAddress("Photons_selectedPatPhotons",&tcphotons); - TClonesArray *tcjets = new TClonesArray ("TopTree::TRootPFJet", 0); - t->SetBranchAddress("PFJets_selectedPatJetsPF2PAT",&tcjets); - TClonesArray *tcmets = new TClonesArray ("TopTree::TRootPFMET", 0); - t->SetBranchAddress("PFMET_patType1CorrectedPFMetPF2PAT",&tcmets); - - TH1F * EventSummary = new TH1F("EventSummary","EventSummary",2,0,2); - - prePathCounter = ntotal; - EventSummary->SetBinContent(1, nevt); - //////////////////////////////////// - // Loop on events - //////////////////////////////////// - - for (unsigned int ievt = 0; ievt < nevt; ievt++) - { - if( ievt % 10000 == 0 ) cout << ievt << "/" << nevt << endl; - - vector < TRootMuon* > muons; - vector < TRootElectron* > electrons; - vector < TRootPhoton* > photons; - vector < TRootPFJet* > jets; - vector < TRootMET* > mets; - - nevents++; - //////////////// - // LOAD EVENT // - //////////////// - - t->GetEntry(ievt); - - //init - //dileptons - diel1_pt = -999; - diel1_eta = -999; - diel1_phi = -999; - diel2_pt = -999; - diel2_eta = -999; - diel2_phi = -999; - diel_mass = -999; - dimu1_pt = -999; - dimu1_eta = -999; - dimu1_phi = -999; - dimu2_pt = -999; - dimu2_eta = -999; - dimu2_phi = -999; - dimu_mass = -999; - emu1_pt = -999; - emu1_eta = -999; - emu1_phi = -999; - emu2_pt = -999; - emu2_eta = -999; - emu2_phi = -999; - emu_mass = -999; - //photons - photon1_pt = -999; - photon1_eta = -999; - photon1_phi = -999; - photon1_chIso = -999; - photon1_phIso = -999; - photon1_nhIso = -999; - photon1_relIso = -999; - photon2_pt = -999; - photon2_eta = -999; - photon2_phi = -999; - photon2_chIso = -999; - photon2_phIso = -999; - photon2_nhIso = -999; - photon2_relIso = -999; - diphoton_mass = -999; - nphotons = -999; - //jets - jet1_pt = -999; - jet1_eta = -999; - jet1_phi = -999; - jet1_csv = -999; - jet2_pt = -999; - jet2_eta = -999; - jet2_phi = -999; - jet2_csv = -999; - jet3_pt = -999; - jet3_eta = -999; - jet3_phi = -999; - jet3_csv = -999; - jet4_pt = -999; - jet4_eta = -999; - jet4_phi = -999; - jet4_csv = -999; - njets = -999; - //b-jets - nbjets_CSVL = -999; - nbjets_CSVM = -999; - nbjets_CSVT = -999; - //met - met = -999; - - //clear vectors - muons.clear(); - electrons.clear(); - photons.clear(); - jets.clear(); - - for (int i = 0; i < tcmuons->GetEntriesFast(); i++) - muons.push_back ((TRootMuon *) tcmuons->At(i)); - for (int i = 0; i < tcelectrons->GetEntriesFast(); i++){ - - TRootElectron * tcelectron = (TRootElectron *) tcelectrons->At(i); - - bool pass = tcelectron->Pt() > 20 && tcelectron->mvaTrigId() > 0.5 && tcelectron->relPfIso(3,0.5) < 0.15; - if( pass ) { - electrons.push_back ((TRootElectron *) tcelectrons->At(i)); - } - } - - for (int i = 0; i < tcphotons->GetEntriesFast(); i++){ - - TRootPhoton * tcphoton = (TRootPhoton *) tcphotons->At(i); - - bool pass = false; - - if( abs(tcphoton->Eta()) < 1.479 ){ - pass = tcphoton->Pt() > 20 && tcphoton->sigmaIetaIeta() < 0.011 && tcphoton->hadronicOverEm() < 0.05 && tcphoton->passelectronveto(); - }else{ - pass = tcphoton->Pt() > 20 && tcphoton->sigmaIetaIeta() < 0.033 && tcphoton->hadronicOverEm() < 0.05 && tcphoton->passelectronveto(); - } - - if( pass ){ - photons.push_back ((TRootPhoton *) tcphotons->At(i)); - } - } - - if( photons.size() < 2 ) continue; - - for (int i = 0; i < tcjets->GetEntriesFast(); i++){ - TRootPFJet * tcjet = (TRootPFJet *) tcjets->At(i); - bool pass = true; - - if( tcjet->Pt() <= 20 ) continue; - - for(int j=0; j < (int) electrons.size()-1; j++){ - double dR = sqrt( (electrons[j]->Eta()-tcjet->Eta())*(electrons[j]->Eta()-tcjet->Eta()) + (electrons[j]->Phi()-tcjet->Phi())*(electrons[j]->Phi()-tcjet->Phi()) ); - if( dR < 0.5 ) { - pass = false; - break; - } - } - - if( pass ){ - jets.push_back ((TRootPFJet *) tcjets->At(i)); - } - } - //------------------------------// - // re-arrange jets in CSV order // - //------------------------------// - sort(jets.begin(),jets.end(),HighestCSVBtag()); - - for (int i = 0; i < tcmets->GetEntriesFast(); i++){ - mets.push_back ((TRootMET *) tcmets->At(i)); - } - - // scale factor for the event - //float scaleFactor = 1.; - - //-----------------// - // test saving tree// - //-----------------// - if( electrons.size() > 1){ - for(int i=0; i < (int) electrons.size()-1; i++){ - for(int j=i+1; j < (int) electrons.size(); j++){ - bool electron1_pass = electrons[i]->Pt() > 20 && electrons[i]->mvaTrigId() > 0.5 && electrons[i]->relPfIso(3,0.5) < 0.15; - bool electron2_pass = electrons[j]->Pt() > 20 && electrons[j]->mvaTrigId() > 0.5 && electrons[j]->relPfIso(3,0.5) < 0.15; - if( electron1_pass && electron2_pass ){ - diel1_pt = electrons[i]->Pt(); - diel1_eta = electrons[i]->Eta(); - diel1_phi = electrons[i]->Phi(); - diel2_pt = electrons[j]->Pt(); - diel2_eta = electrons[j]->Eta(); - diel2_phi = electrons[j]->Phi(); - TLorentzVector v1(electrons[i]->Px(), electrons[i]->Py(), electrons[i]->Pz(), electrons[i]->Energy()); - TLorentzVector v2(electrons[j]->Px(), electrons[j]->Py(), electrons[j]->Pz(), electrons[j]->Energy()); - diel_mass = (v1+v2).M(); - } - } - } - } - - if( muons.size() > 1){ - for(int i=0; i < (int) muons.size()-1; i++){ - for(int j=i+1; j < (int) muons.size(); j++){ - bool muon1_pass = muons[i]->Pt() > 20 && muons[i]->isPFMuon() && ( muons[i]->isGlobalMuon() || muons[i]->isTrackerMuon() ) && muons[i]->relPfIso(3,0.5) < 0.15; - bool muon2_pass = muons[j]->Pt() > 20 && muons[j]->isPFMuon() && ( muons[j]->isGlobalMuon() || muons[j]->isTrackerMuon() ) && muons[j]->relPfIso(3,0.5) < 0.15; - if( muon1_pass && muon2_pass ){ - dimu1_pt = muons[i]->Pt(); - dimu1_eta = muons[i]->Eta(); - dimu1_phi = muons[i]->Phi(); - dimu2_pt = muons[j]->Pt(); - dimu2_eta = muons[j]->Eta(); - dimu2_phi = muons[j]->Phi(); - TLorentzVector v1(muons[i]->Px(), muons[i]->Py(), muons[i]->Pz(), muons[i]->Energy()); - TLorentzVector v2(muons[j]->Px(), muons[j]->Py(), muons[j]->Pz(), muons[j]->Energy()); - dimu_mass = (v1+v2).M(); - } - } - } - } - - if( muons.size() > 0 && electrons.size() > 0){ - for(int i=0; i < (int) electrons.size(); i++){ - for(int j=0; j < (int) muons.size(); j++){ - bool electron_pass = electrons[i]->Pt() > 20 && electrons[i]->mvaTrigId() > 0.5 && electrons[i]->relPfIso(3,0.5) < 0.15; - bool muon_pass = muons[j]->Pt() > 20 && muons[j]->isPFMuon() && ( muons[j]->isGlobalMuon() || muons[j]->isTrackerMuon() ) && muons[j]->relPfIso(3,0.5) < 0.15; - - if( electron_pass && muon_pass ){ - emu1_pt = electrons[i]->Pt(); - emu1_eta = electrons[i]->Eta(); - emu1_phi = electrons[i]->Phi(); - emu2_pt = muons[j]->Pt(); - emu2_eta = muons[j]->Eta(); - emu2_phi = muons[j]->Phi(); - TLorentzVector v1(electrons[i]->Px(), electrons[i]->Py(), electrons[i]->Pz(), electrons[i]->Energy()); - TLorentzVector v2(muons[j]->Px(), muons[j]->Py(), muons[j]->Pz(), muons[j]->Energy()); - emu_mass = (v1+v2).M(); - } - } - } - } - - //if( dimu_mass <= 0 && diel_mass <= 0 && emu_mass <= 0) continue; - - if( photons.size() > 1){ - for(int i=0; i < (int) photons.size()-1; i++){ - for(int j=i+1; j < (int) photons.size(); j++){ - - bool photon1_pass = false; - bool photon2_pass = false; - //not recommended but useful to keep as it is reported to be very efficient cut - bool photon1_hasPixelSeed_pass =false; - bool photon2_hasPixelSeed_pass =false; - - if( abs(photons[i]->Eta()) < 1.479 ){ - photon1_pass = photons[i]->sigmaIetaIeta() < 0.011 && photons[i]->hadronicOverEm() < 0.05 && photons[i]->passelectronveto(); - }else{ - photon1_pass = photons[i]->sigmaIetaIeta() < 0.033 && photons[i]->hadronicOverEm() < 0.05 && photons[i]->passelectronveto(); - } - - if( abs(photons[j]->Eta()) < 1.479 ){ - photon2_pass = photons[j]->sigmaIetaIeta() < 0.011 && photons[j]->hadronicOverEm() < 0.05 && photons[j]->passelectronveto(); - }else{ - photon2_pass = photons[j]->sigmaIetaIeta() < 0.033 && photons[j]->hadronicOverEm() < 0.05 && photons[j]->passelectronveto(); - } - - if( photon1_pass && photon2_pass){ - photon1_pt = photons[i]->Pt(); - photon1_eta = photons[i]->Eta(); - photon1_phi = photons[i]->Phi(); - photon1_chIso = photons[i]->chargedHadronIso(); - photon1_nhIso = photons[i]->neutralHadronIso(); - photon1_phIso = photons[i]->photonIso(); - photon1_relIso = photons[i]->relPfIso(); - photon2_pt = photons[j]->Pt(); - photon2_eta = photons[j]->Eta(); - photon2_phi = photons[j]->Phi(); - photon2_chIso = photons[j]->chargedHadronIso(); - photon2_nhIso = photons[j]->neutralHadronIso(); - photon2_phIso = photons[j]->photonIso(); - photon2_relIso = photons[j]->relPfIso(); - TLorentzVector v1(photons[i]->Px(), photons[i]->Py(), photons[i]->Pz(), photons[i]->Energy()); - TLorentzVector v2(photons[j]->Px(), photons[j]->Py(), photons[j]->Pz(), photons[j]->Energy()); - diphoton_mass = (v1+v2).M(); - } - } - } - } - - nphotons = photons.size(); - - int nb_CSVL = 0; - int nb_CSVM = 0; - int nb_CSVT = 0; - - for(unsigned int i=0; i < jets.size() ; i++){ - if( jets[i]->btag_combinedSecondaryVertexBJetTags() > 0.244 ){ - nb_CSVL = nb_CSVL+1; - } - if( jets[i]->btag_combinedSecondaryVertexBJetTags() > 0.679 ){ - nb_CSVM = nb_CSVM+1; - } - if( jets[i]->btag_combinedSecondaryVertexBJetTags() > 0.898 ){ - nb_CSVT = nb_CSVT+1; - } - } - - nbjets_CSVL = nb_CSVL; - nbjets_CSVM = nb_CSVM; - nbjets_CSVT = nb_CSVT; - - if( jets.size() > 0){ - jet1_pt = jets[0]->Pt(); - jet1_eta = jets[0]->Eta(); - jet1_phi = jets[0]->Phi(); - jet1_csv = jets[0]->btag_combinedSecondaryVertexBJetTags(); - } - if( jets.size() > 1){ - jet2_pt = jets[1]->Pt(); - jet2_eta = jets[1]->Eta(); - jet2_phi = jets[1]->Phi(); - jet2_csv = jets[1]->btag_combinedSecondaryVertexBJetTags(); - } - if( jets.size() > 2){ - jet3_pt = jets[2]->Pt(); - jet3_eta = jets[2]->Eta(); - jet3_phi = jets[2]->Phi(); - jet3_csv = jets[2]->btag_combinedSecondaryVertexBJetTags(); - } - if( jets.size() > 3){ - jet4_pt = jets[3]->Pt(); - jet4_eta = jets[3]->Eta(); - jet4_phi = jets[3]->Phi(); - jet4_csv = jets[3]->btag_combinedSecondaryVertexBJetTags(); - } - - njets = jets.size(); - met = mets[0]->Pt(); - - myTree->Fill(); - } //loop on events - //cout << "nevents= " << nevents << endl; - - fout->Write(); - - delete fout; - - tcmuons->Delete(); - tcelectrons->Delete(); - - return 0; -} diff --git a/compile.sh b/compile.sh new file mode 100644 index 0000000..f9d694f --- /dev/null +++ b/compile.sh @@ -0,0 +1,22 @@ +#if there is one arg compile only this .cc +if [[ -n $1 ]] +then + ccfile=$1 + + ofile=`echo $ccfile |sed 's/\.cc$//g'` + echo "compiling : " $ccfile ", executible name: " $ofile + g++ -g -std=c++11 -L ~/lib -L . -L .. -I ./ -I ../ -l TopTreeAnaContent76 -l TopTreeAna76 -l MLP -l TreePlayer -l TMVA -l XMLIO -I `root-config --incdir` `root-config --libs` $ccfile -o $ofile +# cp ~/lib/libTopTreeAnaContent74.so /localgrid/qpython/lib/ +# cp ~/lib/libTopTreeAna74.so /localgrid/qpython/lib/ + + +# if there is no arg compile all .cc +else + for ccfile in ./*.cc + do + ofile=`echo $ccfile |sed 's/\.cc$//g'` + echo "compiling : " $ccfile ", executible name: " $ofile + g++ -g -std=c++11 -L ~/lib -L . -L .. -I ./ -I ../ -l TopTreeAnaContent76 -l TopTreeAna76 -l MLP -l TreePlayer -l TMVA -l XMLIO -I `root-config --incdir` `root-config --libs` $ccfile -o $ofile + + done +fi diff --git a/config/FCNC_1L3B_config.xml b/config/FCNC_1L3B_config.xml deleted file mode 100644 index 1310ea4..0000000 --- a/config/FCNC_1L3B_config.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/config/FCNC_3L_config.xml b/config/FCNC_3L_config.xml deleted file mode 100644 index 22522b6..0000000 --- a/config/FCNC_3L_config.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/config/FCNC_4L_config.xml b/config/FCNC_4L_config.xml deleted file mode 100644 index ee55bb2..0000000 --- a/config/FCNC_4L_config.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/config/FCNC_OSdilepton_config.xml b/config/FCNC_OSdilepton_config.xml deleted file mode 100644 index 53d142e..0000000 --- a/config/FCNC_OSdilepton_config.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/config/FCNC_SSdilepton_config.xml b/config/FCNC_SSdilepton_config.xml deleted file mode 100644 index 1b25af8..0000000 --- a/config/FCNC_SSdilepton_config.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ---> - - - - - - - - - - - - - diff --git a/config/FCNC_config.xml b/config/FCNC_config.xml deleted file mode 100644 index bb12638..0000000 --- a/config/FCNC_config.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/config/Run2TriLepton_samples_mumumu.xml b/config/Run2TriLepton_samples_mumumu.xml new file mode 100644 index 0000000..f0d16da --- /dev/null +++ b/config/Run2TriLepton_samples_mumumu.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config/Run2TriLepton_samples_mumumu.xmlbackup b/config/Run2TriLepton_samples_mumumu.xmlbackup new file mode 100644 index 0000000..c227914 --- /dev/null +++ b/config/Run2TriLepton_samples_mumumu.xmlbackup @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/FCNC_selection_1L3B.root b/data/FCNC_selection_1L3B.root deleted file mode 100644 index a33a32e..0000000 Binary files a/data/FCNC_selection_1L3B.root and /dev/null differ diff --git a/data/FCNC_selection_3L.root b/data/FCNC_selection_3L.root deleted file mode 100644 index b74a291..0000000 Binary files a/data/FCNC_selection_3L.root and /dev/null differ diff --git a/data/FCNC_selection_SSdilepton.root b/data/FCNC_selection_SSdilepton.root deleted file mode 100644 index c670f0e..0000000 Binary files a/data/FCNC_selection_SSdilepton.root and /dev/null differ diff --git a/macros/FCNC_CutEfficiencies.C b/macros/FCNC_CutEfficiencies.C deleted file mode 100644 index 16a3169..0000000 --- a/macros/FCNC_CutEfficiencies.C +++ /dev/null @@ -1,179 +0,0 @@ -#include -#include -#include -#include -#include "TFile.h" -#include -#include -#include -#include - - -using namespace std; - -void FCNC_CutEfficiencies(string channel = "1L3B"){ - - - string Vector_cutflow_1L3B[18] = {"","initial","1L",">=4jets","== 3 bjets",">= 1 bjets",">= 2 bjets",">= 3 bjets","","","","","","","","","","",""}; - string Vector_cutflow_4L[19] = {"","initial",">3L",">0 jets",">1 jets",">2 jets",">3 jets",">4 jets",">5 jets",">0 Bjets",">1 Bjets",">2 Bjets",">3 Bjets",">4 Bjets",">5 Bjets","4-5 leptons","4 leptons", "5 leptons",""}; - string Vector_cutflow_3L[19] = {"","initial","=3L",">0 jets",">1 jets",">2 jets",">3 jets",">4 jets",">5 jets",">0 Bjets",">1 Bjets",">2 Bjets",">3 Bjets",">4 Bjets",">5 Bjets","","", "",""}; - - - - string rootFileName = "../data/FCNC_selection_"; - rootFileName += channel; - rootFileName += ".root"; - - - TFile *file = new TFile(rootFileName.c_str(),"read"); - - - vector Vector_SampleName; - vector Efficiency_cutflows; - - //Put in the totals for signal and background - Vector_SampleName.push_back("total_B"); - Vector_SampleName.push_back("total_S"); - - //Put in the individual samples - - Vector_SampleName.push_back("W_1Jets"); - Vector_SampleName.push_back("W_2Jets"); - Vector_SampleName.push_back("W_3Jets"); - Vector_SampleName.push_back("W_4Jets"); - Vector_SampleName.push_back("WW_To2L2Nu"); - Vector_SampleName.push_back("WZ_To2L2Q"); - Vector_SampleName.push_back("WZ_To3LNu"); - Vector_SampleName.push_back("ZZ_To2L2Nu"); - Vector_SampleName.push_back("ZZ_To2L2Q"); - Vector_SampleName.push_back("ZZ_To4L"); - Vector_SampleName.push_back("ST_TToDilepton_tW-ch"); - Vector_SampleName.push_back("ST_TToTlepWhad_tW-ch"); - Vector_SampleName.push_back("ST_TToThadWlep_tW-ch"); - Vector_SampleName.push_back("ST_TBarToDilepton_tW-ch"); - Vector_SampleName.push_back("ST_TBarToTlepWhad_tW-ch"); - Vector_SampleName.push_back("ST_TBarToThadWlep_tW-ch"); - Vector_SampleName.push_back("TT_SemiLeptMGDecays"); - Vector_SampleName.push_back("TT_FullLeptMGDecays"); - Vector_SampleName.push_back("TT_HadronicMGDecays"); - Vector_SampleName.push_back("Z_M-10To50"); - Vector_SampleName.push_back("Z_M-50"); - Vector_SampleName.push_back("Z_1Jets"); - Vector_SampleName.push_back("Z_2Jets"); - Vector_SampleName.push_back("Z_3Jets"); - Vector_SampleName.push_back("Z_4Jets"); - Vector_SampleName.push_back("TTZ"); - Vector_SampleName.push_back("TTW"); - Vector_SampleName.push_back("ttbar"); - Vector_SampleName.push_back("ttbar_fullLept"); - Vector_SampleName.push_back("ttbar_semiLept"); - Vector_SampleName.push_back("wjets"); - Vector_SampleName.push_back("ttt"); - Vector_SampleName.push_back("ttw"); - Vector_SampleName.push_back("ww"); - Vector_SampleName.push_back("wz"); - Vector_SampleName.push_back("WW"); - Vector_SampleName.push_back("WZ"); - Vector_SampleName.push_back("zz"); - Vector_SampleName.push_back("ZZ"); - Vector_SampleName.push_back("ttz"); - Vector_SampleName.push_back("Zjets"); - Vector_SampleName.push_back("ST_T_tW-ch"); - Vector_SampleName.push_back("ST_TBar_tW-ch"); - Vector_SampleName.push_back("ST_T_s-ch"); - Vector_SampleName.push_back("ST_Tbar_s-ch"); - Vector_SampleName.push_back("ST_T_t-ch"); - Vector_SampleName.push_back("ST_Tbar_t-ch"); - - - - - - Vector_SampleName.push_back("TTJetsTocHbW_HToWW_WToLNuL_WToJets_HctR"); - Vector_SampleName.push_back("TTJetsTocHbW_HToWW_WToLNuL_WToJets_HctL"); - Vector_SampleName.push_back("TTJetsTocHbW_HToWW_WToLNuL_HctL"); - Vector_SampleName.push_back("TTJetsTocHbW_HToWW_WToLNuL_HctR"); - Vector_SampleName.push_back("TTJetsTocHbW_HToBB_HctL"); - Vector_SampleName.push_back("TTJetsTocHbW_HToBB_HctR"); - - Vector_SampleName.push_back("TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctL"); - Vector_SampleName.push_back("TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctR"); - Vector_SampleName.push_back("TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctL"); - Vector_SampleName.push_back("TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctR"); - Vector_SampleName.push_back("TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctL"); - Vector_SampleName.push_back("TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctR"); - Vector_SampleName.push_back("TTJetsTocHbW_HToZZ_ZToLL_HctL"); - Vector_SampleName.push_back("TTJetsTocHbW_HToZZ_ZToLL_HctR"); - Vector_SampleName.push_back("TTJetsTocZbW"); - - - - //loop over all TH1F in the input rootfile and check if the corresponding samples are present in them - for(unsigned int j = 0; j < Vector_SampleName.size(); j++){ - - string Path_To_Histo = "MultiSamplePlot_MScutflow/MScutflow_"; - Path_To_Histo += Vector_SampleName[j]; - - TH1F *Histo( (TH1F*) file->Get(Path_To_Histo.c_str()) ); - - if(Histo) Efficiency_cutflows.push_back(Histo); - } - - string outputName = "../data/Efficiency_cutflows_"; - outputName += channel; - outputName += ".root"; - TFile *outputFile = new TFile(outputName.c_str(),"RECREATE"); - - for( unsigned int i = 0; i < Efficiency_cutflows.size(); i++){ - double NbOfEvents = Efficiency_cutflows[i]->GetBinContent(2); - - //cout << "NbOfEvents " << NbOfEvents << endl; - Efficiency_cutflows[i]->Scale(1./NbOfEvents); - Efficiency_cutflows[i]->Write(); - - } - - for( unsigned int k = 0; k < Efficiency_cutflows.size(); k++) - { - TH1F *histogram = (TH1F*) Efficiency_cutflows[k]; - //cout << "Histogram: " << k << " with name " << histogram->GetName() << " and title " << histogram->GetTitle() << endl; - double NbOfbins = histogram->GetNbinsX(); - string HistoTitle = histogram->GetName(); - if(histogram->GetBinContent(2) != 0) - { - cout << "------------------------------------------------------------------" << endl; - cout << "*** "<< HistoTitle << " : " << "***"<< endl; - cout << "" << endl; - for(unsigned int i = 1; i < NbOfbins; i ++) - { - int iBin = i; - char *BinName; - - if(channel.find("4L")!=string::npos) - { - BinName = (char*)Vector_cutflow_4L[i-1].c_str(); - } - if(channel.find("3L")!=string::npos) - { - BinName = (char*)Vector_cutflow_3L[i-1].c_str(); - } - if(channel.find("1L3B")!=string::npos) - { - BinName = (char*)Vector_cutflow_1L3B[i-1].c_str(); - } - histogram->GetXaxis()->SetBinLabel(iBin, BinName); - - string binlabel = histogram->GetXaxis()->GetBinLabel(i); - double icontent = histogram->GetBinContent(i); - if(!binlabel.empty()) - { - cout << binlabel << " : " << icontent << " efficiency -- " << icontent*100 <<"% efficiency"<< endl; - } - } - - } - } - outputFile->Write(); - - -} diff --git a/macros/FCNC_compileANDrun.sh b/macros/FCNC_compileANDrun.sh deleted file mode 100644 index 50af306..0000000 --- a/macros/FCNC_compileANDrun.sh +++ /dev/null @@ -1 +0,0 @@ -g++ -g -L ~/lib -I ../../ -l TopTreeAnaContent53 -l TopTreeAna53 -l MLP -l TreePlayer -l TMVA -l XMLIO -I `root-config --incdir` `root-config --libs` FCNC_selection.cc -o FCNC_selection diff --git a/macros/FCNC_photon.C b/macros/FCNC_photon.C deleted file mode 100644 index 8c8a883..0000000 --- a/macros/FCNC_photon.C +++ /dev/null @@ -1,43 +0,0 @@ -#include -using namespace std; - -void FCNC_photon(){ - - AutoLibraryLoader::enable(); - - gSystem->CompileMacro("TopAnalyzerLite.cc", "k"); - - string treeName = "tree"; - string imageOutDir = "FCNC_photon_plot"; - - TopAnalyzerLite* analyzer = new TopAnalyzerLite(treeName, imageOutDir); - - analyzer->addRealData("vallot_Run2012.root", 19700); - - // replace -1 with total number of events if you want to provide total number of MC events manually - analyzer->addMCSig("Hct", "Hct to #gamma #gamma", "vallot_tcHtoGG.root", 5, -1, kRed, false); //cross section = 1 - analyzer->addMCBkg("HToGG", "H to #gamma #gamma", "vallot_HtoGG.root", 19.5, -1, kYellow); //cross section = 19.5 - analyzer->addMCBkg("DiPhotons", "DiPhotons", "vallot_diphotons.root", 75.4, -1, kGreen); //cross section = 75.4 - analyzer->addMCBkg("TTJets", "TTJets", "vallot_TTJets.root", 250, -1, kRed+2); //cross section = 75.4 - analyzer->addMCBkg("DY", "ZJets", "vallot_ZJets.root", 3530, -1, kBlue); //cross section = 3.53*10^3 - - analyzer->addMonitorPlot("njets", "njets", "Jet Multiplicity;Jet Multiplicity;Events", 15, 0, 15, 0.5, 2000, true); - analyzer->addMonitorPlot("nbjets_CSVL", "nbjets_CSVL", "b-Jet Multiplicity;b-Jet Multiplicity (CSVL);Events", 5, 0, 5, 0.5, 2000, true); - analyzer->addMonitorPlot("nbjets_CSVM", "nbjets_CSVM", "b-Jet Multiplicity;b-Jet Multiplicity (CSVM);Events", 5, 0, 5, 0.5, 2000, true); - analyzer->addMonitorPlot("nbjets_CSVT", "nbjets_CSVT", "b-Jet Multiplicity;b-Jet Multiplicity (CSVT);Events", 5, 0, 5, 0.5, 2000, true); - analyzer->addMonitorPlot("nphotons", "nphotons", "Photon Multiplicity;Photon Multiplicity;Events", 6, 0, 6, 0.5, 2000, true); - analyzer->addMonitorPlot("photon1_pt", "photon1_pt", "Leading Photon P_{T};Photon P_{T} (GeV);Events", 20, 0, 200, 0.5, 3000, true); - analyzer->addMonitorPlot("photon2_pt", "photon2_pt", "Second Leading Photon P_{T};Photon P_{T} (GeV);Events", 20, 0, 200, 0.5, 3000, true); - analyzer->addMonitorPlot("photon1_eta", "photon1_eta", "Leading Photon #eta;Photon #eta;Events", 60, -3, 3, 0.5, 5000, true); - analyzer->addMonitorPlot("photon2_eta", "photon2_eta", "Second Leading Photon #eta;Photon #eta;Events", 60, -3, 3, 0.5, 5000, true); - analyzer->addMonitorPlot("diphoton_mass", "diphoton_mass", "Di-Photon Invariant Mass;Di-Photon Invariant Mass (GeV);Events", 80, 80, 160, 0.5, 2000, true); - - analyzer->addCutStep("nphotons >= 2 && njets >= 2 && photon1_pt > 40 && photon2_pt > 40 && abs(photon1_eta) < 2.5 && abs(photon2_eta) < 2.5 && photon1_relIso < 0.05 && photon2_relIso < 0.05", "nbjets_CSVL,nbjets_CSVM,nbjets_CSVT,njets,nphotons,photon1_pt,photon2_pt,photon1_eta,photon2_eta,diphoton_mass", 0.1); - - analyzer->addCutStep("nphotons >= 2 && njets >= 2 && photon1_pt > 40 && photon2_pt > 40 && abs(photon1_eta) < 2.5 && abs(photon2_eta) < 2.5 && nbjets_CSVT >= 1 && photon1_relIso < 0.1 && photon2_relIso < 0.1", "nbjets_CSVL,nbjets_CSVM,nbjets_CSVT,njets,nphotons,photon1_pt,photon2_pt,photon1_eta,photon2_eta,diphoton_mass", 0.1); - - analyzer->applyCutSteps(); - - analyzer->saveHistograms(); - -} diff --git a/macros/FCNC_selection.cc b/macros/FCNC_selection.cc deleted file mode 100644 index a26b8a4..0000000 --- a/macros/FCNC_selection.cc +++ /dev/null @@ -1,1711 +0,0 @@ -// isis.marina.van.parijs@cern.ch -// kevin.deroover@cern.ch -// shimaa.abuzeid@cern.ch -// 2013 -// This is a program that runs over the toptrees and calculates the -// efficiencies of certain cuts in the datasamples. - -#include "TStyle.h" -#include "TH3F.h" -#include -#include -#include -#include - -#include "../../TopTreeProducer/interface/TRootRun.h" -#include "../../TopTreeProducer/interface/TRootEvent.h" - -#include "../../TopTreeAnalysisBase/Selection/interface/SelectionTable.h" -#include "../../TopTreeAnalysisBase/Selection/interface/ElectronPlotter.h" -#include "../../TopTreeAnalysisBase/Selection/interface/MuonPlotter.h" -#include "../../TopTreeAnalysisBase/Selection/interface/JetPlotter.h" -#include "../../TopTreeAnalysisBase/Selection/interface/VertexPlotter.h" - -#include "../../TopTreeAnalysisBase/Tools/interface/PlottingTools.h" -#include "../../TopTreeAnalysisBase/Tools/interface/JetTools.h" -#include "../../TopTreeAnalysisBase/Tools/interface/MultiSamplePlot.h" -#include "../../TopTreeAnalysisBase/Tools/interface/TTreeLoader.h" -#include "../../TopTreeAnalysisBase/Tools/interface/AnalysisEnvironmentLoader.h" -#include "../../TopTreeAnalysisBase/Tools/interface/MVATrainer.h" -#include "../../TopTreeAnalysisBase/Tools/interface/MVAComputer.h" -#include "../../TopTreeAnalysisBase/Tools/interface/BTagWeightTools.h" - -#include "../../TopTreeAnalysisBase/Content/interface/AnalysisEnvironment.h" -#include "../../TopTreeAnalysisBase/Content/interface/Dataset.h" - -#include "../../TopTreeAnalysisBase/MCInformation/interface/MCWeighter.h" -#include "../../TopTreeAnalysisBase/MCInformation/interface/ResolutionFit.h" -#include "../../TopTreeAnalysisBase/MCInformation/interface/JetPartonMatching.h" -#include "../../TopTreeAnalysisBase/MCInformation/interface/LumiReWeighting.h" - -#include "../../TopTreeAnalysisBase/Reconstruction/interface/JetCorrectorParameters.h" -#include "../../TopTreeAnalysisBase/Reconstruction/interface/JetCorrectionUncertainty.h" - - - -#include "../macros/Style.C" - -using namespace std; //needed for cout and stuff -using namespace TopTree; //needed for TT -using namespace reweight; //needed for PUreweighting - - -/// MultiSamplePlot -map MSPlot; - - -/// Normal Plots (TH1F* and TH2F*) -map histo1D; - -struct HighestCVSBtag{ - bool operator()( TRootJet* j1, TRootJet* j2 ) const{ - return j1->btag_combinedSecondaryVertexBJetTags() > j2->btag_combinedSecondaryVertexBJetTags(); - } -}; - - -int main(int argc, char *argv[]){ - //Make plots nicer: color, style, ... - setMyStyle(); - - //see how long the program takes to run with a clock - clock_t start = clock(); - std::cout << "******************************************" << std::endl; - std::cout << " Starting clock" << endl; - std::cout << "******************************************"<1 ; iarg++) - { - std::string argval=argv[iarg]; - - if(argval=="--help" || argval =="--h") - { - cout << "--NoWarnings: put warnings off " << endl; - cout << "--NoInfo: put information off " << endl; - cout << "--debug: put debug output on" << endl; - cout << "--xml myxml.xml: change Xml file" << endl; - cout << "--btag CSVM: change btag algorithm" << endl; - cout << "--1L3B: use the 1 lepton + 3 b-tags channel" << endl; - cout << "--SSdilepton: use the same sign dilepton channel" << endl; - cout << "--OSdilepton: use the opposite sign dilepton channel" << endl; - cout << "--3L: use the 3 lepton channel (exactly 3)" << endl; - cout << "--4L: use the 4 lepton channel (at least 4)" << endl; - cout << "--Bigxml: use the xml file containing all samples (not channel dependent)" << endl; - return 0; - } - if (argval=="--NoInfo") { - iarg++; - information = false; - } - if (argval=="--NoWarnings") { - iarg++; - warnings = false; - } - if (argval=="--debug") { - iarg++; - debug = true; - } - if (argval=="--btag") { - iarg++; - tempbtagger = argv[iarg]; - foundbtag = true; - } - if (argval=="--xml") { - iarg++; - xmlfile = argv[iarg]; - foundxml = true; - } - if (argval=="--1gamma") { - channel = "1gamma"; - xmlfile = "../config/FCNC_1gamma_config.xml"; - } - if (argval=="--2gamma") { - channel = "2gamma"; - xmlfile = "../config/FCNC_2gamma_config.xml"; - } - if (argval=="--1L3B") { - channel = "1L3B"; - xmlfile = "../config/FCNC_1L3B_config.xml"; - } - if (argval=="--SSdilepton") { - channel = "SSdilepton"; - xmlfile = "../config/FCNC_SSdilepton_config.xml"; - } - if (argval=="--OSdilepton") { - channel = "OSdilepton"; - xmlfile = "../config/FCNC_OSdilepton_config.xml"; - } - if (argval=="--3L") { - channel = "3L"; - xmlfile = "../config/FCNC_3L_config.xml"; - } - if (argval=="--4L") { - channel = "4L"; - xmlfile = "../config/FCNC_4L_config.xml"; - } - if (argval=="--Bigxml"){ - Big_xml= true; - xmlfile = "../config/FCNC_config.xml"; - - } - - - - } - - - if (Big_xml) xmlfile = "../config/FCNC_config.xml"; - if (foundbtag) btagger = tempbtagger; - - if(information) std::cout << "[INFO] Used configuration file: " << xmlfile << endl; - if(information) std::cout << "[INFO] Used channel: " << channel << endl; - if(information) std::cout << "[INFO] Used btag algorithm: " << btagger << endl; - if(channel.find("undefined")!=string::npos && warnings) std:cout << "[WARNING] No channel was defined" << endl; - if(Big_xml && warnings) std::cout << "[WARNING] Using the big xml file" << endl; - /////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - // end different options for executing this macro // - /////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - - - /////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - // Options for different b-tagging algorithms ///// - /////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - float workingpointvalue = 9999; //working points updated to 2012 BTV-POG recommendations. - float Tightworkingpoint = .898; - - if(btagger == "TCHPM" || btagger == "TCHET" || btagger == "SSV" ){ - cout<<"This tagger ("<< btagger <<")is not commisioned in 2012, please use CSV, TCHP or JetProb"< datasets; //vector that will contain all datasets - if(debug) std::cout << "[PROCES] Loading the datasets " << endl; - treeLoader.LoadDatasets(datasets, xmlfile.c_str()); //put datasets via xmlfile in the dataset vector - - /////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - // output stuff // - /////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - - // Set an output rootfile - char rootFileName[900]; - char channelchar[900]; - if(channel.find("1gamma")!=string::npos) sprintf(channelchar, "1gamma"); - if(channel.find("2gamma")!=string::npos) sprintf(channelchar, "2gamma"); - if(channel.find("3L")!=string::npos) sprintf(channelchar, "3L"); - if(channel.find("4L")!=string::npos) sprintf(channelchar, "4L"); - if(channel.find("1L3B")!=string::npos) sprintf(channelchar, "1L3B"); - if(channel.find("SSdilepton")!=string::npos) sprintf(channelchar, "SSdilepton"); - if(channel.find("OSdilepton")!=string::npos) sprintf(channelchar, "OSdilepton"); - - sprintf(rootFileName,"../data/FCNC_selection_%s.root",channelchar); - TFile *fout = new TFile (rootFileName, "RECREATE"); - if(debug) cout << "[PROCES] Declared output rootfiles "<< endl; - - /////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - // end output stuff // - /////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - - // Declare variables: - if(debug) cout << "[PROCES] Variable declaration "<< endl; - vector < TRootVertex* > vertex; - vector < TRootMuon* > init_muons; - vector < TRootElectron* > init_electrons; - vector < TRootJet* > init_jets; - vector < TRootMET* > mets; - - - //Define an event (global variable) - TRootEvent* event = 0; - - - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - ////////////////// MultiSample plots: convenient class which combines multiple MC and DATA histograms into single plots. ////////////////////////////// - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - MSPlot["NbOfSelectedJets"] = new MultiSamplePlot(datasets, "NbOfSelectedJets", 15, -0.5, 14.5, "Nb. of jets"); - MSPlot["NbOfSelectedLightJets"] = new MultiSamplePlot(datasets, "NbOfSelectedLightJets", 15, -0.5, 14.5, "Nb. of jets"); - MSPlot["NbOfSelectedLeptons"] = new MultiSamplePlot(datasets, "NbOfSelectedLeptons", 10, -0.5, 9.5, "Nb. of leptons"); - MSPlot["NbOfSelectedBJets_CSVM"] = new MultiSamplePlot(datasets, "NbOfSelectedBJets_CSVM", 15, -0.5, 14.5, "Nb. of jets"); - MSPlot["NbOfSelectedBJets_CSVT"] = new MultiSamplePlot(datasets, "NbOfSelectedBJets_CSVT", 15, -0.5, 14.5, "Nb. of jets"); - MSPlot["JetEta"] = new MultiSamplePlot(datasets, "JetEta", 30,-3., 3., "Jet #eta"); - MSPlot["JetPhi"] = new MultiSamplePlot(datasets, "JetPhi", 50, -4., 4., "Jet #phi"); - MSPlot["MET"] = new MultiSamplePlot(datasets, "MET", 40, 0., 700., "MET"); - if(channel.find("3L")!=string::npos) MSPlot["MET_3LcH"]= new MultiSamplePlot(datasets, "MET_3LcH", 40, 0., 700., "MET"); - //MSPlot["mll_z"] = new MultiSamplePlot(datasets,"mll_z",50,0,100,"Invariant mass of the leptons that make the Z boson"); - MSPlot["Pt_leading_lepton"] = new MultiSamplePlot(datasets,"Pt_leading_lepton",50,0,100,"Pt leading lepton"); - MSPlot["Pt_2nd_leading_lepton"] = new MultiSamplePlot(datasets,"Pt_2nd_leading_lepton",50,0,100,"Pt 2nd leading lepton"); - MSPlot["Pt_3d_leading_lepton"] = new MultiSamplePlot(datasets,"Pt_3d_leading_lepton",50,0,100,"Pt third leading lepton"); - MSPlot["Pt_4th_leading_lepton"] = new MultiSamplePlot(datasets,"Pt_4th_leading_lepton",50,0,100,"Pt fourth leading lepton"); - MSPlot["Pt_5th_leading_lepton"] = new MultiSamplePlot(datasets,"Pt_5th_leading_lepton",50,0,100,"Pt fifth leading lepton"); - MSPlot["Pt_leading_jet"] = new MultiSamplePlot(datasets,"Pt_leading_jet",100,0,200,"Pt leading jet"); - MSPlot["Pt_2nd_leading_jet"] = new MultiSamplePlot(datasets,"Pt_2nd_leading_jet",100,0,200,"Pt 2nd leading jet"); - MSPlot["Pt_3d_leading_jet"] = new MultiSamplePlot(datasets,"Pt_3d_leading_jet",100,0,200,"Pt third leading jet"); - MSPlot["Pt_4th_leading_jet"] = new MultiSamplePlot(datasets,"Pt_4th_leading_jet",100,0,200,"Pt fourth leading jet"); - MSPlot["Pt_5th_leading_jet"] = new MultiSamplePlot(datasets,"Pt_5th_leading_jet",100,0,200,"Pt fifth leading jet"); - MSPlot["Pt_6th_leading_jet"] = new MultiSamplePlot(datasets,"Pt_6th_leading_jet",100,0,200,"Pt sixth leading jet"); - MSPlot["Pt_leading_Bjet"] = new MultiSamplePlot(datasets,"Pt_leading_Bjet",100,0,200,"Pt leading Bjet"); - MSPlot["Pt_2nd_leading_Bjet"] = new MultiSamplePlot(datasets,"Pt_2nd_leading_Bjet",100,0,200,"Pt 2nd leading Bjet"); - MSPlot["Pt_3d_leading_Bjet"] = new MultiSamplePlot(datasets,"Pt_3d_leading_Bjet",100,0,200,"Pt third leading Bjet"); - MSPlot["Pt_4th_leading_Bjet"] = new MultiSamplePlot(datasets,"Pt_4th_leading_Bjet",100,0,200,"Pt fourth leading Bjet"); - MSPlot["Pt_5th_leading_Bjet"] = new MultiSamplePlot(datasets,"Pt_5th_leading_Bjet",100,0,200,"Pt fifth leading Bjet"); - MSPlot["Pt_6th_leading_Bjet"] = new MultiSamplePlot(datasets,"Pt_6th_leading_Bjet",100,0,200,"Pt sixth leading Bjet"); - MSPlot["Mll"] = new MultiSamplePlot(datasets,"Mll",50,0,200,"Mll of leading and second leading lepton"); - if(channel.find("3L")!=string::npos) MSPlot["Mll_3LcH"]= new MultiSamplePlot(datasets,"Mll_3LcH",50,0,200,"Mll of leading and second leading lepton 3LcH"); - //MSPlot["Mllq"] = new MultiSamplePlot(datasets,"Mllq",50,0,100,"Invariant mass of llq ~ mtop"); - //if(channel.find("4L")!=string::npos) MSPlot["Mllll"] = new MultiSamplePlot(datasets,"Mllll",50,0,250,"Invariant mass of llll ~ 2mZ"); - MSPlot["DR_toplepton_MET"] = new MultiSamplePlot(datasets,"DR_toplepton_MET",50,0,100,"DR between toplepton and neutrino"); - MSPlot["DR_toplepton_bjet"] = new MultiSamplePlot(datasets,"DR_toplepton_bjet",50,0,100,"DR between toplepton and bjet"); - MSPlot["Mt_toplepton_MET"] = new MultiSamplePlot(datasets,"Mt_toplepton_MET",50,0,100,"Transverse mass of toplepton and neutrino"); - MSPlot["Mt_toplepton_MET_bjet"] = new MultiSamplePlot(datasets,"Mt_toplepton_MET_bjet",50,0,100,"Transverse mass of toplepton, bjet and neutrino"); - MSPlot["Mbqq"] = new MultiSamplePlot(datasets,"Mbqq",50,0,100,"Invariant mass of bqq ~ mtop"); - MSPlot["Mllqq"] = new MultiSamplePlot(datasets,"Mllqq",50,0,100,"Invariant mass of llqq ~ mH"); - MSPlot["Mllqqq"] = new MultiSamplePlot(datasets,"Mllqqq",50,0,100,"Invariant mass of llqqq ~ mtop"); - MSPlot["Mbb"]= new MultiSamplePlot(datasets,"Mbb",50,0,200,"Invariant mass of bb ~ Higgs"); - MSPlot["DeltaPhi_bb"]= new MultiSamplePlot(datasets,"DeltaPhi_bb",30,0,5,"DeltaPhi_bb"); - MSPlot["DR_bb"]= new MultiSamplePlot(datasets,"DR_bb",30,0,5,"DR_bb"); - if(channel.find("OSdilepton")!=string::npos){ - MSPlot["NbofJets_OSdilepton"]= new MultiSamplePlot(datasets,"NbofJets_OSdilepton",15, -0.5, 14.5,"#jets for OSdilepton"); - MSPlot["Nbof_b_Jets_OSdilepton"]= new MultiSamplePlot(datasets,"Nbof_b_Jets_OSdilepton",15, -0.5, 14.5,"# b_jets for OSdilepton"); - MSPlot["Mll_OSdilepton"]= new MultiSamplePlot(datasets,"Mll_OSdilepton",50,0,200,"Mll of OSdilepton"); - } - if(channel.find("SSdilepton")!=string::npos) { - MSPlot["Mll_SSdilepton"]= new MultiSamplePlot(datasets,"Mll_SSdilepton",50,0,200,"Mll of SSdilepton"); - MSPlot["NbofJets_SSdilepton"]= new MultiSamplePlot(datasets,"NbofJets_SSdilepton",15, -0.5, 14.5,"#jets for SSdilepton"); - MSPlot["Nbof_b_Jets_SSdilepton"]= new MultiSamplePlot(datasets,"Nbof_b_Jets_SSdilepton",15, -0.5, 14.5,"# b_jets for SSdilepton"); - MSPlot["Pt_leading_jet_2SSL"] = new MultiSamplePlot(datasets,"Pt_leading_jet_2SSL",100,0,200,"Pt leading jet"); - MSPlot["Pt_2nd_leading_jet_2SSL"] = new MultiSamplePlot(datasets,"Pt_2nd_leading_jet_2SSL",100,0,200,"Pt 2nd leading jet"); - MSPlot["Pt_3rd_leading_jet_2SSL"] = new MultiSamplePlot(datasets,"Pt_3rd_leading_jet_2SSL",100,0,200,"Pt 3rd leading jet"); - MSPlot["Pt_4th_leading_jet_2SSL"] = new MultiSamplePlot(datasets,"Pt_4th_leading_jet_2SSL",100,0,200,"Pt 4th leading jet"); - MSPlot["Mll_SSdilepton_dR>=0.2"]= new MultiSamplePlot(datasets,"Mll_SSdilepton_dR>=0.2",50,0,200,"Mll of SSdilepton dR>= 0.2"); - MSPlot["Mll_SSdilepton_out_Zmass"]= new MultiSamplePlot(datasets,"Mll_SSdilepton_out_Zmass",50,0,200,"Mll of SSdilepton out Z"); - - MSPlot["Met_pT_SSdilepton"]= new MultiSamplePlot(datasets,"Met_pT_SSdilepton",50,0,300," Met_p_{T} SSdilepton"); - MSPlot["Met_pT_SSdilepton_bTag"]= new MultiSamplePlot(datasets,"Met_pT_SSdilepton_bTag",50,0,300," Met_p_{T} SSdilepton"); - MSPlot["dPhi_2SSL"]= new MultiSamplePlot(datasets,"dPhi_2SSL",30,0,5,"DeltaPhi_2SSL"); - MSPlot["dR_2SSL"]= new MultiSamplePlot(datasets,"dR_2SSL",30,0,5,"DR_2SSL"); - - MSPlot["Mll_SSdiMuons"]= new MultiSamplePlot(datasets,"Mll_SSdiMuons",50,0,200,"Mll of SSdiMuon"); - MSPlot["Met_pT_SSdiMuons"]= new MultiSamplePlot(datasets,"Met_pT_SSdiMuons",50,0,600," Met_p_{T} SSdiMuon"); - MSPlot["Pt_leading_Muon"] = new MultiSamplePlot(datasets,"Pt_leading_Muon",50,0,100,"Pt leading Muon"); - MSPlot["Pt_2nd_leading_Muon"] = new MultiSamplePlot(datasets,"Pt_2nd_leading_Muon",50,0,100,"Pt 2nd leading Muon"); - - MSPlot["Mll_SSdiElectrons"]= new MultiSamplePlot(datasets,"Mll_SSdiElectrons",50,0,200,"Mll of SSdiElectrons"); - MSPlot["Pt_leading_Electron"] = new MultiSamplePlot(datasets,"Pt_leading_Electron",50,0,100,"Pt leading Electron"); - MSPlot["Pt_2nd_leading_Electron"] = new MultiSamplePlot(datasets,"Pt_2nd_leading_Electron",50,0,100,"Pt 2nd leading Electron"); - MSPlot["Met_pT_SSdiElectrons"]= new MultiSamplePlot(datasets,"Met_pT_SSdiElectrons",50,0,600," Met_p_{T} SSdiElectrons"); - - MSPlot["Mll_SSEMu"]= new MultiSamplePlot(datasets,"Mll_SSEMu",50,0,200,"Mll of SSEMu"); - MSPlot["Met_pT_SSEMu"]= new MultiSamplePlot(datasets,"Met_pT_SSEMu",50,0,600," Met_p_{T} SSEMu"); - MSPlot["Pt_leading_EMu_muon"] = new MultiSamplePlot(datasets,"Pt_leading_EMu_muon",50,0,100,"Pt leading EMu_Muon"); - MSPlot["Pt_2nd_leading_EMu_electron"] = new MultiSamplePlot(datasets,"Pt_2nd_leading_EMu_electron",50,0,100,"Pt 2nd leading Muon"); - MSPlot["Pt_leading_EMu_electron"] = new MultiSamplePlot(datasets,"Pt_leading_EMu_electron",50,0,100,"Pt leading Muon"); - MSPlot["Pt_2nd_leading_EMu_muon"] = new MultiSamplePlot(datasets,"Pt_2nd_leading_EMu_muon",50,0,100,"Pt 2nd leading Muon"); - MSPlot["Delta_R_min_Jet_lepton1"] = new MultiSamplePlot(datasets,"Delta_R_min_Jet_lepton1",50,0,10,"Delta_R_min_Jet_lepton1"); - MSPlot["Delta_R_min_Jet_lepton0"] = new MultiSamplePlot(datasets,"Delta_R_min_Jet_lepton0",50,0,10,"Delta_R_min_Jet_lepton0"); - MSPlot["M3_Jets"] = new MultiSamplePlot(datasets,"M3_Jets",50,0,300,"M3_Jets"); - MSPlot["selected_W_Jets"] = new MultiSamplePlot(datasets,"selected_W_Jets",50,0,500,"mass of Jets for W"); - } - ////////////////// Cut flow histograms ///////////////////////////// - MSPlot["MScutflow"] = new MultiSamplePlot(datasets,"MScutflow",20,-0.5,19.5, "cutflow"); - if(channel.find("4L")!=string::npos) MSPlot["NbOfJets_4L4"]= new MultiSamplePlot(datasets,"NbOfJets_4L4",50,0,250,"#jets for exactly 4 leptons"); - if(channel.find("4L")!=string::npos) MSPlot["NbOfBJets_4L4_CSVM"]= new MultiSamplePlot(datasets,"NbOfBJets_4L4_CSVM",50,0,250,"#Bjets for exactly 4 leptons"); - if(channel.find("4L")!=string::npos) MSPlot["NbOfBJets_4L4_CSVT"]= new MultiSamplePlot(datasets,"NbOfBJets_4L4_CSVT",50,0,250,"#Bjets for exactly 4 leptons"); - if(channel.find("4L")!=string::npos) MSPlot["MET_4L4"]= new MultiSamplePlot(datasets, "MET_4L4", 40, 0., 700., "MET"); - if(channel.find("4L")!=string::npos) MSPlot["NbOfJets_4L5"]= new MultiSamplePlot(datasets,"NbOfJets_4L5",50,0,250,"#jets for exactly 4 leptons"); - if(channel.find("4L")!=string::npos) MSPlot["NbOfBJets_4L5_CSVM"]= new MultiSamplePlot(datasets,"NbOfBJets_4L5_CSVM",50,0,250,"#Bjets for exactly 4 leptons"); - if(channel.find("4L")!=string::npos) MSPlot["NbOfBJets_4L5_CSVT"]= new MultiSamplePlot(datasets,"NbOfBJets_4L5_CSVT",50,0,250,"#Bjets for exactly 4 leptons"); - if(channel.find("4L")!=string::npos) MSPlot["MET_4L5"] = new MultiSamplePlot(datasets, "MET_4L5", 40, 0., 700., "MET"); - - - if(debug) cout << "[PROCES] Declared MS histograms "<< endl; - - char plotTitle_total_B[900]; - sprintf(plotTitle_total_B,"The total cutflow for %s channel (B)",channelchar); - histo1D["cutflow_total_B"] = new TH1F("cutflow_total_B", plotTitle_total_B, 11, -0.5,10.5); - histo1D["cutflow_total_B"]->Sumw2(); - histo1D["cutflow_total_B"]->GetYaxis()->SetTitle("#evts."); - - - char plotTitle_total_S[900]; - sprintf(plotTitle_total_S,"The total cutflow for %s channel (S)",channelchar); - histo1D["cutflow_total_S"] = new TH1F("cutflow_total_S", plotTitle_total_S, 11, -0.5,10.5); - histo1D["cutflow_total_S"]->Sumw2(); - histo1D["cutflow_total_S"]->GetYaxis()->SetTitle("Eff."); - - - - // Define different cutflow plots for each channel and dataset - for(unsigned int d = 0; d < datasets.size();d++){ - //Load datasets - treeLoader.LoadDataset(datasets[d], anaEnv); - string datasetName = datasets[d]->Name(); - - char datasetNamechar[900]; - if(datasetName.find("W_1Jets")!=string::npos) {sprintf(datasetNamechar,"W_1Jets");} - if(datasetName.find("W_2Jets")!=string::npos) {sprintf(datasetNamechar,"W_2Jets");} - if(datasetName.find("W_3Jets")!=string::npos) {sprintf(datasetNamechar,"W_3Jets");} - if(datasetName.find("W_4Jets")!=string::npos) {sprintf(datasetNamechar,"W_4Jets");} - if(datasetName.find("WW_To2L2Nu")!=string::npos) {sprintf(datasetNamechar,"WW_To2L2Nu");} - if(datasetName.find("WZ_To2L2Q")!=string::npos) {sprintf(datasetNamechar,"WZ_To2L2Q");} - if(datasetName.find("WZ_To3LNu")!=string::npos) {sprintf(datasetNamechar,"WZ_To3LNu");} - if(datasetName.find("ZZ_To2L2Nu")!=string::npos) {sprintf(datasetNamechar,"ZZ_To2L2Nu");} - if(datasetName.find("ZZ_To2L2Q")!=string::npos) {sprintf(datasetNamechar,"ZZ_To2L2Q");} - if(datasetName.find("ZZ_To4L")!=string::npos) {sprintf(datasetNamechar,"ZZ_To4L");} - if(datasetName.find("ST_T_t-ch")!=string::npos) {sprintf(datasetNamechar,"ST_T_t-ch");} - if(datasetName.find("ST_Tbar_t-ch")!=string::npos) {sprintf(datasetNamechar,"ST_Tbar_t-ch");} - if(datasetName.find("ST_TToDilepton_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TToDilepton_tW-ch");} - if(datasetName.find("ST_TToTlepWhad_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TToTlepWhad_tW-ch");} - if(datasetName.find("ST_TToThadWlep_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TToThadWlep_tW-ch");} - if(datasetName.find("ST_TBarToDilepton_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TBarToDilepton_tW-ch");} - if(datasetName.find("ST_TBarToTlepWhad_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TBarToTlepWhad_tW-ch");} - if(datasetName.find("ST_TBarToThadWlep_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TBarToThadWlep_tW-ch");} - if(datasetName.find("TT_SemiLeptMGDecays")!=string::npos) {sprintf(datasetNamechar,"TT_SemiLeptMGDecays");} - if(datasetName.find("TT_FullLeptMGDecays")!=string::npos) {sprintf(datasetNamechar,"TT_FullLeptMGDecays");} - if(datasetName.find("TT_HadronicMGDecays")!=string::npos) {sprintf(datasetNamechar,"TT_HadronicMGDecays");} - if(datasetName.find("Z_M-10To50")!=string::npos) {sprintf(datasetNamechar,"Z_M-10To50");} - if(datasetName.find("Z_M-50")!=string::npos) {sprintf(datasetNamechar,"Z_M-50");} - if(datasetName.find("Z_1Jets")!=string::npos) {sprintf(datasetNamechar,"Z_1Jets");} - if(datasetName.find("Z_2Jets")!=string::npos) {sprintf(datasetNamechar,"Z_2Jets");} - if(datasetName.find("Z_3Jets")!=string::npos) {sprintf(datasetNamechar,"Z_3Jets");} - if(datasetName.find("Z_4Jets")!=string::npos) {sprintf(datasetNamechar,"Z_4Jets");} - if(datasetName.find("TTZ")!=string::npos) {sprintf(datasetNamechar,"TTZ");} - if(datasetName.find("TTW")!=string::npos) {sprintf(datasetNamechar,"TTW");} - if(datasetName.find("ttbar")!=string::npos) {sprintf(datasetNamechar,"ttbar");} - if(datasetName.find("ttbar_fullLept")!=string::npos) {sprintf(datasetNamechar,"ttbar_fullLept");} - if(datasetName.find("ttbar_semiLept")!=string::npos) {sprintf(datasetNamechar,"ttbar_semiLept");} - if(datasetName.find("Wjets")!=string::npos || datasetName.find("wjets")!=string::npos) {sprintf(datasetNamechar,"wjets");} - if(datasetName.find("ttt")!=string::npos) {sprintf(datasetNamechar,"ttt");} - if(datasetName.find("ttW")!=string::npos) {sprintf(datasetNamechar,"ttw");} - if(datasetName.find("WW")!=string::npos || datasetName.find("ww")!=string::npos) {sprintf(datasetNamechar,"ww");} - if(datasetName.find("WZ")!=string::npos || datasetName.find("wz")!=string::npos) {sprintf(datasetNamechar,"wz");} - if(datasetName.find("ZZ")!=string::npos || datasetName.find("zz")!=string::npos) {sprintf(datasetNamechar,"zz");} - if(datasetName.find("ttZ")!=string::npos || datasetName.find("ttz")!=string::npos) {sprintf(datasetNamechar,"ttz");} - if(datasetName.find("Zjets")!=string::npos || datasetName.find("zjets")!=string::npos) {sprintf(datasetNamechar,"Zjets");} - if(datasetName.find("ST_T_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_T_tW-ch");} - if(datasetName.find("ST_TBar_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TBar_tW-ch");} - if(datasetName.find("ST_T_s-ch")!=string::npos) {sprintf(datasetNamechar,"ST_T_s-ch");} - if(datasetName.find("ST_TBar_s-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TBar_s-ch");} - - - if(datasetName.find("TTJetsTocHbW_HToWW_WToLNuL_WToJets_HctR")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToWW_WToLNuL_WToJets_HctR");} - if(datasetName.find("TTJetsTocHbW_HToWW_WToLNuL_WToJets_HctL")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToWW_WToLNuL_WToJets_HctL");} - if(datasetName.find("TTJetsTocHbW_HToWW_WToLNuL_HctL")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToWW_WToLNuL_HctL");} - if(datasetName.find("TTJetsTocHbW_HToWW_WToLNuL_HctR")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToWW_WToLNuL_HctR");} - if(datasetName.find("TTJetsTocHbW_HToBB_HctL")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToBB_HctL");} - if(datasetName.find("TTJetsTocHbW_HToBB_HctR")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToBB_HctR");} - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctL")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctL");} - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctR")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctR");} - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctL")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctL");} - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctR")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctR");} - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctL")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctL");} - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctR")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctR");} - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToLL_HctL")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToLL_HctL");} - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToLL_HctR")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToLL_HctR");} - if(datasetName.find("TTJetsTocZbW")!=string::npos) {sprintf(datasetNamechar,"TTJetsTocZbW");} - - - // Define different plots for each channel and dataset - char plotTitle[900]; - char NamePlot[900]; - sprintf(plotTitle,"The cutflow for %s channel: %s dataset",channelchar,datasetNamechar); - sprintf(NamePlot,"cutflow_%s",datasetNamechar); - - string Process_cutflow = "cutflow_"; - Process_cutflow +=datasetNamechar; - - histo1D[Process_cutflow] = new TH1F(NamePlot, plotTitle, 15, -0.5,14.5); - //histo1D[Process_cutflow]->Sumw2(); - histo1D[Process_cutflow]->GetYaxis()->SetTitle("#evts."); - - - - } - - - if(debug) cout << "[PROCES] Declared cutflow histograms "<< endl; - - //Defining a directory in which .png files of all the plots created will be stored. - char pathPNG[900]; - sprintf(pathPNG,"../data/FCNC_%s_MSPlots_MCStudy/",channelchar); - mkdir(pathPNG,0777); - if(debug) cout << "[PROCES] Declared PNG directory "<< endl; - - /////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - // START LOOPING OVER THE DATASETS // - /////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - if(information) cout << "[PROCES] Looping over the datasets: " << datasets.size()<< " datasets" << endl; - for(unsigned int d = 0; d < datasets.size();d++) - { - bool is_signal = false; - - //Load datasets - treeLoader.LoadDataset(datasets[d], anaEnv); - string datasetName = datasets[d]->Name(); - - char datasetNamechar[900]; - if(datasetName.find("W_1Jets")!=string::npos) {sprintf(datasetNamechar,"W_1Jets");} - if(datasetName.find("W_2Jets")!=string::npos) {sprintf(datasetNamechar,"W_2Jets");} - if(datasetName.find("W_3Jets")!=string::npos) {sprintf(datasetNamechar,"W_3Jets");} - if(datasetName.find("W_4Jets")!=string::npos) {sprintf(datasetNamechar,"W_4Jets");} - if(datasetName.find("WW_To2L2Nu")!=string::npos) {sprintf(datasetNamechar,"WW_To2L2Nu");} - if(datasetName.find("WZ_To2L2Q")!=string::npos) {sprintf(datasetNamechar,"WZ_To2L2Q");} - if(datasetName.find("WZ_To3LNu")!=string::npos) {sprintf(datasetNamechar,"WZ_To3LNu");} - if(datasetName.find("ZZ_To2L2Nu")!=string::npos) {sprintf(datasetNamechar,"ZZ_To2L2Nu");} - if(datasetName.find("ZZ_To2L2Q")!=string::npos) {sprintf(datasetNamechar,"ZZ_To2L2Q");} - if(datasetName.find("ZZ_To4L")!=string::npos) {sprintf(datasetNamechar,"ZZ_To4L");} - if(datasetName.find("ST_T_t-ch")!=string::npos) {sprintf(datasetNamechar,"ST_T_t-ch");} - if(datasetName.find("ST_Tbar_t-ch")!=string::npos) {sprintf(datasetNamechar,"ST_Tbar_t-ch");} - if(datasetName.find("ST_TToDilepton_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TToDilepton_tW-ch");} - if(datasetName.find("ST_TToTlepWhad_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TToTlepWhad_tW-ch");} - if(datasetName.find("ST_TToThadWlep_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TToThadWlep_tW-ch");} - if(datasetName.find("ST_TBarToDilepton_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TBarToDilepton_tW-ch");} - if(datasetName.find("ST_TBarToTlepWhad_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TBarToTlepWhad_tW-ch");} - if(datasetName.find("ST_TBarToThadWlep_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TBarToThadWlep_tW-ch");} - if(datasetName.find("TT_SemiLeptMGDecays")!=string::npos) {sprintf(datasetNamechar,"TT_SemiLeptMGDecays");} - if(datasetName.find("TT_FullLeptMGDecays")!=string::npos) {sprintf(datasetNamechar,"TT_FullLeptMGDecays");} - if(datasetName.find("TT_HadronicMGDecays")!=string::npos) {sprintf(datasetNamechar,"TT_HadronicMGDecays");} - if(datasetName.find("Z_M-10To50")!=string::npos) {sprintf(datasetNamechar,"Z_M-10To50");} - if(datasetName.find("Z_M-50")!=string::npos) {sprintf(datasetNamechar,"Z_M-50");} - if(datasetName.find("Z_1Jets")!=string::npos) {sprintf(datasetNamechar,"Z_1Jets");} - if(datasetName.find("Z_2Jets")!=string::npos) {sprintf(datasetNamechar,"Z_2Jets");} - if(datasetName.find("Z_3Jets")!=string::npos) {sprintf(datasetNamechar,"Z_3Jets");} - if(datasetName.find("Z_4Jets")!=string::npos) {sprintf(datasetNamechar,"Z_4Jets");} - if(datasetName.find("TTZ")!=string::npos) {sprintf(datasetNamechar,"TTZ");} - if(datasetName.find("TTW")!=string::npos) {sprintf(datasetNamechar,"TTW");} - if(datasetName.find("ttbar")!=string::npos) {sprintf(datasetNamechar,"ttbar");} - if(datasetName.find("ttbar_fullLept")!=string::npos) {sprintf(datasetNamechar,"ttbar_fullLept");} - if(datasetName.find("ttbar_semiLept")!=string::npos) {sprintf(datasetNamechar,"ttbar_semiLept");} - if(datasetName.find("Wjets")!=string::npos || datasetName.find("wjets")!=string::npos) {sprintf(datasetNamechar,"wjets");} - if(datasetName.find("ttt")!=string::npos) {sprintf(datasetNamechar,"ttt");} - if(datasetName.find("ttW")!=string::npos) {sprintf(datasetNamechar,"ttw");} - if(datasetName.find("WW")!=string::npos || datasetName.find("ww")!=string::npos) {sprintf(datasetNamechar,"ww");} - if(datasetName.find("WZ")!=string::npos || datasetName.find("wz")!=string::npos) {sprintf(datasetNamechar,"wz");} - if(datasetName.find("ZZ")!=string::npos || datasetName.find("zz")!=string::npos) {sprintf(datasetNamechar,"zz");} - if(datasetName.find("ttZ")!=string::npos || datasetName.find("ttz")!=string::npos) {sprintf(datasetNamechar,"ttz");} - if(datasetName.find("Zjets")!=string::npos || datasetName.find("zjets")!=string::npos) {sprintf(datasetNamechar,"Zjets");} - if(datasetName.find("ST_T_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_T_tW-ch");} - if(datasetName.find("ST_TBar_tW-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TBar_tW-ch");} - if(datasetName.find("ST_T_s-ch")!=string::npos) {sprintf(datasetNamechar,"ST_T_s-ch");} - if(datasetName.find("ST_TBar_s-ch")!=string::npos) {sprintf(datasetNamechar,"ST_TBar_s-ch");} - - if(datasetName.find("TTJetsTocHbW_HToWW_WToLNuL_WToJets_HctR")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToWW_WToLNuL_WToJets_HctR"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToWW_WToLNuL_WToJets_HctL")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToWW_WToLNuL_WToJets_HctL"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToWW_WToLNuL_HctL")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToWW_WToLNuL_HctL"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToWW_WToLNuL_HctR")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToWW_WToLNuL_HctR"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToBB_HctL")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToBB_HctL"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToBB_HctR")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToBB_HctR"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctL")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctL"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctR")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctR"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctL")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctL"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctR")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctR"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctL")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctL"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctR")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctR"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToLL_HctL")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToLL_HctL"); - is_signal = true; - } - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToLL_HctR")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocHbW_HToZZ_ZToLL_HctR"); - is_signal = true; - } - if(datasetName.find("TTJetsTocZbW")!=string::npos) { - sprintf(datasetNamechar,"TTJetsTocZbW"); - is_signal = true; - } - - - - if(information) cout << "[INFO] Dataset " << d << " name : " << datasetName << " / title : " << datasets[d]->Title() << endl; - - //def - string Process_cutflow = "cutflow_"; - Process_cutflow += datasetNamechar; - - /////////////////////////////////////////////////////////// - // START LOOPING OVER THE EVENTS // - /////////////////////////////////////////////////////////// - - - if(information) cout << "[PROCES] looping over " << datasets[d]->NofEvtsToRunOver() <<" events "<< endl; - - for(int ievent = 0; ievent NofEvtsToRunOver(); ievent++) - { - if(ievent%1000 == 0 && information) - { - // << flush << "\r" means this line will be overwritten next time - std::cout << "[PROCES] Processing the " << ievent << "th event" << flush << "\r"; - } - // scale factor for the event - float scaleFactor = 1.; - - //Load the event - event = treeLoader.LoadEvent(ievent, vertex, init_muons, init_electrons, init_jets, mets); - - MSPlot["MScutflow"]->Fill(1, datasets[d], true, Luminosity*scaleFactor); - histo1D[Process_cutflow]->Fill(1); - if(!is_signal) histo1D["cutflow_total_B"]->Fill(1); - if(is_signal) histo1D["cutflow_total_S"]->Fill(1); - - if(!is_signal) histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(2, "initial"); - if(is_signal) histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(2, "initial"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(2, "initial"); - - - //Make a preliminary selection - Selection selection(init_jets, init_muons,init_electrons,mets); - //define selection cuts --> have to be validated!!! - // From the class Selection the following functions are used: - // void Selection::setJetCuts(float Pt, float Eta, float EMF, float n90Hits, float fHPD, float dRJetElectron, float dRJetMuon) - // void Selection::setLooseDiElectronCuts(float ptt, float Eta, float RelIso, MVAid) - // void Selection::setLooseMuonCuts(float Pt, float Eta, float RelIso) - selection.setJetCuts(20.,2.4,0.01,1.,0.98,0.3,0.1); - selection.setDiMuonCuts(10.,2.5,0.2,0.04); - selection.setDiElectronCuts(15.0,2.4,0.15,0.04,0.5,1,0.3,1); - //void Selection::setDiElectronCuts(float Et, float Eta, float RelIso, float d0, float MVAId, float DistVzPVz, float DRJets, int MaxMissingHits) - //select the right objects and put them in a vector - vector selectedJets = selection.GetSelectedJets(true); - vector looseMuons = selection.GetSelectedDiMuons(); - vector looseElectrons = selection.GetSelectedDiElectrons(); - - vector selectedBJets_CSVM; // B-Jets, to be filled after b-tagging - vector selectedBJets_CSVT; // B-jets at the Tight working point - vector selectedLightJets; // light-Jets, to be filled afer b-tagging - // vector selectedPhotons = selection.GetSelecetedPhotons(); Photons not yet included in the selection class!!!! - - - //order the jets according to the Pt - sort(selectedJets.begin(),selectedJets.end(),HighestPt()); - sort(looseElectrons.begin(),looseElectrons.end(),HighestPt()); - sort(looseMuons.begin(),looseMuons.end(),HighestPt()); - - //Start btagging - int nTags = 0; - bool Passed_selection = false; - - //check missing Et - double met_px = 0; - double met_py = 0; - double met_pt = 0; - met_px = mets[0]->Px(); - met_py = mets[0]->Py(); - met_pt = sqrt(met_px*met_px + met_py*met_py); - if(debug) cout << "[INFO] met_px = " << met_px << endl; - if(debug) cout << "[INFO] met_py = " << met_py << endl; - if(debug) cout << "[INFO] met_pt = " << met_pt << endl; - - - - - - //implement btagging - for(unsigned int iJet=0; iJetbtag_combinedSecondaryVertexBJetTags() > workingpointvalue) - { - nTags++; - selectedBJets_CSVM.push_back(selectedJets[iJet]); - } - else selectedLightJets.push_back(selectedJets[iJet]); - - if (selectedJets[iJet]->btag_combinedSecondaryVertexBJetTags() > Tightworkingpoint) - { - selectedBJets_CSVT.push_back(selectedJets[iJet]); - } - - } - - sort(selectedBJets_CSVM.begin(), selectedBJets_CSVM.end(), HighestCVSBtag()); - - - if(debug) cout << "[INFO] looseElectrons.size() = " << looseElectrons.size() << endl; - if(debug) cout << "[INFO] looseMuons.size() = " << looseMuons.size() << endl; - - - bool OneLepton_4Jets = false; - bool chan3L4L = false; - - - //exactly 3 leptons - if(channel.find("3L")!=string::npos) - { - chan3L4L = true; - if(debug) cout << "[PROCES] in 3L channel" << endl; - if(looseElectrons.size() + looseMuons.size() ==3) - { - if(debug) cout << "[PROCES] fill 3L" << endl; - - //fill histograms - MSPlot["MScutflow"]->Fill(2, datasets[d], true, Luminosity*scaleFactor); - if(!is_signal)histo1D["cutflow_total_B"]->Fill(2); - if(is_signal) histo1D["cutflow_total_S"]->Fill(2); - histo1D[Process_cutflow]->Fill(2); - - //set labels - if(!is_signal)histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(3, "3L"); - if(is_signal) histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(3, "3L"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(3, "3L"); - - Passed_selection = true; - - - if(debug) cout << "[PROCES] filled 3L" << endl; - - - } - if(debug) cout << "[PROCES] out fill 3L loop" << endl; - } - //more than 4 leptons - if(channel.find("4L")!=string::npos) - { - chan3L4L = true; - if(debug) cout << "[PROCES] in 4L channel" << endl; - - if(looseElectrons.size() + looseMuons.size() > 3) - { - if(debug) cout << "[PROCES] fill 4L" << endl; - - //fill histograms - if(!is_signal) histo1D["cutflow_total_B"]->Fill(2); - if(is_signal) histo1D["cutflow_total_S"]->Fill(2); - histo1D[Process_cutflow]->Fill(2); - MSPlot["MScutflow"]->Fill(2, datasets[d], true, Luminosity*scaleFactor); - //label histograms - if(!is_signal) histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(3, "4L"); - if(is_signal) histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(3, "4L"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(3, "4L"); - Passed_selection = true; - - if(debug) cout << "[PROCES] filled 4L" << endl; - - - } - if(debug) cout << "[PROCES] out fill 4L loop" << endl; - } - //1 lepton + 3 b-jets - if(channel.find("1L3B")!=string::npos) - { - if(debug) cout << "in 1L3B channel" << endl; - - if(looseElectrons.size() + looseMuons.size() == 1) - { - if(debug) cout << "in fill 1l3b loop" << endl; - - //fill histograms - MSPlot["MScutflow"]->Fill(2, datasets[d], true, Luminosity*scaleFactor); - if(!is_signal) histo1D["cutflow_total_B"]->Fill(2); - if(is_signal) histo1D["cutflow_total_S"]->Fill(2); - histo1D[Process_cutflow]->Fill(2); - //label histograms - if(!is_signal) histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(3, "1L"); - if(is_signal) histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(3, "1L"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(3, "1L"); - - if(debug) cout << "selectedJets.size() = " << selectedJets.size() << endl; - - if(selectedJets.size() >= 4) - { - OneLepton_4Jets = true; - if(debug) cout << "in fill 1l3b loop: 3jets" << endl; - //fill histograms - MSPlot["MScutflow"]->Fill(3, datasets[d], true, Luminosity*scaleFactor); - if(!is_signal) histo1D["cutflow_total_B"]->Fill(3); - if(is_signal) histo1D["cutflow_total_S"]->Fill(3); - histo1D[Process_cutflow]->Fill(3); - //label histograms - if(!is_signal) histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(4, ">= 4jets"); - if(is_signal) histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(4, ">= 4jets"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(4, ">=4jets"); - - if(nTags == 3) - { - if(debug) cout << "in fill 1l3b loop: 3bjets" << endl; - //fill histograms - MSPlot["MScutflow"]->Fill(4, datasets[d], true, Luminosity*scaleFactor); - if(!is_signal) histo1D["cutflow_total_B"]->Fill(4); - if(is_signal) histo1D["cutflow_total_S"]->Fill(4); - histo1D[Process_cutflow]->Fill(4); - //label histograms - if(!is_signal) histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(5, "== 3 bjets"); - if(is_signal) histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(5, "== 3 bjets"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(5, "== 3 bjets"); - - - } - if(nTags > 0) - { - if(debug) cout << "in fill 1l3b loop: 3bjets" << endl; - //fill histograms - MSPlot["MScutflow"]->Fill(5, datasets[d], true, Luminosity*scaleFactor); - if(!is_signal) histo1D["cutflow_total_B"]->Fill(5); - if(is_signal) histo1D["cutflow_total_S"]->Fill(5); - histo1D[Process_cutflow]->Fill(5); - //label histograms - if(!is_signal) histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(6, ">= 1 bjets"); - if(is_signal) histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(6, ">= 1 bjets"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(6, ">= 1 bjets"); - - } - if(nTags > 1) - { - if(debug) cout << "in fill 1l3b loop: 3bjets" << endl; - //fill histograms - MSPlot["MScutflow"]->Fill(6, datasets[d], true, Luminosity*scaleFactor); - if(!is_signal) histo1D["cutflow_total_B"]->Fill(6); - if(is_signal) histo1D["cutflow_total_S"]->Fill(6); - histo1D[Process_cutflow]->Fill(6); - //label histograms - if(!is_signal) histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(7, ">= 2 bjets"); - if(is_signal) histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(7, ">= 2 bjets"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(7, ">= 2 bjets"); - - } - if(nTags > 2) - { - if(debug) cout << "in fill 1l3b loop: 3bjets" << endl; - //fill histograms - MSPlot["MScutflow"]->Fill(7, datasets[d], true, Luminosity*scaleFactor); - if(!is_signal) histo1D["cutflow_total_B"]->Fill(7); - if(is_signal) histo1D["cutflow_total_S"]->Fill(7); - histo1D[Process_cutflow]->Fill(7); - //label histograms - if(!is_signal) histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(8, ">= 3 bjets"); - if(is_signal) histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(8, ">= 3 bjets"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(8, ">= 3 bjets"); - - Passed_selection = true; - } - } - - if(debug) cout << "out fill 1l3b loop" << endl; - } - } - - // dilepton Channels - - // SSdilepton Channel - - if(channel.find("SSdilepton")!=string::npos) - { - - if(debug) cout << "in SSdilepton channel" << endl; - - if(looseElectrons.size() + looseMuons.size() == 2) //ask for dilepton - { - //cout << "after 2 leptons" << endl; - if(debug) cout << "in fill SS dilepton " << endl; - MSPlot["MScutflow"]->Fill(2, datasets[d], true, Luminosity*scaleFactor); - if(!is_signal)histo1D["cutflow_total_B"]->Fill(2); - if(is_signal) histo1D["cutflow_total_S"]->Fill(2); - histo1D[Process_cutflow]->Fill(2); - - bool electron = false; - bool muon = false; - bool EMu = false; - - - //cout << "start" << endl; - if(looseElectrons.size() == 2) - { - if(looseElectrons[0]->charge()==looseElectrons[1]->charge()) electron = true; - if(debug) cout << "Electron boolean defined" << endl; - - } - - if(looseMuons.size() == 2) - { - if(looseMuons[0]->charge() == looseMuons[1]->charge()) muon = true; - if(debug) cout << "Muon boolean defined" << endl; - } - if(looseMuons.size() == 1 && looseElectrons.size() == 1) - { - if(looseMuons[0]->charge() == looseElectrons[0]->charge()) EMu = true; - if(debug) cout << "EMu boolean defined" << endl; - } - - unsigned int nbofjets = selectedJets.size(); - float dPhi_2SSL = 999; - float dR_2SSL = 999; - TLorentzVector Lepton0 ; - TLorentzVector Lepton1 ; - Lepton0.Clear(); - Lepton1.Clear(); - float Delta_R = 999; - float Delta_R_min_lepton0 = 999; - float Delta_R_min_lepton1 = 999; - - if(muon || electron || EMu) - { - if(debug) cout << "in fill SS dilepton: same sign " << endl; - - MSPlot["MScutflow"]->Fill(3, datasets[d], true, Luminosity*scaleFactor); - - if(!is_signal)histo1D["cutflow_total_B"]->Fill(3); - if(is_signal) histo1D["cutflow_total_S"]->Fill(3); - histo1D[Process_cutflow]->Fill(3); - - MSPlot["NbofJets_SSdilepton"]->Fill(nbofjets, datasets[d],true,Luminosity*scaleFactor); - - if(nbofjets>=4) - { - MSPlot["MScutflow"]->Fill(4, datasets[d], true, Luminosity*scaleFactor); - //fill histograms - if(!is_signal)histo1D["cutflow_total_B"]->Fill(4); - if(is_signal) histo1D["cutflow_total_S"]->Fill(4); - histo1D[Process_cutflow]->Fill(4); - - if(mets.size()>=0)MSPlot["Met_pT_SSdilepton"]->Fill(mets[0]->Pt(), datasets[d], true, Luminosity*scaleFactor); - MSPlot["Nbof_b_Jets_SSdilepton"]->Fill(nTags , datasets[d],true,Luminosity*scaleFactor); - MSPlot["Pt_leading_jet_2SSL"]->Fill(selectedJets[0]->Pt(), datasets[d],true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_jet_2SSL"]->Fill(selectedJets[1]->Pt(), datasets[d],true, Luminosity*scaleFactor); - MSPlot["Pt_3rd_leading_jet_2SSL"]->Fill(selectedJets[2]->Pt(), datasets[d],true, Luminosity*scaleFactor); - MSPlot["Pt_4th_leading_jet_2SSL"]->Fill(selectedJets[3]->Pt(), datasets[d],true, Luminosity*scaleFactor); - - - if (nTags == 1) - { - MSPlot["MScutflow"]->Fill(5, datasets[d], true, Luminosity*scaleFactor); - if(!is_signal)histo1D["cutflow_total_B"]->Fill(5); - if(is_signal) histo1D["cutflow_total_S"]->Fill(5); - histo1D[Process_cutflow]->Fill(5); - if(mets.size()>=0)MSPlot["Met_pT_SSdilepton_bTag"]->Fill(mets[0]->Pt(), datasets[d], true, Luminosity*scaleFactor); - - float mll = -1; - float Zmass = 91.1876; // ref-> pdg - if(electron) - { - mll = (*looseElectrons[0]+*looseElectrons[1]).M(); - MSPlot["Pt_leading_Electron"]->Fill(looseElectrons[0]->Pt(),datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_Electron"]->Fill(looseElectrons[1]->Pt(),datasets[d], true, Luminosity*scaleFactor); - if(mets.size()>=0)MSPlot["Met_pT_SSdiElectrons"]->Fill(mets[0]->Pt(), datasets[d], true, Luminosity*scaleFactor); - MSPlot["Mll_SSdiElectrons"]->Fill(mll, datasets[d],true,Luminosity*scaleFactor); - Lepton0.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - Lepton1.SetPxPyPzE(looseElectrons[1]->Px(),looseElectrons[1]->Py(),looseElectrons[1]->Pz(),looseElectrons[1]->Energy()); - - } - else if(muon) - { - mll = (*looseMuons[0]+*looseMuons[1]).M(); - MSPlot["Pt_leading_Muon"]->Fill(looseMuons[0]->Pt(),datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_Muon"]->Fill(looseMuons[1]->Pt(),datasets[d], true, Luminosity*scaleFactor); - if(mets.size()>=0) MSPlot["Met_pT_SSdiMuons"]->Fill(mets[0]->Pt(), datasets[d], true, Luminosity*scaleFactor); - MSPlot["Mll_SSdiMuons"]->Fill(mll, datasets[d],true,Luminosity*scaleFactor); - Lepton0.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - Lepton1.SetPxPyPzE(looseMuons[1]->Px(),looseMuons[1]->Py(),looseMuons[1]->Pz(),looseMuons[1]->Energy()); - - - - } - else if(EMu) - { - mll = (*looseMuons[0]+*looseElectrons[0]).M(); - if(looseMuons[0]->Pt() > looseElectrons[0]->Pt()){ - Lepton0.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - Lepton1.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - MSPlot["Pt_leading_EMu_muon"]->Fill(looseMuons[0]->Pt(),datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_EMu_electron"]->Fill(looseElectrons[0]->Pt(),datasets[d], true, Luminosity*scaleFactor);} - else - { - Lepton1.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - Lepton0.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - MSPlot["Pt_leading_EMu_electron"]->Fill(looseElectrons[0]->Pt(),datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_EMu_muon"]->Fill(looseMuons[0]->Pt(),datasets[d], true, Luminosity*scaleFactor); - } - if(mets.size()>=0) MSPlot["Met_pT_SSEMu"]->Fill(mets[0]->Pt(), datasets[d], true, Luminosity*scaleFactor); - MSPlot["Mll_SSEMu"]->Fill(mll, datasets[d],true,Luminosity*scaleFactor); - } - - MSPlot["Mll_SSdilepton"]->Fill(mll, datasets[d],true,Luminosity*scaleFactor); - dPhi_2SSL = sqrt(pow(Lepton0.Phi() - Lepton1.Phi(),2)); - //dR_2SSL = sqrt(pow(Lepton0.Eta() - Lepton1.Eta(),2)+pow(Lepton0.Phi() - Lepton1.Phi(),2)); - dR_2SSL = Lepton0.DeltaR(Lepton1); - MSPlot["dPhi_2SSL"]->Fill(dPhi_2SSL, datasets[d],true,Luminosity*scaleFactor); - MSPlot["dR_2SSL"]->Fill(dR_2SSL, datasets[d],true,Luminosity*scaleFactor); - if (dR_2SSL >= 0.2) {MSPlot["Mll_SSdilepton_dR>=0.2"]->Fill(mll, datasets[d],true,Luminosity*scaleFactor);} - if (abs(Zmass - mll) > 15){ - MSPlot["Mll_SSdilepton_out_Zmass"]->Fill(mll, datasets[d],true,Luminosity*scaleFactor);} - - //detrmine deltaR between first lepton and nearest jet - for (unsigned ijet=0 ; ijet< nbofjets; ijet++){ - //Delta_R = sqrt(pow(Lepton0.Eta() - selectedJets[ijet]->Eta(),2)+pow(Lepton0.Phi() - selectedJets[ijet]->Phi(),2)); - Delta_R = Lepton0.DeltaR(* selectedJets[ijet]); - if (Delta_R_min_lepton0 > Delta_R) - { - Delta_R_min_lepton0 = Delta_R; - MSPlot["Delta_R_min_Jet_lepton0"]->Fill(Delta_R_min_lepton0, datasets[d],true,Luminosity*scaleFactor); - }} - - //detrmine deltaR between second lepton and nearest jet - for (unsigned ijet=0 ; ijet< nbofjets ; ijet++){ - Delta_R = sqrt(pow(Lepton1.Eta() - selectedJets[ijet]->Eta(),2)+pow(Lepton1.Phi() - selectedJets[ijet]->Phi(),2)); - if (Delta_R_min_lepton1 > Delta_R) - { - Delta_R_min_lepton1 = Delta_R; - MSPlot["Delta_R_min_Jet_lepton1"]->Fill(Delta_R_min_lepton1, datasets[d],true,Luminosity*scaleFactor); - }} - unsigned int sum =0; - unsigned int sum_W_Jets =0; - float selectedHighestPtJetsMass = 0.; - float selected_W_Jets = 0.; - float M3Jets = 999; - float W_Jets_Mass = 999; - //float W_mass = 80.385; //pdg ref - //float mjj = 999; - for (unsigned ijet=0 ; ijet< nbofjets ; ijet++) - { - if (selectedJets[ijet] != selectedBJets_CSVM[0]) - { - selectedHighestPtJetsMass += selectedJets[ijet]->M(); - sum += 1; - if (sum == 3){ - M3Jets = selectedHighestPtJetsMass; - MSPlot["M3_Jets"]->Fill(M3Jets, datasets[d],true,Luminosity*scaleFactor);}} - } - for(unsigned ijet=0 ; ijet< nbofjets ; ijet++) - { - if (selectedJets[ijet] != selectedBJets_CSVM[0]) - { - for(unsigned j=ijet+1 ; j< nbofjets ; j++){ - selected_W_Jets += selectedJets[j]->M(); - sum_W_Jets +=1; - if (sum_W_Jets ==2) { - W_Jets_Mass = selected_W_Jets; - MSPlot["selected_W_Jets"]->Fill(W_Jets_Mass, datasets[d],true,Luminosity*scaleFactor); - }}}} - Passed_selection = true; - } - } - - - } - - - - if(debug) cout << "out fill SS dilepton " << endl; - } - - } - - //Opposite Sign dilepton // - - if(channel.find("OSdilepton")!=string::npos) - { - //float Zmass = 91.1876; // ref-> pdg - //float massDiff = 9999; - float mll = 999; - if(debug) cout << "in OSdilepton channel" << endl; - if(looseElectrons.size() + looseMuons.size() == 2) - { - MSPlot["MScutflow"]->Fill(2, datasets[d], true, Luminosity*scaleFactor); - if(debug) cout << "in fill OS dilepton " << endl; - - if(!is_signal)histo1D["cutflow_total_B"]->Fill(2); - if(is_signal) histo1D["cutflow_total_S"]->Fill(2); - histo1D[Process_cutflow]->Fill(2); - - if(!is_signal)histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(3, "2L"); - if(is_signal) histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(3, "2L"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(3, "2L"); - - bool electron = false; - bool muon = false; - bool EMu = false; - unsigned int nbofjets = selectedJets.size(); - float dPhi_2SSL = 999; - float dR_2SSL = 999; - TLorentzVector Lepton0 ; - TLorentzVector Lepton1 ; - Lepton0.Clear(); - Lepton1.Clear(); - float Delta_R = 999; - - if(looseElectrons.size() == 2) - { - if(looseElectrons[0]->charge() != looseElectrons[1]->charge()) electron = true; - if(debug) cout << "Electron boolean defined" << endl; - } - - if(looseMuons.size() == 2) - { - if(looseMuons[0]->charge() != looseMuons[1]->charge()) muon = true; - if(debug) cout << "Muon boolean defined" << endl; - } - if(looseMuons.size() == 1 && looseElectrons.size() == 1) - { - if(looseMuons[0]->charge() != looseElectrons[0]->charge()) EMu = true; - if(debug) cout << "EMu boolean defined" << endl; - } - - if(muon || electron || EMu) - { - MSPlot["MScutflow"]->Fill(3, datasets[d], true, Luminosity*scaleFactor); - if(debug) cout << "in fill OS dilepton: same sign " << endl; - if(!is_signal) histo1D["cutflow_total_B"]->Fill(3); - if(is_signal) histo1D["cutflow_total_S"]->Fill(3); - histo1D[Process_cutflow]->Fill(3); - - if (!is_signal) histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(4, "2 OS L"); - if(is_signal) histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(4, "2 OS L"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(4, "2 OS L"); - - MSPlot["NbofJets_OSdilepton"]->Fill(nbofjets, datasets[d],true,Luminosity*scaleFactor); - MSPlot["Nbof_b_Jets_OSdilepton"]->Fill(nTags , datasets[d],true,Luminosity*scaleFactor); - - // Additional cuts - - if (electron) { - Lepton0.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - Lepton1.SetPxPyPzE(looseElectrons[1]->Px(),looseElectrons[1]->Py(),looseElectrons[1]->Pz(),looseElectrons[1]->Energy()); - } - if (muon){ - Lepton0.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - Lepton1.SetPxPyPzE(looseMuons[1]->Px(),looseMuons[1]->Py(),looseMuons[1]->Pz(),looseMuons[1]->Energy()); - } - if (EMu){ - Lepton0.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - Lepton1.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - } - mll = Lepton0.M()+ Lepton1.M(); - MSPlot["Mll_OSdilepton"]->Fill(mll, datasets[d],true,Luminosity*scaleFactor); - - if(nbofjets>=1) - { - MSPlot["MScutflow"]->Fill(4, datasets[d], true, Luminosity*scaleFactor); - //fill histograms - if(!is_signal)histo1D["cutflow_total_B"]->Fill(4); - if(is_signal) histo1D["cutflow_total_S"]->Fill(4); - histo1D[Process_cutflow]->Fill(4); - - //set labels - if(!is_signal)histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(5, ">1j"); - if(is_signal) histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(5, ">1j"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(5, ">=1j"); - - } - Passed_selection = true; - if(debug) cout << "out fill OS dilepton " << endl; - } - } - - } - - if(channel.find("1gamma")!=string::npos) - { - } - if(channel.find("2gamma")!=string::npos) - { - } - - - - ////////////////////////////////////////////////////////////////////////////////// - // Filling histograms ////////// - ////////////////////////////////////////////////////////////////////////////////// - int nLeptons = looseElectrons.size() + looseMuons.size(); - if(nLeptons == 1){ - MSPlot["NbOfSelectedJets"]->Fill(selectedJets.size(), datasets[d], true, Luminosity*scaleFactor); - MSPlot["NbOfSelectedBJets_CSVM"]->Fill(selectedBJets_CSVM.size(), datasets[d], true, Luminosity*scaleFactor); - MSPlot["NbOfSelectedBJets_CSVT"]->Fill(selectedBJets_CSVT.size(), datasets[d], true, Luminosity*scaleFactor); - - } - if(!Passed_selection) continue; - if(Passed_selection){ - if(debug) cout << "[PROCES] In passed_selection loop" << endl; - - if(nLeptons != 1) MSPlot["NbOfSelectedJets"]->Fill(selectedJets.size(), datasets[d], true, Luminosity*scaleFactor); - if(debug) cout << "[PROCES] Filled NbOfSelectedJets" << endl; - MSPlot["NbOfSelectedLightJets"]->Fill(selectedLightJets.size(), datasets[d], true, Luminosity*scaleFactor); - if(debug) cout << "[PROCES] Filled NbOfSelectedLightJets" << endl; - if(nLeptons != 1) MSPlot["NbOfSelectedBJets_CSVM"]->Fill(selectedBJets_CSVM.size(), datasets[d], true, Luminosity*scaleFactor); - if(debug) cout << "[PROCES] Filled NbOfSelectedBJets_CSVM" << endl; - if(nLeptons != 1) MSPlot["NbOfSelectedBJets_CSVT"]->Fill(selectedBJets_CSVT.size(), datasets[d], true, Luminosity*scaleFactor); - if(debug) cout << "[PROCES] Filled NbOfSelectedJets_CSVT" << endl; - MSPlot["NbOfSelectedLeptons"]->Fill(looseMuons.size()+looseElectrons.size(),datasets[d],true,Luminosity*scaleFactor); - if(debug) cout << "[PROCES] Filled NbOfSelectedLeptons" << endl; - if(debug) cout << "[PROCES] Filling MET with " << (float) met_pt << endl; - MSPlot["MET"]->Fill((float) met_pt, datasets[d], true, Luminosity*scaleFactor); - if(debug) cout << "[PROCES] Filled MET" << endl; - - for (Int_t seljet1 =0; seljet1 < selectedJets.size(); seljet1++ ){ - - MSPlot["JetEta"]->Fill(selectedJets[seljet1]->Eta() , datasets[d], true, Luminosity*scaleFactor); - MSPlot["JetPhi"]->Fill(selectedJets[seljet1]->Phi() , datasets[d], true, Luminosity*scaleFactor); - } - if( selectedJets.size() > 0) { - if(debug) cout << "[PROCES] In selectedJets.size() > 0" << endl; - MSPlot["Pt_leading_jet"]->Fill(selectedJets[0]->Pt(), datasets[d],true, Luminosity*scaleFactor); - if(chan3L4L) MSPlot["MScutflow"]->Fill(3, datasets[d], true, Luminosity*scaleFactor); - if(debug) cout << "[PROCES] Out selectedJets.size() > 0" << endl; - } - if( selectedJets.size() > 1) - { - if(chan3L4L) MSPlot["MScutflow"]->Fill(4, datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_jet"]->Fill(selectedJets[1]->Pt(), datasets[d],true, Luminosity*scaleFactor); - } - if( selectedJets.size() > 2) - { - if(chan3L4L) MSPlot["MScutflow"]->Fill(5, datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_3d_leading_jet"]->Fill(selectedJets[2]->Pt(), datasets[d],true, Luminosity*scaleFactor); - } - if( selectedJets.size() > 3) - { - if(chan3L4L) MSPlot["MScutflow"]->Fill(6, datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_4th_leading_jet"]->Fill(selectedJets[3]->Pt(), datasets[d],true, Luminosity*scaleFactor); - } - if( selectedJets.size() > 4) - { - if(chan3L4L) MSPlot["MScutflow"]->Fill(7, datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_5th_leading_jet"]->Fill(selectedJets[4]->Pt(), datasets[d],true, Luminosity*scaleFactor); - } - if( selectedJets.size() > 5) - { - if(chan3L4L) MSPlot["MScutflow"]->Fill(8, datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_6th_leading_jet"]->Fill(selectedJets[5]->Pt(), datasets[d],true, Luminosity*scaleFactor); - } - if( selectedBJets_CSVM.size() > 0) { - if(chan3L4L) MSPlot["MScutflow"]->Fill(9, datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_leading_Bjet"]->Fill(selectedBJets_CSVM[0]->Pt(), datasets[d],true, Luminosity*scaleFactor); - } - if( selectedBJets_CSVM.size() > 1) - { - if(chan3L4L) MSPlot["MScutflow"]->Fill(10, datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_Bjet"]->Fill(selectedBJets_CSVM[1]->Pt(), datasets[d],true, Luminosity*scaleFactor); - } - if( selectedBJets_CSVM.size() > 2) - { - if(chan3L4L) MSPlot["MScutflow"]->Fill(11, datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_3d_leading_Bjet"]->Fill(selectedBJets_CSVM[2]->Pt(), datasets[d],true, Luminosity*scaleFactor); - } - if( selectedBJets_CSVM.size() > 3) - { - if(chan3L4L) MSPlot["MScutflow"]->Fill(12, datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_4th_leading_Bjet"]->Fill(selectedBJets_CSVM[3]->Pt(), datasets[d],true, Luminosity*scaleFactor); - } - if( selectedBJets_CSVM.size() > 4) - { - if(chan3L4L) MSPlot["MScutflow"]->Fill(13, datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_5th_leading_Bjet"]->Fill(selectedBJets_CSVM[4]->Pt(), datasets[d],true, Luminosity*scaleFactor); - } - if( selectedBJets_CSVM.size() > 5) - { - if(chan3L4L) MSPlot["MScutflow"]->Fill(14, datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_6th_leading_Bjet"]->Fill(selectedBJets_CSVM[5]->Pt(), datasets[d],true, Luminosity*scaleFactor); - } - - - double mll = 0; - TLorentzVector leptonpair_mll; - TLorentzVector lepton0; - TLorentzVector lepton1; - leptonpair_mll.Clear(); - lepton0.Clear(); - lepton1.Clear(); - if(looseElectrons.size()==0) - { - if(debug) cout << "[PROCES] in looseElectrons.size()==0" << endl; - if(looseMuons.size()!=0) - { - lepton0.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - - - if(looseMuons.size()>1 ) - { - lepton1.SetPxPyPzE(looseMuons[1]->Px(),looseMuons[1]->Py(),looseMuons[1]->Pz(),looseMuons[1]->Energy()); - leptonpair_mll = lepton0+lepton1; - MSPlot["Pt_leading_lepton"]->Fill(lepton0.Pt(),datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_lepton"]->Fill(lepton1.Pt(),datasets[d], true, Luminosity*scaleFactor); - } - } - - } - else if (looseMuons.size()==0) - { - if(debug) cout << "[PROCES] in looseMuons.size()==0" << endl; - if(looseElectrons.size()!=0) - { - lepton0.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - - if(looseElectrons.size()>1 ) - { - lepton1.SetPxPyPzE(looseElectrons[1]->Px(),looseElectrons[1]->Py(),looseElectrons[1]->Pz(),looseElectrons[1]->Energy()); - leptonpair_mll = lepton0+lepton1; - MSPlot["Pt_leading_lepton"]->Fill(lepton0.Pt(),datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_lepton"]->Fill(lepton1.Pt(),datasets[d], true, Luminosity*scaleFactor); - } - } - } - else if(looseMuons.size()>1 && looseElectrons.size()>1) - { - if(debug) cout << "[PROCES] in looseMuons.size()>1 && looseElectrons.size()>1" << endl; - double px12 = (looseElectrons[1]->Px())*(looseElectrons[1]->Px()); - double py12 = (looseElectrons[1]->Py())*(looseElectrons[1]->Py()); - double pt_electron1=TMath::Sqrt(px12+py12); - if(debug) cout << "[INFO] pt_electron1 = " << pt_electron1 << endl; - double pt_electron0=TMath::Sqrt((looseElectrons[0]->Px())*(looseElectrons[0]->Px())+(looseElectrons[0]->Py())*(looseElectrons[0]->Py())); - if(debug) cout << "[INFO] pt_electron0 = " << pt_electron0 << endl; - double pt_muon1=TMath::Sqrt((looseMuons[1]->Px())*(looseMuons[1]->Px())+(looseMuons[1]->Py())*(looseMuons[1]->Py())); - if(debug) cout << "[INFO] pt_muon1 = " << pt_muon1 << endl; - double pt_muon0=TMath::Sqrt((looseMuons[0]->Px())*(looseMuons[0]->Px())+(looseMuons[0]->Py())*(looseMuons[0]->Py())); - if(debug) cout << "[INFO] pt_muon0 = " << pt_muon0 << endl; - if(pt_electron0 > pt_muon0) - { - if(debug) cout << "[PROCES] in pt_electron0 > pt_muon0" << endl; - lepton0.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - if(pt_muon0 >= pt_electron1) - { - lepton1.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - } - else if(pt_muon0 < pt_electron1) - { - lepton1.SetPxPyPzE(looseElectrons[1]->Px(),looseElectrons[1]->Py(),looseElectrons[1]->Pz(),looseElectrons[1]->Energy()); - } - - } - else if (pt_muon0 > pt_electron0) - { - lepton0.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - if(pt_electron0 > pt_muon1) - { - lepton1.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - } - else if (pt_electron0 < pt_muon1) - { - lepton1.SetPxPyPzE(looseMuons[1]->Px(),looseMuons[1]->Py(),looseMuons[1]->Pz(),looseMuons[1]->Energy()); - - } - - } - leptonpair_mll = lepton0+lepton1; - MSPlot["Pt_leading_lepton"]->Fill(lepton0.Pt(),datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_lepton"]->Fill(lepton1.Pt(),datasets[d], true, Luminosity*scaleFactor); - } - else if(looseMuons.size() == 1 && looseElectrons.size()>1) - { - if(debug) cout << "[PROCES] in looseMuons.size() == 1 && looseElectrons.size()>1" << endl; - double px12 = (looseElectrons[1]->Px())*(looseElectrons[1]->Px()); - double py12 = (looseElectrons[1]->Py())*(looseElectrons[1]->Py()); - double pt_electron1=TMath::Sqrt(px12+py12); - if(debug) cout << "[INFO] pt_electron1 = " << pt_electron1 << endl; - double pt_electron0=TMath::Sqrt((looseElectrons[0]->Px())*(looseElectrons[0]->Px())+(looseElectrons[0]->Py())*(looseElectrons[0]->Py())); - if(debug) cout << "[INFO] pt_electron0 = " << pt_electron0 << endl; - double pt_muon0=TMath::Sqrt((looseMuons[0]->Px())*(looseMuons[0]->Px())+(looseMuons[0]->Py())*(looseMuons[0]->Py())); - if(debug) cout << "[INFO] pt_muon0 = " << pt_muon0 << endl; - if(pt_electron0 > pt_muon0) - { - if(debug) cout << "[PROCES] in pt_electron0 > pt_muon0" << endl; - lepton0.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - if(pt_muon0 >= pt_electron1) - { - lepton1.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - } - else if(pt_muon0 < pt_electron1) - { - lepton1.SetPxPyPzE(looseElectrons[1]->Px(),looseElectrons[1]->Py(),looseElectrons[1]->Pz(),looseElectrons[1]->Energy()); - } - - } - else if (pt_muon0 > pt_electron0) - { - lepton0.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - lepton1.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - } - leptonpair_mll = lepton0+lepton1; - MSPlot["Pt_leading_lepton"]->Fill(lepton0.Pt(),datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_lepton"]->Fill(lepton1.Pt(),datasets[d], true, Luminosity*scaleFactor); - } - else if(looseMuons.size() > 1 && looseElectrons.size() == 1) - { - if(debug) cout << "[PROCES] in looseMuons.size() > 1 && looseElectrons.size() == 1" << endl; - double pt_electron0=TMath::Sqrt((looseElectrons[0]->Px())*(looseElectrons[0]->Px())+(looseElectrons[0]->Py())*(looseElectrons[0]->Py())); - if(debug) cout << "[INFO] pt_electron0 = " << pt_electron0 << endl; - double pt_muon0=TMath::Sqrt((looseMuons[0]->Px())*(looseMuons[0]->Px())+(looseMuons[0]->Py())*(looseMuons[0]->Py())); - if(debug) cout << "[INFO] pt_muon0 = " << pt_muon0 << endl; - double pt_muon1=TMath::Sqrt((looseMuons[1]->Px())*(looseMuons[1]->Px())+(looseMuons[1]->Py())*(looseMuons[1]->Py())); - if(debug) cout << "[INFO] pt_muon1 = " << pt_muon1 << endl; - if(pt_electron0 > pt_muon0) - { - if(debug) cout << "[PROCES] in pt_electron0 > pt_muon0" << endl; - lepton0.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - lepton1.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - } - else if (pt_muon0 > pt_electron0) - { - lepton0.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - if(pt_electron0 > pt_muon1) - { - lepton1.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - } - else if (pt_electron0 < pt_muon1) - { - lepton1.SetPxPyPzE(looseMuons[1]->Px(),looseMuons[1]->Py(),looseMuons[1]->Pz(),looseMuons[1]->Energy()); - - } - - } - leptonpair_mll = lepton0+lepton1; - MSPlot["Pt_leading_lepton"]->Fill(lepton0.Pt(),datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_lepton"]->Fill(lepton1.Pt(),datasets[d], true, Luminosity*scaleFactor); - } - else if(looseMuons.size() == 1 && looseElectrons.size() == 1) - { - if(debug) cout << "[PROCES] in looseMuons.size() == 1 && looseElectrons.size() == 1" << endl; - lepton0.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->Energy()); - lepton1.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->Energy()); - leptonpair_mll = lepton0+lepton1; - MSPlot["Pt_leading_lepton"]->Fill(lepton0.Pt(),datasets[d], true, Luminosity*scaleFactor); - MSPlot["Pt_2nd_leading_lepton"]->Fill(lepton1.Pt(),datasets[d], true, Luminosity*scaleFactor); - } - bool empty = false; - if(looseMuons.size() == 0 && looseElectrons.size() == 0) empty = true; - if(looseMuons.size() == 0 && looseElectrons.size() == 1) empty = true; - if(looseMuons.size() == 1 && looseElectrons.size() == 0) empty = true; - if(!empty && (leptonpair_mll!=(0,0,0,0))) - { - mll = leptonpair_mll.M(); - if(debug) cout << "[INFO] mll = " << mll << endl; - MSPlot["Mll"]->Fill(mll,datasets[d],true,Luminosity*scaleFactor); - if(channel.find("3L")!=string::npos) - { - if(selectedBJets_CSVM.size()>1) - { - if(debug) cout << "[PROCES] In 3L (#bjets > 1)" << endl; - MSPlot["Mll_3LcH"]->Fill(mll,datasets[d],true,Luminosity*scaleFactor); - MSPlot["MET_3LcH"]->Fill((float) met_pt, datasets[d], true, Luminosity*scaleFactor); - } - } - - } - - - - /* - double mllll = 0; - TLorentzVector leptonpair_mllll; - TLorentzVector lepton2; - TLorentzVector lepton3; - leptonpair_mllll.Clear(); - lepton2.Clear(); - lepton3.Clear(); - if(looseMuons.size()>3 && looseElectrons.size() == 0) - { - lepton2.SetPxPyPzE(looseMuons[2]->Px(),looseMuons[2]->Py(),looseMuons[2]->Pz(),looseMuons[2]->Energy()); - lepton3.SetPxPyPzE(looseMuons[3]->Px(),looseMuons[3]->Py(),looseMuons[3]->Pz(),looseMuons[3]->Energy()); - leptonpair_mllll = leptonpair_mll + lepton2 + lepton3; - mllll = leptonpair_mllll.M(); - } - if(looseMuons.size()==0&& looseElectrons.size() > 3) - { - lepton2.SetPxPyPzE(looseElectrons[2]->Px(),looseElectrons[2]->Py(),looseElectrons[2]->Pz(),looseElectrons[2]->Energy()); - lepton3.SetPxPyPzE(looseElectrons[3]->Px(),looseElectrons[3]->Py(),looseElectrons[3]->Pz(),looseElectrons[3]->Energy()); - leptonpair_mllll = leptonpair_mll + lepton2 + lepton3; - mllll = leptonpair_mllll.M(); - } - - - - - - - if(mllll != 0 && channel.find("4L")!=string::npos ) MSPlot["Mllll"]->Fill(mllll,datasets[d],true,Luminosity*scaleFactor); - */ - - } - - - - - - - // adding additional cuts - if(channel.find("4L")!=string::npos && Passed_selection) - { - - if(looseMuons.size()+looseElectrons.size() < 6) - { - // 3 < #leptons < 6 - MSPlot["MScutflow"]->Fill(15, datasets[d], true, Luminosity*scaleFactor); - - - } - if(looseMuons.size()+looseElectrons.size() < 5) - { - // #lepons = 4 - MSPlot["MScutflow"]->Fill(16, datasets[d], true, Luminosity*scaleFactor); - MSPlot["NbOfBJets_4L4_CSVM"]->Fill(selectedBJets_CSVM.size(),datasets[d],true,Luminosity*scaleFactor); - MSPlot["NbOfBJets_4L4_CSVT"]->Fill(selectedBJets_CSVT.size(),datasets[d],true,Luminosity*scaleFactor); - // #bjets should be 1 + Z(bb) = 3 - MSPlot["NbOfJets_4L4"]->Fill(selectedJets.size(),datasets[d],true,Luminosity*scaleFactor); - // #jets should be 4 - MSPlot["MET_4L4"]->Fill((float) met_pt, datasets[d], true, Luminosity*scaleFactor); - // MET should be zero - } - if(looseMuons.size()+looseElectrons.size() == 5) - { - // #leptons = 5 - MSPlot["MScutflow"]->Fill(17, datasets[d], true, Luminosity*scaleFactor); - MSPlot["NbOfBJets_4L5_CSVM"]->Fill(selectedBJets_CSVM.size(),datasets[d],true,Luminosity*scaleFactor); - MSPlot["NbOfBJets_4L5_CSVT"]->Fill(selectedBJets_CSVT.size(),datasets[d],true,Luminosity*scaleFactor); - // #bjets should be 1 - MSPlot["NbOfJets_4L5"]->Fill(selectedJets.size(),datasets[d],true,Luminosity*scaleFactor); - // #jets should be 2 - MSPlot["MET_4L5"]->Fill((float) met_pt, datasets[d], true, Luminosity*scaleFactor); - // MET should be half the mass of a W boson - - } - - - } - if(channel.find("3L")!=string::npos && Passed_selection) - { - - } - - - if(channel.find("1L3B")!=string::npos && Passed_selection){ - TLorentzVector Lepton; - TLorentzVector bb_cand; - - Lepton.Clear(); - bb_cand.Clear(); - - vector frac_b_topcandidate; - if (looseElectrons.size() == 1) Lepton.SetPxPyPzE(looseElectrons[0]->Px(),looseElectrons[0]->Py(),looseElectrons[0]->Pz(),looseElectrons[0]->E()); - if (looseMuons.size() == 1) Lepton.SetPxPyPzE(looseMuons[0]->Px(),looseMuons[0]->Py(),looseMuons[0]->Pz(),looseMuons[0]->E()); - - - float TransvM_lept_MET = 0; - float TransvM_lept_MET_b = 0; - float InvM_bb = 0; - float DeltaR_lepton_b_min = 9999; //The b which is closest to the lepton is more probable to come from the SM top decay - float DeltaR_bb_min = 9999; - float DeltaR_bb_max = -9999; //The bigger DeltaR_bb, the more probable those 2 b-jets do not come from H->bb (and therefore the max is a good handle to determine which of the 3 b-jets comes from SM top decay - float dR_lb_temp = 9999; - float dR_bb_temp = 9999; - int index_BTopcandidate = 9999; // based on the minimal DeltaR_lepton_b + DeltaR_bb - - //Determine the minimal Delta R - for(int iBjet = 0; iBjet < selectedBJets_CSVM.size(); iBjet++){ - - dR_lb_temp = sqrt(pow(Lepton.Eta() - selectedBJets_CSVM[iBjet]->Eta(),2)+pow(Lepton.Phi() - selectedBJets_CSVM[iBjet]->Phi(),2)); - if(DeltaR_lepton_b_min>dR_lb_temp){ - DeltaR_lepton_b_min = dR_lb_temp; - //index_BTopcandidate = iBjet; - } - - for(int iBjet2 = 0; iBjet2 < selectedBJets_CSVM.size(); iBjet2++){ - if(iBjet != iBjet2) dR_bb_temp = sqrt(pow(selectedBJets_CSVM[iBjet]->Eta() - selectedBJets_CSVM[iBjet2]->Eta(),2)+pow(selectedBJets_CSVM[iBjet]->Phi() - selectedBJets_CSVM[iBjet2]->Phi(),2)); - if(DeltaR_bb_min>dR_bb_temp) DeltaR_bb_min = dR_bb_temp; - if(DeltaR_bb_max frac_b_topcandidate[iBjet]){ - min_frac = frac_b_topcandidate[iBjet]; - index_BTopcandidate = iBjet; - } - } - - - - - float DeltaPhi_bb = 0; - float InvMass_bb = 0; - for(int iBjet = 0; iBjet < selectedBJets_CSVM.size(); iBjet++){ - for(int iBjet2 = 0; iBjet2 < selectedBJets_CSVM.size(); iBjet2++){ - if((iBjet != index_BTopcandidate) && (iBjet2 != index_BTopcandidate) && (iBjet != iBjet2)){ - - bb_cand.SetPxPyPzE(selectedBJets_CSVM[iBjet]->Px()+selectedBJets_CSVM[iBjet2]->Px(),selectedBJets_CSVM[iBjet]->Py()+selectedBJets_CSVM[iBjet2]->Py(),selectedBJets_CSVM[iBjet]->Pz()+selectedBJets_CSVM[iBjet2]->Pz(),selectedBJets_CSVM[iBjet]->E()+selectedBJets_CSVM[iBjet]->E()); - - DeltaPhi_bb = sqrt( pow(( selectedBJets_CSVM[iBjet]->Phi() - selectedBJets_CSVM[iBjet2]->Phi() ), 2)); - InvMass_bb = bb_cand.M(); - } - } - } - - - MSPlot["DR_toplepton_bjet"]->Fill(DeltaR_lepton_b_min, datasets[d], true, Luminosity*scaleFactor); - MSPlot["DR_bb"]->Fill(DeltaR_bb_min, datasets[d],true,Luminosity*scaleFactor); - MSPlot["Mbb"]->Fill(InvMass_bb, datasets[d],true,Luminosity*scaleFactor); - MSPlot["DeltaPhi_bb"]->Fill(DeltaPhi_bb, datasets[d],true,Luminosity*scaleFactor); - MSPlot["Pt_leading_lepton"]->Fill(Lepton.Pt(), datasets[d], true, Luminosity*scaleFactor); - } - - } - - /////////////////////////////////////////////////////////// - // END LOOPING OVER THE EVENTS // - /////////////////////////////////////////////////////////// - if(channel.find("SSdilepton")!=string::npos) - { - if(!is_signal){ - histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(3, "2L"); - histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(4, "2L SS"); - histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(5, ">=4j"); - histo1D["cutflow_total_B"]->GetXaxis()->SetBinLabel(6, ">=4j1b"); - } - else {if(is_signal){ - histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(3, "2L"); - histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(4, ">=2j"); - histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(5, ">=4j"); - histo1D["cutflow_total_S"]->GetXaxis()->SetBinLabel(6, ">=4j1b"); - }} - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(3, "2L"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(4, "2L SS"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(5, ">=4j"); - histo1D[Process_cutflow]->GetXaxis()->SetBinLabel(6, ">=4j1b"); - - - - } - - - } - if(information) cout << "[PROCES] End of looping over the datasets: " << datasets.size()<< " datasets" << endl; - /////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - // END LOOPING OVER THE DATASETS // - /////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////// - - - fout->cd(); - if(information) cout << "[PROCES] Looping over MSplots" << endl; - for(map::const_iterator it = MSPlot.begin(); it != MSPlot.end(); it++) - { - - - - - MultiSamplePlot *temp = it->second; - TH1F *tempHisto_data; - TH1F *tempHisto_back; - temp->addText("CMS simulation"); - string name = it->first; - temp->Draw( name, 0, false, false, false, 1); - - - if(debug) cout <<" looping MS plots..., name ... "<< name<Write(fout, name, false);//, pathPNG, "pdf"); - - if(debug) cout <<" written MSplot " << name <mkdir("Histos1D"); - th1dir->cd(); - if(information) cout << "[PROCES] Looping over 1D plots" << endl; - for(map::const_iterator it = histo1D.begin(); it != histo1D.end(); it++) - { - TH1F *temp = it->second; - temp->Write(); - //TCanvas* tempCanvas = TCanvasCreator(temp, it->first); - //tempCanvas->SaveAs( (pathPNG+it->first+".png").c_str() ); - } - - - - std::cout << "******************************************"< -#include -#include -#include - -//user code -#include "../../TopTreeProducer/interface/TRootRun.h" -#include "../../TopTreeProducer/interface/TRootEvent.h" -#include "../../TopTreeAnalysisBase/Selection/interface/SelectionTable.h" -#include "../../TopTreeAnalysisBase/Tools/interface/PlottingTools.h" -#include "../../TopTreeAnalysisBase/Tools/interface/MultiSamplePlot.h" -#include "../../TopTreeAnalysisBase/Tools/interface/TTreeLoader.h" -#include "../../TopTreeAnalysisBase/Tools/interface/AnalysisEnvironmentLoader.h" -#include "../../TopTreeAnalysisBase/Content/interface/AnalysisEnvironment.h" -#include "../../TopTreeAnalysisBase/Content/interface/Dataset.h" -#include "../../TopTreeAnalysisBase/MCInformation/interface/MCWeighter.h" -#include "../../TopTreeAnalysisBase/Selection/interface/ElectronPlotter.h" -#include "../../TopTreeAnalysisBase/Selection/interface/MuonPlotter.h" -#include "../../TopTreeAnalysisBase/Selection/interface/JetPlotter.h" -#include "../../TopTreeAnalysisBase/Selection/interface/VertexPlotter.h" -#include "../../TopTreeAnalysisBase/Tools/interface/JetTools.h" -#include "../../TopTreeAnalysisBase/MCInformation/interface/ResolutionFit.h" -#include "../../TopTreeAnalysisBase/MCInformation/interface/JetPartonMatching.h" -#include "../../TopTreeAnalysisBase/Reconstruction/interface/JetCorrectorParameters.h" -#include "../../TopTreeAnalysis/macros/Style.C" -#include "../../TopTreeAnalysisBase/MCInformation/interface/LumiReWeighting.h" - -using namespace std; -using namespace reweight; -using namespace TopTree; - - - -int main (int argc, char *argv[]) -{ - - - clock_t start = clock(); - - - /////////////////////////////////////////////////////////// - // different options for executing this macro // - /////////////////////////////////////////////////////////// - - std::string tempxmlName; - std::string channelName = "undefined"; - bool information = true; - bool warnings = true; - bool debug = false; - int nb_Leptons = 0; - bool foundxml= false; - - for(int iarg = 0; iarg < argc && argc>1 ; iarg++) - { - std::string argval=argv[iarg]; - - if(argval=="--help" || argval =="--h") - { - cout << "--NoWarnings: put warnings off " << endl; - cout << "--NoInfo: put information off " << endl; - cout << "--debug: put debug output on" << endl; - cout << "--xml myxml.xml: change Xml file" << endl; - cout << " " << endl; - cout << "--1L3B: use the 1 lepton + 3 b-tags channel" << endl; - cout << "--SSdilepton: use the same sign dilepton channel" << endl; - cout << "--OSdilepton: use the opposite sign dilepton channel" << endl; - cout << "--3L: use the 3 lepton channel (exactly 3)" << endl; - cout << "--45: at least 4 leptons " << endl; - - return 0; - } - if (argval=="--xml") { - iarg++; - tempxmlName = argv[iarg]; - foundxml = true; - if(debug) cout << "foundxml = true" << endl; - - } - if (argval=="--NoInfo") { - iarg++; - information = false; - } - if (argval=="--NoWarnings") { - iarg++; - warnings = false; - } - if (argval=="--debug") { - iarg++; - debug = true; - } - - if (argval=="--1L3B") { - nb_Leptons = 1; - channelName = "1L3B"; - if(!foundxml) tempxmlName = "../config/FCNC_1L3B_config.xml"; - } - if (argval=="--SSdilepton") { - nb_Leptons = 2; - channelName = "SSdilepton"; - if(!foundxml) tempxmlName = "../config/FCNC_SSdilepton_config.xml"; - } - if (argval=="--OSdilepton") { - nb_Leptons = 2; - channelName = "OSdilepton"; - if(!foundxml) tempxmlName = "../config/FCNC_OSdilepton_config.xml"; - } - if (argval=="--3L") { - nb_Leptons = 3; - channelName = "3L"; - if(!foundxml) tempxmlName = "../config/FCNC_3L_config.xml"; - } - if (argval=="--45") { - nb_Leptons = 3; - channelName = "45"; - if(!foundxml) tempxmlName = "../config/FCNC_45_config.xml"; - } - - - - } - //put in a warning - if(channelName.find("undefined")!=string::npos && warnings) std::cout << "[WARNING] No channel was defined" << endl; - if(nb_Leptons == 0 && warnings) std::cout << "[WARNING] No nb of leptons was defined, default setting is 0" << endl; - - - - - - //SetStyle if needed - //setTDRStyle(); - setMyStyle(); - - ///////////////////// - // Configuration - ///////////////////// - - //xml file - string xmlFileName = tempxmlName; - - - const char *xmlfile = xmlFileName.c_str(); - const char *channel = channelName.c_str(); - if(information) - { - cout << "********************************************************" << endl; - cout << "used config file: " << xmlfile << endl; - cout << "used channel: " << channel << endl; - cout << "********************************************************" << endl; - } - //Configuration output format - TTree *configTree = new TTree("configTree","configuration Tree"); - TClonesArray* tcdatasets = new TClonesArray("Dataset",1000); - configTree->Branch("Datasets","TClonesArray",&tcdatasets); - TClonesArray* tcAnaEnv = new TClonesArray("AnalysisEnvironment",1000); - configTree->Branch("AnaEnv","TClonesArray",&tcAnaEnv); - - //////////////////////////////////// - /// AnalysisEnvironment - //////////////////////////////////// - - AnalysisEnvironment anaEnv; - if(debug) std::cout << "Loading the analysisenvironment" << endl; - AnalysisEnvironmentLoader anaLoad(anaEnv,xmlfile); - if(debug) std::cout << "done creating AnalysisEnvironmentLoader" << endl; - - new ((*tcAnaEnv)[0]) AnalysisEnvironment(anaEnv); - int verbose = anaEnv.Verbose; - float oldLuminosity = anaEnv.Luminosity; // in 1/pb - - if(debug) cout << "analysis environment luminosity for rescaling "<< oldLuminosity << endl; - - ///////////////////// - // Load Datasets - ///////////////////// - - TTreeLoader treeLoader; - if(debug) cout << " - Load datasets ..." << endl; - vector < Dataset* > datasets; - - treeLoader.LoadDatasets (datasets, xmlfile); - for(unsigned int i=0;i datasets[d]->EquivalentLumi() ) Luminosity = datasets[d]->EquivalentLumi(); - - string dataSetName = datasets[d]->Name(); - cout << "datasets: " << dataSetName << endl; - } - cout << "********************************************************" << endl; - - - - //Global variable - //TRootEvent* event = 0; - - //nof selected events - double NEvtsData = 0; - Double_t *nEvents = new Double_t[datasets.size()]; - Double_t *nEvents_Selected = new Double_t[datasets.size()]; - - //////////////////////// - // PileUp Reweighting // - - //////////////////////// - - //cout << Luminosity << endl; - - LumiReWeighting LumiWeights, LumiWeightsUp, LumiWeightsDown; - - LumiWeights = LumiReWeighting("../../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_MC_Summer12_S10.root","../../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_2012Data53X_UpToRun208357/nominal.root", "pileup", "pileup"); - LumiWeightsUp = LumiReWeighting("../../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_MC_Summer12_S10.root", "../../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_2012Data53X_UpToRun208357/sys_up.root", "pileup", "pileup"); - LumiWeightsDown = LumiReWeighting("../../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_MC_Summer12_S10.root", "../../TopTreeAnalysisBase/Calibrations/PileUpReweighting/pileup_2012Data53X_UpToRun208357/sys_down.root", "pileup", "pileup"); - - - if(debug) cout << " Initialized LumiReWeighting stuff" << endl; - - //////////////////////////////////// - // Loop on datasets - //////////////////////////////////// - - if(debug) cout << " - Loop over datasets ... " << datasets.size () << " datasets !" << endl; - for (unsigned int d = 0; d < datasets.size (); d++) { - - string previousFilename = ""; - int iFile = -1; - string dataSetName = datasets[d]->Name(); - - cout << " Dataset " << d << ": " << datasets[d]->Name () << "/ title : " << datasets[d]->Title () << endl; - if (debug) - std::cout<<" -> This sample contains, " << datasets[d]->NofEvtsToRunOver() << " events." << endl; - -// make root tree file name - string roottreename = "../ntuples/"; - roottreename+= channelName; - roottreename+= "_"; - roottreename+= datasets[d]->Name(); - roottreename+="_tree.root"; - // cout << "creating tree in file " << roottreename << endl; - - TFile *fileout = new TFile (roottreename.c_str(), "RECREATE"); - fileout->cd(); - ///////////////////// - // My tree // - //////////////////// - Int_t nElectrons; - Double_t pX_electron[10]; - Double_t pY_electron[10]; - Double_t pZ_electron[10]; - Double_t E_electron[10]; - Double_t pfIso_electron[10]; - Int_t charge_electron[10]; - - Int_t nMuons; - Double_t pX_muon[10]; - Double_t pY_muon[10]; - Double_t pZ_muon[10]; - Double_t E_muon[10]; - Double_t pfIso_muon[10]; - Int_t charge_muon[10]; - - Int_t nJets; - Double_t pX_jet[10]; - Double_t pY_jet[10]; - Double_t pZ_jet[10]; - Double_t E_jet[10]; - - Int_t nBJets; - Double_t pX_Bjet[10]; - Double_t pY_Bjet[10]; - Double_t pZ_Bjet[10]; - Double_t E_Bjet[10]; - - Int_t nLJets; - Double_t pX_Ljet[10]; - Double_t pY_Ljet[10]; - Double_t pZ_Ljet[10]; - Double_t Phi_Ljet[10]; - Double_t E_Ljet[10]; - - - Double_t missingEt; - Double_t missingEt_Phi; - Double_t missingEt_Theta; - Double_t missingEt_pX; - Double_t missingEt_pY; - Double_t missingEt_pZ; - - - //45 channel variables - Double_t InvMass_4lept_Zdecay; - Double_t InvMass_FCNC_top_Zdecay; - Double_t InvMass_SM_lb; - Double_t InvMass_SM_W_lv; - Double_t InvMass_SM_W_qq; - Double_t InvMass_SM_W; - Double_t InvMass_SM_top_blv; - Double_t InvMass_SM_top_bqq; - Double_t InvMass_SM_top; - Double_t TrMass_W; - Double_t TrMass_W_qq; - Double_t TrMass_W_lv; - - Double_t Phi_Higgs; - Double_t Eta_Higgs; - - Double_t Bdiscr; - //3L channel variables - Double_t InvMass_Z; - Double_t InvMass_H; - Double_t Z_candidate_pT; - Double_t Z_candidate_Eta; - Double_t H_candidate_pT; - Double_t H_candidate_Eta; - - Double_t pT_FCNC_top_tcZ; - Double_t Eta_FCNC_top_tcZ; - Double_t InvMass_FCNC_top_tcZ; - - Double_t pT_FCNC_top_candidate; - Double_t Eta_FCNC_top_candidate; - Double_t InvMass_FCNC_top_candidate; - - Double_t pT_FCNC_top_tcH_ZZ_llqq; - Double_t Eta_FCNC_top_tcH_ZZ_llqq; - Double_t InvMass_FCNC_top_tcH_ZZ_llqq; - - - Double_t Bjet_Eta; - Double_t Bjet_Phi; - Double_t Bjet_Px; - Double_t Bjet_Pt; - Double_t Bjet_Py; - Double_t Bjet_Pz; - Double_t FCNC_ll_Eta; - Double_t FCNC_ll_Phi; - Double_t FCNC_ll_Px; - Double_t FCNC_ll_Pt; - Double_t FCNC_ll_Py; - Double_t FCNC_ll_Pz; - - Double_t InvMass_FCNC_ll; - Double_t DeltaR_SMlb_FCNCll; - Double_t DeltaPhi_SMlb_FCNCll; - - - - - Int_t nEvents_Tree; - Int_t isdata; - // various weights - Double_t pu_weight; - - - TTree* myTree = new TTree("tree","tree"); - myTree->Branch("isdata",&isdata,"isdata/I"); - myTree->Branch("nEvents_Tree",&nEvents_Tree,"nEvents_Tree/I"); - - myTree->Branch("nElectrons",&nElectrons, "nElectrons/I"); - myTree->Branch("pX_electron",pX_electron,"pX_electron[nElectrons]/D"); - myTree->Branch("pY_electron",pY_electron,"pY_electron[nElectrons]/D"); - myTree->Branch("pZ_electron",pZ_electron,"pZ_electron[nElectrons]/D"); - myTree->Branch("E_electron",E_electron,"E_electron[nElectrons]/D"); - myTree->Branch("pfIso_electron",pfIso_electron,"pfIso_electron[nElectrons]/D"); - myTree->Branch("charge_electron",charge_electron,"charge_electron[nElectrons]/I"); - - myTree->Branch("nMuons",&nMuons, "nMuons/I"); - myTree->Branch("pX_muon",pX_muon,"pX_muon[nMuons]/D"); - myTree->Branch("pY_muon",pY_muon,"pY_muon[nMuons]/D"); - myTree->Branch("pZ_muon",pZ_muon,"pZ_muon[nMuons]/D"); - myTree->Branch("E_muon",E_muon,"E_muon[nMuons]/D"); - myTree->Branch("pfIso_muon",pfIso_muon,"pfIso_muon[nMuons]/D"); - myTree->Branch("charge_muon",charge_muon,"charge_muon[nMuons]/I"); - - myTree->Branch("nJets",&nJets, "nJets/I"); - myTree->Branch("pX_jet",pX_jet,"pX_jet[nJets]/D"); - myTree->Branch("pY_jet",pY_jet,"pY_jet[nJets]/D"); - myTree->Branch("pZ_jet",pZ_jet,"pZ_jet[nJets]/D"); - myTree->Branch("E_jet",E_jet,"E_jet[nJets]/D"); - - myTree->Branch("nBJets",&nJets, "nBJets/I"); - myTree->Branch("pX_Bjet",pX_Bjet,"pX_Bjet[nBJets]/D"); - myTree->Branch("pY_Bjet",pY_Bjet,"pY_Bjet[nBJets]/D"); - myTree->Branch("pZ_Bjet",pZ_Bjet,"pZ_Bjet[nBJets]/D"); - myTree->Branch("E_Bjet",E_Bjet,"E_Bjet[nBJets]/D"); - - myTree->Branch("nLJets",&nJets, "nLJets/I"); - myTree->Branch("pX_Ljet",pX_Ljet,"pX_Ljet[nLJets]/D"); - myTree->Branch("pY_Ljet",pY_Ljet,"pY_Ljet[nLJets]/D"); - myTree->Branch("pZ_Ljet",pZ_Ljet,"pZ_Ljet[nLJets]/D"); - myTree->Branch("E_Ljet",E_Ljet,"E_Ljet[nLJets]/D"); - - myTree->Branch("missingEt",&missingEt,"missingEt/D"); - myTree->Branch("missingEt_Phi",&missingEt_Phi,"missingEt_Phi/D"); - myTree->Branch("missingEt_Theta",&missingEt_Theta,"missingEt_Theta/D"); - myTree->Branch("missingEt_pX",&missingEt_pX,"missingEt_pX/D"); - myTree->Branch("missingEt_pY",&missingEt_pY,"missingEt_pY/D"); - - myTree->Branch("pu_weight",&pu_weight,"pu_weight/D"); - - if(channelName.find("45")!=string::npos) - { - //45 channel variables - myTree->Branch("InvMass_4lept_Zdecay",&InvMass_4lept_Zdecay,"InvMass_4lept_Zdecay/D"); - myTree->Branch("InvMass_FCNC_top_Zdecay",&InvMass_FCNC_top_Zdecay,"InvMass_FCNC_top_Zdecay/D"); - myTree->Branch("InvMass_SM_lb",&InvMass_SM_lb,"InvMass_SM_lb/D"); - myTree->Branch("InvMass_SM_W_lv",&InvMass_SM_W_lv,"InvMass_SM_W_lv/D"); - myTree->Branch("InvMass_SM_W_qq",&InvMass_SM_W_qq,"InvMass_SM_W_qq/D"); - myTree->Branch("InvMass_SM_W",&InvMass_SM_W,"InvMass_SM_W/D"); - myTree->Branch("InvMass_SM_top_blv",&InvMass_SM_top_blv,"InvMass_SM_top_blv/D"); - myTree->Branch("InvMass_SM_top_bqq",&InvMass_SM_top_bqq,"InvMass_SM_top_bqq/D"); - myTree->Branch("InvMass_SM_top",&InvMass_SM_top,"InvMass_SM_top/D"); - myTree->Branch("TrMass_W",&TrMass_W,"TrMass_W/D"); - myTree->Branch("TrMass_W_qq",&TrMass_W_qq,"TrMass_W_qq/D"); - myTree->Branch("TrMass_W_lv",&TrMass_W_lv,"TrMass_W_lv/D"); - - myTree->Branch("Phi_Higgs",&Phi_Higgs,"Phi_Higgs/D"); - myTree->Branch("Eta_Higgs",&Eta_Higgs,"Eta_Higgs/D"); - - myTree->Branch("Bdiscr",&Bdiscr,"Bdiscr/D"); - } - if(channelName.find("3L")!=string::npos) - { - //3L channel variables - myTree->Branch("InvMass_Z",&InvMass_Z,"InvMass_Z/D"); - myTree->Branch("InvMass_H",&InvMass_H,"InvMass_H/D"); - myTree->Branch("Z_candidate_pT",&Z_candidate_pT,"Z_candidate_pT/D"); - myTree->Branch("Z_candidate_Eta",&Z_candidate_Eta,"Z_candidate_Eta/D"); - myTree->Branch("H_candidate_pT",&H_candidate_pT,"H_candidate_pT/D"); - myTree->Branch("H_candidate_Eta",&H_candidate_Eta,"H_candidate_Eta/D"); - myTree->Branch("pT_FCNC_top_tcZ",&pT_FCNC_top_tcZ,"pT_FCNC_top_tcZ/D"); - myTree->Branch("Eta_FCNC_top_tcZ",&Eta_FCNC_top_tcZ,"Eta_FCNC_top_tcZ/D"); - myTree->Branch("InvMass_FCNC_top_tcZ",&InvMass_FCNC_top_tcZ,"InvMass_FCNC_top_tcZ/D"); - myTree->Branch("pT_FCNC_top_candidate",&pT_FCNC_top_candidate,"pT_FCNC_top_candidate/D"); - myTree->Branch("Eta_FCNC_top_candidate",&Eta_FCNC_top_candidate,"Eta_FCNC_top_candidate/D"); - myTree->Branch("InvMass_FCNC_top_candidate",&InvMass_FCNC_top_candidate,"InvMass_FCNC_top_candidate/D"); - myTree->Branch("pT_FCNC_top_tcH_ZZ_llqq",&pT_FCNC_top_tcH_ZZ_llqq,"pT_FCNC_top_tcH_ZZ_llqq/D"); - myTree->Branch("Eta_FCNC_top_tcH_ZZ_llqq",&Eta_FCNC_top_tcH_ZZ_llqq,"Eta_FCNC_top_tcH_ZZ_llqq/D"); - myTree->Branch("InvMass_FCNC_top_tcH_ZZ_llqq",&InvMass_FCNC_top_tcH_ZZ_llqq,"InvMass_FCNC_top_tcH_ZZ_llqq/D"); - myTree->Branch("Bjet_Eta",&Bjet_Eta, "Bjet_Eta/D"); - myTree->Branch("Bjet_Phi",&Bjet_Phi, "Bjet_Phi/D"); - myTree->Branch("Bjet_Px",&Bjet_Px, "Bjet_Px/D"); - myTree->Branch("Bjet_Pt",&Bjet_Pt, "Bjet_Pt/D"); - myTree->Branch("Bjet_Py",&Bjet_Py, "Bjet_Py/D"); - myTree->Branch("Bjet_Pz",&Bjet_Pz, "Bjet_Pz/D"); - myTree->Branch("FCNC_ll_Eta",&FCNC_ll_Eta, "FCNC_ll_Eta/D"); - myTree->Branch("FCNC_ll_Phi",&FCNC_ll_Phi, "FCNC_ll_Phi/D"); - myTree->Branch("FCNC_ll_Px",&FCNC_ll_Px, "FCNC_ll_Px/D"); - myTree->Branch("FCNC_ll_Pt",&FCNC_ll_Pt, "FCNC_ll_Pt/D"); - myTree->Branch("FCNC_ll_Py",&FCNC_ll_Py, "FCNC_ll_Py/D"); - myTree->Branch("FCNC_ll_Pz",&FCNC_ll_Pz, "FCNC_ll_Pz/D"); - myTree->Branch("InvMass_SM_lb",&InvMass_SM_lb, "InvMass_SM_lb/D"); - myTree->Branch("InvMass_FCNC_ll",&InvMass_FCNC_ll, "InvMass_FCNC_ll/D"); - myTree->Branch("DeltaR_SMlb_FCNCll",&DeltaR_SMlb_FCNCll, "DeltaR_SMlb_FCNCll/D"); - myTree->Branch("DeltaPhi_SMlb_FCNCll",&DeltaPhi_SMlb_FCNCll, "DeltaPhi_SMlb_FCNCll/D"); - myTree->Branch("Bdiscr",&Bdiscr,"Bdiscr/D"); - - } - - // myTree->Print(); - - TH1F * EventSummary = new TH1F("EventSummary","EventSummary",2,0,2); - TH1F * Xsection = new TH1F("Xsection","Xsection",2,0,2); - - //open files and load - if(debug) cout<<"LoadEvent"< vCorrParam; - - /*JetCorrectorParameters *L3JetPar = new JetCorrectorParameters("../../TopTreeAnalysisBase/Calibrations/JECFiles/Summer12_V3_MC_L3Absolute_AK5PFchs.txt"); - JetCorrectorParameters *L2JetPar = new JetCorrectorParameters("../../TopTreeAnalysisBase/Calibrations/JECFiles/Summer12_V3_MC_L2Relative_AK5PFchs.txt"); - JetCorrectorParameters *L1JetPar = new JetCorrectorParameters("../../TopTreeAnalysisBase/Calibrations/JECFiles/Summer12_V3_MC_L1FastJet_AK5PFchs.txt"); - - // Load the JetCorrectorParameter objects into a vector, IMPORTANT: THE ORDER MATTERS HERE !!!! - vCorrParam.push_back(*L1JetPar); - vCorrParam.push_back(*L2JetPar); - vCorrParam.push_back(*L3JetPar); - vector selectedLightJets - if(dataSetName.find("Data") == 0 || dataSetName.find("data") == 0 || dataSetName.find("DATA") == 0) { // DATA! - JetCorrectorParameters *ResJetCorPar = new JetCorrectorParameters("../../TopTreeAnalysisBase/Calibrations/JECFiles/Summer12_V3_DATA_L2L3Residual_AK5PFchs.txt"); - vCorrParam.push_back(*ResJetCorPar); - }*/ - - JetCorrectionUncertainty *jecUnc = new JetCorrectionUncertainty(*(new JetCorrectorParameters("../../TopTreeAnalysisBase/Calibrations/JECFiles/Fall12_V6_DATA_UncertaintySources_AK5PFchs.txt", "Total"))); - - // true means redo also the L1 - JetTools *jetTools = new JetTools(vCorrParam, jecUnc, true); - - - //////////////////////////////////// - // Loop on events - //////////////////////////////////// - - nEvents[d] = 0; - nEvents_Selected[d] = 0; - int itriggerSemiMu = -1,itriggerSemiEl = -1, previousRun = -1; - - // store number of events in ntuple - nEvents_Tree = datasets[d]->NofEvtsToRunOver(); - EventSummary->SetBinContent(1, datasets[d]->NofEvtsToRunOver()); - - - //define all cross sections - string datasetName = datasets[d]->Name(); - - - if(datasetName.find("GluGluHiggs4lep")!=string::npos) {Xsection->SetBinContent(1,0.005109893);} - if(datasetName.find("VBHiggs4lep")!=string::npos) {Xsection->SetBinContent(1,0.00414341777);} - - if(datasetName.find("WW_To2L2Nu")!=string::npos) {Xsection->SetBinContent(1,5.757);} - if(datasetName.find("WZ_To2L2Q")!=string::npos) {Xsection->SetBinContent(1,2.267);} - if(datasetName.find("WZ_To3LNu")!=string::npos) {Xsection->SetBinContent(1,1.087);} - if(datasetName.find("ZZ_To2L2Nu")!=string::npos) {Xsection->SetBinContent(1,0.713);} - if(datasetName.find("ZZ_To2L2Q")!=string::npos) {Xsection->SetBinContent(1,2.492);} - if(datasetName.find("ZZ_To4L")!=string::npos) {Xsection->SetBinContent(1,0.18);} - - if(datasetName.find("TBZ_ToLL_4F")!=string::npos) {Xsection->SetBinContent(1,0.0114);} - if(datasetName.find("ttH")!=string::npos) {Xsection->SetBinContent(1,0.1293);} - if(datasetName.find("TTZ")!=string::npos) {Xsection->SetBinContent(1,0.172);} - if(datasetName.find("TTW")!=string::npos) {Xsection->SetBinContent(1,0.2148);} - - if(datasetName.find("ST_T_s-ch")!=string::npos) {Xsection->SetBinContent(1,3.79);} - if(datasetName.find("ST_TBar_s-ch")!=string::npos) {Xsection->SetBinContent(1,1.76);} - if(datasetName.find("ST_T_tW-ch")!=string::npos) {Xsection->SetBinContent(1,11.1);} - if(datasetName.find("ST_TBar_tW-ch")!=string::npos) {Xsection->SetBinContent(1,11.1);} - - if(datasetName.find("TT_SemiLeptMGDecays")!=string::npos) {Xsection->SetBinContent(1,110.26;} - if(datasetName.find("TT_FullLeptMGDecays")!=string::npos) {Xsection->SetBinContent(1,26.42);} - - if(datasetName.find("Z_1Jets")!=string::npos) {Xsection->SetBinContent(1,671.83);} - if(datasetName.find("Z_2Jets")!=string::npos) {Xsection->SetBinContent(1,216.76);} - if(datasetName.find("Z_3Jets")!=string::npos) {Xsection->SetBinContent(1,61.20);} - if(datasetName.find("Z_4Jets")!=string::npos) {Xsection->SetBinContent(1,27.59);} - - - if(datasetName.find("TTJetsTocHbW_HToWW_WToLNuL_WToJets")!=string::npos) {Xsection->SetBinContent(1,0.090636); } - if(datasetName.find("TTJetsTocHbW_HToWW_WToLNuL")!=string::npos) {Xsection->SetBinContent(1,0.022659); } - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToBB_ZToLL")!=string::npos) { Xsection->SetBinContent(1, 0.0005135); } - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL")!=string::npos) {Xsection->SetBinContent(1, 0.0018609);} - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToNuL_ZToLL")!=string::npos) { Xsection->SetBinContent(1, 0.00067929); } - if(datasetName.find("TTJetsTocHbW_HToZZ_ZToLL")!=string::npos) {Xsection->SetBinContent(1, 0.00016516); } - if(datasetName.find("TTJetsTocZbW")!=string::npos) {Xsection->SetBinContent(1, 0.1575); } - - - for (unsigned int ievt = 0; ievt < datasets[d]->NofEvtsToRunOver(); ievt++) // event loop - //for (unsigned int ievt = 0; ievt < 20000; ievt++) - { - - vector < TRootVertex* > vertex; - vector < TRootMuon* > init_muons; - vector < TRootElectron* > init_electrons; - vector < TRootJet* > init_jets_corrected; - vector < TRootJet* > init_jets; - vector < TRootMET* > mets; - vector < TRootGenJet* > genjets; - - nEvents[d]++; - - if(ievt%1000 == 0) - std::cout<<"Processing the "<NofEvtsToRunOver())*100 <<"%)" << " +> "<< (nEvents_Selected[d]/(double)datasets[d]->NofEvtsToRunOver())*100 << "% selected of the total events" << flush<<"\r"; - - //////////////// - // LOAD EVENT // - //////////////// - - TRootEvent* event = treeLoader.LoadEvent (ievt, vertex, init_muons, init_electrons, init_jets_corrected, mets); - isdata=0; - if(! (dataSetName.find("Data") == 0 || dataSetName.find("data") == 0 || dataSetName.find("DATA") == 0 ) ) { - genjets = treeLoader.LoadGenJet(ievt,false); - sort(genjets.begin(),genjets.end(),HighestPt()); // HighestPt() is included from the Selection class - } - else{ - isdata=1; - } - - - - ///////////////////////////////// - // DETERMINE EVENT SCALEFACTOR // - ///////////////////////////////// - - // scale factor for the event - float scaleFactor = 1.; - - // PU reweighting - - double lumiWeight = LumiWeights.ITweight( (int)event->nTruePU() ); - - if(dataSetName.find("Data") == 0 || dataSetName.find("data") == 0 || dataSetName.find("DATA") == 0) - lumiWeight=1; - - // up syst -> lumiWeight = LumiWeightsUp.ITweight( (int)event->nTruePU() ); - // down syst -> lumiWeight = LumiWeightsDown.ITweight( (int)event->nTruePU() ); - - pu_weight=lumiWeight; - - scaleFactor = scaleFactor*lumiWeight; - - /////////////////// - // TRIGGER SETUP // - /////////////////// - - string currentFilename = datasets[d]->eventTree()->GetFile()->GetName(); - if(previousFilename != currentFilename){ - previousFilename = currentFilename; - iFile++; - // cout<<"File changed!!! => iFile = "<eventTree()->GetFile()->GetName() << " in sample " << dataSetName << endl; - } - - int currentRun = event->runId(); - - if(previousRun != currentRun) - previousRun = currentRun; - - //triggering only for data, I only have events that either have at least 2 muons or 2 electrons so use double, - // otherwise include EMU trigger as well - /*bool triggered = false; - int trigger1; - int trigger2; - if(isdata == 1) - { - cout << "isdata with currentRun " << currentRun << " iFile " << iFile << endl; - trigger1 = treeLoader.iTrigger("HLT_Mu17_Mu8_v17",currentRun,iFile); //double muon - cout << "trigger1" << endl; - trigger2 = treeLoader.iTrigger("HLT_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v18",currentRun,iFile); //double electron - cout << "trigger2" << endl; - - triggered = (treeLoader.EventTrigged(trigger1) || treeLoader.EventTrigged(trigger2)); - - cout << "triggered is true" << endl; - - } - else triggered = true; - - - if(!triggered) continue; //if the events isn't triggered go to the next event - */ - ///////////////////////////////////////////////////////////////////////////// - // JES SYSTEMATICS && SMEAR JET RESOLUTION TO MIMIC THE RESOLUTION IN DATA // - ///////////////////////////////////////////////////////////////////////////// - - if( ! (dataSetName.find("Data") == 0 || dataSetName.find("data") == 0 || dataSetName.find("DATA") == 0 ) ) - - jetTools->correctJetJER(init_jets_corrected, genjets, mets[0], "nominal",false); - - ///////////////////// - // EVENT SELECTION // - ///////////////////// - - //Declare selection instance - Selection selection(init_jets_corrected, init_muons, init_electrons, mets, event->kt6PFJets_rho()); -/* selection.setJetCuts(20,2.5,0.01,1.,0.98,0.3,0.1); // standard TOP jet selection - selection.setMuonCuts(5,2.5,0.4,0.2,0.3,1,0.5,5,0); // standard mu selection but with looser iso - selection.setElectronCuts(10,2.5,0.4,0.02,0.5,0.3,0); // standard ele selection but with looser iso -*/ - //define selection cuts --> have to be validated!!! - // From the class Selection the following functions are used: - // void Selection::setJetCuts(float Pt, float Eta, float EMF, float n90Hits, float fHPD, float dRJetElectron, float dRJetMuon) - // void Selection::setLooseDiElectronCuts(float ptt, float Eta, float RelIso, MVAid) - // void Selection::setLooseMuonCuts(float Pt, float Eta, float RelIso) - //void Selection::setDiElectronCuts(float Et, float Eta, float RelIso, float d0, float MVAId, float DistVzPVz, float DRJets, int MaxMissingHits) - - selection.setJetCuts(20.,2.4,0.01,1.,0.98,0.3,0.1); - selection.setDiMuonCuts(10.,2.5,0.2,0.04); - selection.setDiElectronCuts(15.0,2.4,0.15,0.04,0.5,1,0.3,1); - - - bool isGoodPV = selection.isPVSelected(vertex, 4, 24, 2.); - - if(!isGoodPV) - continue; - - missingEt=mets[0]->Pt(); - missingEt_pX=mets[0]->Px(); - missingEt_pY=mets[0]->Py(); - missingEt_Phi = mets[0]->Phi(); - missingEt_Theta = mets[0]->Theta(); - - - vector selectedJets= selection.GetSelectedJets(true); - -// vector selectedMuons = selection.GetSelectedMuons(vertex[0],selectedJets); - vector selectedMuons = selection.GetSelectedDiMuons(); - -// vector selectedElectrons = selection.GetSelectedElectrons(selectedJets); - vector selectedElectrons = selection.GetSelectedDiElectrons(); - - vector selectedBJets_CSVM; // B-jets at the Tight working point - vector selectedLightJets; // light-Jets, to be filled afer b-tagging - - - nElectrons=0; - for(int iele=0; ielePx(); - pY_electron[nElectrons]=selectedElectrons[iele]->Py(); - pZ_electron[nElectrons]=selectedElectrons[iele]->Pz(); - E_electron[nElectrons]=selectedElectrons[iele]->E(); - Double_t isocorr=0; - - // get isolation out, start by getting pu corrections - if(selectedElectrons[iele]->puChargedHadronIso()>0){ - isocorr = selectedElectrons[iele]->puChargedHadronIso(); - - } - else{ - // go through loads of pain to get rho correction, no function available. code below taken from TRootElectron selector in TopTreeAnalysisBase/*/Selector.cc - double EffectiveArea = 0.; - - // HCP 2012 updated for electron conesize = 0.3, taken from http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/EGamma/EGammaAnalysisTools/interface/ElectronEffectiveArea.h?revision=1.4&view=markup - if (fabs(selectedElectrons[iele]->superClusterEta()) >= 0.0 && fabs(selectedElectrons[iele]->superClusterEta()) < 1.0 ) EffectiveArea = 0.130; - if (fabs(selectedElectrons[iele]->superClusterEta()) >= 1.0 && fabs(selectedElectrons[iele]->superClusterEta()) < 1.479 ) EffectiveArea = 0.137; - if (fabs(selectedElectrons[iele]->superClusterEta()) >= 1.479 && fabs(selectedElectrons[iele]->superClusterEta()) < 2.0 ) EffectiveArea = 0.067; - if (fabs(selectedElectrons[iele]->superClusterEta()) >= 2.0 && fabs(selectedElectrons[iele]->superClusterEta()) < 2.2 ) EffectiveArea = 0.089; - if (fabs(selectedElectrons[iele]->superClusterEta()) >= 2.2 && fabs(selectedElectrons[iele]->superClusterEta()) < 2.3 ) EffectiveArea = 0.107; - if (fabs(selectedElectrons[iele]->superClusterEta()) >= 2.3 && fabs(selectedElectrons[iele]->superClusterEta()) < 2.4 ) EffectiveArea = 0.110; - if (fabs(selectedElectrons[iele]->superClusterEta()) >= 2.4) EffectiveArea = 0.138; - isocorr = event->kt6PFJets_rho()*EffectiveArea; - } - - pfIso_electron[nElectrons]=(selectedElectrons[iele]->chargedHadronIso() + max( selectedElectrons[iele]->neutralHadronIso() + selectedElectrons[iele]->photonIso() - isocorr, 0.) )/ selectedElectrons[iele]->Pt(); - charge_electron[nElectrons]=selectedElectrons[iele]->charge(); - nElectrons++; - } - nMuons=0; - for(int imuo=0; imuoPx(); - pY_muon[nMuons]=selectedMuons[imuo]->Py(); - pZ_muon[nMuons]=selectedMuons[imuo]->Pz(); - E_muon[nMuons]=selectedMuons[imuo]->E(); - pfIso_muon[nMuons]=(selectedMuons[imuo]->chargedHadronIso() + max( 0.0, selectedMuons[imuo]->neutralHadronIso() + selectedMuons[imuo]->photonIso() - 0.5*selectedMuons[imuo]->puChargedHadronIso() ) ) / selectedMuons[imuo]->Pt(); // dBeta corrected - - - charge_muon[nMuons]=selectedMuons[imuo]->charge(); - nMuons++; - } - nJets=0; - for(int ijet=0; ijetPx(); - pY_jet[nJets]=selectedJets[ijet]->Py(); - pZ_jet[nJets]=selectedJets[ijet]->Pz(); - E_jet[nJets]=selectedJets[ijet]->E(); - nJets++; - } - - - for(unsigned int iJet=0; iJetbtag_combinedSecondaryVertexBJetTags() > .679) - { - selectedBJets_CSVM.push_back(selectedJets[iJet]); - } - else selectedLightJets.push_back(selectedJets[iJet]); - - - } - - nBJets=0; - for(int ijet=0; ijetPx(); - pY_Bjet[nBJets]=selectedBJets_CSVM[ijet]->Py(); - pZ_Bjet[nBJets]=selectedBJets_CSVM[ijet]->Pz(); - E_Bjet[nBJets]=selectedBJets_CSVM[ijet]->E(); - nBJets++; - } - - nLJets=0; - for(int ijet=0; ijetPx(); - pY_Ljet[nLJets]=selectedLightJets[ijet]->Py(); - pZ_Ljet[nLJets]=selectedLightJets[ijet]->Pz(); - E_Ljet[nLJets]=selectedLightJets[ijet]->E(); - nLJets++; - } - - - - vector > HighestPtLept; - HighestPtLept.clear(); - - - for(int leptonIt = 0; leptonIt < selectedElectrons.size(); leptonIt++) - { - HighestPtLept.push_back(make_pair(leptonIt, selectedElectrons[leptonIt]->Pt())); - } - for(int k =0; k < selectedMuons.size() ; k++) - { - HighestPtLept.push_back(make_pair(20+k, selectedMuons[k]->Pt())); - - } - - sort(HighestPtLept.begin(), HighestPtLept.end(),cmp_big_first); - if(debug) - { - cout << "****************New event*****************" << endl; - for(int i = 0; i aPair = HighestPtLept[i]; - if(aPair.first>19) - { - int number = aPair.first-20; - cout << "selectedMuons[number]->Pt: " << selectedMuons[number]->Pt() << endl; - } - else - { - int number = aPair.first; - cout << "selectedElectrons[number]->Pt: " << selectedElectrons[number]->Pt() << endl; - - } - } - } - - - - - - - - if(channelName.find("45")!=string::npos && (nElectrons+nMuons>3)) - { - - - myTree->Fill(); - nEvents_Selected[d]++; - - - } // > 3 leptons - - if(channelName.find("3L")!=string::npos && (nElectrons+nMuons == 3)) - { - - - myTree->Fill(); - nEvents_Selected[d]++; - if(debug) cout << "filled tree for 3l channel" << endl; - - } - - - - - - - - - - - } //loop on events - - cout<Write(); - configTree->Write("", TObject::kOverwrite); - myTree->Write("", TObject::kOverwrite); - fileout->Write(); - fileout->Close(); - // delete myTree; - delete fileout; - - //important: free memory - treeLoader.UnLoadDataset(); - - } //loop on datasets - - //Once everything is filled - //Once everything is filled ... - if (debug) - cout << " We ran over all the data ;-)" << endl; - - // Do some special things with certain plots (normalize, BayesDivide, ... ) - // if (debug) - // cout << "Treating the special plots." << endl; - - delete tcdatasets; - delete tcAnaEnv; - delete configTree; - - cout << "It took us " << ((double)clock() - start) / CLOCKS_PER_SEC << " to run the program" << endl; - - cout << "********************************************" << endl; - cout << " End of the program !! " << endl; - cout << "********************************************" << endl; - - return 0; -} diff --git a/macros/Optimal_cut.C b/macros/Optimal_cut.C deleted file mode 100644 index 65674cb..0000000 --- a/macros/Optimal_cut.C +++ /dev/null @@ -1,421 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "TGraph.h" -#include "TVectorT.h" - -using namespace std; - -string infile = "../data/FCNC_1L3B_SelectedSamples_NoJetPtCuts.root"; -string eclusiveinfile = ""; -bool debug = false; -int jetcut = 5 + 1; //+1 for getting the right binnumber -int bcut = 3 +1; //+1 for the binnumber - -void Optimal_cut(){ - - TFile *file = new TFile(infile.c_str(),"read"); - TFile *exclusiveFile = new TFile(eclusiveinfile.c_str(),"read"); - TFile *outputfile = new TFile("../data/OptimalCuts_1L3B.root","RECREATE"); - - vector Variables; - - Variables.push_back("NbOfSelectedJets"); - Variables.push_back("NbOfSelectedBJets_CSVM"); - Variables.push_back("NbOfSelectedBJets_CSVT"); - Variables.push_back("Pt_leading_jet"); - Variables.push_back("Pt_2nd_leading_jet"); - Variables.push_back("Pt_3d_leading_jet"); - Variables.push_back("Pt_4th_leading_jet"); - - - - vector signalname; - vector backgroundnames; - - backgroundnames.push_back("W_1Jets"); - backgroundnames.push_back("W_2Jets"); - backgroundnames.push_back("W_3Jets"); - backgroundnames.push_back("W_4Jets"); - backgroundnames.push_back("WW_To2L2Nu"); - backgroundnames.push_back("WZ_To2L2Q"); - backgroundnames.push_back("WZ_To3LNu"); - backgroundnames.push_back("ZZ_To2L2Nu"); - backgroundnames.push_back("ZZ_To2L2Q"); - backgroundnames.push_back("ZZ_To4L"); - backgroundnames.push_back("ST_TToDilepton_tW-ch"); - backgroundnames.push_back("ST_TToTlepWhad_tW-ch"); - backgroundnames.push_back("ST_TToThadWlep_tW-ch"); - backgroundnames.push_back("ST_TBarToDilepton_tW-ch"); - backgroundnames.push_back("ST_TBarToTlepWhad_tW-ch"); - backgroundnames.push_back("ST_TBarToThadWlep_tW-ch"); - backgroundnames.push_back("TT_SemiLeptMGDecays"); - backgroundnames.push_back("TT_FullLeptMGDecays"); - backgroundnames.push_back("TT_HadronicMGDecays"); - backgroundnames.push_back("Z_M-10To50"); - backgroundnames.push_back("Z_M-50"); - backgroundnames.push_back("Z_1Jets"); - backgroundnames.push_back("Z_2Jets"); - backgroundnames.push_back("Z_3Jets"); - backgroundnames.push_back("Z_4Jets"); - backgroundnames.push_back("TTZ"); - backgroundnames.push_back("TTW"); - backgroundnames.push_back("ttbar"); - backgroundnames.push_back("ttbar_fullLept"); - backgroundnames.push_back("ttbar_semiLept"); - backgroundnames.push_back("wjets"); - backgroundnames.push_back("ttt"); - backgroundnames.push_back("ttw"); - backgroundnames.push_back("WW"); - backgroundnames.push_back("WZ"); - backgroundnames.push_back("ZZ"); - backgroundnames.push_back("ttz"); - backgroundnames.push_back("Zjets"); - backgroundnames.push_back("ST_T_tW-ch"); - backgroundnames.push_back("ST_TBar_tW-ch"); - backgroundnames.push_back("ST_T_s-ch"); - backgroundnames.push_back("ST_Tbar_s-ch"); - backgroundnames.push_back("ST_T_t-ch"); - backgroundnames.push_back("ST_Tbar_t-ch"); - - signalname.push_back("TTJetsTocHbW_HToWW_WToLNuL_WToJets_HctR"); - signalname.push_back("TTJetsTocHbW_HToWW_WToLNuL_WToJets_HctL"); - signalname.push_back("TTJetsTocHbW_HToWW_WToLNuL_HctL"); - signalname.push_back("TTJetsTocHbW_HToWW_WToLNuL_HctR"); - signalname.push_back("TTJetsTocHbW_HToBB_HctL"); - signalname.push_back("TTJetsTocHbW_HToBB_HctR"); - signalname.push_back("TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctL"); - signalname.push_back("TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctR"); - signalname.push_back("TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctL"); - signalname.push_back("TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctR"); - signalname.push_back("TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctL"); - signalname.push_back("TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctR"); - signalname.push_back("TTJetsTocHbW_HToZZ_ZToLL_HctL"); - signalname.push_back("TTJetsTocHbW_HToZZ_ZToLL_HctR"); - signalname.push_back("TTJetsTocZbW"); - - for(unsigned int iVar = 0; iVarmkdir(Variables[iVar].c_str()); - th1dir->cd(); - - - vector Histo_samples; - vector Name_samples; - - string Path_To_Histo = "MultiSamplePlot_"; - Path_To_Histo += Variables[iVar]; - Path_To_Histo += "/"; - Path_To_Histo += Variables[iVar]; - Path_To_Histo += "_"; - - int first_index_S = -1; // Define the first indices for S and B, which indicate which histograms are filled and which not from all samples - int first_index_B = -1; - - TH1F *HistoSignal = 0; - for(unsigned int iSignal = 0; iSignal < signalname.size(); iSignal++){ - if(HistoSignal) continue; //We only want to go further if the HistoSignal isn't filled yet - - string histoName = Path_To_Histo; - histoName += signalname[iSignal]; - TH1F *histo( (TH1F*) file->Get(histoName.c_str()) ); - TH1F *histo_exclusive( (TH1F*) exclusiveFile->Get(histoName.c_str()) ); - - if(histo){ - histo->Clone("Hist"); - HistoSignal = Hist; - first_index_S = iSignal; - Histo_samples.push_back(histo); - Name_samples.push_back(signalname[iSignal]); - - if(debug){ - cout << histo->Integral(6,15) << endl; - cout << Histo_samples.back()->Integral(6,15) << endl; - cout << " " << endl; - } - continue; - } - if(histo_exclusive){ - histo_exclusive->Clone("Histo"); - HistoSignal = Histo; - first_index_S = iSignal; - Histo_samples.push_back(histo_exclusive); - Name_samples.push_back(signalname[iSignal]); - - if(debug){ - cout << histo_exclusive->Integral(6,15) << endl; - cout << Histo_samples.back()->Integral(6,15) << endl; - cout << " " << endl; - } - } - - } - TH1F *HistoBackground = 0; - for(unsigned int iBackgr = 0; iBackgr < backgroundnames.size(); iBackgr++){ - if(HistoBackground) continue; //We only want to go further if the HistoBackground isn't filled yet - string histoName = Path_To_Histo; - histoName += backgroundnames[iBackgr]; - TH1F *histo( (TH1F*) file->Get(histoName.c_str()) ); - TH1F *histo_exclusive( (TH1F*) exclusiveFile->Get(histoName.c_str()) ); - - if(histo){ - histo->Clone("Histog"); - HistoBackground = Histog; - first_index_B = iBackgr; - Histo_samples.push_back(histo); - Name_samples.push_back(backgroundnames[iBackgr]); - - if(debug){ - cout << histo->Integral(6,15) << endl; - cout << Histo_samples.back()->Integral(6,15) << endl; - cout << " " << endl; - } - continue; - } - if(histo_exclusive){ - histo_exclusive->Clone("Histogr"); - HistoBackground = Histogr; - first_index_B = iBackgr; - Histo_samples.push_back(histo_exclusive); - Name_samples.push_back(backgroundnames[iBackgr]); - - if(debug){ - cout << histo_exclusive->Integral(6,15) << endl; - cout << Histo_samples.back()->Integral(6,15) << endl; - cout << " " << endl; - } - } - } - - - - //Add the histograms into 1 for S and B seperately - for(unsigned int iSignal = first_index_S+1; iSignal < signalname.size(); iSignal++){ - - - string histoName = Path_To_Histo; - histoName += signalname[iSignal]; - TH1F *histo( (TH1F*) file->Get(histoName.c_str()) ); - TH1F *histo_exclusive( (TH1F*) exclusiveFile->Get(histoName.c_str()) ); - - if(histo){ - HistoSignal->Add( histo ); - Histo_samples.push_back(histo); - Name_samples.push_back(signalname[iSignal]); - - if(debug){ - cout << histo->Integral(6,15) << endl; - cout << Histo_samples.back()->Integral(6,15) << endl; - cout << " " << endl; - } - continue; - } - if(histo_exclusive){ - HistoSignal->Add( histo_exclusive ); - Histo_samples.push_back(histo_exclusive); - Name_samples.push_back(signalname[iSignal]); - - if(debug){ - cout << histo_exclusive->Integral(6,15) << endl; - cout << Histo_samples.back()->Integral(6,15) << endl; - cout << " " << endl; - } - } - } - - - for(unsigned int iBackgr = first_index_B+1; iBackgr < backgroundnames.size(); iBackgr++){ - - - string histoName = Path_To_Histo; - histoName += backgroundnames[iBackgr]; - TH1F *histo( (TH1F*) file->Get(histoName.c_str()) ); - TH1F *histo_exclusive((TH1F*) exclusiveFile->Get(histoName.c_str())); - - if(histo){ - HistoBackground->Add( histo ); - Histo_samples.push_back(histo); - Name_samples.push_back(backgroundnames[iBackgr]); - - if(debug){ - cout << histo->Integral(6,15) << endl; - cout << Histo_samples.back()->Integral(6,15) << endl; - cout << " " << endl; - } - continue; - } - if(histo_exclusive){ - HistoBackground->Add( histo_exclusive ); - Histo_samples.push_back(histo_exclusive); - Name_samples.push_back(backgroundnames[iBackgr]); - - if(debug){ - cout << histo_exclusive->Integral(6,15) << endl; - cout << Histo_samples.back()->Integral(6,15) << endl; - cout << " " << endl; - } - } - } - - - //////////////////////////////////////////////////////////////////////////////////////////////////// - //// Now we get into the real part where we find the optimal cut, where the significance is the highest - //////////////////////////////////////////////////////////////////////////////////////////////////// - int end = HistoSignal->GetNbinsX(); - - //Efficiencies calculating as #events_passing_cut/#Total_events - double Total_signal = 0; - double Total_background = 0; - Total_signal = HistoSignal->Integral(); - Total_background = HistoBackground->Integral(); - - double * Signal_Integral_PerBin = new double [end]; - double * Background_Integral_PerBin = new double [end]; - double * Eff_Signal = new double [end]; - double * RejectionEff_Background = new double [end]; - - for(unsigned int i = 0; i< end; i++){ - double s = 0; - double b = 0; - - s = (HistoSignal->Integral(i , end)); - b = (HistoBackground->Integral(i,end)); - - Signal_Integral_PerBin[i] = s; - Background_Integral_PerBin[i] = b; - Eff_Signal[i] = s/Total_signal; - RejectionEff_Background[i] = (1- b/Total_background); - } - - - - //Determine the optimal cut-value for a cut-and-count experiment - string optcutName = "Opt_cut"; - TH1F *Opt_cut = new TH1F(optcutName.c_str(),optcutName.c_str(), end, HistoSignal->GetXaxis()->GetXmin(), HistoSignal->GetXaxis()->GetXmax()); - for(unsigned int i = 0; iSetBinContent(i, signal_significance); - } - Opt_cut->GetXaxis()->SetTitle(Variables[iVar].c_str()); - Opt_cut->GetYaxis()->SetTitle("Signif."); - - string signaleeffName = "Signal_eff"; - TH1F *Signal_eff = new TH1F(signaleeffName.c_str(),signaleeffName.c_str(), end, HistoSignal->GetXaxis()->GetXmin(), HistoSignal->GetXaxis()->GetXmax()); - for(unsigned int i = 0; iSetBinContent(i, Eff_Signal[i]); - } - Signal_eff->GetXaxis()->SetTitle(Variables[iVar].c_str()); - Signal_eff->GetYaxis()->SetTitle("Eff."); - - string brejName = "B_rej"; - TH1F *B_rej = new TH1F(brejName.c_str(),brejName.c_str(), end, HistoSignal->GetXaxis()->GetXmin(), HistoSignal->GetXaxis()->GetXmax()); - for(unsigned int i = 0; iSetBinContent(i, RejectionEff_Background[i]); - } - B_rej->GetXaxis()->SetTitle(Variables[iVar].c_str()); - B_rej->GetYaxis()->SetTitle("Rejection eff."); - - - cout << "******************************************************************" << endl; - cout << "Optimal cut efficiencies for each sample " << Variables[iVar] << endl; - if(Variables[iVar] == "NbOfSelectedJets")cout << ". Cutvalue: " << jetcut - 1 << endl; - if(Variables[iVar] == "NbOfSelectedBJets_CSVM")cout << ". Cutvalue: " << bcut -1 << endl; - cout << "******************************************************************" << endl; - - for(unsigned int i =0; iIntegral(jetcut,end); - if(Variables[iVar] == "NbOfSelectedBJets_CSVM")Nevents = Histo_samples[i]->Integral(bcut,end); - - Histo_samples[i]->Write(); - - cout << Variables[iVar] << "... Efficiency for optimal cut " << Name_samples[i] << ": " << Nevents << endl; - } - - - Histo_samples.clear(); - Name_samples.clear(); - } - - - outputfile->Write(); - - -} - - - - - -/* - int end = HistoSignal->GetNbinsX(); - - - //Efficiencies calculating as #events_passing_cut/#Total_events - double Total_signal; - double Total_background; - Total_signal = HistoSignal->Integral(); - Total_background = HistoBackground->Integral(); - - double * Signal_Integral_PerBin = new double [end]; - double * Background_Integral_PerBin = new double [end]; - double * Eff_Signal = new double [end]; - double * RejectionEff_Background = new double [end]; - - for(int i = 0; i< end; i++){ - double s; - double b; - - s = (HistoSignal->Integral(i , end)); - b = (HistoBackground->Integral(i,end)); - - Signal_Integral_PerBin[i] = s; - Background_Integral_PerBin[i] = b; - Eff_Signal[i] = s/Total_signal; - RejectionEff_Background[i] = (1- b/Total_background); - } - - TGraph * Efficiencies_2D = new TGraph(end, Eff_Signal , RejectionEff_Background); // (#entries, efficiency Signal, Rejection efficiency background) - Efficiencies_2D->SetTitle("ROC-curve"); - Efficiencies_2D->GetXaxis()->SetTitle("eff_s"); - Efficiencies_2D->GetYaxis()->SetTitle("(1-eff_b)"); - Efficiencies_2D->Write(); - - - - - //Determine the optimal cut-value for a cut-and-count experiment - TH1F *Opt_cut = new TH1F("Opt_cut","Optimal cut", end, HistoSignal->GetXaxis()->GetXmin(), HistoSignal->GetXaxis()->GetXmax()); - for(int i = 0; iSetBinContent(i, signal_significance); - } - - Opt_cut->GetXaxis()->SetTitle(Variablename.c_str()); - TH1F *Signal_eff = new TH1F("Signal_eff","Signal_eff", end, HistoSignal->GetXaxis()->GetXmin(), HistoSignal->GetXaxis()->GetXmax()); - for(int i = 0; iSetBinContent(i, Eff_Signal[i]); - } - - Signal_eff->GetXaxis()->SetTitle(Variablename.c_str()); - TH1F *B_rej = new TH1F("B_rej","B_rej", end, HistoSignal->GetXaxis()->GetXmin(), HistoSignal->GetXaxis()->GetXmax()); - for(int i = 0; iSetBinContent(i, RejectionEff_Background[i]); - } - - B_rej->GetXaxis()->SetTitle(Variablename.c_str()); - - cout << "Signal: " << HistoSignal->Integral(22,25) << endl; - cout << "Data: " <Integral(22,25) << endl; - cout << "Background: " <Integral(22,25) << endl; -*/ diff --git a/macros/Readme b/macros/Readme deleted file mode 100644 index a523238..0000000 --- a/macros/Readme +++ /dev/null @@ -1,27 +0,0 @@ -********************************* -* Main code: FCNC_selection.cc * -********************************* - -To Compile this code: - sh FCNC_compileANDrun.sh -This make the executable - FCNC_selection -To run the code: - ./FCNC_selection options - options: --channel with channel = 3L / 1L3B / 4L / SSdilepton / OSdilepton / 1gamma / 2gamma - --xml file.xml - -This takes the configuration files from - FCNCAnalysis/config -And makes output rootfiles in - FCNCAnalysis/data - - -********************************************* -* Plotanalyzer code: FCNC_CutEfficiencies.C * -********************************************* - -This code takes the rootfiles from - FCNCAnalysis/data -And makes efficiency cutflows in - FCNCAnalysis/data diff --git a/macros/Style.C b/macros/Style.C deleted file mode 100644 index bd3ced6..0000000 --- a/macros/Style.C +++ /dev/null @@ -1,485 +0,0 @@ -///////// -// the Style Section -///////// - - -///////// -// Colors, markers, and line styles that are easy to differentiate in -// slides, and color / black and white print -///////// - -// int color[] = { 1, 2, 4, 904, 419, 9,11,12,13,14,15,16,17,18,19,20,21}; -// int style[] = {21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38}; -// int lstyle[] ={ 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9}; - -void setGregStyle() { - TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR"); - -// For the canvas: - tdrStyle->SetCanvasBorderMode(0); - tdrStyle->SetCanvasColor(kWhite); - tdrStyle->SetCanvasDefH(600); //Height of canvas - tdrStyle->SetCanvasDefW(600); //Width of canvas - tdrStyle->SetCanvasDefX(0); //POsition on screen - tdrStyle->SetCanvasDefY(0); - -// For the Pad: - tdrStyle->SetPadBorderMode(0); - // tdrStyle->SetPadBorderSize(Width_t size = 1); - tdrStyle->SetPadColor(kWhite); - tdrStyle->SetPadGridX(false); - tdrStyle->SetPadGridY(false); - tdrStyle->SetGridColor(0); - tdrStyle->SetGridStyle(3); - tdrStyle->SetGridWidth(1); - -// For the frame: - tdrStyle->SetFrameBorderMode(0); - tdrStyle->SetFrameBorderSize(1); - tdrStyle->SetFrameFillColor(0); - tdrStyle->SetFrameFillStyle(0); - tdrStyle->SetFrameLineColor(1); - tdrStyle->SetFrameLineStyle(1); - tdrStyle->SetFrameLineWidth(1); - -// For the histo: - // tdrStyle->SetHistFillColor(1); - // tdrStyle->SetHistFillStyle(0); - tdrStyle->SetHistLineColor(1); - tdrStyle->SetHistLineStyle(0); - tdrStyle->SetHistLineWidth(1); - // tdrStyle->SetLegoInnerR(Float_t rad = 0.5); - // tdrStyle->SetNumberContours(Int_t number = 20); - - tdrStyle->SetEndErrorSize(2); - //tdrStyle->SetErrorMarker(20); - //tdrStyle->SetErrorX(0.); - - tdrStyle->SetMarkerStyle(21); - -//For the fit/function: - tdrStyle->SetOptFit(1); - tdrStyle->SetFitFormat("5.4g"); - tdrStyle->SetFuncColor(2); - tdrStyle->SetFuncStyle(1); - tdrStyle->SetFuncWidth(1); - -//For the date: - tdrStyle->SetOptDate(0); - // tdrStyle->SetDateX(Float_t x = 0.01); - // tdrStyle->SetDateY(Float_t y = 0.01); - -// For the statistics box: - tdrStyle->SetOptFile(0); - tdrStyle->SetOptStat(0); // To display the mean and RMS: SetOptStat("mr"); - tdrStyle->SetStatColor(kWhite); - tdrStyle->SetStatFont(43); - tdrStyle->SetStatFontSize(17); - tdrStyle->SetStatTextColor(1); - tdrStyle->SetStatFormat("6.4g"); - tdrStyle->SetStatBorderSize(1); - tdrStyle->SetStatH(0.1); - tdrStyle->SetStatW(0.15); - // tdrStyle->SetStatStyle(Style_t style = 1001); - // tdrStyle->SetStatX(Float_t x = 0); - // tdrStyle->SetStatY(Float_t y = 0); - -// Margins: - tdrStyle->SetPadTopMargin(0.05); - tdrStyle->SetPadBottomMargin(0.13); - tdrStyle->SetPadLeftMargin(0.13); - tdrStyle->SetPadRightMargin(0.05); - -// For the Global title: - - tdrStyle->SetOptTitle(0); - tdrStyle->SetTitleFont(42); - tdrStyle->SetTitleColor(1); - tdrStyle->SetTitleTextColor(1); - tdrStyle->SetTitleFillColor(10); - tdrStyle->SetTitleFontSize(0.05); - // tdrStyle->SetTitleH(0); // Set the height of the title box - // tdrStyle->SetTitleW(0); // Set the width of the title box - // tdrStyle->SetTitleX(0); // Set the position of the title box - // tdrStyle->SetTitleY(0.985); // Set the position of the title box - // tdrStyle->SetTitleStyle(Style_t style = 1001); - // tdrStyle->SetTitleBorderSize(2); - -// For the axis titles: - - tdrStyle->SetTitleColor(1, "XYZ"); - tdrStyle->SetTitleFont(42, "XYZ"); - tdrStyle->SetTitleSize(0.05, "XYZ"); - // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size? - // tdrStyle->SetTitleYSize(Float_t size = 0.02); - tdrStyle->SetTitleXOffset(1.1); - tdrStyle->SetTitleYOffset(1.15); - // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset - -// For the axis labels: - - tdrStyle->SetLabelColor(1, "XYZ"); - tdrStyle->SetLabelFont(42, "XYZ"); - tdrStyle->SetLabelOffset(0.007, "XYZ"); - tdrStyle->SetLabelSize(0.04, "XYZ"); - -// For the axis: - - tdrStyle->SetAxisColor(1, "XYZ"); - tdrStyle->SetStripDecimals(kTRUE); - tdrStyle->SetTickLength(0.03, "XYZ"); - tdrStyle->SetNdivisions(510, "XYZ"); - tdrStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame - tdrStyle->SetPadTickY(1); - -// Change for log plots: - tdrStyle->SetOptLogx(0); - tdrStyle->SetOptLogy(0); - tdrStyle->SetOptLogz(0); - -// Postscript options: - // tdrStyle->SetPaperSize(15.,15.); - // tdrStyle->SetLineScalePS(Float_t scale = 3); - // tdrStyle->SetLineStyleString(Int_t i, const char* text); - // tdrStyle->SetHeaderPS(const char* header); - // tdrStyle->SetTitlePS(const char* pstitle); - - // tdrStyle->SetBarOffset(Float_t baroff = 0.5); - // tdrStyle->SetBarWidth(Float_t barwidth = 0.5); - // tdrStyle->SetPaintTextFormat(const char* format = "g"); - tdrStyle->SetPaintTextFormat("5.2f"); - tdrStyle->SetPalette(1,0); - // tdrStyle->SetTimeOffset(Double_t toffset); - // tdrStyle->SetHistMinimumZero(kTRUE); - //tdrStyle->SetDrawOption("col"); - tdrStyle->cd(); - //gROOT->ForceStyle(); - //gStyle->ls(); - -} - -void setTDRStyle() { - TStyle *tdrStyle = new TStyle("tdrStyle","Style for P-TDR"); - -// For the canvas: - tdrStyle->SetCanvasBorderMode(0); - tdrStyle->SetCanvasColor(kWhite); - tdrStyle->SetCanvasDefH(600); //Height of canvas - tdrStyle->SetCanvasDefW(600); //Width of canvas - tdrStyle->SetCanvasDefX(0); //POsition on screen - tdrStyle->SetCanvasDefY(0); - -// For the Pad: - tdrStyle->SetPadBorderMode(0); - // tdrStyle->SetPadBorderSize(Width_t size = 1); - tdrStyle->SetPadColor(kWhite); - tdrStyle->SetPadGridX(false); - tdrStyle->SetPadGridY(false); - tdrStyle->SetGridColor(0); - tdrStyle->SetGridStyle(3); - tdrStyle->SetGridWidth(1); - -// For the frame: - tdrStyle->SetFrameBorderMode(0); - tdrStyle->SetFrameBorderSize(1); - tdrStyle->SetFrameFillColor(0); - tdrStyle->SetFrameFillStyle(0); - tdrStyle->SetFrameLineColor(1); - tdrStyle->SetFrameLineStyle(1); - tdrStyle->SetFrameLineWidth(1); - -// For the histo: - // tdrStyle->SetHistFillColor(1); - // tdrStyle->SetHistFillStyle(0); - tdrStyle->SetHistLineColor(1); - tdrStyle->SetHistLineStyle(0); - tdrStyle->SetHistLineWidth(1); - // tdrStyle->SetLegoInnerR(Float_t rad = 0.5); - // tdrStyle->SetNumberContours(Int_t number = 20); - - tdrStyle->SetEndErrorSize(2); -// tdrStyle->SetErrorMarker(20); - tdrStyle->SetErrorX(0.); - - tdrStyle->SetMarkerStyle(20); - -//For the fit/function: - tdrStyle->SetOptFit(1); - tdrStyle->SetFitFormat("5.4g"); - tdrStyle->SetFuncColor(2); - tdrStyle->SetFuncStyle(1); - tdrStyle->SetFuncWidth(1); - -//For the date: - tdrStyle->SetOptDate(0); - // tdrStyle->SetDateX(Float_t x = 0.01); - // tdrStyle->SetDateY(Float_t y = 0.01); - -// For the statistics box: - tdrStyle->SetOptFile(0); - tdrStyle->SetOptStat(0); // To display the mean and RMS: SetOptStat("mr"); - tdrStyle->SetStatColor(kWhite); - tdrStyle->SetStatFont(42); - tdrStyle->SetStatFontSize(0.025); - tdrStyle->SetStatTextColor(1); - tdrStyle->SetStatFormat("6.4g"); - tdrStyle->SetStatBorderSize(1); - tdrStyle->SetStatH(0.1); - tdrStyle->SetStatW(0.15); - // tdrStyle->SetStatStyle(Style_t style = 1001); - // tdrStyle->SetStatX(Float_t x = 0); - // tdrStyle->SetStatY(Float_t y = 0); - -// Margins: - tdrStyle->SetPadTopMargin(0.05); - tdrStyle->SetPadBottomMargin(0.13); - tdrStyle->SetPadLeftMargin(0.16); - tdrStyle->SetPadRightMargin(0.02); - -// For the Global title: - - tdrStyle->SetOptTitle(0); - tdrStyle->SetTitleFont(42); - tdrStyle->SetTitleColor(1); - tdrStyle->SetTitleTextColor(1); - tdrStyle->SetTitleFillColor(10); - tdrStyle->SetTitleFontSize(0.05); - // tdrStyle->SetTitleH(0); // Set the height of the title box - // tdrStyle->SetTitleW(0); // Set the width of the title box - // tdrStyle->SetTitleX(0); // Set the position of the title box - // tdrStyle->SetTitleY(0.985); // Set the position of the title box - // tdrStyle->SetTitleStyle(Style_t style = 1001); - // tdrStyle->SetTitleBorderSize(2); - -// For the axis titles: - - tdrStyle->SetTitleColor(1, "XYZ"); - tdrStyle->SetTitleFont(42, "XYZ"); - tdrStyle->SetTitleSize(0.06, "XYZ"); - // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size? - // tdrStyle->SetTitleYSize(Float_t size = 0.02); - tdrStyle->SetTitleXOffset(0.9); - tdrStyle->SetTitleYOffset(1.25); - // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset - -// For the axis labels: - - tdrStyle->SetLabelColor(1, "XYZ"); - tdrStyle->SetLabelFont(42, "XYZ"); - tdrStyle->SetLabelOffset(0.007, "XYZ"); - tdrStyle->SetLabelSize(0.05, "XYZ"); - -// For the axis: - - tdrStyle->SetAxisColor(1, "XYZ"); - tdrStyle->SetStripDecimals(kTRUE); - tdrStyle->SetTickLength(0.03, "XYZ"); - tdrStyle->SetNdivisions(510, "XYZ"); - tdrStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame - tdrStyle->SetPadTickY(1); - -// Change for log plots: - tdrStyle->SetOptLogx(0); - tdrStyle->SetOptLogy(0); - tdrStyle->SetOptLogz(0); - -// Postscript options: - tdrStyle->SetPaperSize(20.,20.); - // tdrStyle->SetLineScalePS(Float_t scale = 3); - // tdrStyle->SetLineStyleString(Int_t i, const char* text); - // tdrStyle->SetHeaderPS(const char* header); - // tdrStyle->SetTitlePS(const char* pstitle); - - // tdrStyle->SetBarOffset(Float_t baroff = 0.5); - // tdrStyle->SetBarWidth(Float_t barwidth = 0.5); - // tdrStyle->SetPaintTextFormat(const char* format = "g"); - // tdrStyle->SetPalette(Int_t ncolors = 0, Int_t* colors = 0); - // tdrStyle->SetTimeOffset(Double_t toffset); - // tdrStyle->SetHistMinimumZero(kTRUE); - - tdrStyle->cd(); - -} - -void setRBellanStyle() { - TStyle *theStyle = new TStyle("rbStyle", "Style for Bellan Thesis"); - theStyle->SetOptStat(0); - theStyle->SetPadBorderMode(0); - theStyle->SetCanvasBorderMode(0); - theStyle->SetPadColor(0); - theStyle->SetCanvasColor(0); - theStyle->SetMarkerStyle(8); - theStyle->SetMarkerSize(0.7); - theStyle->SetPalette(1); - - theStyle->SetStatH(0.3); - // theStyle->SetTextFont(132); - // theStyle->SetTitleFont(132); - theStyle->SetTitleBorderSize(1); - // theStyle->SetPalette(1); - theStyle->SetOptStat(0); - theStyle->SetFitFormat("4.4g"); - theStyle->SetStatY(0.99); - theStyle->SetStatX(0.99); - theStyle->SetTitleYOffset(1.6); - theStyle->SetLabelSize(0.035, "XYZ"); - theStyle->SetPadGridX(true); - theStyle->SetPadGridY(true); - theStyle->SetFrameBorderMode(0); - theStyle->SetTitleFillColor(0); - theStyle->SetLegendBorderSize(); - - // theStyle->SetCanvasDefH(600); - // theStyle->SetCanvasDefW(400); - - //theStyle->SetOptLogy(); //aaa - // theStyle->SetOptLogx(); - theStyle->cd(); -} - - -void setMyStyle(){ - TStyle *tdrStyle = new TStyle("myStyle","Style of Stijn"); - - // For the canvas: - tdrStyle->SetCanvasBorderMode(0); - tdrStyle->SetCanvasColor(kWhite); - tdrStyle->SetCanvasDefH(500); //Height of canvas for form=1 //600 - tdrStyle->SetCanvasDefW(700); //Width of canvas for form=1 //600 - tdrStyle->SetCanvasDefX(0); //POsition on screen - tdrStyle->SetCanvasDefY(0); - -// For the Pad: - tdrStyle->SetPadBorderMode(0); - tdrStyle->SetPadBorderSize(1); - tdrStyle->SetPadColor(kWhite); - tdrStyle->SetPadGridX(true); - tdrStyle->SetPadGridY(true); - tdrStyle->SetGridColor(0); - tdrStyle->SetGridStyle(3); - tdrStyle->SetGridWidth(1); - -// For the frame: - tdrStyle->SetFrameBorderMode(0); - tdrStyle->SetFrameBorderSize(1); - tdrStyle->SetFrameFillColor(0); - tdrStyle->SetFrameFillStyle(0); - tdrStyle->SetFrameLineColor(1); - tdrStyle->SetFrameLineStyle(1); - tdrStyle->SetFrameLineWidth(1); - -// For the histo: - // tdrStyle->SetHistFillColor(1); - // tdrStyle->SetHistFillStyle(0); - tdrStyle->SetPalette(1); -// tdrStyle->SetHistLineColor(1); - tdrStyle->SetHistLineStyle(0); - tdrStyle->SetHistLineWidth(2); - // tdrStyle->SetLegoInnerR(Float_t rad = 0.5); - // tdrStyle->SetNumberContours(Int_t number = 20); - - tdrStyle->SetEndErrorSize(2); - //tdrStyle->SetErrorMarker(20); - tdrStyle->SetErrorX(0.); - - tdrStyle->SetMarkerStyle(20); - -//For the fit/function: - tdrStyle->SetOptFit(1); - tdrStyle->SetFitFormat("5.4g"); - tdrStyle->SetFuncColor(2); - tdrStyle->SetFuncStyle(1); - tdrStyle->SetFuncWidth(1); - -//For the date: - tdrStyle->SetOptDate(0); - // tdrStyle->SetDateX(Float_t x = 0.01); - // tdrStyle->SetDateY(Float_t y = 0.01); - -// For the statistics box: - tdrStyle->SetOptFile(0); - tdrStyle->SetOptStat("nemrou"); // To display the mean and RMS: SetOptStat("mr"); - tdrStyle->SetStatColor(kWhite); - tdrStyle->SetStatFont(42); - tdrStyle->SetStatFontSize(0.025); - tdrStyle->SetStatTextColor(1); - tdrStyle->SetStatFormat("6.4g"); - tdrStyle->SetStatBorderSize(1); - tdrStyle->SetStatH(0.1); - tdrStyle->SetStatW(0.15); - // tdrStyle->SetStatStyle(Style_t style = 1001); - // tdrStyle->SetStatX(Float_t x = 0); - // tdrStyle->SetStatY(Float_t y = 0); - -// Margins: - tdrStyle->SetPadTopMargin(0.07); - tdrStyle->SetPadBottomMargin(0.13); - tdrStyle->SetPadLeftMargin(0.17); //aaa 0.13 - tdrStyle->SetPadRightMargin(0.05); //aaa 0.05 - -// For the Global title: - - tdrStyle->SetOptTitle(0); - /* - tdrStyle->SetTitleFont(42); - tdrStyle->SetTitleColor(1); - tdrStyle->SetTitleTextColor(1); - tdrStyle->SetTitleFillColor(10); - tdrStyle->SetTitleFontSize(0.05); - */ - // tdrStyle->SetTitleH(0); // Set the height of the title box - // tdrStyle->SetTitleW(0); // Set the width of the title box - // tdrStyle->SetTitleX(0); // Set the position of the title box - // tdrStyle->SetTitleY(0.985); // Set the position of the title box - // tdrStyle->SetTitleStyle(Style_t style = 1001); - // tdrStyle->SetTitleBorderSize(2); - -// For the axis titles: - - tdrStyle->SetTitleColor(1, "XYZ"); - tdrStyle->SetTitleFont(42, "XYZ"); - tdrStyle->SetTitleSize(0.06, "XYZ"); - // tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size? - // tdrStyle->SetTitleYSize(Float_t size = 0.02); - tdrStyle->SetTitleXOffset(0.9); - tdrStyle->SetTitleYOffset(1.05); //aaa 1.05 - // tdrStyle->SetTitleOffset(1.1, "Y"); // Another way to set the Offset - -// For the axis labels: - - tdrStyle->SetLabelColor(1, "XYZ"); - tdrStyle->SetLabelFont(42, "XYZ"); - tdrStyle->SetLabelOffset(0.007, "XYZ"); - tdrStyle->SetLabelSize(0.05, "XYZ"); - -// For the axis: - - tdrStyle->SetAxisColor(1, "XYZ"); - tdrStyle->SetStripDecimals(kTRUE); - tdrStyle->SetTickLength(0.03, "XYZ"); - tdrStyle->SetNdivisions(510, "XYZ"); - tdrStyle->SetPadTickX(true); // To get tick marks on the opposite side of the frame - tdrStyle->SetPadTickY(true); - -// Change for log plots: - tdrStyle->SetOptLogx(0); - tdrStyle->SetOptLogy(0); - tdrStyle->SetOptLogz(0); - -// Postscript options: - // tdrStyle->SetPaperSize(15.,15.); - // tdrStyle->SetLineScalePS(Float_t scale = 3); - // tdrStyle->SetLineStyleString(Int_t i, const char* text); - // tdrStyle->SetHeaderPS(const char* header); - // tdrStyle->SetTitlePS(const char* pstitle); - - // tdrStyle->SetBarOffset(Float_t baroff = 0.5); - // tdrStyle->SetBarWidth(Float_t barwidth = 0.5); - // tdrStyle->SetPaintTextFormat(const char* format = "g"); - // tdrStyle->SetPalette(Int_t ncolors = 0, Int_t* colors = 0); - // tdrStyle->SetTimeOffset(Double_t toffset); - // tdrStyle->SetHistMinimumZero(kTRUE); - - tdrStyle->cd(); - -} diff --git a/macros/TopAnalyzerLite.cc b/macros/TopAnalyzerLite.cc deleted file mode 100644 index f08e9d6..0000000 --- a/macros/TopAnalyzerLite.cc +++ /dev/null @@ -1,1122 +0,0 @@ -#include "TROOT.h" -#include "TSystem.h" - -#include "TCut.h" -#include "TObjString.h" -#include "TParameter.h" -#include "TFile.h" -#include "TChain.h" -#include "TTreePlayer.h" -#include "TFileCollection.h" -#include "THashList.h" -#include "TFileInfo.h" - -#include "TCanvas.h" -#include "TPad.h" -#include "TLegend.h" -#include "TH1F.h" -#include "THStack.h" -#include "TGraph.h" - -#include "TMath.h" - -#include "TPRegexp.h" - -#include "TEntryList.h" - -#include -#include -#include -#include -#include -#include - -using namespace std; - -class TopAnalyzerLite -{ -public: - TopAnalyzerLite(const string subDirName = "", const string imageOutDir = "", bool createplots = true, bool printstats = true); - ~TopAnalyzerLite(); - - void addMCSig(const string mcSampleName, const string mcSampleLabel, - const string fileName, const double xsec, const double nEvents, - const Color_t color, const bool doStackSignal = true, const TCut cut = ""); - void addMCBkg(const string mcSampleName, const string mcSampleLabel, - const string fileName, const double xsec, const double nEvents, - const Color_t color, const TCut cut = ""); - void addDataBkg(const string name, const string label, - const string fileName, const double norm, - const Color_t color); - void replaceDataBkgCut(const string name, const string from, const string to); - - void addRealData(const string fileName, const double lumi); - - void addCutStep(const TCut cut, const TString & monitorPlotNamesStr, const double plotScale = 1.0, const string weight = "1", const TString& cutName = "", const TString& postfix = "", const TCut subCut = "1"); - void addMonitorPlot(const string name, const string varexp, const string title, - const int nBins, const double xmin, const double xmax, - const double ymin = 0, const double ymax = 0, const bool doLogy = true); - void addMonitorPlot(const string name, const string varexp, const string title, - const string xBinsStr, - const double ymin = 0, const double ymax = 0, const bool doLogy = true); - void setEventWeightVar(const string eventWeightVar = "weight"); - void setEventWeight(const string sample, const TString & step, const double & w); - void setScanVariables(const string scanVariables); - - void applyCutSteps(); - void applySingleCut(const TCut cut, const TString monitirPlotNamesStr, int istep = 0); - - void saveHistograms(TString fileName = ""); - void printCutFlow(); - -private: - TObjArray getHistograms(); - - struct MCSample - { - string name; - double nEvents; - double xsec; - TChain* chain; - string label; - Color_t color; - bool doStack; - TCut cut; - }; - - struct DataSample - { - string name; - double norm; - TChain* chain; - string label; - Color_t color; - std::map replaceCuts; - }; - - struct MonitorPlot - { - string varexp; - string title; - std::vector xBins; - bool doLogy; - double ymin, ymax; - }; - - struct CutStep - { - TCut cut; - vector monitorPlotNames; - double plotScale; - string weight; - TString cutName; - TString postfix; - TCut subCut; - }; - - struct Stat - { - string name, label; - double nEvents, nEventsErr2; - }; - - double lumi_; - string subDirName_; - vector mcSigs_; - vector mcBkgs_; - vector dataBkgs_; - TChain* realDataChain_; - - map monitorPlots_; - vector cuts_; - - string imageOutDir_; - - void prepareEventList(const TCut &cut, int istep); - void plot(const string name, TCut cut, MonitorPlot& monitorPlot, const double plotScale = 1.0, const double custStep = 1, const string weight = "1"); - void printStat(const string& name, TCut cut, int cutStep=0); - void addMC(vector& mcSetup, - const string name, const string label, - const string fileName, const double xsec, const double nEvents, - const Color_t color, bool doStack=true, TCut cut =""); - - TObjArray histograms_; - ofstream fout_; - bool writeSummary_; - string scanVariables_; - string eventWeightVar_; - //map > wMap_; - map > wMap_; - map > statsMap_; - map > entryList_; - TDirectory* baseRootDir_; - - bool createplots_; - bool printstats_; -}; - -TopAnalyzerLite::TopAnalyzerLite(const string subDirName, const string imageOutDir, bool createplots, bool printstats) -{ - subDirName_ = subDirName; - lumi_ = 0; - realDataChain_ = 0; - imageOutDir_ = imageOutDir; - - baseRootDir_ = gROOT->mkdir(subDirName_.c_str()); - - if ( imageOutDir != "" ) - { - gSystem->mkdir(imageOutDir.c_str(), true); - fout_.open((imageOutDir+"/summary.txt").c_str()); - writeSummary_ = true; - } - else writeSummary_ = false; - - scanVariables_ = ""; - eventWeightVar_ = "1"; - - createplots_ = createplots; - printstats_ = printstats; -} - -TopAnalyzerLite::~TopAnalyzerLite() -{ - if ( writeSummary_ ) fout_.close(); -} - -void TopAnalyzerLite::addMC(vector& mcSetup, - const string name, const string label, - const string fileName, const double xsec, const double nEvents, - const Color_t color, bool doStack, TCut cut) -{ - int index = -1; - for ( unsigned int i=0; icd(); - //mc.chain = new TChain((subDirName_+"/tree").c_str(), (subDirName_+"/tree").c_str()); - mc.chain = new TChain((subDirName_).c_str(), (subDirName_).c_str()); - //mc.chain = new TChain("tree", "tree"); - mcSetup.push_back(mc); - index = mcSetup.size()-1; - } - MCSample& mc = mcSetup[index]; - mc.chain->Add(fileName.c_str()); - - if ( nEvents > 0 ) - { - mc.nEvents += nEvents; - } - else - { - TFile* f = TFile::Open(fileName.c_str()); - if ( !f || !f->IsOpen() ) cout << "Cannot open file\n"; - else - { - //TH1* hEventSummary = (TH1*)f->Get((subDirName_+"/EventSummary").c_str()); - TH1* hEventSummary = (TH1*)f->Get("EventSummary"); - if ( !hEventSummary ) cout << "Cannot find EventSummary histogram" << endl; - else mc.nEvents += hEventSummary->GetBinContent(1); - f->Close(); - } - } -} - -void TopAnalyzerLite::addMCSig(const string name, const string label, - const string fileName, const double xsec, const double nEvents, - const Color_t color, const bool doStackSignal, const TCut cut) -{ - addMC(mcSigs_, name, label, fileName, xsec, nEvents, color, doStackSignal, cut); -} - -void TopAnalyzerLite::addMCBkg(const string name, const string label, - const string fileName, const double xsec, const double nEvents, - const Color_t color, const TCut cut) -{ - addMC(mcBkgs_, name, label, fileName, xsec, nEvents, color, true, cut); //stack true for background -} - -void TopAnalyzerLite::addDataBkg(const string name, const string label, - const string fileName, const double norm, - const Color_t color) -{ - int index = -1; - for ( unsigned int i=0; i replaceCuts; - DataSample data = {name, norm, 0, label, color, replaceCuts}; - baseRootDir_->cd(); - //data.chain = new TChain((subDirName_+"/tree").c_str(), (subDirName_+"/tree").c_str()); - data.chain = new TChain((subDirName_).c_str(), (subDirName_).c_str()); - //data.chain = new TChain("tree", "tree"); - dataBkgs_.push_back(data); - index = dataBkgs_.size()-1; - } - - DataSample& data = dataBkgs_[index]; - data.chain->Add(fileName.c_str()); -} - -void TopAnalyzerLite::prepareEventList(const TCut &cut, int istep) -{ - char entrylistname[100]; - char puttoentrylistname[100]; - - if (realDataChain_) { - sprintf(entrylistname, "realdata%d", istep); - sprintf(puttoentrylistname, ">> %s", entrylistname); - realDataChain_->Draw(puttoentrylistname, cut, "entrylist"); - TEntryList *list = (TEntryList *)gDirectory->Get(entrylistname); - if (list==0) cout << "error!" << endl; - realDataChain_->SetEntryList(list); - entryList_["realdata"].push_back(list); - if( entryList_["realdata"].back() == 0 ) cout << "Error!" << endl; - } - - for ( unsigned int i=0; i> %s", entrylistname); - mcSample.chain->Draw(puttoentrylistname, finalCut, "entrylist"); - TEntryList *list = (TEntryList *)gDirectory->Get(entrylistname); - mcSample.chain->SetEntryList(list); - entryList_[Form("mcsig%d",i)].push_back(list); - } - for ( unsigned int i=0; i> %s", entrylistname); - mcSample.chain->Draw(puttoentrylistname, finalCut, "entrylist"); - TEntryList *list = (TEntryList *)gDirectory->Get(entrylistname); - mcSample.chain->SetEntryList(list); - entryList_[Form("mcbkg%d",i)].push_back(list); - } - for ( unsigned int i=0; i::const_iterator cit; - for(cit=sample.replaceCuts.begin(); cit != sample.replaceCuts.end() ; cit++){ - cutStr.ReplaceAll((*cit).first, (*cit).second); - } - sprintf(entrylistname, "databkg%d_%d", i, istep); - sprintf(puttoentrylistname, ">> %s", entrylistname); - sample.chain->Draw(puttoentrylistname, cutStr, "entrylist"); - TEntryList *list = (TEntryList *)gDirectory->Get(entrylistname); - sample.chain->SetEntryList(list); - entryList_[Form("databkg%d",i)].push_back(list); - } -} - -void TopAnalyzerLite::replaceDataBkgCut(const string name, const string from, const string to) -{ - for ( unsigned int i=0; icd(); - realDataChain_ = new TChain(chainName.c_str(), chainName.c_str()); - } - - realDataChain_->Add(fileName.c_str()); -} - -void TopAnalyzerLite::addCutStep(const TCut cut, const TString & monitorPlotNamesStr, const double plotScale, const string weight, const TString& cutName, const TString& postfix, TCut subCut) -{ - TObjArray* monitorPlotNames = monitorPlotNamesStr.Tokenize(","); - const int nPlots = monitorPlotNames->GetSize(); - - vector plotNames; - for ( int i=0; iAt(i); - if ( !obj ) continue; - - const string plotName = obj->GetName(); - - plotNames.push_back(plotName); - } - - int nstep = (int)cuts_.size()+1; - TString dirName = cutName; - if( cutName == "" ) dirName = Form("Step_%d", nstep); - CutStep cutStep = {cut, plotNames, plotScale, weight, dirName, postfix, subCut}; - cuts_.push_back(cutStep); -} - -void TopAnalyzerLite::addMonitorPlot(const string name, const string varexp, const string title, - const int nBins, const double xmin, const double xmax, - const double ymin, const double ymax, const bool doLogy) -{ - std::vector xBins; - const double dX = (xmax-xmin)/nBins; - for ( int i=0; i<=nBins; ++i ) - { - xBins.push_back(xmin+dX*i); - } - - MonitorPlot monitorPlot = {varexp, title, xBins, doLogy, ymin, ymax}; - monitorPlots_[name] = monitorPlot; -} - -void TopAnalyzerLite::addMonitorPlot(const string name, const string varexp, const string title, - const string xBinsStr, - const double ymin, const double ymax, const bool doLogy) -{ - stringstream ss(xBinsStr); - std::vector xBins; - double x; - while(ss >> x ) xBins.push_back(x); - - MonitorPlot monitorPlot = {varexp, title, xBins, doLogy, ymin, ymax}; - monitorPlots_[name] = monitorPlot; -} - -void TopAnalyzerLite::applyCutSteps() -{ - cout << "--------------------------------------\n"; - cout << " Cross sections and sample statistics \n"; - if ( writeSummary_ ) - { - fout_ << "--------------------------------------\n"; - fout_ << " Cross sections and sample statistics \n"; - } - for ( unsigned int i=0; i& monitorPlotNames = cuts_[i].monitorPlotNames; - const double plotScale = cuts_[i].plotScale; - const string w = cuts_[i].weight; - TString cname = cuts_[i].cutName; - TString postfix = cuts_[i].postfix; - prepareEventList(cut, i); - if( printstats_ ) printStat(Form("%s", cname.Data() ), cut, i); - for ( unsigned int j = 0; j < monitorPlotNames.size(); ++ j) - { - const string& plotName = monitorPlotNames[j]; - - if ( monitorPlots_.find(plotName) == monitorPlots_.end() ) continue; - MonitorPlot& monitorPlot = monitorPlots_[plotName]; - plot(Form("%s_%s%s", cname.Data(), plotName.c_str(), postfix.Data() ), cuts_[i].subCut, monitorPlot, lumi_*plotScale, i, w); - } - } - - //cout << "Final" << endl; - //if ( writeSummary_ ) fout_ << "Final" << endl; - //TCut finalCut = ""; - //for ( unsigned int i=0; iScan(scanVariables_.c_str()); - //cout << "Number of entries after final selection = " << entryList_["realdata"].back()->GetN() << endl; - //} - - if ( writeSummary_ && realDataChain_ && printstats_ ) - { - printCutFlow(); - const string tmpFileName = imageOutDir_+"/tmp.txt"; - - ((TTreePlayer*)(realDataChain_->GetPlayer()))->SetScanRedirect(true); - ((TTreePlayer*)(realDataChain_->GetPlayer()))->SetScanFileName(tmpFileName.c_str()); - //realDataChain_->Scan(scanVariables_.c_str(), finalCut); - realDataChain_->Scan(scanVariables_.c_str()); - ((TTreePlayer*)(realDataChain_->GetPlayer()))->SetScanRedirect(false); - - ifstream tmpFile(tmpFileName.c_str()); - copy(istreambuf_iterator(tmpFile), istreambuf_iterator(), ostreambuf_iterator(fout_)); - //fout_ << "Number of entries after final selection = " << realDataChain_->GetEntries(finalCut) << endl; - fout_ << "Number of entries after final selection = " << entryList_["realdata"].back()->GetN() << endl; - gSystem->Exec(("rm -f "+tmpFileName).c_str()); - } -} - -void TopAnalyzerLite::plot(const string name, const TCut cut, MonitorPlot& monitorPlot, const double plotScale, const double cutStep, const string weight) -{ - const string& varexp = monitorPlot.varexp; - const string& title = monitorPlot.title; - const int nBins = monitorPlot.xBins.size()-1; - const double* xBins = &(monitorPlot.xBins[0]); - double ymin = monitorPlot.ymin; - double ymax = monitorPlot.ymax*plotScale; - - baseRootDir_->cd(); - TLegend* legend = new TLegend(0.73,0.57,0.88,0.88); - legend->SetTextSize(0.04); - legend->SetFillColor(0); - legend->SetLineColor(0); - - //TString dataHistName = Form("hData_%s_%s", subDirName_.c_str(), name.c_str()); - TString dataHistName = Form("hData_%s", name.c_str()); - TH1F* hData = new TH1F(dataHistName, title.c_str(), nBins, xBins); - histograms_.Add(hData); - - if ( realDataChain_ ) realDataChain_->Project(dataHistName, varexp.c_str(), cut); - hData->AddBinContent(nBins, hData->GetBinContent(nBins+1)); - hData->Sumw2(); - hData->SetMarkerStyle(20); - hData->SetMarkerSize(1); - hData->SetTitle(title.c_str()); - hData->SetStats(0); - - legend->AddEntry(hData, "Data", "p"); - - TString dataSubHistName = Form("hDataSub_%s", name.c_str()); - TH1F* hDataSub = (TH1F*)hData->Clone(dataSubHistName); - hDataSub->SetTitle(hData->GetTitle()+TString(" background subtracted")); - histograms_.Add(hDataSub); - - THStack* hStack = new THStack("hStack", title.c_str()); - typedef vector > LabeledPlots; - LabeledPlots stackedPlots; - LabeledPlots sigPlots; // Keep list of signal plots if doStackSignal == false - - TString cutStr; - cutStr = cut; - - for ( unsigned int i=0; iProject(mcSigHistName, varexp.c_str(),mcWeightStr); - hMCSig->AddBinContent(nBins, hMCSig->GetBinContent(nBins+1)); - hMCSig->Scale(lumi_*mcSample.xsec/mcSample.nEvents); - - if ( mcSample.doStack ) - { - hMCSig->SetFillColor(mcSample.color); - hMCSig->SetFillStyle(1001); - - stackedPlots.push_back(make_pair(mcSample.label, hMCSig)); - hStack->Add(hMCSig); - - histograms_.Add(hMCSig); - } - else - { - LabeledPlots::const_iterator matchedPlot = sigPlots.end(); - for ( LabeledPlots::const_iterator plotIter = sigPlots.begin(); - plotIter != sigPlots.end(); ++plotIter ) - { - if ( plotIter->first == mcSample.label ) - { - matchedPlot = plotIter; - break; - } - } - if ( matchedPlot == sigPlots.end() ) - { - sigPlots.push_back(make_pair(mcSample.label, hMCSig)); - -// hMCSig->SetLineWidth(2); - hMCSig->SetLineStyle(mcSample.color); - hMCSig->SetLineColor(mcSample.color); - histograms_.Add(hMCSig); - } - else - { - TH1F* h = matchedPlot->second; - if ( h ) h->Add(hMCSig); - delete hMCSig; - } - - } - } - - for ( unsigned int i=0; iProject(mcHistName, varexp.c_str(),mcWeightStr); - hMC->AddBinContent(nBins, hMC->GetBinContent(nBins+1)); - hMC->Scale(lumi_*mcSample.xsec/mcSample.nEvents); - - //scale MC - //map >::iterator it; - map >::iterator it; - it = wMap_.find(mcSample.name); - if( it != wMap_.end() ) { - //hMC->Scale(it->second[cutStep]); - hMC->Scale(it->second[cuts_[cutStep].cutName]); - } - - hMC->SetFillColor(mcSample.color); - hMC->SetFillStyle(1001); - - // Subtract background from the hDataSub histogram - hDataSub->Add(hMC, -1); - - // Add to the HStack if there's no duplicated label - // If duplicated label exists, call TH1::Add - // First, find if plot with same label already in the THStack - LabeledPlots::const_iterator matchedPlot = stackedPlots.end(); - for ( LabeledPlots::const_iterator plotIter = stackedPlots.begin(); - plotIter != stackedPlots.end(); ++plotIter ) - { - if ( plotIter->first == mcSample.label ) - { - matchedPlot = plotIter; - break; - } - } - // If the label was not in the stack, insert it - if ( matchedPlot == stackedPlots.end() ) - { - stackedPlots.push_back(make_pair(mcSample.label, hMC)); - hStack->Add(hMC); - histograms_.Add(hMC); - } - // If there's plot with same label, sum entries - else - { - TH1F* h = matchedPlot->second; - if ( h ) h->Add(hMC); - // In this case, temporary histogram is not needed anymore. - delete hMC; - } - } - - for ( unsigned int i=0; iProject(histName, varexp.c_str(), cut); - hBkg->AddBinContent(nBins, hBkg->GetBinContent(nBins+1)); - hBkg->Scale(sample.norm); - - //scale MC - //map >::iterator it; - map >::iterator it; - it = wMap_.find(sample.name); - if( it != wMap_.end() ) { - hBkg->Scale(it->second[cuts_[cutStep].cutName]); - } - - hBkg->SetFillColor(sample.color); - hBkg->SetFillStyle(1001); - - // Subtract background from the hDataSub histogram - hDataSub->Add(hBkg, -1); - - LabeledPlots::const_iterator matchedPlot = stackedPlots.end(); - for ( LabeledPlots::const_iterator plotIter = stackedPlots.begin(); - plotIter != stackedPlots.end(); ++plotIter ) - { - if ( plotIter->first == sample.label ) - { - matchedPlot = plotIter; - break; - } - } - - if ( matchedPlot == stackedPlots.end() ) - { - stackedPlots.push_back(make_pair(sample.label, hBkg)); - hStack->Add(hBkg); - histograms_.Add(hBkg); - } - else - { - TH1F* h = matchedPlot->second; - if ( h ) h->Add(hBkg); - // In this case, temporary histogram is not needed anymore. - delete hBkg; - } - } - - // Do automatic bin labels - if ( xBins[0] == 0 and xBins[nBins] == nBins and nBins < 20 ) - { - const int xmin = xBins[0]; - TList* hList = hStack->GetHists(); - for ( int bin=1; binGetXaxis()->SetBinLabel(bin, Form("%d", int(xmin+bin-1))); - } - hData->GetXaxis()->SetBinLabel(nBins, Form("#geq%d", int(xmin+nBins-1))); - - for ( int i=0; iGetSize(); ++i ) - { - TH1* h = (TH1*)hList->At(i); - - for ( int bin=1; binGetXaxis()->SetBinLabel(bin, Form("%d", int(xmin+bin-1))); - } - h->GetXaxis()->SetBinLabel(nBins, Form("#geq%d", int(xmin+nBins-1))); - } - - } - - // Build legend, legend should be added in reversed order of THStack - for ( int i=stackedPlots.size()-1; i>=0; --i ) - { - const char* label = stackedPlots[i].first.c_str(); - TH1F* h = stackedPlots[i].second; - legend->AddEntry(h, label, "f"); - } - - for ( unsigned int i=0; iAddEntry(h, label, "l"); - } - - TCanvas* c = new TCanvas(Form("c_%s", name.c_str()), name.c_str(), 1); - if ( ymax == 0 ) - { - const int dataMaxBin = hData->GetMaximumBin(); - const double dataYmax = hData->GetBinContent(dataMaxBin) + hData->GetBinError(dataMaxBin); - const double mcYmax = hStack->GetMaximum(); - - ymax = TMath::Max(dataYmax, mcYmax); - } - - if ( monitorPlot.doLogy ) - { - if ( ymin <= 0 ) ymin = 1e-2; - c->SetLogy(); - } - - hStack->SetMinimum(ymin); - hStack->SetMaximum(ymax); - - hStack->Draw(); - for ( unsigned int i=0; iDraw("same"); - } - hData->Draw("same"); - - legend->Draw(); - - if ( createplots_ && imageOutDir_ != "" ) - { - c->Print((imageOutDir_+"/"+c->GetName()+".png").c_str()); - c->Print((imageOutDir_+"/"+c->GetName()+".eps").c_str()); - //c->Print((imageOutDir_+"/"+c->GetName()+".pdf").c_str()); - } -} - -void TopAnalyzerLite::printStat(const string& name, TCut cut, int cutStep) -{ - cout << "-------------------------\n"; - cout << " " << name << endl; - - if ( writeSummary_ ) - { - fout_ << "-------------------------\n"; - fout_ << " " << name << endl; - } - - const double nData = realDataChain_ ? entryList_["realdata"].at(cutStep)->GetN() : 0; - - double nTotal = 0, nSignal = 0; - double nTotalErr2 = 0; - - TString cutStr; - cutStr = cut; - - vector stats; - for ( unsigned int i=0; iGetN()*norm; - const double nEventsErr2 = nEvents*norm; - - // Merge statistics with same labels - vector::iterator matchedStatObj = stats.end(); - for ( vector::iterator statObj = stats.begin(); - statObj != stats.end(); ++statObj ) - { - if ( statObj->label == mcSample.label ) - { - matchedStatObj = statObj; - break; - } - } - if ( matchedStatObj == stats.end() ) - { - Stat stat = {mcSample.name, mcSample.label, nEvents, nEventsErr2}; - stats.push_back(stat); - } - } - - for ( unsigned int i=0; i >::iterator it; - map >::iterator it; - it = wMap_.find(mcSample.name); - if( it != wMap_.end() ) { - scale = it->second[cuts_[cutStep].cutName]; - } - const double norm = lumi_*mcSample.xsec/mcSample.nEvents; - double rawN = 0; - if( entryList_[Form("mcbkg%d",i)].at(cutStep) != NULL ){ - rawN = entryList_[Form("mcbkg%d",i)].at(cutStep)->GetN(); - } - const double nEvents = rawN*norm*scale; - const double nEventsErr2 = nEvents*norm; - - // Merge statistics with same labels - vector::iterator matchedStatObj = stats.end(); - for ( vector::iterator statObj = stats.begin(); - statObj != stats.end(); ++statObj ) - { - if ( statObj->label == mcSample.label ) - { - matchedStatObj = statObj; - break; - } - } - if ( matchedStatObj == stats.end() ) - { - Stat stat = {mcSample.name, mcSample.label, nEvents, nEventsErr2}; - stats.push_back(stat); - } - else - { - matchedStatObj->nEvents += nEvents; - matchedStatObj->nEventsErr2 += nEventsErr2; - } - } - - for ( unsigned int i=0; i::const_iterator cit; - for(cit=sample.replaceCuts.begin(); cit != sample.replaceCuts.end() ; cit++){ - cutStr.ReplaceAll((*cit).first, (*cit).second); - } - - //scale MC - double scale = 1; - //map >::iterator it; - map >::iterator it; - it = wMap_.find(sample.name); - if( it != wMap_.end() ) { - scale = it->second[cuts_[cutStep].cutName]; - } - - const double norm = sample.norm; - const double nEvents = entryList_[Form("databkg%d",i)].at(cutStep)->GetN()*norm*scale; - const double nEventsErr2 = nEvents*norm; - - vector::iterator matchedStatObj = stats.end(); - for ( vector::iterator statObj = stats.begin(); - statObj != stats.end(); ++statObj ) - { - if ( statObj->label == sample.label ) - { - matchedStatObj = statObj; - break; - } - } - if ( matchedStatObj == stats.end() ) - { - Stat stat = {sample.name, sample.label, nEvents, nEventsErr2}; - stats.push_back(stat); - } - else - { - matchedStatObj->nEvents += nEvents; - matchedStatObj->nEventsErr2 += nEventsErr2; - } - } - - // Get the field width for printing - int maxFWidth = 0; - for ( int i=stats.size()-1; i>=0; --i ) - { - const int fWidth = stats[i].label.size(); - if ( fWidth > maxFWidth ) maxFWidth = fWidth; - } - TString form = TString("%-") + Form("%d", maxFWidth) + "s"; - - // Print out statistics - for ( int i=stats.size()-1; i>=0; --i ) - { - Stat& stat = stats[i]; - const string label = Form(form.Data(), stat.label.c_str()); - - cout << label << " = " << stat.nEvents << " +- " << sqrt(stat.nEventsErr2) << endl; - if ( writeSummary_ ) fout_ << label << " = " << stat.nEvents << " +- " << sqrt(stat.nEventsErr2) << endl; - - bool isSignal = false; - for ( unsigned int j=0; jGetSize(); - - cout << "----------------------------\n"; - cout << "Result of single cut" << endl; - cout << "Cut = " << cut << endl; - prepareEventList(cut, istep); - if( printstats_ ) printStat(Form("SingleCut_%d", singleCutUniqueId), cut, istep); - for ( int i=0; iAt(i); - if ( !obj ) continue; - - const string plotName = obj->GetName(); - if ( monitorPlots_.find(plotName) == monitorPlots_.end() ) continue; - MonitorPlot& monitorPlot = monitorPlots_[plotName]; - plot(Form("SingleCut_%d_%s", singleCutUniqueId, plotName.c_str()), cut, monitorPlot); - } - - monitorPlotNames->Delete(); - - ++singleCutUniqueId; -} - -TObjArray TopAnalyzerLite::getHistograms() -{ - return histograms_; -} - -void TopAnalyzerLite::saveHistograms(TString fileName) -{ - if ( fileName == "" ) - { - if ( imageOutDir_ != "" ) fileName = imageOutDir_+"/Hist.root"; - else fileName = "Hist.root"; - } - - TFile* f = TFile::Open(fileName, "recreate"); - - TParameter lumi("lumi", lumi_); - lumi.Write(); - - TH1F* hScale = new TH1F("hScale", "Scale factors for each samples", mcBkgs_.size()+1, 0, mcBkgs_.size()+1); - for ( unsigned int i=0; iFill(mcSigs_[i].name.c_str(), lumi_*mcSigs_[i].xsec/mcSigs_[i].nEvents); - } - for ( unsigned int i=0; iFill(mcBkgs_[i].name.c_str(), lumi_*mcBkgs_[i].xsec/mcBkgs_[i].nEvents); - } - - TCut cut; - TObjArray histograms = getHistograms(); - - vector dirNames; - for ( unsigned int i=0; iGetDirectory(dirName); - if ( !dir ) { - dir = f->mkdir(dirName); - dir->cd(); - cut += cuts_[i].cut; - TNamed cutStr("cut", cut); - cutStr.Write(); - TNamed subCutStr("subCut", cuts_[i].subCut); - subCutStr.Write(); - dirNames.push_back(dirName); - } - } - - for ( unsigned int i=0; iGetDirectory(dirName); - dir->cd(); - - //need to fix : avoid loop - //we can make histograms with vector so that only relevant histograms can be taken - for ( int j=0; jGetName(); - if( hName.Contains( dirName.Data() )) { - h->Write(); - } - } - } - - f->Write(); - f->Close(); -} - -void TopAnalyzerLite::setScanVariables(const string scanVariables) -{ - scanVariables_ = scanVariables; -} - -void TopAnalyzerLite::setEventWeightVar(const string eventWeightVar) -{ - eventWeightVar_ = eventWeightVar; -} - -void TopAnalyzerLite::setEventWeight(const string sample, const TString& step, const double & w) -{ - wMap_[sample.c_str()][step] = w; -} - -void TopAnalyzerLite::printCutFlow(){ - - fout_ << "Cut Flow Table as a latex format" << endl; - fout_ << "--------------------------------------\n"; - - map >::iterator it; - it = statsMap_.begin(); - int nSample = it->second.size(); - - int maxFWidth = 0; - for ( int i=0; i < nSample; i++ ) - { - const int fWidth = (*it).second[i].label.size(); - if ( fWidth > maxFWidth ) maxFWidth = fWidth; - } - TString form = TString("%-") + Form("%d", maxFWidth) + "s"; - - map nTotal; - map nTotalErr2; - for( int i=0 ; i < nSample ; i++ ) - { - it = statsMap_.begin(); - const string label = Form(form.Data(), (*it).second[i].label.c_str()); - - fout_ << label << " " ; - for( int k = 0; k != (int) statsMap_.size() ; k++){ - Stat& stat = (*it).second[i]; - fout_ << " \t&" << setprecision(4) << stat.nEvents ; - if( k >= (int) statsMap_.size()-1 ) fout_ << " $\\pm$ " << setprecision(4) << sqrt(stat.nEventsErr2) ; - nTotal[Form("Step_%d", k+1) ] += stat.nEvents; - nTotalErr2[Form("Step_%d", k+1)] += stat.nEventsErr2; - it++; - } - fout_ << "\\\\ \n" ; - } - - map::iterator itTotal; - map::iterator itTotalErr2; - itTotal= nTotal.begin(); - itTotalErr2= nTotalErr2.begin(); - - fout_ << Form(form.Data(), "Total MC") << " " ; - for( int k = 0; k != (int) statsMap_.size() ; k++){ - fout_ << " \t&" << setprecision(4) << (*itTotal).second ; - if( k >= (int) statsMap_.size()-1 ) fout_ << " $\\pm$ " << setprecision(4) << sqrt( (*itTotalErr2).second ) ; - itTotal++; - itTotalErr2++; - } - fout_ << "\\\\\\hline \n" ; - fout_ << Form(form.Data(), "Data") << " " ; - for( int k = 0; k != (int) statsMap_.size() ; k++){ - const double nData = realDataChain_ ? entryList_["realdata"].at(k)->GetN() : 0; - fout_ << " \t&" << nData ; - } - fout_ << "\\\\\\hline\\hline \n" ; -} diff --git a/macros/comparevariable.C b/macros/comparevariable.C deleted file mode 100644 index 08e516e..0000000 --- a/macros/comparevariable.C +++ /dev/null @@ -1,76 +0,0 @@ -#include "TH1F.h" -#include "TCanvas.h" -#include "TFile.h" -#include "TLegend.h" -#include "TROOT.h" -#include "tdrstyle.C" -#include "TString.h" - -void comparevariable(const TString & variable = "jet_Pt", const TString & title = "Leading Jet p_{T} (GeV)" ){ - - gROOT->ProcessLine(".L tdrstyle.C"); - setTDRStyle(); - - TFile * f = new TFile("../data/FCNC_selection_3L.root"); - - const int ndataset = 17; - TH1F * h[ndataset]; - h[0] = (TH1F *) f->Get(Form("Histos1D/%s_TTJetsTocHbW_HToWW_WToLNuL_HctL",variable.Data())); - h[1] = (TH1F *) f->Get(Form("Histos1D/%s_TTJetsTocHbW_HToWW_WToLNuL_HctR",variable.Data())); - h[2] = (TH1F *) f->Get(Form("Histos1D/%s_TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctL",variable.Data())); - h[3] = (TH1F *) f->Get(Form("Histos1D/%s_TTJetsTocHbW_HToZZ_ZToBB_ZToLL_HctR",variable.Data())); - h[4] = (TH1F *) f->Get(Form("Histos1D/%s_TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctL",variable.Data())); - h[5] = (TH1F *) f->Get(Form("Histos1D/%s_TTJetsTocHbW_HToZZ_ZToJetsUDC_ZToLL_HctR",variable.Data())); - h[6] = (TH1F *) f->Get(Form("Histos1D/%s_TTJetsTocHbW_HToZZ_ZToLL_HctL",variable.Data())); - h[7] = (TH1F *) f->Get(Form("Histos1D/%s_TTJetsTocHbW_HToZZ_ZToLL_HctR",variable.Data())); - h[8] = (TH1F *) f->Get(Form("Histos1D/%s_TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctL",variable.Data())); - h[9] = (TH1F *) f->Get(Form("Histos1D/%s_TTJetsTocHbW_HToZZ_ZToNuL_ZToLL_HctR",variable.Data())); - h[10] = (TH1F *) f->Get(Form("Histos1D/%s_TTJetsTocZbW",variable.Data())); - h[11] = (TH1F *) f->Get(Form("Histos1D/%s_ttbar",variable.Data())); - h[12] = (TH1F *) f->Get(Form("Histos1D/%s_ttz",variable.Data())); - h[13] = (TH1F *) f->Get(Form("Histos1D/%s_ttw",variable.Data())); - h[14] = (TH1F *) f->Get(Form("Histos1D/%s_Zjets",variable.Data())); - h[15] = (TH1F *) f->Get(Form("Histos1D/%s_zz",variable.Data())); - h[16] = (TH1F *) f->Get(Form("Histos1D/%s_wz",variable.Data())); - - TCanvas * c = new TCanvas("c","c",800,600); - h[0]->Rebin(10); - h[0]->Scale(1.0/h[0]->Integral()); - h[0]->Draw(); - h[0]->SetMaximum(0.3); - h[0]->SetTitle(""); - h[0]->GetYaxis()->SetTitle("Normalized Entries"); - h[0]->GetXaxis()->SetTitle(Form("%s",title.Data())); - h[0]->SetLineWidth(2); - h[0]->SetStats(0); - for(int i = 1 ; i < ndataset; i++){ - h[i]->Rebin(10); - h[i]->Scale(1.0/h[i]->Integral()); - h[i]->SetLineWidth(2); - h[i]->Draw("same"); - if( i < 9) { - h[i]->SetLineColor(i+1); - }else if( i < 11){ - h[i]->SetLineColor(i+2); - }else{ - h[i]->SetLineStyle(2); - h[i]->SetLineColor(i-10); - } - } - - TLegend *l = new TLegend(0.42,0.50,0.90,0.90); - for(int i = 0 ; i < ndataset; i++){ - l->AddEntry(h[i],h[i]->GetName(),"L"); - } - l->SetTextSize(0.02); - l->SetFillColor(0); - l->SetLineColor(0); - l->Draw(); - - - c->Print(Form("%s.png", variable.Data())); - -} - - - diff --git a/macros/compile.sh b/macros/compile.sh deleted file mode 100755 index 66244bc..0000000 --- a/macros/compile.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -for ccfile in ./*.cc -do - ofile=`echo $ccfile |sed 's/\.cc$//g'` - echo "compiling : " $ccfile ", executible name: " $ofile - g++ -g -L ~/lib -L . -I ../../ -l TopTreeAnaContent53 -l TopTreeAna53 -l MLP -l TreePlayer -l TMVA -l XMLIO -I `root-config --incdir` `root-config --libs` $ccfile -o $ofile -done diff --git a/macros/dummyconfig.xml b/macros/dummyconfig.xml deleted file mode 100644 index 2e1852b..0000000 --- a/macros/dummyconfig.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/macros/scriptstomakexml b/macros/scriptstomakexml deleted file mode 100644 index 45fa177..0000000 --- a/macros/scriptstomakexml +++ /dev/null @@ -1,9 +0,0 @@ -cat DYJetsToLL_M-50.txt | awk '{print "replace NAME "$1" FILENAME "$2" < dummyconfig.xml > xmlfiles/scripted_"$1".xml"}' -cat MuEG-Run2012A.txt | awk '{print "replace NAME "$1" FILENAME "$2" < dummyconfig.xml > xmlfiles/scripted_"$1".xml"}' - -ls PNFSNAME | awk 'begin{i=0}{print "SAMPLENAME_"i" dcap://maite.iihe.ac.bePNFSNAME"$1; i++}' -ls /pnfs/iihe/cms/store/user/dhondt/DoubleMuParked/Run2012C-22Jan2013-v1/V5_0_5/30012014_224017/TOPTREE | awk 'begin{i=0}{print "DoubleMuParked-Run2012C_"i" dcap://maite.iihe.ac.be/pnfs/iihe/cms/store/user/dhondt/DoubleMuParked/Run2012C-22Jan2013-v1/V5_0_5/30012014_224017/TOPTREE/"$1; i++}' > DoubleMuParked-Run2012C.txt -cat DoubleMuParked-Run2012C.txt | awk '{print "replace NAME "$1" FILENAME "$2" < dummyconfig.xml > xmlfiles/scripted_"$1".xml"}' -ls xmlfiles/*.xml | awk '{print "./Ntupler "$1;if(i==20){i=0; print "sleep 2m"}; i++}' -ls ntuples/ | awk -F"_tree" '{print "rename scripted done xmlfiles/scripted_"$1".xml"}' | sh -ls xmlfiles/scripted_Data_DoubleElectron-Run2012B_*.xml | awk '{if(i==3){i=0; print "./Ntupler "$1} else{print "./Ntupler "$1" &"}; i++}' diff --git a/macros/tdrstyle.C b/macros/tdrstyle.C deleted file mode 100644 index 0770b3f..0000000 --- a/macros/tdrstyle.C +++ /dev/null @@ -1,199 +0,0 @@ -#include "TStyle.h" -void setTDRStyle() { - - TStyle *tdrStyle = new TStyle("Plain","Style for P-TDR"); - - tdrStyle->SetPaintTextFormat("5.0f"); - -// For the canvas: - tdrStyle->SetCanvasBorderMode(0); - tdrStyle->SetCanvasColor(kWhite); - tdrStyle->SetCanvasDefH(400); //Height of canvas - tdrStyle->SetCanvasDefW(400); //Width of canvas - tdrStyle->SetCanvasDefX(0); //POsition on screen - tdrStyle->SetCanvasDefY(0); - -// For the Pad: - tdrStyle->SetPadBorderMode(0); - // tdrStyle->SetPadBorderSize(Width_t size = 1); - tdrStyle->SetPadColor(kWhite); - tdrStyle->SetPadGridX(false); - tdrStyle->SetPadGridY(false); - tdrStyle->SetGridColor(0); - tdrStyle->SetGridStyle(3); - tdrStyle->SetGridWidth(1); - -// For the frame: - tdrStyle->SetFrameBorderMode(0); - tdrStyle->SetFrameBorderSize(1); - tdrStyle->SetFrameFillColor(0); - tdrStyle->SetFrameFillStyle(0); - tdrStyle->SetFrameLineColor(1); - tdrStyle->SetFrameLineStyle(1); - tdrStyle->SetFrameLineWidth(1); - -// For the histo: - // tdrStyle->SetHistFillColor(1); - // tdrStyle->SetHistFillStyle(0); - tdrStyle->SetHistLineColor(1); - tdrStyle->SetHistLineStyle(0); - tdrStyle->SetHistLineWidth(1); - // tdrStyle->SetLegoInnerR(Float_t rad = 0.5); - // tdrStyle->SetNumberContours(Int_t number = 20); - - tdrStyle->SetEndErrorSize(2); - //tdrStyle->SetErrorMarker(20); - tdrStyle->SetErrorX(0.); - - tdrStyle->SetMarkerStyle(20); - -//For the fit/function: - tdrStyle->SetOptFit(1); - - tdrStyle->SetFuncColor(2); - tdrStyle->SetFuncStyle(1); - tdrStyle->SetFuncWidth(1); - -//For the date: - tdrStyle->SetOptDate(0); - // tdrStyle->SetDateX(Float_t x = 0.01); - // tdrStyle->SetDateY(Float_t y = 0.01); - -// For the statistics box: - tdrStyle->SetOptFile(0); - tdrStyle->SetOptStat(0); - //tdrStyle->SetOptStat("mr"); // To display the mean and RMS: SetOptStat("mr"); - tdrStyle->SetStatColor(kWhite); - tdrStyle->SetStatFont(42); - tdrStyle->SetStatFontSize(0.025); - tdrStyle->SetStatTextColor(1); - tdrStyle->SetStatFormat("6.4g"); - tdrStyle->SetStatBorderSize(0); - tdrStyle->SetStatH(0.1); - tdrStyle->SetStatW(0.15); - // tdrStyle->SetStatStyle(Style_t style = 1001); - // tdrStyle->SetStatX(Float_t x = 0); - // tdrStyle->SetStatY(Float_t y = 0); - -// Margins: - tdrStyle->SetPadTopMargin(0.05); - tdrStyle->SetPadBottomMargin(0.15); - tdrStyle->SetPadLeftMargin(0.15); - tdrStyle->SetPadRightMargin(0.05); - -// For the Global title: - - tdrStyle->SetOptTitle(0); - tdrStyle->SetTitleFont(42); - tdrStyle->SetTitleColor(1); - tdrStyle->SetTitleTextColor(1); - tdrStyle->SetTitleFillColor(10); - tdrStyle->SetTitleFontSize(0.05); - // tdrStyle->SetTitleH(0); // Set the height of the title box - // tdrStyle->SetTitleW(0); // Set the width of the title box - tdrStyle->SetTitleX(0.2); // Set the position of the title box - tdrStyle->SetTitleY(0.985); // Set the position of the title box - // tdrStyle->SetTitleStyle(Style_t style = 1001); - // tdrStyle->SetTitleBorderSize(0); //2 - -// For the axis titles: - - tdrStyle->SetTitleColor(1, "XYZ"); - tdrStyle->SetTitleFont(42, "XYZ"); - tdrStyle->SetTitleSize(0.06, "XYZ"); - //tdrStyle->SetTitleXSize(Float_t size = 0.02); // Another way to set the size? - //tdrStyle->SetTitleYSize(Float_t size = 0.02); - tdrStyle->SetTitleXOffset(0.9); - tdrStyle->SetTitleYOffset(1.19); - //tdrStyle->SetTitleOffset(3.1, "Y"); // Another way to set the Offset - -// For the axis labels: - - tdrStyle->SetLabelColor(1, "XYZ"); - tdrStyle->SetLabelFont(42, "XYZ"); - tdrStyle->SetLabelOffset(0.007, "XYZ"); - tdrStyle->SetLabelSize(0.05, "XYZ"); - -// For the axis: - - tdrStyle->SetAxisColor(1, "XYZ"); - tdrStyle->SetStripDecimals(kTRUE); - tdrStyle->SetTickLength(0.03, "XYZ"); - tdrStyle->SetNdivisions(510, "XYZ"); - tdrStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame - tdrStyle->SetPadTickY(1); - -// Change for log plots: - tdrStyle->SetOptLogx(0); - tdrStyle->SetOptLogy(0); - tdrStyle->SetOptLogz(0); - -// Postscript options: - tdrStyle->SetPalette(1); - tdrStyle->SetPaperSize(15.,15.); - // tdrStyle->SetLineScalePS(Float_t scale = 3); - // tdrStyle->SetLineStyleString(Int_t i, const char* text); - // tdrStyle->SetHeaderPS(const char* header); - // tdrStyle->SetTitlePS(const char* pstitle); - - // tdrStyle->SetBarOffset(Float_t baroff = 0.5); - // tdrStyle->SetBarWidth(Float_t barwidth = 0.5); - // tdrStyle->SetPaintTextFormat(const char* format = "g"); - // tdrStyle->SetPalette(Int_t ncolors = 0, Int_t* colors = 0); - // tdrStyle->SetTimeOffset(Double_t toffset); - // tdrStyle->SetHistMinimumZero(kTRUE); - - tdrStyle->cd(); - - //gROOT->ForceStyle(); - -} - -//void tdrGrid(bool gridOn) { -// tdrStyle->SetPadGridX(gridOn); -// tdrStyle->SetPadGridY(gridOn); -//} - -void defaultStyle(){ - gROOT->SetStyle("Plain"); - //gStyle->SetOptStat(1110); - gStyle->SetOptStat(0); //remove statistics box - gStyle->SetOptFit(1); - gStyle->SetStatW(0.25); - gStyle->SetStatH(0.15); - - gStyle->SetCanvasDefH(400); - gStyle->SetCanvasDefW(400); - - // For the axis: - gStyle->SetAxisColor(1, "XYZ"); - gStyle->SetStripDecimals(kTRUE); - gStyle->SetTickLength(0.03, "XYZ"); - gStyle->SetNdivisions(510, "XYZ"); - gStyle->SetPadTickX(1); // To get tick marks on the opposite side of the frame - gStyle->SetPadTickY(1); - - // To make 2D contour colorful - gStyle->SetPalette(1); - - //gStyle->SetOptTitle(0); - // Margins: - gStyle->SetPadTopMargin(0.1); - gStyle->SetPadBottomMargin(0.15); - gStyle->SetPadLeftMargin(0.15); - gStyle->SetPadRightMargin(0.05); - - // For the axis titles: - gStyle->SetTitleColor(1, "XYZ"); - gStyle->SetTitleFont(42, "XYZ"); - gStyle->SetTitleSize(0.06, "XYZ"); - gStyle->SetTitleXOffset(0.9); - gStyle->SetTitleYOffset(1.2); - - // For the axis labels: - gStyle->SetLabelColor(1, "XYZ"); - gStyle->SetLabelFont(42, "XYZ"); - gStyle->SetLabelOffset(0.007, "XYZ"); - gStyle->SetLabelSize(0.05, "XYZ"); - -}