Skip to content

Commit

Permalink
Merge pull request #156 from kreczko/merge-run1-into-run2
Browse files Browse the repository at this point in the history
[MRG] Merge run1 into run2
  • Loading branch information
EmyrClement committed May 20, 2015
2 parents 268958d + dd8faea commit e25e377
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 49 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Check if cmake has the required version
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
set(PROJECT_NAME_STR AnalysisSoftware)
set(PROJECT_LIB_NAME BristolAnalysisTools)
PROJECT(${PROJECT_NAME_STR})
set(PROJECT_LIB_NAME BristolAnalysisTools)

Expand Down Expand Up @@ -93,6 +94,9 @@ include_directories(${COMMON_INCLUDES})
file(GLOB TEST_SRC_FILES ${PROJECT_SOURCE_DIR}/test/*.cpp)
add_executable(${PROJECT_TEST_NAME} ${TEST_SRC_FILES} )
target_link_libraries(${PROJECT_TEST_NAME}
${Boost_LIBRARIES}
${PYTHON_LIBRARIES}
${ROOT_LIBRARIES}
${PROJECT_LIB_NAME}
)
add_test(test1 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${PROJECT_TEST_NAME})
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,16 @@ cmsenv
# get the code from the repository
git clone https://github.com/BristolTopGroup/AnalysisSoftware.git BristolAnalysis/Tools
# get submodules:
git submodule init && git submodule update
# compile
scram b -j2
hash -r #or rehash in case that BAT cannot be found
# test run the code:
BAT_Tests
nohup BAT BristolAnalysis/Tools/python/test_cfg.py &> test.log &
```

Expand Down
4 changes: 2 additions & 2 deletions python/DataSetInfo_7TeV.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

datasetInfo = {}
#if using the designated subset:
#cross-section from http://arxiv.org/pdf/1303.6254v1.pdf
datasetInfo['TTJet'] = {"cross-section": 172, "NumberOfProcessedEvents":17100187}
#https://twiki.cern.ch/twiki/bin/view/LHCPhysics/TtbarNNLO
datasetInfo['TTJet'] = {"cross-section": 177.31, "NumberOfProcessedEvents":17100187}
#cross-section from twiki (https://twiki.cern.ch/twiki/bin/viewauth/CMS/StandardModelCrossSections)
datasetInfo['WJetsToLNu'] = {"cross-section": 31314, "NumberOfProcessedEvents":76726296}
#cross-sections from PREP (search for: W*Jet*7TeV*madgraph-tauola)
Expand Down
4 changes: 2 additions & 2 deletions python/DataSetInfo_8TeV.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

datasetInfo = {}
#if using the designated subset:
#cross-section from http://arxiv.org/pdf/1303.6254v1.pdf
datasetInfo['TTJet'] = {"cross-section": 245.8, "NumberOfProcessedEvents":6706068}
#cross-section from https://twiki.cern.ch/twiki/bin/view/LHCPhysics/TtbarNNLO
datasetInfo['TTJet'] = {"cross-section": 252.89, "NumberOfProcessedEvents":6706068}
#cross-sections from ??
datasetInfo['WJetsToLNu'] = {"cross-section": 36257.2, "NumberOfProcessedEvents":57708550} #not used
#cross-sections from PREP (search for: W*Jet*8TeV*madgraph)
Expand Down
20 changes: 17 additions & 3 deletions src/Analysers/METAnalyser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ void METAnalyser::analyseTransverseMass(const EventPtr event, const ParticlePoin
histMan_->H1D("DeltaPhi_lepton_MET")->Fill(delPhi, weight_);
if (met->et() < 20)
histMan_->H1D("Transverse_Mass_MET20")->Fill(MT, weight_);
histMan_->H2D("MET_vs_leptonPt")->Fill(particle->pt(), met->et(), weight_);
histMan_->H1D("MET_plus_leptonPt")->Fill(particle->pt() + met->et(), weight_);
histMan_->H2D("MET_vs_leptonEta")->Fill(particle->eta(), met->et(), weight_);
}
}

Expand Down Expand Up @@ -106,9 +109,18 @@ void METAnalyser::createHistograms() {
histMan_->addH1D("Angle_lepton_MET", "angle(lepton,MET);angle(l,MET); Events/0.01", 320, 0, 3.2);
histMan_->addH1D("DeltaPhi_lepton_MET", "#Delta#phi(lepton,MET);angle(l,MET); Events/0.01", 320, 0,
3.2);
// histMan_->addH1D("DeltaPhi_lepton_MET", "#Delta#phi(lepton,MET);angle(l,MET); Events/0.01", 320, 0,
// 3.2);

histMan_->addH2D("MET_vs_leptonPt",
"Missing transverse energy vs. Lepton p_{T}; Lepton p_{T}/(5 GeV); #slash{E}_{T}/(5 GeV)",
200, 0, 1000, 200, 0, 1000);
histMan_->addH1D("MET_plus_leptonPt",
"Missing transverse energy plus Lepton p_{T}; Lepton p_{T} + #slash{E}_{T}/(5 GeV)",
200, 0, 1000);
histMan_->addH2D("MET_vs_leptonEta",
"Missing transverse energy vs. Lepton #eta; Lepton #eta/(5 GeV); #slash{E}_{T}/(5 GeV)",
300, -3, 3, 200, 0, 1000);
histMan_->addH2D("HT_vs_MET_plus_leptonPt",
"HT vs.Missing transverse energy plus Lepton p_{T}; Lepton p_{T} + #slash{E}_{T}/(5 GeV); {H}_{T}/(5 GeV)",
200, 0, 1000, 200, 0, 1000);
}
}

Expand Down Expand Up @@ -165,6 +177,8 @@ void METAnalyser::analyse_ST(const EventPtr event, const ParticlePointer particl
treeMan_->Fill("ST",ST);
treeMan_->Fill("WPT",WPT);
treeMan_->Fill("MT",MT);

histMan_->H2D("HT_vs_MET_plus_leptonPt")->Fill(particle->pt() + met->et(), Event::HT(jets), weight_);
}
}

Expand Down
80 changes: 38 additions & 42 deletions src/Analysers/TTbar_plus_X_analyser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -872,68 +872,64 @@ TTbar_plus_X_analyser::TTbar_plus_X_analyser(HistogramManagerPtr histMan, TreeMa

//bins: start is always assumed to be 0 and the last is read as > X
//MET bins:
// old: [0.0, 31.0, 58.0, 96.0, 142.0, 191.0, inf]
// new: [0.0, 27.0, 52.0, 87.0, 129.0, 171.0, inf]
// old: [0., 27., 52., 87., 129., 171., inf]
metBins_.push_back(0.);
metBins_.push_back(27.);
metBins_.push_back(52.);
metBins_.push_back(87.);
metBins_.push_back(129.);
metBins_.push_back(171.);
metBins_.push_back(130.);
metBins_.push_back(172.);

//HT:
// old: [0.0, 190.0, 225.0, 262.0, 302.0, 345.0, 392.0, 445.0, 501.0, 562.0, 623.0, 689.0, 766.0, inf]
// new: [0.0, 187.0, 217.0, 250.0, 287.0, 327.0, 369.0, 414.0, 464.0, 517.0, 575.0, 634.0, 696.0, 772.0, inf]
ht_bins_.push_back(0.);
ht_bins_.push_back(187.0);
ht_bins_.push_back(217.0);
ht_bins_.push_back(250.0);
ht_bins_.push_back(287.0);
ht_bins_.push_back(327.0);
ht_bins_.push_back(369.0);
ht_bins_.push_back(414.0);
ht_bins_.push_back(464.0);
ht_bins_.push_back(517.0);
ht_bins_.push_back(575.0);
ht_bins_.push_back(634.0);
ht_bins_.push_back(696.0);
ht_bins_.push_back(772.0);
// old: [0., 187., 217., 250., 287., 327., 369., 414., 414., 464., 517., 575., 634., 696., 772., inf]
ht_bins_.push_back(120.0);
ht_bins_.push_back(185.0);
ht_bins_.push_back(215.0);
ht_bins_.push_back(247.0);
ht_bins_.push_back(283.0);
ht_bins_.push_back(323.0);
ht_bins_.push_back(365.0);
ht_bins_.push_back(409.0);
ht_bins_.push_back(458.0);
ht_bins_.push_back(512.0);
ht_bins_.push_back(570.0);
ht_bins_.push_back(629.0);
ht_bins_.push_back(691.0);
ht_bins_.push_back(769.0);

//ST:
// old: [0.0, 285.0, 329.0, 376.0, 428.0, 484.0, 544.0, 609.0, 678.0, 751.0, 830.0, 911.0, 1028.0, inf]
// new: [0.0, 281.0, 324.0, 367.0, 415.0, 466.0, 521.0, 581.0, 645.0, 714.0, 783.0, 861.0, 946.0, inf]
st_bins_.push_back(0.);
st_bins_.push_back(281.0);
st_bins_.push_back(324.0);
st_bins_.push_back(367.0);
st_bins_.push_back(415.0);
st_bins_.push_back(466.0);
st_bins_.push_back(521.0);
st_bins_.push_back(581.0);
st_bins_.push_back(645.0);
st_bins_.push_back(714.0);
st_bins_.push_back(783.0);
st_bins_.push_back(861.0);
st_bins_.push_back(946.0);
// old: [0.0, 281.0, 324.0, 367.0, 415.0, 466.0, 521.0, 581.0, 645.0, 714.0, 783.0, 861.0, 946.0, inf]
st_bins_.push_back(146.0);
st_bins_.push_back(277.0);
st_bins_.push_back(319.0);
st_bins_.push_back(361.0);
st_bins_.push_back(408.0);
st_bins_.push_back(459.0);
st_bins_.push_back(514.0);
st_bins_.push_back(573.0);
st_bins_.push_back(637.0);
st_bins_.push_back(705.0);
st_bins_.push_back(774.0);
st_bins_.push_back(854.0);
st_bins_.push_back(940.0);

//MT:
// old: [0.0, 28.0, 66.0, inf]
// new: [0.0, 23.0, 58.0, inf]
// old: [0., 23., 58., inf]
mt_bins_.push_back(0.);
mt_bins_.push_back(23.0);
mt_bins_.push_back(58.0);

//WPT:
// old: [0.0, 31.0, 59.0, 88.0, 118.0, 151.0, 187.0, 227.0, 267.0, inf]
// new: [0.0, 27.0, 52.0, 78.0, 105.0, 134.0, 165.0, 198.0, 235.0, inf]
// old: [0., 27., 52., 78., 105., 134., 165., 198., 235., inf]
wpt_bins_.push_back(0.);
wpt_bins_.push_back(27.0);
wpt_bins_.push_back(52.0);
wpt_bins_.push_back(78.0);
wpt_bins_.push_back(105.0);
wpt_bins_.push_back(134.0);
wpt_bins_.push_back(165.0);
wpt_bins_.push_back(198.0);
wpt_bins_.push_back(235.0);
wpt_bins_.push_back(166.0);
wpt_bins_.push_back(200.0);
wpt_bins_.push_back(237.0);

// mttbar
// Estimated from previous papers
Expand Down

0 comments on commit e25e377

Please sign in to comment.