Skip to content

Commit

Permalink
Merge pull request #103 from jjacob/master
Browse files Browse the repository at this point in the history
Updates for running on 7TeV 53X nTuples.
  • Loading branch information
senkin committed Jul 22, 2014
2 parents 12bd625 + 285599d commit d7f5c65
Show file tree
Hide file tree
Showing 16 changed files with 1,333 additions and 654 deletions.
Binary file added data/Data_PUDist_2011Full_64600mb_June2014.root
Binary file not shown.
Binary file added data/Data_PUDist_2011Full_71400mb_June2014.root
Binary file not shown.
Binary file not shown.
17 changes: 13 additions & 4 deletions interface/DataTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,23 @@ enum value {
W3Jets,
W4Jets,
Zjets,
//2012 DY samples
// 2012 DY samples
Z1Jet,
Z2Jets,
Z3Jets,
Z4Jets,
// 2011 QCD samples
QCD_BCtoE_Pt20to30,
QCD_BCtoE_Pt30to80,
QCD_BCtoE_Pt80to170,
QCD_EMEnriched_Pt20to30,
QCD_EMEnriched_Pt30to80,
QCD_EMEnriched_Pt80to170,
QCD_EMEnriched_Pt170to250,
QCD_EMEnriched_Pt250to350,
QCD_EMEnriched_Pt350,
QCD_MuEnrichedPt15_Pt20,
//2012 QCD samples
// 2012 QCD samples
QCD_BCtoE_Pt20_30,
QCD_BCtoE_Pt30_80,
QCD_BCtoE_Pt80_170,
Expand All @@ -48,7 +52,7 @@ enum value {
QCD_EMEnriched_Pt80_170,
QCD_EMEnriched_Pt170_250,
QCD_EMEnriched_Pt250_350,
QCD_EMEnriched_Pt350,
//QCD_EMEnriched_Pt350, // commented out as it has the same name as for 2011 a few lines above
QCD_MuEnrichedPt15_Pt_20,
QCD_MuEnrichedPt5_Pt15to20,
QCD_MuEnrichedPt5_Pt20to30,
Expand Down Expand Up @@ -138,12 +142,16 @@ const boost::array<std::string, DataType::NUMBER_OF_DATA_TYPES> names = { {
"DY2JetsToLL", //
"DY3JetsToLL", //
"DY4JetsToLL", //
//2011 QCD Samples
"QCD_Pt-20to30_BCtoE", //
"QCD_Pt-30to80_BCtoE", //
"QCD_Pt-80to170_BCtoE", //
"QCD_Pt-20to30_EMEnriched", //
"QCD_Pt-30to80_EMEnriched", //
"QCD_Pt-80to170_EMEnriched", //10
"QCD_Pt-170to250_EMEnriched", //
"QCD_Pt-250to350_EMEnriched", //
"QCD_Pt-350_EMEnriched", //
"QCD_Pt-20_MuEnrichedPt-15", //
//2012 QCD samples
"QCD_Pt_20_30_BCtoE", //
Expand All @@ -157,7 +165,8 @@ const boost::array<std::string, DataType::NUMBER_OF_DATA_TYPES> names = { {
"QCD_Pt_80_170_EMEnriched", //
"QCD_Pt_170_250_EMEnriched", //
"QCD_Pt_250_350_EMEnriched", //
"QCD_Pt_350_EMEnriched", //
//"QCD_Pt_350_EMEnriched", // commented out as it has the same name as for 2011 a few lines above
//2011 & 2012 Muon QCD samples
"QCD_Pt_20_MuEnrichedPt_15", //
"QCD_Pt-15to20_MuEnrichedPt5", //
"QCD_Pt-20to30_MuEnrichedPt5", //
Expand Down
61 changes: 61 additions & 0 deletions interface/EventWeightProvider.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,5 +166,66 @@ const boost::array<double, 60> Summer2012 = { {
1.570E-05,
5.005E-06} };

const boost::array<double, 60> Summer11Leg = { {
1.30976e-05,
0.000148266,
0.00226073,
0.030543,
0.0868303,
0.120295,
0.124687,
0.110419,
0.0945742,
0.0837875,
0.0774277,
0.0740595,
0.0676844,
0.0551203,
0.0378357,
0.0210203,
0.00918262,
0.00309786,
0.000808509,
0.000168568,
3.02344e-05,
5.16455e-06,
8.83185e-07,
1.43975e-07,
2.07228e-08,
2.51393e-09,
2.52072e-10,
2.07328e-11,
1.39369e-12,
7.63843e-14,
3.4069e-15,
1.23492e-16,
3.63059e-18,
8.53277e-20,
1.33668e-22,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0} };

#endif /* EVENTWEIGHTPROVIDER_H_ */
174 changes: 88 additions & 86 deletions python/DataSetInfo_7TeV.py

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions python/DataSetInfo_8TeV.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,8 @@
datasetInfo['QCD_Pt-20to30_EMEnriched'] = {"cross-section": 0.2355e9 * 0.0073, "NumberOfProcessedEvents":34607077}
datasetInfo['QCD_Pt-30to80_EMEnriched'] = {"cross-section": 0.0593e9 * 0.059, "NumberOfProcessedEvents":70376046}
datasetInfo['QCD_Pt-80to170_EMEnriched'] = {"cross-section": 0.906e6 * 0.148, "NumberOfProcessedEvents":8150672}
datasetInfo['QCD_Pt-170to250_EMEnriched'] = {"cross-section": 0.906e6 * 0.148, "NumberOfProcessedEvents":8150672}
datasetInfo['QCD_Pt-250to350_EMEnriched'] = {"cross-section": 0.906e6 * 0.148, "NumberOfProcessedEvents":8150672}
datasetInfo['QCD_Pt-350_EMEnriched'] = {"cross-section": 0.906e6 * 0.148, "NumberOfProcessedEvents":8150672}
#Higgs
datasetInfo['TTH_Inclusive_M-125'] = {"cross-section": 0.1293, "NumberOfProcessedEvents":993656}
142 changes: 81 additions & 61 deletions python/master_2011_53X_cfg.py

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions python/test_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@
JetSmearingSystematic = 0

#Apply Top Pt Reweighting
applyTopPtReweighting = True
applyTopPtReweighting = False

#Lepton Scale Factors
ElectronScaleFactorSystematic = 0
MuonScaleFactorSystematic = 0

elif centerOfMassEnergy == 7:
#File for pile-up re-weighting
if nTuple_version == 8 or nTuple_version == 10:
if nTuple_version == 8 or nTuple_version > 10:
#integrated luminosity the MC simulation will be scaled to
lumi = 5050#pb-1
PUFile = toolsFolder + "data/PileUp_2011_truth_finebin_68000microbarn.root"
PUFile = toolsFolder + "data/Data_PUDist_2011Full_central_68000mb_June2014.root"
#+5%
# PUFile = toolsFolder + "data/PileUp_2011_truth_finebin_71400microbarn.root"
# PUFile = toolsFolder + "data/Data_PUDist_2011Full_71400mb_June2014.root"
#-5%
# PUFile = toolsFolder + "data/PileUp_2011_truth_finebin_64600microbarn.root"
# PUFile = toolsFolder + "data/Data_PUDist_2011Full_64600mb_June2014.root"

#apply the met corrections
applyMetSysShiftCorr = False
Expand All @@ -71,9 +71,9 @@
produceFitterASCIIoutput = False
inputFiles = [
'/storage/TopQuarkGroup/data/2012/SingleElectron/nTuple_v10_Run2012D-22Jan2013-v1_AOD_GoldenJSON_LeptonPlus3Jets/*.root' # 53X 8TeV data
# '/storage/TopQuarkGroup/mc/8TeV/LeptonPlus3JetsSkim/TTJets_MassiveBinDECAY_TuneZ2star_8TeV-madgraph-tauola/nTuple_v10_Summer12_DR53X-PU_S10_START53_V7C-v1_LeptonPlus3Jets/*.root' #53X 8TeV MC
# '/storage/TopQuarkGroup/data/2011/ElectronHad/nTuple_v10_Run2011A-12Oct2013-v1_53X_GoldenJSON_LeptonPlus3Jets/*.root' # 53X 7TeV data
# ''53X 7TeV MC not available yet
# '/storage/TopQuarkGroup/mc/8TeV/LeptonPlus3JetsSkim/TTJets_MassiveBinDECAY_TuneZ2star_8TeV-madgraph-tauola/nTuple_v10_Summer12_DR53X-PU_S10_START53_V7C-v1_LeptonPlus3Jets/*.root' # 53X 8TeV MC
# '/storage/TopQuarkGroup/data/2011/ElectronHad/nTuple_v11_Run2011B-12Oct2013-v1_GoldenJSON_LeptonPlus3Jets/*.root' # 53X 7TeV data
# '/storage/TopQuarkGroup/mc/7TeV/v11/LeptonPlus3JetsSkim/TTJets_MSDecays_central_TuneZ2_7TeV-madgraph-tauola/nTuple_v11_Summer11LegDR-PU_S13_START53_LV6-v1_LeptonPlus3Jets/*.root'# 53X 7TeV MC
# '/storage/TopQuarkGroup/data/2011/ElectronHad/nTuple_v10_Run2011B-19Nov2011-v1_44X_GoldenJSON_LeptonPlus3Jets/*.root' #44X 7TeV data
# '/storage/TopQuarkGroup/mc/7TeV/v10/LeptonPlus3JetsSkim/TTJets_TuneZ2_7TeV-madgraph-tauola_with_genjet_properties/nTuple_v10_Fall11-PU_S6_START44_V9B-v1_LeptonPlus3Jets/*.root' #44X 7TeV MC
]
Expand All @@ -89,4 +89,4 @@
elif centerOfMassEnergy == 8:
datasetInfoFile = toolsFolder + "python/DataSetInfo_8TeV.py"

custom_file_suffix = "TEST"
custom_file_suffix = "TEST"
5 changes: 5 additions & 0 deletions src/Analysers/METAnalyser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ void METAnalyser::analyse(const EventPtr event) {
continue;
const METPointer met(event->MET(metType));
histMan_->setCurrentHistogramFolder(histogramFolder_ + "/" + prefix);
histMan_->H1D("MET")->Fill(met->et());
histMan_->H1D_BJetBinned("MET")->Fill(met->et(), weight_);
if (index != METAlgorithm::GenMET && !event->isRealData()) {
histMan_->H2D_BJetBinned("RecoMET_vs_GenMET")->Fill(event->GenMET()->et(), met->et(), weight_);
}
//do not fill other histograms for met systematics
if ((index > METAlgorithm::patType1p2CorrectedPFMet) && (index != METAlgorithm::recoMetPFlow))
continue;
histMan_->H1D("MET_phi")->Fill(met->phi(), weight_);
histMan_->H1D_BJetBinned("MET_phi")->Fill(met->phi(), weight_);
histMan_->H1D_BJetBinned("METsignificance")->Fill(met->significance(), weight_);
histMan_->H2D_BJetBinned("METsignificance_vs_MET")->Fill(met->et(), met->significance(), weight_);
Expand Down Expand Up @@ -81,6 +83,7 @@ void METAnalyser::createHistograms() {
continue;
std::string prefix = METAlgorithm::prefixes.at(index);
histMan_->setCurrentHistogramFolder(histogramFolder_ + "/" + prefix);
histMan_->addH1D("MET", "Missing transverse energy; #slash{E}_{T}/GeV; events/5 GeV", 400, 0, 2000);
histMan_->addH1D_BJetBinned("MET", "Missing transverse energy; #slash{E}_{T}/GeV; events/5 GeV", 400, 0, 2000);
histMan_->addH1D_BJetBinned("ST", "ST;ST [GeV]; Events/5 GeV", 600, 0, 3000);
histMan_->addH1D_BJetBinned("WPT", "WPT;WPT [GeV]; Events/GeV", 1000, 0, 1000);
Expand All @@ -93,6 +96,8 @@ void METAnalyser::createHistograms() {
//do not create other histograms for met systematics
if ((index > METAlgorithm::patType1p2CorrectedPFMet) && (index != METAlgorithm::recoMetPFlow))
continue;
histMan_->addH1D("MET_phi", "#phi(Missing transverse energy);#phi(#slash{E}_{T});Events/0.1", 80, -4,
4);
histMan_->addH1D_BJetBinned("MET_phi", "#phi(Missing transverse energy);#phi(#slash{E}_{T});Events/0.1", 80, -4,
4);
histMan_->addH1D_BJetBinned("METsignificance", "METsignificance; #slash{E}_{T} significance", 1000, 0, 1000);
Expand Down
Loading

0 comments on commit d7f5c65

Please sign in to comment.