#ifndef GUARD_TDSUBANA #define GUARD_TDSUBANA #include "mtuple.h" #include "TDHistSet.hh" #include #include #include "TDCanvMan.hh" #include "TF1.h" #include "TPaveText.h" #include #include "DilWeights.hh" //#include "DilLeptonType.hh" //#include "LeptonType.hh" #include "LeptonCat.hh" #include "TDMinMax.hh" #include "TDFlexCut.hh" #include "TDGroupCut.hh" #include "TDMtupCutInterface.hh" #include "TDMtupCutInterface_JESup.hh" #include "TDMtupCutInterface_JESdn.hh" #include "TDMtupCutInterface_LESup.hh" #include "TDMtupCutInterface_LESdn.hh" #include "TDAnaCutSet.hh" #include "TDDilSet.hh" #include "TDDilSetBMU.hh" #include "TDhwwlvlvGoodRun.hh" #include "TDhwwlvlvGoodRun13.hh" #include "TDUniqueMap.hh" #include "TDRunInfoSet.hh" #include "TDRunInfo.hh" #define PI 3.14159265 #include "TDMassPeakFit.hh" #include "TDVnEEE.hh" #include "TRandom.h" #include "TString.h" #include "./TMVA/src/Reader.h" #include "TMultiLayerPerceptron.h" #include "DFakeRates.h" #include "TDMatrix.hh" class TDSubAna: public mtuple { public: TDSubAna(char * datasource, bool isdata, bool debug, char * filename, TDCanvMan * CanvMan, int mydiltype, int weighting, TDRunSet& goodruns, char * runinfofile, float higgsMass, std::ofstream& latexcuttables, int minrun, int maxrun, int datasourceint, bool stn, bool mircea, float xs)://, int colour): mtuple(filename, debug), _datasource(datasource), _isdata(isdata), _debug(debug), CanvMan1(CanvMan), _mydiltype(mydiltype), maxweight(0.0), //_dilWeight(DilWeights::JOINTPHYSICSV1),//OLDHWW),//JOINTPHYSICSV1), _leptonType(), _dilType(), Zinwindow(0), runmm("runnumber"), evtmm("eventnumber"), weightmm("weight"), dilweightmm("dilweight"), _passAll(false), _dilset(mydiltype), _weighttype(weighting), _hwwlvlvGoodRun(), _runstoignore("MCrunstoignore.txt"), _thisrun(0), _thisZevents(0), _thisSS(0), _goodruns(goodruns), _sampleRunInfo(runinfofile), _totZevents(0), _totSS(0), _totWW(0), _higgsMass(higgsMass), _cutblockLat(latexcuttables), _dileptonmasshists("massplotst",("massplots in"+_datasource).c_str(),("massplots in"+_datasource).c_str(),CanvMan1,2,false), _debugruns("debugruns.txt"), _minRun(minrun), _maxRun(maxrun), _debugrunevt("debugrunevt.txt"), _datasourceint(datasourceint), weight(1.0), _myrand(0.0), _myrand2(0.0), _random(22345), _stn(stn), _mircea(mircea), _xs(xs), Use_Cuts(0), Use_Likelihood(0), Use_LikelihoodD(0), Use_PDERS(0), Use_HMatrix(0), Use_Fisher(0), Use_CFMlpANN(0), Use_TMlpANN(0), Use_BDT(0),//_GiniIndex(0), // default BDT method EvaluateVariables(0), initTMVA(false), _NNdiltype(0), _initTMLP(false), _initFakes(false), _matTest(0), _SaveRjn(false), _useSCMIO(false), _Mt_ll(0.0), _Mt_llMet(0.0), _Mt_All(0.0), _Isr(0.0), _DilPhillCorr(0.0) //_fakes("FakeRates-28-09-06/FakeRates_v1_21.root") //_color(color) { //_debugrunevt.PrintValues(); for(std::vector::iterator it=_debugrunevt.begin(); it!=_debugrunevt.end(); it++) _debugEvents.Insert((int)(it->_run),(int)(it->_hepgZ)); //_debugEvents.PrintValues(); if(_weighttype==2) _dilWeight = new (DilWeights)(DilWeights::JOINTPHYSICSV1, &_hwwlvlvGoodRun13, _minRun, _maxRun); else _dilWeight = new (DilWeights)(DilWeights::OLDHWW, &_hwwlvlvGoodRun13, _minRun, _maxRun); //std::cout<<"test test delete dilweight"<GetAnaHist("luminosity")->GetHist()->GetMean()<PrintTree(fitinfo); _anaCutSet->GetCutAnaCut()->PrintTree(fitinfo); _anaCutSet->GetCutAnaCut()->PrintTree(fitinfo, true); //fitinfo<::iterator it=_alldilcuts.begin(); it!=_alldilcuts.end(); it++) {/* cutblock<<(*it)->Getname()<<" "; (*it)->GetCutAnaCut()->PrintCumulativeTreeinBlockForm(cutblock); cutblock< "<::iterator it=_alldilcuts.begin(); it!=_alldilcuts.end(); it++)//run through the dilepton types printing out the cut statistics { if(counter==4)//sub total for ee types { _cutblockLat<<_anaCutSetee->Getname()<<" & "; _anaCutSetee->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, subtotinputevents); //prints the cut efficiency _cutblockLat<Getname()<<" & "; _anaCutSetemu->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, subtotinputevents);//prints the cut efficiency _cutblockLat<Getname()<<" & "; _anaCutSetmumu->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, subtotinputevents);//prints the cut efficiency _cutblockLat<Getname()<<" & "; (*it)->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, GetInputEvents(counter));//prints the cut efficiency _cutblockLat<Getname()<<" & "; _anaCutSetmumu->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, subtotinputevents);//prints the cut efficiency _cutblockLat<Getname()<<" & "; _anaCutSet->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, GetInputEvents()); _cutblockLat<Getname()<<" & "; _anaCutSet0d->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, GetInputEvents0d());//prints the cut efficiency _cutblockLat<Getname()<<" & "; _anaCutSet0h->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, GetInputEvents0h());//prints the cut efficiency _cutblockLat<Getname()<<" & "; _anaCutSet0i->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, GetInputEvents0i());//prints the cut efficiency _cutblockLat<Getname()<<" & "; _anaCutSet0h0i->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, GetInputEvents0h()+GetInputEvents0i());//prints the cut efficiency _cutblockLat<::iterator it=_fakevectord->begin(); it!=_fakevectord->end(); it++){if(*it!=NULL)delete *it; *it=0; std::cout<<"in loop"<::iterator it=_fakevectorh->begin(); it!=_fakevectorh->end(); it++){if(*it!=NULL)delete *it; *it=0;} std::cout<<"deleting fake elements"<::iterator it=_fakevectori->begin(); it!=_fakevectori->end(); it++){if(*it!=NULL)delete *it; *it=0;} std::cout<<"deleting fake elements"<GetAnaHist("luminosity")->GetHist()->GetMean()<GetAnaHist("DileptonMass")->GetHist())); std::cout<<" Same sign events in Zmasspeak: "<<_subAnaHists->GetAnaHist("SameSignDilMass")->GetHist()->Integral()<GetAnaHist("SameSignDilMass")->GetHist()->Integral()<=4 && counter<=16))) { Massfile<<_dilType.Int2String(counter)<<" "; testmasspeak.RangeMassfitter( ( * ( (TH1F*) ((*(_dileptonmasshists.GetAnaIt())) ->GetHist()) ) ), 87.0, 95.0); // ++counter; TDVnEEE mean=testmasspeak.GetVnEEEMean(); ExcelDataOut(mean, Massfile); Massfile<GetAnaHist(((_dilType.Int2String(type)) + " relweighterror").c_str())->GetHist()->Integral()==0) { HistFill( ((_dilType.Int2String(type)) + " relweighterror").c_str(), (_subAnaHists->GetAnaHist(((_dilType.Int2String(type)) + " weight").c_str())->GetHist()->GetRMS())/ (_subAnaHists->GetAnaHist(((_dilType.Int2String(type)) + " weight").c_str())->GetHist()->GetMean()), _subAnaHists->GetAnaHist(((_dilType.Int2String(type)) + " weight").c_str())->GetHist()->Integral()); HistFill("RelWeightError", (_subAnaHists->GetAnaHist(((_dilType.Int2String(type)) + " weight").c_str())->GetHist()->GetRMS())/ (_subAnaHists->GetAnaHist(((_dilType.Int2String(type)) + " weight").c_str())->GetHist()->GetMean()), _subAnaHists->GetAnaHist(((_dilType.Int2String(type)) + " weight").c_str())->GetHist()->Integral());//TD add weight to all the other collected weighterrors } } //char buffer[500]; if(true)//if(_mydiltype==-1) { std::ofstream cutblock; // cutblock.open(("results/cutblock_"+_datasource+".txt").c_str()); sprintf(buffer,"results/cutblock_%s-%d.txt",_datasource.c_str(),(int)_higgsMass); cutblock.open(buffer); for(std::vector::iterator it=_alldilcuts.begin(); it!=_alldilcuts.end(); it++) { cutblock<<(*it)->Getname()<<" "; (*it)->GetCutAnaCut()->PrintCumulativeTreeinBlockForm(cutblock); cutblock< "<::iterator it=_alldilcuts.begin(); it!=_alldilcuts.end(); it++)//run through the dilepton types printing out the cut statistics { std::cout<<"in TDAnaCutSet loop"<Getname()<<" & "<GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, subtotinputevents); //prints the cut efficiency _cutblockLat<Getname()<<" & "<GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, subtotinputevents);//prints the cut efficiency _cutblockLat<Getname()<<" & "; _anaCutSetmumu->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, subtotinputevents);//prints the cut efficiency _cutblockLat<Getname()<<" & "<GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, GetInputEvents(counter));//prints the cut efficiency _cutblockLat<Getname()<<" & "<GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, subtotinputevents);//prints the cut efficiency _cutblockLat<Getname()<<" & "<< GetInputEvents()<<" & "; _anaCutSet->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, GetInputEvents()); _cutblockLat<Getname()<<" & "<< GetInputEvents0d()<<" & "; _anaCutSet0d->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, GetInputEvents0d());//prints the cut efficiency _cutblockLat<Getname()<<" & "<< GetInputEvents0h()<<" & "; _anaCutSet0h->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, GetInputEvents0h());//prints the cut efficiency _cutblockLat<Getname()<<" & "<< GetInputEvents0i()<<" & "; _anaCutSet0i->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, GetInputEvents0i());//prints the cut efficiency _cutblockLat<Getname()<<" & "<< GetInputEvents0h()+GetInputEvents0i()<<" & ";; _anaCutSet0h0i->GetCutAnaCut()->PrintCumulativeTreeinLatForm(_cutblockLat); //prints the passed numbers _cutblockLat<GetCutAnaCut()->PrintCumulativeEffTreeinLatForm(_cutblockLat, GetInputEvents0h()+GetInputEvents0i());//prints the cut efficiency _cutblockLat<200)return; //if(diltype!=23)return; //if(_isdata && evt> 1000000)std::cout<<"fake event:"<=10 && _isdata){std::cout<<"fake lep type: "<=10)fakeevent=true; if(fakeevent && FakeSubEvNo==0)std::cout<<"fake lepton in normal event"< _maxRun))return; if(_debugEvents.Find(run,evt)) debugrun=true; if(diltype==3)return; //TD get rid of PHX-PHX events if(debugrun)std::cout<<"1run: "<CalculateCutValues(); _cutInterface_JESup->CalculateCutValues(); _cutInterface_JESdn->CalculateCutValues(); _cutInterface_LESup->CalculateCutValues(); _cutInterface_LESdn->CalculateCutValues(); if(!_dilset.CorrectDilType(diltype))return; //TD diltype requirement if(debugrun)std::cout<<"5run: "<25) { if(debugrun)std::cout<<"no BMU for now"<186598)return; //gen 5 //if(_mydiltype == -1 && run <186599)return; if(debugrun)std::cout<<"run: "< VecForSumMt; for(int lep=0; lep=0 && lepPhi[lep]<(75*2*PI/360))|| (lepEtaDet[lep]>0 && lepPhi[lep]>(105*2*PI/360) && lepPhi[lep]<(225*2*PI/360))|| (lepEtaDet[lep]<0 && lepPhi[lep]>(105*2*PI/360) && lepPhi[lep]<(210*2*PI/360))|| (lepPhi[lep]>=(315*2*PI/360) && lepPhi[lep]<(2*PI)) ) )_badCMXWedge++; if(_badCMXWedge && debugrun)std::cout<<"bad cmx wedge"<35 && diltype<41))//no BMU in the analysis { if(_mydiltype==-1) // && !samesign) //one of the cut is same sign; // && _badCMXRCot==0 && _badCMXWedge==0 ) //should be implemented when ready. { //if(_datasource=="data")filedump<UnFreeze(); (_alldilcuts[diltype])->PassAnaCut(); (_alldilcuts[diltype])->PassCumulateCut(); } //if( _badCMXRCot==0 && _badCMXWedge==0) //should be implemented when ready. passanacuts=false; // _cutInterface->CalculateCutValues(); _anaCutSet->UnFreeze(); //TD cuts are usually freezed to prevent constsnt recalculation; so we have to unfreeze from last event. _anaCutSet->PassAnaCut(); passanacuts = _anaCutSet->PassCumulateCut(); //TD store normal cut pass in handy bool.. _anaCutSet->GetCutAnaCut()->FlagNm1(); //TD FlagNm1 does check to see if only one cut was not passed and to flag the cut. if(diltype<=4) { _anaCutSetee->UnFreeze(); _anaCutSetee->PassAnaCut(); _anaCutSetee->PassCumulateCut(); _anaCutSetee->GetCutAnaCut()->FlagNm1(); }else if(diltype>=17 && diltype<=25){ _anaCutSetmumu->UnFreeze(); _anaCutSetmumu->PassAnaCut(); _anaCutSetmumu->PassCumulateCut(); _anaCutSetmumu->GetCutAnaCut()->FlagNm1(); }else if(diltype<17 && diltype >4){ _anaCutSetemu->UnFreeze(); _anaCutSetemu->PassAnaCut(); _anaCutSetemu->PassCumulateCut(); _anaCutSetemu->GetCutAnaCut()->FlagNm1(); } _anaCutSet_JESup->UnFreeze(); //TD same for high JES _anaCutSet_JESup->PassAnaCut(); _anaCutSet_JESup->GetCutAnaCut()->FlagNm1(); _anaCutSet_JESdn->UnFreeze(); //TD same for high JES _anaCutSet_JESdn->PassAnaCut(); _anaCutSet_JESdn->GetCutAnaCut()->FlagNm1(); _anaCutSet_LESup->UnFreeze(); //TD same for high LES _anaCutSet_LESup->PassAnaCut(); _anaCutSet_LESup->GetCutAnaCut()->FlagNm1(); _anaCutSet_LESdn->UnFreeze(); //TD same for high LES _anaCutSet_LESdn->PassAnaCut(); _anaCutSet_LESdn->GetCutAnaCut()->FlagNm1(); if(run<186599)//TD fill the anacuts for the total in the 0d, 0h, and 0i samples. { _anaCutSet0d->UnFreeze(); _anaCutSet0d->PassAnaCut(); _anaCutSet0d->PassCumulateCut(); _anaCutSet0d->FlagNm1(); }else if(run< 203799&& run>186599){ _anaCutSet0h->UnFreeze(); _anaCutSet0h->PassAnaCut(); _anaCutSet0h->PassCumulateCut(); _anaCutSet0h->FlagNm1(); }else if(run< 212133&& run>203799){ _anaCutSet0i->UnFreeze(); _anaCutSet0i->PassAnaCut(); _anaCutSet0i->PassCumulateCut(); _anaCutSet0i->FlagNm1(); } if(run< 212133&& run >186599) { _anaCutSet0h0i->UnFreeze(); _anaCutSet0h0i->PassAnaCut(); _anaCutSet0h0i->PassCumulateCut(); _anaCutSet0h0i->FlagNm1(); } } DebugOut("ENDOF passing analysis cuts"); //TD ENDOF see which if events passes any of the analysis cuts for various cases ++++++++++++++ _lepR=sqrt(((lepEta[0]-lepEta[1])*(lepEta[0]-lepEta[1]))+((lepPhi[0]-lepPhi[1])*(lepPhi[0]-lepPhi[1]))); _NNdiltype=0; //TD default if(diltype==0 || diltype==1 || diltype==3 || diltype==17 || diltype==18 || diltype==19 || diltype==20 || diltype==21 || diltype==22 || diltype==23 || diltype==24 || diltype==25)_NNdiltype=1; //TD for same type dileptons - useful for the tmva analysis. if(_thisrun!=run && _thisrun!=0)//BMU included { if(_thisrun==156464)std::cout<<_thisrun<<" "<<_thisZevents<<" "<<_thisSS<<" "<<0<35 && diltype<41))//no BMU in this until their energies are sorted out. HistFill("HepGZDileptonMass", hepgZmass[0], 1); int goodlep=0; for(int lep=0; lep 20.0 && lepType[lep]!=8)goodlep++; //no BMU - I'm hoping this will be enough to remove BMU from the future code. if(goodlep>2)std::cout<<"trilep: "< 20.0) for(int lep2=0; lep2 10.0 && lep2!=lep) gooddilep++; if(lepEt[lep2] > 10.0 && lepEt[lep2] < 20.0 && lep2!=lep) dilep1020++; } //TD Weights calculation ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ DebugOut("Weights calculation"); //double weight; double weighterror=0.0; rawweight=1; luminosityweight=1; weight=1; gennumberweight=1; goodZweight=1; if(_weighttype==0) { rawweight=1; weighterror=0; }else{ if(debugrun)_dilWeight->SetDebug(true); if(diltype<26 || (diltype>35 && diltype<41))//BMU has raw weight of 1 for now. rawweight=GetDilWeight(); if(rawweight>1e2 || rawweight<0 || weight!=weight) //TD get rid of bogus weights. { std::cout<<"bad weight run: "<=10) { DebugOut("found fake"); weight*=GetFakeRate(run, lepType[lep], lepEt[lep]); if(_debug)std::cout<<"weight is"<35 && diltype<41))//BMU has weight of 1 for now with no error. weighterror=(_dilWeight->DilWeightError(diltype));//TD this maybe will need to be updated - I don't think any extra error arrive due to the other scaling factors above, but it will need to be scaled itself. if(debugrun)_dilWeight->SetDebug(false); } if(weight!=weight) { DebugOut("infinite dilepton weight"); weight=0.0; } DebugOut("ENDOF Weights calculation"); //TD ENDOF Weights calculation ++++++++++++++++++++++++++++++++++++++++++++++++++++++ if(passanacuts && (diltype<26 || (_useSCMIO && diltype>35 && diltype<41)))//no BMU in the file dumps - it doesn't pass the analysis cuts. { if(debugrun)std::cout<<"printing to _anafiledump"<Fill(); } //std::cout<35 && diltype<41))//no BMU in the min max weights, because this is set to 1 for all BMU weights. weightmm.mm(weight); int NhepgZ=0; for(int hepgz=0; hepgz 0.0) NhepgZ++;// mostly depricated now. //TD Isolation Checking and Muon Geometry Hist Filling ++++++++++++++++++++++++++++++++++ DebugOut("Isolation Checking and Muon Geometry Hist Filling"); int nonisol=0; int bothnonisol=0; if(diltype<26 || (_useSCMIO && diltype>35 && diltype<41))//no BMU in th isolation and geomety plots for now. { for(int lep=0; lepPassCut() != lepCalIsol[lep]<0.1)std::cout<<"cut class has not worked"<0.1)return; //if(run==168640)std::cout<<"lepton "<0.1 || lepTrkIsol[lep]>0.1) { bothnonisol++; }else{ HistFill("Isol", lepCalIsol[lep], weight); HistFill("BigIsol", lepCalIsol[lep], weight); } if(lepCalIsol[lep]>0.1) { nonisol++; } } }//I hope ENDOF no BMU DebugOut("ENDOF Isolation Checking and Muon Geometry Hist Filling"); //TD ENDOF Isolation Checking and Muon Geometry Hist Filling ++++++++++++++++++++++++++++++++++ // if(nonisol>0) if(debugrun)std::cout<<"10run: "<GetCutAnaCut()->PassUpTo("MissingETMag") && _anaCutSet->GetCutAnaCut()->GetCut("MetMag2")->Getpass() && (diltype<26 || (_useSCMIO && diltype>35 && diltype<41)))//no BMU in the weights, although this is mostly depricated now that I'm doing my own likelihood fits. //_anaCutSet->GetCutAnaCut()->GetCut("dilmassmax")->Getpass()) _tomUnbinnedTree->Fill(); if(_anaCutSet->GetCutAnaCut()->PassUpTo("dilmassmin")&&_badCMXRCot==0 && _badCMXWedge==0 && (diltype<26 || (_useSCMIO && diltype>35 && diltype<41)))//no BMU for now. {_descVar2->Fill();} if(_anaCutSet->GetCutAnaCut()->PassUpTo("MissingETMag") && bothnonisol==0 && dilmass>16)//&& _anaCutSet->GetCutAnaCut()->GetCut("dilmassmax")->Getpass()) { if(_badCMXRCot==0 && _badCMXWedge==0 && (diltype<26 || (_useSCMIO && diltype>35 && diltype<41)))//no BMU for now. { if(dilmass!=(*(_cutInterface->dilmass())))std::cout<dilmass())<16) { for(int lep=0; lep=DilType::trilep && lepType[lep]==LeptonType::BMU)) { HistFill(((_leptonType.Int2String(lepType[lep])) + " leptonET").c_str(), lepEt[lep], weight); } } } HistFill("NNVar_LepAEn", *(_cutInterface->LepAEn()),weight); HistFill("NNVar_LepBEn", *(_cutInterface->LepBEn()),weight); HistFill("NNVar_dilmass", *(_cutInterface->dilmass()),weight); HistFill("NNVar_metmag", *(_cutInterface->metmag()),weight); HistFill("NNVar_addEt", *(_cutInterface->addEt()),weight); HistFill("NNVar_dPhiMetLJ", *(_cutInterface->dPhiMetLJ()),weight); HistFill("NNVar_ntightjets", *(_cutInterface->ntightjets()),weight); HistFill("NNVar_jet1_Et", *(_cutInterface->jet1_Et()),weight); HistFill("NNVar_jet2_Et", *(_cutInterface->jet2_Et()),weight); HistFill("NNVar_dildphi", dildphi,weight); HistFill("NNVar_lepR", _lepR,weight); HistFill("NNVar_metsig", metsig,weight); HistFill("NNVar_diltype", _NNdiltype,weight); HistFill("NNVar_Mt_ll", _Mt_ll,weight); HistFill("NNVar_Mt_llMet", _Mt_llMet,weight); HistFill("NNVar_Mt_All", _Mt_All,weight); HistFill("NNVar_Isr", _Isr,weight); HistFill("NNVar_DilPhillCorr",_DilPhillCorr,weight); if(metsig>2.0) { HistFill("NNVar_MetSigCut_LepAEn", *(_cutInterface->LepAEn()),weight); HistFill("NNVar_MetSigCut_LepBEn", *(_cutInterface->LepBEn()),weight); HistFill("NNVar_MetSigCut_dilmass", *(_cutInterface->dilmass()),weight); HistFill("NNVar_MetSigCut_metmag", *(_cutInterface->metmag()),weight); HistFill("NNVar_MetSigCut_addEt", *(_cutInterface->addEt()),weight); HistFill("NNVar_MetSigCut_dPhiMetLJ", *(_cutInterface->dPhiMetLJ()),weight); HistFill("NNVar_MetSigCut_ntightjets", *(_cutInterface->ntightjets()),weight); HistFill("NNVar_MetSigCut_jet1_Et", *(_cutInterface->jet1_Et()),weight); HistFill("NNVar_MetSigCut_jet2_Et", *(_cutInterface->jet2_Et()),weight); HistFill("NNVar_MetSigCut_dildphi", dildphi,weight); HistFill("NNVar_MetSigCut_lepR", _lepR,weight); HistFill("NNVar_MetSigCut_metsig", metsig,weight); HistFill("NNVar_MetSigCut_diltype", _NNdiltype,weight); HistFill("NNVar_MetSigCut_Mt_ll", _Mt_ll,weight); HistFill("NNVar_MetSigCut_Mt_llMet", _Mt_llMet,weight); HistFill("NNVar_MetSigCut_Mt_All", _Mt_All,weight); HistFill("NNVar_MetSigCut_Isr", _Isr,weight); HistFill("NNVar_MetSigCut_DilPhillCorr",_DilPhillCorr,weight); } if(_datasourceint!=-1) { //if(_myrand<(_lowestlumback/(GetInputEvents()/GetXS()))) //{ _descVar->Fill(); if(_SaveRjn)_rootJetNetfile<<*_cutInterface->LepAEn()<<" "<< *_cutInterface->LepBEn()<<" "<< *_cutInterface->dilmass()<<" "<< *_cutInterface->metmag()<<" "<< *_cutInterface->ChargeProduct()<<" "<< *_cutInterface->addEt()<<" "<< *_cutInterface->dPhiMetLJ()<<" "<< *_cutInterface->ntightjets()<<" "<< *_cutInterface->jet1_Et()<<" "<< *_cutInterface->jet2_Et()<<" "<< weight<<" "<35 && diltype<41))//no BMU { HistFill("Lepton1Et",*(_cutInterface->LepAEn()), weight); HistFill("Lepton2Et",*(_cutInterface->LepBEn()), weight); } /* if(bothnonisol==0 && dilmass>16) { //if(_datasource=="data")if(diltype==DilType::CMX_CMP)filedump<=DilType::trilep && lepType[lep]==LeptonType::BMU)) HistFill(((_leptonType.Int2String(lepType[lep])) + " leptonET").c_str(), lepEt[lep], weight); //only include the normal muons in plots, as if BMU dileptons get in, this screws up the luminosity for the plot. //if(_datasource=="data")std::cout<<((_leptonType.Int2String(lepType[lep])) + " leptonET").c_str()<34)//no BMU incase the BMU energy calculation screws up the missing et HistFill("Missing_Et",*(_cutInterface->metmag()), weight); //std::cout<<_anaCutSet->GetCutAnaCut() //TD Analysis NM1 Style hist filling ++++++++++++++++++++++++++++++++++++++++++++++++++++ if(diltype<26 || (_useSCMIO && diltype>35 && diltype<41))//no BMU in any analysis type plots { if(_anaCutSet->GetCutAnaCut()->PassUpTo("CominedJetNumbers")) //Plots before Jet Cut { HistFill("JetNumBeforeCut",*(_cutInterface->ntightjets()), weight); if(*(_cutInterface->ntightjets())>0) HistFill("LeadJetEt_anyN",*(_cutInterface->jet1_Et()), weight); if(*(_cutInterface->ntightjets())==1) { HistFill("LeadJetEt_1Jet",*(_cutInterface->jet1_Et()), weight); } if(*(_cutInterface->ntightjets())==2) { HistFill("LeadJetEt_2Jet",*(_cutInterface->jet1_Et()), weight); HistFill("SecondJetEt_2Jet",*(_cutInterface->jet2_Et()), weight); } } //weight=1; if(_anaCutSet->GetCutAnaCut()->PassUpTo("MissingETMag")) //Plots before Et Cut { HistFill("MissingETMag",*(_cutInterface->metmag()), weight); } if(_anaCutSet->GetCutAnaCut()->PassUpTo("dilmassmax")) //Plots before second dilmass Cut { HistFill("dilmassmax",*(_cutInterface->dilmass()), weight); } if(_anaCutSet->GetCutAnaCut()->PassUpTo("TotalEt")) //Plots before TotalEt { HistFill("TotalEt",*(_cutInterface->addEt()), weight); } //N-1 plots if(_anaCutSet->GetCutAnaCut()->GetCut("CominedJetNumbers")->Nm1()) //Jet N-1 Cut { HistFill("Nm1JetNumBeforeCut",*(_cutInterface->ntightjets()), weight); if(*(_cutInterface->ntightjets())>0) HistFill("Nm1LeadJetEt_anyN",*(_cutInterface->jet1_Et()), weight); if(*(_cutInterface->ntightjets())==1) { HistFill("Nm1LeadJetEt_1Jet",*(_cutInterface->jet1_Et()), weight); } if(*(_cutInterface->ntightjets())==2) { HistFill("Nm1LeadJetEt_2Jet",*(_cutInterface->jet1_Et()), weight); HistFill("Nm1SecondJetEt_2Jet",*(_cutInterface->jet2_Et()), weight); } } if(_anaCutSet->GetCutAnaCut()->GetCut("MissingETMag")->Nm1()) //N-1 Et Cut { // _anaCutSet->GetCutAnaCut()->PrintCuts(); HistFill("Nm1MissingETMag",*(_cutInterface->metmag()), weight); } if(_anaCutSet->GetCutAnaCut()->GetCut("dilmassmax")->Nm1()) //N-1 dilmass Cut { HistFill("Nm1dilmassmax",*(_cutInterface->dilmass()), weight); } if(_anaCutSet->GetCutAnaCut()->GetCut("TotalEt")->Nm1()) //N-1TotalEt { HistFill("Nm1TotalEt",*(_cutInterface->addEt()), weight); } }//ENDOF no BMU in NM1 plots //TD ENDOF Analysis NM1 Style hist filling ++++++++++++++++++++++++++++++++++++++++++++++++++++ if(diltype<26 || (_useSCMIO && diltype>35 && diltype<41))//no BMU in the following small calculations { if(samesign)HistFill("SameSignDilMass", dilmass, weight); maxweight = TMath::Max((double)maxweight,(double)dilweight); dilweightmm.mm((double)weight); if(debugrun)_anaCutSet->GetCutAnaCut()->PrintCuts(); if(debugrun)std::cout<<"ettot: "<<*(_cutInterface->addEt())<GetCutAnaCut()->PassUpTo("dilmassmin")) //{ if(debugrun)std::cout<<" dilmassmin run: "<66 && gooddilep>0 && bothnonisol==0 && _badCMXWedge==0) { if(debugrun)std::cout<<"(dilmass<116 && dilmass>66) run: "<35 && diltype<41))//no BMU in the Z events, incase it screws up that calculation, although, I cannot see how at the moment, this is a precaution. { _thisZevents+=(rawweight*luminosityweight); _totZevents+=(rawweight*luminosityweight); Zinwindow++; } _alldilGoodZ[diltype]+=(rawweight*luminosityweight); if(diltype==0)HistFill("TCE_TCEmass", dilmass, weight); if(diltype==1)HistFill("TCE_PHXmass", dilmass, weight); if(diltype==3)HistFill("PHX_PHXmass", dilmass, weight); if(diltype==17)HistFill("CMUP_CMUPmass", dilmass, weight); if(diltype==18)HistFill("CMUP_CMUmass", dilmass, weight); if(diltype==19)HistFill("CMUP_CMPmass", dilmass, weight); if(diltype==20)HistFill("CMUP_CMXmass", dilmass, weight); if(diltype==21)HistFill("CMUP_CMIOmass", dilmass, weight); if(diltype==22)HistFill("CMX_CMXmass", dilmass, weight); if(diltype==23)HistFill("CMX_CMUmass", dilmass, weight); if(diltype==24)HistFill("CMX_CMPmass", dilmass, weight); if(diltype==25)HistFill("CMX_CMIOmass", dilmass, weight); if(diltype==30)HistFill("CMUP_BMUmass", dilmass, weight); if(diltype==31)HistFill("CMX_BMUmass", dilmass, weight); if(diltype==32)HistFill("BMU_BMUmass", dilmass, weight); if(diltype==33)HistFill("BMU_CMUmass", dilmass, weight); if(diltype==34)HistFill("BMU_CMPmass", dilmass, weight); if(diltype==35)HistFill("BMU_CMIOmass", dilmass, weight); // _alldilSS.push_back(0); }else{ //include for same sign in equations. if(debugrun)std::cout<<"(dilmass<116 && dilmass>66) samesign run: "<35 && diltype<41))HistFill("Weight", (rawweight*luminosityweight), 1); if(diltype<26 || (_useSCMIO && diltype>35 && diltype<41))HistFill("WeightError", (weighterror*luminosityweight), 1); //TD errors for Z xs only! they are in that loop! this loop, I mean! // HistFill("RelWeightError", (rawweight*luminosityweight), 1); }else{if(debugrun)std::cout<<"notxs: mass: "<66 && goodlep==2 && nonisol==0 && _badCMXRCot==0 && _badCMXWedge==0)//TD my set of cuts for Z crossections { //bool mylepet=true; //for(int lep=0; lep66 && dilep1020==1 && bothnonisol==0) { if(!samesign) //include for same sign in equations. { //include for same sign in equations. _alldilGoodZ_1020cut[diltype]+=(rawweight*luminosityweight); } } //ENDOF TD Z XS Calculations +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //TD dilDphi histogram filling++++++++++++++++++++++++++++++++++++++++++++++++++++++++ if(diltype<26 || (_useSCMIO && diltype>35 && diltype<41))//no BMU here either { if(passanacuts && _badCMXWedge==0) { if(_datasource=="data")std::cout<<"Passed: run "<=17){ HistFill("dilDphimumu",dildphi, weight); HistFill("RelWeightError_mumu", (weighterror/rawweight)*weight, 1); //HistFill("dilDphimumu_PDFup", dildphi, weight*GetPDFError(true)); //TD wait for implementation (boom boom). //HistFill("dilDphimumu_PDFdn", dildphi, weight*GetPDFError(false)); if(_initFakes){ HistFill("dilDphimumu_ISRup", dildphi, weight);//TD no Isr error on fakes HistFill("dilDphimumu_ISRdn", dildphi, weight); HistFill("dilDphimumu_Fakeup", dildphi, weight*(1+GetRelativeFakeRateError(run, lepType[1], lepEt[1]))); HistFill("dilDphimumu_Fakedn", dildphi, weight*(1-GetRelativeFakeRateError(run, lepType[1], lepEt[1]))); }else{ HistFill("dilDphimumu_ISRup", dildphi, weight+GetISRError(true, subprocesspT)); HistFill("dilDphimumu_ISRdn", dildphi, weight+GetISRError(false, subprocesspT)); HistFill("dilDphimumu_Fakeup", dildphi, weight); HistFill("dilDphimumu_Fakedn", dildphi, weight); } }else{ HistFill("dilDphiemu",dildphi, weight); HistFill("RelWeightError_emu", (weighterror/rawweight)*weight, 1); //HistFill("dilDphiemu_PDFup", dildphi, weight*GetPDFError(true)); //TD wait for implementation (boom boom). //HistFill("dilDphiemu_PDFdn", dildphi, weight*GetPDFError(false)); if(_initFakes){ HistFill("dilDphiemu_ISRup", dildphi, weight); HistFill("dilDphiemu_ISRdn", dildphi, weight); HistFill("dilDphiemu_Fakeup", dildphi, weight*(1+GetRelativeFakeRateError(run, lepType[1], lepEt[1]))); HistFill("dilDphiemu_Fakedn", dildphi, weight*(1-GetRelativeFakeRateError(run, lepType[1], lepEt[1]))); }else{ HistFill("dilDphiemu_ISRup", dildphi, weight+GetISRError(true, subprocesspT)); HistFill("dilDphiemu_ISRdn", dildphi, weight+GetISRError(false, subprocesspT)); HistFill("dilDphiemu_Fakeup", dildphi, weight); HistFill("dilDphiemu_Fakedn", dildphi, weight); } } HistFill("RelWeightError", (weighterror/rawweight)*weight, 1); //TD this is after the anacuts //TD corrected in EndRun() of tce and phx diltypes. } if(_anaCutSet_JESup->PassAnaCut() && _badCMXWedge==0)//TD does it pass the high JES cuts? { //TD separate events into ee emu and mumu if(diltype<=4) { HistFill("dilDphiee_JESup",dildphi, weight); }else if(diltype>=17){ HistFill("dilDphimumu_JESup",dildphi, weight); }else{ HistFill("dilDphiemu_JESup",dildphi, weight); } } if(_anaCutSet_JESdn->PassAnaCut() && _badCMXWedge==0)//TD does it pass the low JES cuts? { //TD separate events into ee emu and mumu if(diltype<=4) { HistFill("dilDphiee_JESdn",dildphi, weight); }else if(diltype>=17){ HistFill("dilDphimumu_JESdn",dildphi, weight); }else{ HistFill("dilDphiemu_JESdn",dildphi, weight); } } if(_anaCutSet_LESup->PassAnaCut() && _badCMXWedge==0)//TD does it pass the high LES cuts? { //TD separate events into ee emu and mumu if(diltype<=4) { HistFill("dilDphiee_LESup",dildphi, weight); }else if(diltype>=17){ HistFill("dilDphimumu_LESup",dildphi, weight); }else{ HistFill("dilDphiemu_LESup",dildphi, weight); } } if(_anaCutSet_LESdn->PassAnaCut() && _badCMXWedge==0)//TD does it pass the low LES cuts? { //TD separate events into ee emu and mumu if(diltype<=4) { HistFill("dilDphiee_LESdn",dildphi, weight); }else if(diltype>=17){ HistFill("dilDphimumu_LESdn",dildphi, weight); }else{ HistFill("dilDphiemu_LESdn",dildphi, weight); } } //ENDOF TD dilDphi histogram filling++++++++++++++++++++++++++++++++++++++++++++++++++++++++ }//end of no BMU here either if(!samesign)//TD depricated Z number storage. need to be put in the right places. Mass plots too! { if(diltype==1)HistFill("ZDileptonMassTCEPHX",dilmass, weight); HistFill("DileptonMass", dilmass, weight); HistFill("ZDileptonMass", dilmass, weight); (*(_dileptonmasshists.GetAnaHistVector()))[diltype]->GetHist()->Fill(dilmass, weight);//for Z mass. } //WW crossec stuff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ if(diltype<26 || (_useSCMIO && diltype>35 && diltype<41))//no BMU here { if(!samesign) { int bigjet=0; if(dilmass>16) if(bothnonisol==0) if(_badCMXWedge==0) if(((dilmass<60 || dilmass>120) && metmag>25) || (dilmass>60 && dilmass<120 && metmag>40)) if(metsig>5.5) { for(int jet=0; jet!=ntightjets; jet++)if(tjetEt[jet]>20)bigjet++; if(bigjet<=1 && goodlep==2) { HistFill("WWmetsig", metsig, weight); HistFill("WWdilmass", dilmass, weight); HistFill("WWmetmag", metmag, weight); HistFill("WWsumEt", sumEt, weight); for(int lep=0; lep 0) { TDMatrix test; TLorentzVector lep1(lepPx[0], lepPy[0], lepPz[0], lepEn[0]); TLorentzVector lep2(lepPx[1], lepPy[1], lepPz[1], lepEn[1]); test.scanmasses(lep1, lep2, (TH1F*)(_subAnaHists->GetAnaHist("MatrixTest")->GetHist()), 30, 160, 220, 10000); _matTest--; } }//end of no BMU here } //==============================================================================================end of main loop================================================= TDHistSet * GetHistSet(){return _subAnaHists;} void SetHistSet (TDHistSet * SubAnaHists){_subAnaHists=SubAnaHists;} void InitHists() { if(_debug)std::cout<<"initialising ana hists"<HistSetEmpty()) { _subAnaHists->AddAnaHist(new TDAnaHist("DileptonMass", "dilepton masses for Z peak", 66.0, 116.0, 120, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("ZDileptonMass", "dilepton masses for Z peak", 0.0, 120.0, 120, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("ZDileptonMassTCEPHX", "dilepton masses for TCE-PHX Z peak", 0.0, 120.0, 120, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("HepGZDileptonMass", "hepg dilepton masses for Z peak", 66.0, 116.0, 120, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("SameSignDilMass", "same sign dilepton masses", 66.0, 116.0, 120, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("WeightDileptonMass", "Weighted dilepton masses for Z peak", 60.0, 120.0, 120, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("WeightZDileptonMass", "Weighted dilepton masses for Z peak", 0.0, 120.0, 120, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("RickWeightDileptonMass","Rick Weighted dilepton masses for Z peak", 60.0, 120.0, 120, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("RickWeightZDileptonMass","Rick Weighted dilepton masses for Z peak", 0.0, 120.0, 120, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("NHJets", "Number of harmful Jets", 0.0, 8.0, 8, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("NJets", "Number of Jets", 0.0, 15.0, 15, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("JetEt", "JetEt", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("MissEt", "Missing Et", 0.0, 60.0, 30, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("EtSum", "Sum of Missing Energy", 0.0, 200.0, 50, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("LeptonEt", "Lepton Energy", 0.0, 30.0, 50, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("E/P", "E over P", 0.0, 4.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Isolbefore", "before lepton calorimeter isolation cut", 0.0, 0.2, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Isol", "after lepton calorimeter isolation cut", 0.0, 0.2, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("BigIsolbefore", "before lepton calorimeter isolation cut", 0.0, 1.4, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("BigIsol", "after lepton calorimeter isolation cut", 0.0, 1.4, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("BigIsolTCE", "TCE Trk Isolation", 0.0, 1.4, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("BigIsolCMUP", "CMUP Trk Isolation", 0.0, 1.4, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("BigIsolCMX", "CMX Trk Isolation", 0.0, 1.4, 100, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("TrackZ0", "Track z0", 0.0, 100.0, 100, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("Z0", "z0", 0.0, 100.0, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphi", "lepton angular separation", 0.0, 3.141592654, 8, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("dilDphi")->SetAxisLables("rads","events"); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphilike", ("dildphi in "+ _dilset.GetDilString()+"for like").c_str(), 0.0, 3.141592654, 200, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiee", "lepton angular separation of electrons", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("dilDphiee")->SetAxisLables("rads","events"); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiemu", "lepton angular separation of muon and electron", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("dilDphiemu")->SetAxisLables("rads","events"); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphimumu", "lepton angular separation of muons", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("dilDphimumu")->SetAxisLables("rads","events"); _subAnaHists->AddAnaHist(new TDAnaHist("TomdilDphi", ("dildphi in "+ _dilset.GetDilString()).c_str(), 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphi7708", ("dildphi in "+ _dilset.GetDilString()).c_str(), 0.0, 3.141592654, 20, _datasource.c_str(), "HistSetDesc")); //TD histograms corresponding to the dilDphiemu etc. above with high and low JES. _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiee_JESup", "dphi of electrons, high JES", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiee_JESdn", "dphi of electrons, low JES", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiemu_JESup", "dphi of electron and muon, high JES", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiemu_JESdn", "dphi of electron and muon, low JES", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphimumu_JESup", "dphi of muons, high JES", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphimumu_JESdn", "dphi of muons, low JES", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); //TD histograms corresponding to the dilDphiemu etc. above with high and low LES. _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiee_LESup", "dphi of electrons, high LES", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiee_LESdn", "dphi of electrons, low LES", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiemu_LESup", "dphi of electron and muon, high LES", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiemu_LESdn", "dphi of electron and muon, low LES", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphimumu_LESup", "dphi of muons, high LES", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphimumu_LESdn", "dphi of muons, low LES", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); //TD Lepton ID weight errors for the three channels: _subAnaHists->AddAnaHist(new TDAnaHist("RelWeightError_ee", "Relative Weights Error for electrons", 0.0, 0.1, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("RelWeightError_emu", "Relative Weights Error for electron and muon", 0.0, 0.1, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("RelWeightError_mumu", "Relative Weights Error for muons", 0.0, 0.1, 100, _datasource.c_str(), "HistSetDesc")); //TD histograms corresponding to the dilDphiemu etc. above with high and low PDF Errors //TD wait for implementation (boom boom). /*_subAnaHists->AddAnaHist(new TDAnaHist("dilDphiee_PDFup", "dphi of electrons, high PDF", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiee_PDFdn", "dphi of electrons, low PDF", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiemu_PDFup", "dphi of electron and muon, high PDF", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiemu_PDFdn", "dphi of electron and muon, low PDF", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphimumu_PDFup", "dphi of muons, high PDF", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _sbAnaHists->AddAnaHist(new TDAnaHist("dilDphimumu_PDFdn", "dphi of muons, low PDF", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc"));*/ //TD histograms corresponding to the dilDphiemu etc. above with high and low ISR Errors _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiee_ISRup", "dphi of electrons, high ISR", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiee_ISRdn", "dphi of electrons, low ISR", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiemu_ISRup", "dphi of electron and muon, high ISR", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiemu_ISRdn", "dphi of electron and muon, low ISR", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphimumu_ISRup", "dphi of muons, high ISR", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphimumu_ISRdn", "dphi of muons, low ISR", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); //TD histograms corresponding to the dilDphiemu etc. above with high and low Fake Errors _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiee_Fakeup", "dphi of electrons, high Fake", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiee_Fakedn", "dphi of electrons, low Fake", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiemu_Fakeup", "dphi of electron and muon, high Fake", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphiemu_Fakedn", "dphi of electron and muon, low Fake", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphimumu_Fakeup", "dphi of muons, high Fake", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphimumu_Fakedn", "dphi of muons, low Fake", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDphi_TMVA", "dphi from TMVA selection", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilDR", "dilepton dR", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("LeptonEt", "Lepton Et", 0.0, 30.0, 30, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Weight", ("Weight for" + _dilset.GetDilString()).c_str(), 0.7, 1.1, 80, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("WeightError", ("Weight Error for " + _dilset.GetDilString()).c_str(), 0.0, 0.1, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("RelWeightError", ("Relative Weight Error for " + _dilset.GetDilString()).c_str(), 0.0, 0.1, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("JetNumBeforeCut","Number of Jets in before Jet cut", 0.0, 10.0, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("JetNumBeforeCut")->SetAxisLables("# jets","events"); _subAnaHists->AddAnaHist(new TDAnaHist("MissingETMag","Missing Et before missing et cut", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("MissingETMag")->SetAxisLables("Missing Et (GeV)","events"); //_subAnaHists->AddAnaHist(new TDAnaHist("dilmassmin",("dil mass in"+ _dilset.GetDilString()+" before dil mass cut").c_str(), 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("dilmassmax","dilepton mass before dilepton mass cut", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("dilmassmax")->SetAxisLables("dilepton mass (GeV)","events"); _subAnaHists->AddAnaHist(new TDAnaHist("TotalEt","total Et in before total et cut", 0.0, 500.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("TotalEt")->SetAxisLables("total Et (GeV)","events"); //_subAnaHists->AddAnaHist(new TDAnaHist("Ht",("Ht"+ _dilset.GetDilString()+" before Ht cut").c_str(), 0.0, 500.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("LeadJetEt_anyN","Lead jet Et for all jets before Jet cut", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("LeadJetEt_anyN")->SetAxisLables("jet Et (GeV)","events"); _subAnaHists->AddAnaHist(new TDAnaHist("LeadJetEt_1Jet","Lead jet Et for one jet before Jet cut", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("LeadJetEt_1Jet")->SetAxisLables("jet Et (GeV)","events"); _subAnaHists->AddAnaHist(new TDAnaHist("LeadJetEt_2Jet","Lead jet Et for two jets in before Jet cut", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("LeadJetEt_2Jet")->SetAxisLables("jet Et (GeV)","events"); _subAnaHists->AddAnaHist(new TDAnaHist("SecondJetEt_2Jet","Second jet Et for two jets before Jet cut", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("SecondJetEt_2Jet")->SetAxisLables("jet Et (GeV)","events"); _subAnaHists->AddAnaHist(new TDAnaHist("Nm1JetNumBeforeCut",("Number of Jets in"+ _dilset.GetDilString()+" in Nm1 Jet cut").c_str(), 0.0, 10.0, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Nm1MissingETMag",("Missing Et in"+ _dilset.GetDilString()+" in Nm1 missing et cut").c_str(), 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("Nm1dilmassmin",("dil mass in"+ _dilset.GetDilString()+" in Nm1 dil mass cut").c_str(), 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Nm1dilmassmax",("dil mass in"+ _dilset.GetDilString()+" in Nm1 dil mass max cut").c_str(), 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Nm1TotalEt",("total et in"+ _dilset.GetDilString()+" in Nm1 total et cut").c_str(), 0.0, 500.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Nm1LeadJetEt_anyN",("Lead jet Et for all jets in"+ _dilset.GetDilString()+" in Nm1 Jet cut").c_str(), 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Nm1LeadJetEt_1Jet",("Lead jet Et for one jet in "+ _dilset.GetDilString()+" in Nm1 Jet cut").c_str(), 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Nm1LeadJetEt_2Jet",("Lead jet Et for two jets in "+ _dilset.GetDilString()+" in Nm1 Jet cut").c_str(), 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Nm1SecondJetEt_2Jet",("Second jet Et for two jets in "+ _dilset.GetDilString()+" in Nm1 Jet cut").c_str(), 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Missing_Et","Missing Et", 0.0, 250.0, 250, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->AddAnaHist(new TDAnaHist("dilDphi", ("dildphi in "+ _dilset.GetDilString()).c_str(), 0.0, 3.142, 6, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Lepton1Et",("highest lepton Et in "+ _dilset.GetDilString()).c_str(), 0.0, 100.0, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("Lepton2Et",("secondhighest lepton Et in "+ _dilset.GetDilString()).c_str(), 0.0, 100.0, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMPEtaPhi",("CMP EtaPhi in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("CMPEtaPhi")->SetAxisLables("eta","phi (rads)"); _subAnaHists->AddAnaHist(new TDAnaHist("CMPPhi",("CMP Phi in "+ _dilset.GetDilString()).c_str(), 0, (3.142*2), 240, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMXEtaPhi",("CMX EtaPhi in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMXDeanEtaPhi",("CMX DeanEtaPhi in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUEtaPhi",("CMU EtaPhi in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("CMUEtaPhi")->SetAxisLables("eta","phi (rads)"); _subAnaHists->AddAnaHist(new TDAnaHist("CMUPEtaPhi",("CMUP EtaPhi in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("CMUPEtaPhi")->SetAxisLables("eta","phi (rads)"); _subAnaHists->AddAnaHist(new TDAnaHist("CMIOEtaPhi",("CMIO EtaPhi in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMIOEtaPhiCMUP",("CMUP_CMIO EtaPhi of CMUP in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMIOEtaPhiCMIO",("CMUP_CMIO EtaPhi of CMIO in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMUPEtaPhiCMUP",("CMUP_CMUP EtaPhi of CMUP in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMUEtaPhiCMUP",("CMUP_CMU EtaPhi of CMUP in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMUEtaPhiCMU",("CMUP_CMU EtaPhi of CMU in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMPEtaPhiCMUP",("CMUP_CMP EtaPhi of CMUP in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMPEtaPhiCMP",("CMUP_CMP EtaPhi of CMP in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMXEtaPhiCMUP",("CMUP_CMX EtaPhi of CMUP in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMXEtaPhiCMX",("CMUP_CMX EtaPhi of CMX in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMX_CMIOEtaPhiCMX",("CMX_CMIO EtaPhi of CMX in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMX_CMIOEtaPhiCMIO",("CMX_CMIO EtaPhi of CMIO in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMX_CMUEtaPhiCMX",("CMX_CMU EtaPhi of CMX in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMX_CMUEtaPhiCMU",("CMX_CMU EtaPhi of CMU in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMX_CMPEtaPhiCMX",("CMX_CMP EtaPhi of CMX in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMX_CMPEtaPhiCMP",("CMX_CMP EtaPhi of CMP in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMX_CMXEtaPhiCMX",("CMX_CMX EtaPhi of CMX in "+ _dilset.GetDilString()).c_str(), -1.5, 1.5, 60, 0, (3.142*2), 60, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("TCE_TCEmass", "TCE_TCE Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("TCE_PHXmass", "TCE_PHX Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("PHX_PHXmass", "PHX_PHX Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMUPmass", "CMUP_CMUP Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMUmass", "CMUP_CMU Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMPmass", "CMUP_CMP Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMXmass", "CMUP_CMX Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_CMIOmass", "CMUP_CMIO Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMX_CMXmass", "CMX_CMX Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMX_CMUmass", "CMX_CMU Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMX_CMPmass", "CMX_CMP Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMX_CMIOmass", "CMX_CMIO Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMUP_BMUmass", "CMUP_BMU Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("CMX_BMUmass", "CMX_BMU Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("BMU_BMUmass", "BMU_BMU Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("BMU_CMPmass", "CMP_BMU Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("BMU_CMIOmass", "CMIO_BMU Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("BMU_CMUmass", "CMU_BMU Mass", 70.0, 120.0, 50, _datasource.c_str(), "HistSetDesc")); for(int type=DilType::TCE_TCE; type<=DilType::BMU_SCMIO; ++type) { _subAnaHists->AddAnaHist(new TDAnaHist(((_dilType.Int2String(type)) + " dilDphilike").c_str(), ((_dilType.Int2String(type)) + " dilDphilike").c_str(), 0.0, 3.141592654, 200, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->GetAnaHist(((_dilType.Int2String(type)) + " dilDphilike").c_str())->SetDraw(false); // _subAnaHists->AddAnaHist(new TDAnaHist(((_dilType.Int2String(type)) + " 1stleptonET").c_str(), // ((_dilType.Int2String(type)) + " 1stleptonET").c_str(), 0.0, 50.0, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist(((_dilType.Int2String(type)) + " weight").c_str(), ((_dilType.Int2String(type)) + " weight").c_str(), 0.7, 1.1, 80, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist(((_dilType.Int2String(type)) + " weight").c_str())->GetHist()->StatOverflows(kTRUE); _subAnaHists->GetAnaHist(((_dilType.Int2String(type)) + " weight").c_str())->SetDraw(false); _subAnaHists->AddAnaHist(new TDAnaHist(((_dilType.Int2String(type)) + " relweighterror").c_str(), ((_dilType.Int2String(type)) + " relweighterror").c_str(), 0.0, 0.1, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist(((_dilType.Int2String(type)) + " relweighterror").c_str())->GetHist()->StatOverflows(kTRUE); _subAnaHists->GetAnaHist(((_dilType.Int2String(type)) + " relweighterror").c_str())->SetDraw(false); _subAnaHists->AddAnaHist(new TDAnaHist(((_dilType.Int2String(type)) + " rawweight").c_str(), ((_dilType.Int2String(type)) + " rawweight").c_str(), 0.7, 1.1, 80, _datasource.c_str(), "HistSetDesc")); //_subAnaHists->GetAnaHist(((_dilType.Int2String(type)) + " rawweight").c_str())->SetDraw(false); } for(int leptype=LeptonType::TCE; leptype<=LeptonType::BMU; ++leptype) { _subAnaHists->AddAnaHist(new TDAnaHist(((_leptonType.Int2String(leptype)) + " leptonET").c_str(), ((_leptonType.Int2String(leptype)) + " leptonET").c_str(), 0.0, 50.0, 100, _datasource.c_str(), "HistSetDesc")); } _subAnaHists->AddAnaHist(new TDAnaHist("luminosity", "luminosity", 0.0, 1500.0, 1500, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("WWmetsig", "WW missing Et significance", 0.0, 16.0, 32, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("WWmetsig")->SetAxisLables("Missing Et significance","events"); _subAnaHists->AddAnaHist(new TDAnaHist("WWdilmass", "WW dilepton mass", 0.0, 250.0, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("WWdilmass")->SetAxisLables("Dilepton Mass (GeV)","events"); _subAnaHists->AddAnaHist(new TDAnaHist("WWmetmag", "WW missing Et", 0.0, 200.0, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("WWmetmag")->SetAxisLables("Missing Et (GeV)","events"); _subAnaHists->AddAnaHist(new TDAnaHist("WWsumEt", "WW total Et", 0.0, 600.0, 32, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("WWsumEt")->SetAxisLables("Total Et (GeV)","events"); _subAnaHists->AddAnaHist(new TDAnaHist("WWlepPt", "WW lepton pT", 0.0, 200.0, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->GetAnaHist("WWlepPt")->SetAxisLables("Lepton pT (GeV)","#leptons"); _subAnaHists->GetAnaHist("WeightError")->GetHist()->StatOverflows(kTRUE); _subAnaHists->GetAnaHist("Weight")->GetHist()->StatOverflows(kTRUE); _subAnaHists->AddAnaHist(new TDAnaHist("MatrixTest", "mattest", 160.0, 200.0, 20, _datasource.c_str(), "HistSetDesc")); std::cout<<"creating hists in "<<_datasource<AddAnaHist(new TDAnaHist("MVA_Cuts", "MVA_Cuts", 0, 2, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA_Cuts_cut1", "MVA_Cuts_cut1", 0, 2, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_Cuts", "MVA2_Cuts", 0, 2, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_Cuts_cut1", "MVA2_Cuts_cut1", 0, 2, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_Cuts_cut2", "MVA2_Cuts_cut2", 0, 2, 20, _datasource.c_str(), "HistSetDesc") ); } if (Use_Likelihood ) {_subAnaHists->AddAnaHist(new TDAnaHist("MVA_Likelihood", "MVA_Likelihood", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA_Likelihood_cut1", "MVA_Likelihood_cut1", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_Likelihood", "MVA2_Likelihood", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_Likelihood_cut1", "MVA2_Likelihood_cut1", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_Likelihood_cut2", "MVA2_Likelihood_cut2", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); } if (Use_LikelihoodD ) {_subAnaHists->AddAnaHist(new TDAnaHist("MVA_LikelihoodD", "MVA_LikelihoodD", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA_LikelihoodD_cut1", "MVA_LikelihoodD_cut1", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_LikelihoodD", "MVA2_LikelihoodD", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_LikelihoodD_cut1", "MVA2_LikelihoodD_cut1", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_LikelihoodD_cut2", "MVA2_LikelihoodD_cut2", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); } if (Use_PDERS ) {_subAnaHists->AddAnaHist(new TDAnaHist("MVA_PDERS", "MVA_PDERS", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA_PDERS_cut1", "MVA_PDERS_cut1", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_PDERS", "MVA2_PDERS", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_PDERS_cut1", "MVA2_PDERS_cut1", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_PDERS_cut2", "MVA2_PDERS_cut2", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); } if (Use_HMatrix ) {_subAnaHists->AddAnaHist(new TDAnaHist("MVA_HMatrix", "MVA_HMatrix", -1.25, 1.25, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA_HMatrix_cut1", "MVA_HMatrix_cut1", -1.25, 1.25, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_HMatrix", "MVA2_HMatrix", -1.25, 1.25, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_HMatrix_cut1", "MVA2_HMatrix_cut1", -1.25, 1.25, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_HMatrix_cut2", "MVA2_HMatrix_cut2", -1.25, 1.25, 20, _datasource.c_str(), "HistSetDesc") ); } if (Use_Fisher ) {_subAnaHists->AddAnaHist(new TDAnaHist("MVA_Fisher", "MVA_Fisher", -4, 4, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA_Fisher_cut1", "MVA_Fisher_cut1", -4, 4, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_Fisher", "MVA2_Fisher", -2, 2, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_Fisher_cut1", "MVA2_Fisher_cut1", -2, 2, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_Fisher_cut2", "MVA2_Fisher_cut2", -2, 2, 20, _datasource.c_str(), "HistSetDesc") ); } if (Use_CFMlpANN ) {_subAnaHists->AddAnaHist(new TDAnaHist("MVA_CFMlpANN", "Drell-Yan trained NN", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA_CFMlpANN_cut1", "MVA_CFMlpANN_cut1", 0, 0.1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN", "WW trained NN", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN_cut1", "MVA2_CFMlpANN_cut1", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN_cut2", "MVA2_CFMlpANN_cut2", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN_cut2_0", "MVA2_CFMlpANN_cut2_0", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN_cut2_1", "MVA2_CFMlpANN_cut2_1", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN_cut2_2", "MVA2_CFMlpANN_cut2_2", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN_cut2_3", "MVA2_CFMlpANN_cut2_3", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN_cut2_4", "MVA2_CFMlpANN_cut2_4", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN_cut2_5", "MVA2_CFMlpANN_cut2_5", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN_cut2_6", "MVA2_CFMlpANN_cut2_6", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN_cut2_7", "WW trained NN with Drell Yan cut", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN_cut2_8", "MVA2_CFMlpANN_cut2_8", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_CFMlpANN_cut2_9", "MVA2_CFMlpANN_cut2_9", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); } if (Use_TMlpANN ) {_subAnaHists->AddAnaHist(new TDAnaHist("MVA_TMlpANN", "MVA_TMlpANN", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA_TMlpANN_cut1", "MVA_TMlpANN_cut1", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_TMlpANN", "MVA2_TMlpANN", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_TMlpANN_cut1", "MVA2_TMlpANN_cut1", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_TMlpANN_cut2", "MVA2_TMlpANN_cut2", -1, 1, 20, _datasource.c_str(), "HistSetDesc") ); } if (Use_BDT ) {_subAnaHists->AddAnaHist(new TDAnaHist("MVA_BDT", "MVA_BDT", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA_BDT_cut1", "MVA_BDT_cut1", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_BDT", "MVA2_BDT", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_BDT_cut1", "MVA2_BDT_cut1", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); _subAnaHists->AddAnaHist(new TDAnaHist("MVA2_BDT_cut2", "MVA2_BDT_cut2", 0, 1, 20, _datasource.c_str(), "HistSetDesc") ); } } //TD histograms to check NN input variables _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_LepAEn", "NN Variable LepAEn", 0.0, 100.0, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_LepBEn", "NN Variable LepBEn", 0.0, 100.0, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_dilmass", "NN Variable dilmass", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_metmag", "NN Variable metmag", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_addEt", "NN Variable addEt", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_dPhiMetLJ", "NN Variable dPhiMetLJ", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_ntightjets", "NN Variable tightjets", 0.0, 10.0, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_jet1_Et", "NN Variable jet1_Et", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_jet2_Et", "NN Variable jet2_Et", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_dildphi", "NN Variable dildphi", 0.0, 3.141592654, 20, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_lepR", "NN Variable lepR", 0.0, 7.0, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_metsig", "NN Variable metsig", 0.0, 16.0, 32, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_diltype", "NN Variable diltype", 0, 2, 2, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_Mt_ll", "NN Variable Mt_ll", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_Mt_llMet", "NN Variable Mt_llMet", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_Mt_All", "NN Variable Mt_All", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_Isr", "NN Variable Isr", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_DilPhillCorr","NN Variable DilPhillCorr", -1, 3.141592654, 20, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_LepAEn", "NN Variable Metsig cut LepAEn", 0.0, 100.0, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_LepBEn", "NN Variable Metsig cut LepBEn", 0.0, 100.0, 100, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_dilmass", "NN Variable Metsig cut dilmass", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_metmag", "NN Variable Metsig cut metmag", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_addEt", "NN Variable Metsig cut addEt", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_dPhiMetLJ", "NN Variable Metsig cut dPhiMetLJ", 0.0, 3.141592654, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_ntightjets", "NN Variable Metsig cut tightjets", 0.0, 10.0, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_jet1_Et", "NN Variable Metsig cut jet1_Et", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_jet2_Et", "NN Variable Metsig cut jet2_Et", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_dildphi", "NN Variable Metsig cut dildphi", 0.0, 3.141592654, 20, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_lepR", "NN Variable Metsig cut lepR", 0.0, 7.0, 10, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_metsig", "NN Variable Metsig cut metsig", 0.0, 16.0, 32, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_diltype", "NN Variable Metsig cut diltype", 0, 2, 2, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_Mt_ll", "NN Variable Metsig cut Mt_ll", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_Mt_llMet", "NN Variable Metsig cut Mt_llMet", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_Mt_All", "NN Variable Metsig cut Mt_All", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_Isr", "NN Variable Metsig cut Isr", 0.0, 200.0, 40, _datasource.c_str(), "HistSetDesc")); _subAnaHists->AddAnaHist(new TDAnaHist("NNVar_MetSigCut_DilPhillCorr","NN Variable Metsig cut DilPhillCorr", -1, 3.141592654, 20, _datasource.c_str(), "HistSetDesc")); } } } const char * GetDataSource(){return _datasource.c_str();} int HistFill(const char * histname, double fillvalue, double weight); int HistFill(const char * histname, double fillvalue, double fillvalue2, double weight); double GetDilWeight(); void DebugOut(char * statement, bool condition=true) { if(_debug && condition) std::cout<0.0) rho = (zCOT - z0) / tan(lambda); else rho = -(zCOT + z0) / tan(lambda); return rho; } TDAnaCutSet * GetAnaCutSet(){return _anaCutSet;} void SetTomUnbinned() { _tomUnbinnedTree = new TTree("TomTree", "events passing non-MH-dependent cuts"); _tomUnbinnedTree->Branch("run", &run, "run/I"); _tomUnbinnedTree->Branch("evt", &evt, "evt/I"); _tomUnbinnedTree->Branch("metmag", _cutInterface->metmag(), "metmag/F"); _tomUnbinnedTree->Branch("addEt", _cutInterface->addEt(), "addEt/F"); _tomUnbinnedTree->Branch("dildphi", &dildphi, "dildphi/F"); _tomUnbinnedTree->Branch("dilmass", &dilmass, "dilmass/F"); // _tomUnbinnedTree->Branch("dilmass", &dilmass, "passed/I"); } void WriteTomUnbinned() { //char buffer[200]; // sprintf(buffer,"results/hists_%s-%s_%d-%d.root",_datasource.c_str(), (_dilset.GetDilString().c_str()), _weighttype, ((int)_higgsMass)); TFile* f= new TFile("results/DataUnbinned.root","recreate"); //char buffer[200]; //sprintf(buffer,"%s",(_DataSourcePrefix + "-" + _Name).c_str()); _tomUnbinnedTree->Write("",TObject::kOverwrite); f->Close(); } void SetDescVar() { _descVar = new TTree("TDDescVar", "descriminating variables"); _descVar->Branch("LepAEn", _cutInterface->LepAEn(), "LepAEn/F"); // _descVar->Branch("LepACalIsol", _cutInterface->LepACalIsol(), "LepACalIsol/F"); // _descVar->Branch("LepATrkIsol", _cutInterface->LepATrkIsol(), "LepATrkIsol/F"); _descVar->Branch("LepBEn", _cutInterface->LepBEn(), "LepBEn/F"); // _descVar->Branch("LepBCalIsol", _cutInterface->LepBCalIsol(), "LepBCalIsol/F"); // _descVar->Branch("LepBTrkIsol", _cutInterface->LepBTrkIsol(), "LepBTrkIsol/F"); _descVar->Branch("dilmass", _cutInterface->dilmass(), "dilmass/F"); // _descVar->Branch("nhjets", _cutInterface->nhjets(), "nhjets/F"); // _descVar->Branch("nmjets", _cutInterface->nmjets(), "nmjets/F"); // _descVar->Branch("nljets", _cutInterface->nljets(), "nljets/F"); _descVar->Branch("metmag", _cutInterface->metmag(), "metmag/F"); _descVar->Branch("ChargeProduct", _cutInterface->ChargeProduct(), "ChargeProduct/I"); _descVar->Branch("addEt", _cutInterface->addEt(), "addEt/F"); _descVar->Branch("dPhiMetLJ", _cutInterface->dPhiMetLJ(), "dPhiMetLJ/F"); _descVar->Branch("ntightjets", _cutInterface->ntightjets(), "ntightjets/F"); _descVar->Branch("jet1_Et", _cutInterface->jet1_Et(), "jet1_Et/F"); _descVar->Branch("jet2_Et", _cutInterface->jet2_Et(), "jet2_Et/F"); // _descVar->Branch("jet2_Et", &_datasourceint, "jet2_Et/I");//TD fix to check the correlation _descVar->Branch("weight", &weight, "weight/F"); _descVar->Branch("rand", &_myrand, "rand/F"); _descVar->Branch("type",&_datasourceint,"type/I"); _descVar->Branch("dildphi",&dildphi,"dildphi/F"); _descVar->Branch("metsig",&metsig,"metsig/F"); _descVar->Branch("lepR",&_lepR,"lepR/F"); _descVar->Branch("diltype",&_NNdiltype,"diltype/F"); _descVar->Branch("Mt_ll", &_Mt_ll, "Mt_ll/F"); _descVar->Branch("Mt_llMet", &_Mt_llMet, "Mt_llMet/F"); _descVar->Branch("Mt_All", &_Mt_All, "Mt_All/F"); _descVar->Branch("Isr", &_Isr, "Isr/F"); _descVar->Branch("DilPhillCorr",&_DilPhillCorr, "DilPhillCorr/F"); // _descVar->Branch("",&,"/F"); _descVar2 = new TTree("TDDescVar2", "descriminating variables"); _descVar2->Branch("LepAEn", _cutInterface->LepAEn(), "LepAEn/F"); // _descVar2->Branch("LepACalIsol", _cutInterface->LepACalIsol(), "LepACalIsol/F"); // _descVar2->Branch("LepATrkIsol", _cutInterface->LepATrkIsol(), "LepATrkIsol/F"); _descVar2->Branch("LepBEn", _cutInterface->LepBEn(), "LepBEn/F"); // _descVar2->Branch("LepBCalIsol", _cutInterface->LepBCalIsol(), "LepBCalIsol/F"); // _descVar2->Branch("LepBTrkIsol", _cutInterface->LepBTrkIsol(), "LepBTrkIsol/F"); _descVar2->Branch("dilmass", _cutInterface->dilmass(), "dilmass/F"); // _descVar2->Branch("nhjets", _cutInterface->nhjets(), "nhjets/F"); // _descVar2->Branch("nmjets", _cutInterface->nmjets(), "nmjets/F"); // _descVar2->Branch("nljets", _cutInterface->nljets(), "nljets/F"); _descVar2->Branch("metmag", _cutInterface->metmag(), "metmag/F"); _descVar2->Branch("ChargeProduct", _cutInterface->ChargeProduct(), "ChargeProduct/I"); _descVar2->Branch("addEt", _cutInterface->addEt(), "addEt/F"); _descVar2->Branch("dPhiMetLJ", _cutInterface->dPhiMetLJ(), "dPhiMetLJ/F"); _descVar2->Branch("ntightjets", _cutInterface->ntightjets(), "ntightjets/F"); _descVar2->Branch("jet1_Et", _cutInterface->jet1_Et(), "jet1_Et/F"); _descVar2->Branch("jet2_Et", _cutInterface->jet2_Et(), "jet2_Et/F"); // _descVar2->Branch("jet2_Et", &_datasourceint, "jet2_Et/I");//TD fix to check the correlation _descVar2->Branch("weight", &weight, "weight/F"); _descVar2->Branch("rand", &_myrand2, "rand/F"); _descVar2->Branch("type",&_datasourceint,"type/I"); _descVar2->Branch("dildphi",&dildphi,"dildphi/F"); _descVar2->Branch("metsig",&metsig,"metsig/F"); _descVar2->Branch("lepR",&_lepR,"lepR/F"); _descVar2->Branch("diltype",&_NNdiltype,"diltype/F");//TD only whether or not there are the same type of leptons (DY has ony same type) _descVar2->Branch("Mt_ll", &_Mt_ll, "Mt_ll/F"); _descVar2->Branch("Mt_llMet", &_Mt_llMet, "Mt_llMet/F"); _descVar2->Branch("Mt_All", &_Mt_All, "Mt_All/F"); _descVar2->Branch("Isr", &_Isr, "Isr/F"); _descVar2->Branch("DilPhillCorr",&_DilPhillCorr, "DilPhillCorr/F"); if(_SaveRjn)_rootJetNetfile<<"LepAEn"<& Getalldilcuts(){return _alldilcuts;} TDRunInfoSet& GetRunInfoSet(){return _sampleRunInfo;} TDRunInfo GetRunInfo(){return _sampleRunInfo.GetSumTDRunInfo();} double GetInputEvents(){return _genNum;}//TD worked out differtently!!!!! double GetInputEvents0d(){return _genNum0d;}//TD quick ifxes - should really take a runrange as an arguement. double GetInputEvents0h(){return _genNum0h;} double GetInputEvents0i(){return _genNum0i;} void SetInputEvents(int gennum){_genNum=gennum;} double GetInputEvents(TDRunSet& set){return _sampleRunInfo.GetSumTDRunInfo(set)._hepgZ;} double GetInputEvents(DilType::dilepton_type thedilType) {if(_stn)return _sampleRunInfo.GetSumTDRunInfo(*(_hwwlvlvGoodRun13.GetRunSet(thedilType)))._hepgZ; return _sampleRunInfo.GetSumTDRunInfo(*(_hwwlvlvGoodRun.GetRunSet(thedilType)))._hepgZ;} double GetInputEvents(int thedilType)//TD worked out differtently!!!!! { return _dilGenNum[thedilType]; } //{if(_stn)return _sampleRunInfo.GetSumTDRunInfo(*(_hwwlvlvGoodRun13.GetRunSet(_dilType.Int2Type(thedilType))))._hepgZ; // return _sampleRunInfo.GetSumTDRunInfo(*(_hwwlvlvGoodRun.GetRunSet(_dilType.Int2Type(thedilType))))._hepgZ;} double GetGoodGenMassZ(){return _sampleRunInfo.GetSumTDRunInfo()._goodZ;} double GetGoodGenMassZ(TDRunSet& set){return _sampleRunInfo.GetSumTDRunInfo(set)._goodZ;} double GetGoodGenMassZ(DilType::dilepton_type thedilType) {if(_stn)return _sampleRunInfo.GetSumTDRunInfo(*(_hwwlvlvGoodRun13.GetRunSet(thedilType)))._goodZ; return _sampleRunInfo.GetSumTDRunInfo(*(_hwwlvlvGoodRun.GetRunSet(thedilType)))._goodZ;} double GetGoodGenMassZ(int thedilType) {if(_stn)return _sampleRunInfo.GetSumTDRunInfo(*(_hwwlvlvGoodRun13.GetRunSet(_dilType.Int2Type(thedilType))))._goodZ; return _sampleRunInfo.GetSumTDRunInfo(*(_hwwlvlvGoodRun.GetRunSet(_dilType.Int2Type(thedilType))))._goodZ;} double GetGoodGenZ(){return _goodZGenNum;} //TD worked out differtently!!!!! double GetGoodGenZ(TDRunSet& set){return _sampleRunInfo.GetSumTDRunInfo(set)._goodobsp;} double GetGoodGenZ(DilType::dilepton_type thedilType) {if(_stn)return _sampleRunInfo.GetSumTDRunInfo(*(_hwwlvlvGoodRun13.GetRunSet(thedilType)))._goodobsp; return _sampleRunInfo.GetSumTDRunInfo(*(_hwwlvlvGoodRun.GetRunSet(thedilType)))._goodobsp;} double GetGoodGenZ(int thedilType) { return _goodZDilGenNum[thedilType]; } std::vector GetGoodZDileptonVector(){return _alldilGoodZ;} double GetGoodZDilepton(DilType::dilepton_type thedilType){return _alldilGoodZ[thedilType];} double GetGoodZDilepton(int thedilType){return _alldilGoodZ[thedilType];} double GetGoodZ(){return _totZevents;} std::vector GetGoodZDileptonVector_mycut(){return _alldilGoodZ_mycut;} double GetGoodZDilepton_mycut(DilType::dilepton_type thedilType){return _alldilGoodZ_mycut[thedilType];} double GetGoodZDilepton_mycut(int thedilType){return _alldilGoodZ_mycut[thedilType];} //double GetGoodZ_mycut(){return _totZevents_mycut;} std::vector GetSSDileptonVector_mycut(){return _alldilSS_mycut;} double GetSSDilepton_mycut(int thedilType){return _alldilSS_mycut[thedilType];} std::vector GetGoodZDileptonVector_1020cut(){return _alldilGoodZ_1020cut;} double GetGoodZDilepton_1020cut(DilType::dilepton_type thedilType){return _alldilGoodZ_1020cut[thedilType];} double GetGoodZDilepton_1020cut(int thedilType){return _alldilGoodZ_1020cut[thedilType];} std::vector GetSSDileptonVector_1020cut(){return _alldilSS_1020cut;} double GetSSDilepton_1020cut(int thedilType){return _alldilSS_1020cut[thedilType];} int GetFailGoodRun(int thedilType){return _failgoodrun[thedilType];} int GetFailExtraGoodRun(int thedilType){return _failextragoodrun[thedilType];} int GetRawDilNumber(int thedilType){return _rawDilNumber[thedilType];} int GetDataSourceInt(){return _datasourceint;} std::vector GetSSDileptonVector(){return _alldilSS;} double GetSSDilepton(int thedilType) { if(thedilType>DilType::CMX_CMIO) { std::cout<<"out of range"<GetAnaHist("luminosity")->GetHist()->GetMean();} double DeanDetEta(double const eta, double const z0); std::vector GetGoodWW(){return _goodWW;} double GetGoodWW(int diltype){return _goodWW[diltype];} double GetTotGoodWW(){return _totWW;} float GetXS(){return _xs;} float GetScaleforNormalisation(){//std::cout<<"lum: "<<_alldilLums[0]<); protected: TDHistSet * _subAnaHists; std::string _datasource; bool _isdata; bool _debug; ofstream fitinfo; ofstream filedump; ofstream _runsfile; ofstream _anafiledump; TDCanvMan * CanvMan1; int _mydiltype; double maxweight; LeptonType _leptonType; DilType _dilType; int Zinwindow; TDMinMax runmm; TDMinMax evtmm; TDMinMax weightmm; TDMinMax dilweightmm; double cutisol; bool _passAll; TDMtupCutInterface * _cutInterface; TDAnaCutSet * _anaCutSet; TDAnaCutSet * _anaCutSetee; TDAnaCutSet * _anaCutSetemu; TDAnaCutSet * _anaCutSetmumu; TDAnaCutSet * _anaCutSet0d; TDAnaCutSet * _anaCutSet0h; TDAnaCutSet * _anaCutSet0i; TDAnaCutSet * _anaCutSet0h0i; TDMtupCutInterface_JESup * _cutInterface_JESup;//TD cut sets and intefaces for JES systematic errors TDAnaCutSet * _anaCutSet_JESup; TDMtupCutInterface_JESdn * _cutInterface_JESdn; TDAnaCutSet * _anaCutSet_JESdn; TDMtupCutInterface_LESup * _cutInterface_LESup;//TD cut sets and intefaces for LES systematic errors TDAnaCutSet * _anaCutSet_LESup; TDMtupCutInterface_LESdn * _cutInterface_LESdn; TDAnaCutSet * _anaCutSet_LESdn; TDDilSetBMU _dilset; int _weighttype; DilWeights * _dilWeight; TDhwwlvlvGoodRun _hwwlvlvGoodRun; TDhwwlvlvGoodRun13 _hwwlvlvGoodRun13; TDRunSet _runstoignore; int _thisrun; //TD individual run counters double _thisZevents; double _thisSS; TDRunSet _goodruns; TDUniqueMap _uniqueEvents; std::vector _alldilcuts; TDRunInfoSet _sampleRunInfo; double _totZevents; double _totSS; double _totWW; std::vector _alldilGoodZ; std::vector _alldilSS; std::vector _alldilGoodZ_mycut; std::vector _alldilSS_mycut; std::vector _alldilGoodZ_1020cut; std::vector _alldilSS_1020cut; std::vector _alldilLums; std::vector _goodWW; std::vector _failgoodrun; std::vector _failextragoodrun; std::vector _rawDilNumber; //TDRunInfoSet _sampleRunInfo; std::vector _dilGenNum; //it seems with some root files, this has problems deleting itself, probably due to memory over run. //TDRunInfoSet _debugrunevt; std::vector _goodZDilGenNum; //std::vector _alldildumps; float _higgsMass; std::ofstream& _cutblockLat; TTree * _descVar; TTree * _descVar2; //bool _descVarSet; TDHistSet _dileptonmasshists; //int _color; TDRunSet _debugruns; TTree * _tomUnbinnedTree; int _minRun; int _maxRun; TDRunInfoSet _debugrunevt; TDUniqueMap _debugEvents; int _datasourceint; float weight; float rawweight; float luminosityweight; float gennumberweight; float goodZweight; float _myrand; float _myrand2; TRandom _random; std::ofstream _rootJetNetfile; bool _stn; int _genNum; int _genNum0d; int _genNum0h; int _genNum0i; int _goodZGenNum; int _badCMXRCot; int _badCMXWedge; bool _mircea; float _xs; // int dilep1020; float _lowestlumback; // --------------------------------------------------------------- // choose MVA methods to be trained + tested bool Use_Cuts; bool Use_Likelihood; bool Use_LikelihoodD; bool Use_PDERS; bool Use_HMatrix; bool Use_Fisher; bool Use_CFMlpANN; bool Use_TMlpANN; bool Use_BDT;//_GiniIndex; // default BDT method //bool Use_BDT_CrossEntro; //bool Use_BDT_SdivStSpB; //bool Use_BDT_MisClass; //bool Use_BDT_Bagging_Gini; // --------------------------------------------------------------- bool EvaluateVariables; // perform evaluation for each input variable // --------------------------------------------------------------- TMVA::Reader *reader; vector* inputVars; TMVA::Reader *reader2; bool initTMVA; float _lepR; float _NNdiltype; TMultiLayerPerceptron * _myNN; bool _initTMLP; TH1F * _ISRHist; TH1F * _ISRHistUp; TH1F * _ISRHistDn; //DFakeRates _fakes; bool _initFakes; std::vector * _fakevectord; std::vector * _fakevectorh; std::vector * _fakevectori; int _matTest; bool _SaveRjn; bool _useSCMIO; float _Mt_ll; float _Mt_llMet; float _Mt_All; float _Isr; float _DilPhillCorr; }; #endif