Skip to content

Commit

Permalink
Merge pull request #163 from kreczko/documentation-update
Browse files Browse the repository at this point in the history
[MRG] Updating the documentation (Run 2)
  • Loading branch information
EmyrClement committed Jun 10, 2015
2 parents e25e377 + 5d5f9ae commit 78a858d
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 20 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Analysis software for TTbar+X differential cross section analysis (TOP-12-042)
To setup the stand-alone version of the code:

```
# this section will be revisited, please use CMSSW setup for now
# get the code from the repository
git clone https://github.com/BristolTopGroup/AnalysisSoftware.git AnalysisSoftware
cd AnalysisSoftware
Expand Down Expand Up @@ -40,30 +41,30 @@ nohup ./AnalysisSoftware python/test_cfg.py &> test.log &
To setup the code using CMSSW:

```
# on soolin (scientific linux 5 machines)
export SCRAM_ARCH=slc5_amd64_gcc462
cmsrel CMSSW_6_0_0
cd CMSSW_6_0_0/src
cmsenv
# OR on DICE (scientific linux 6 machines)
. $VO_CMS_SW_DIR/cmsset_default.sh # echo $SCRAM_ARCH should now return slc6_amd64_gcc472
cmsrel CMSSW_6_2_12
cd CMSSW_6_2_12/src
# on soolin (and other scientific linux 6 machines)
export SCRAM_ARCH=slc6_amd64_gcc491
# This version comes with ROOT 6.02/05
scram p -n CMSSW_7_5_0_pre5_AS CMSSW_7_5_0_pre5
cd CMSSW_7_5_0_pre4_AS/src/
cmsenv
# initialise CMS git
git cms-init
# get the code from the repository
git clone https://github.com/BristolTopGroup/AnalysisSoftware.git BristolAnalysis/Tools
cd BristolAnalysis/Tools
# get submodules:
git submodule init && git submodule update
cd -
ln -s BristolAnalysis/Tools/external/TopQuarkAnalysis TopQuarkAnalysis
# compile
scram b -j2
hash -r #or rehash in case that BAT cannot be found
# test run the code:
BAT_Tests
#../tmp/slc6_amd64_gcc491/src/BristolAnalysis/Tools/test/BAT_Tests/BAT_Tests
nohup BAT BristolAnalysis/Tools/python/test_cfg.py &> test.log &
```

Expand Down
File renamed without changes.
10 changes: 6 additions & 4 deletions python/master_PHYS14_cfg.py → python/master_2015_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ def getAnalysisSettings(analysisMode):


#config start
#number of events to be processed
maxEvents = 0# 0 == all
if os.environ.has_key('maxEvents'):
maxEvents = int(os.environ['maxEvents'])

toolsFolder = 'BristolAnalysis/Tools/'
if os.environ.has_key('toolsFolder'):
toolsFolder = os.environ['toolsFolder']
Expand Down Expand Up @@ -124,9 +129,6 @@ def getAnalysisSettings(analysisMode):
for setting,value in settings.iteritems():
print setting, '=', value

#number of events to be processed
maxEvents = 0# 0 == all

#Jet Energy Resolutions files (L7 corrections)
bJetResoFile = toolsFolder + "data/bJetReso.root"
lightJetResoFile = toolsFolder + "data/lightJetReso.root"
Expand Down Expand Up @@ -158,7 +160,7 @@ def getAnalysisSettings(analysisMode):
#file with information (cross-section, number of processed events) for event weight calculation
datasetInfoFile = ""
if centerOfMassEnergy == 13:
datasetInfoFile = toolsFolder + "python/DataSetInfo_PHYS14.py"
datasetInfoFile = toolsFolder + "python/DataSetInfo_13TeV.py"


nTuple_version = 0
38 changes: 35 additions & 3 deletions python/test_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,45 @@

#center of mass energy: 7TeV for 2010/2011 data/MC, 8TeV for 2012 data
#this value will be part of the output file name: DataType_CenterOfMassEnergyTeV_lumipb-1_....
centerOfMassEnergy = 8
centerOfMassEnergy = 13
nTuple_version = 0
#number of events to be processed
maxEvents = 100000
verbose = True

if centerOfMassEnergy == 8:
if centerOfMassEnergy == 13:
lumi = 5000.#pb-1
PUFile = 'noFile.root'
#+5%
# PUFile = toolsFolder + "data/PileUp_2012_72765_truth_finebin.root"
#-5%
# PUFile = toolsFolder + "data/PileUp_2012_65835_truth_finebin.root"

#apply the met corrections
applyMetSysShiftCorr = False
applyMetType0Corr = False

#Apply Jet Smearing
applyJetSmearing = False
JetSmearingSystematic = 0

#Apply Top Pt Reweighting
applyTopPtReweighting = False

#Lepton Scale Factors
ElectronScaleFactorSystematic = 0
MuonScaleFactorSystematic = 0

getMuonScaleFactorsFromFile = False
MuonScaleFactorsFile = toolsFolder + ""

getElectronScaleFactorsFromFile = False
ElectronIdIsoScaleFactorsFile = 'noFile.root'
ElectronTriggerScaleFactorsFile = 'noFile.root'

getHadronTriggerFromFile = False
hadronTriggerFile = 'noFile.root'
elif centerOfMassEnergy == 8:
#File for pile-up re-weighting
#integrated luminosity the MC simulation will be scaled to
lumi = 19584#pb-1
Expand Down Expand Up @@ -93,7 +125,7 @@
useHitFit = False
produceFitterASCIIoutput = False
inputFiles = [
'/storage/ec6821/NTupleProd/CMSSW_7_2_3/src/ntuple_TTJets_madgraph.root' # 53X 8TeV data
'/hdfs/TopQuarkGroup/run2/ntuples/v18/TTJets_Madgraph_PU30bx50/ntuple_merged_001.root' # 74X 13TeV MC
]

#relative Path from calling BAT to the TopQuarkAnalysis folder
Expand Down
2 changes: 1 addition & 1 deletion src/Analysers/HitFitAnalyser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ HitFitAnalyser::HitFitAnalyser(boost::shared_ptr<HistogramManager> histMan, cons
outFile(outFileName.c_str()), //
// The following five initializers read the config parameters for the
// ASCII text files which contains the physics object resolutions.
FitterPath_("./"), //
FitterPath_(Globals::TQAFPath), //
hitfitDefault_(FitterPath_ + "TopQuarkAnalysis/TopHitFit/data/setting/RunHitFitConfiguration.txt"), //
hitfitElectronResolution_(
FitterPath_ + "TopQuarkAnalysis/TopHitFit/data/resolution/tqafElectronResolution.txt"), //
Expand Down
1 change: 0 additions & 1 deletion src/Event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ void Event::setPassesMuonQCDSelection( bool passesMuonQCDSelection ) {

void Event::setPassOfflineSelectionInfo( std::vector<unsigned int> passSelections ) {
if ( passSelections.size() > 1 ) {
cout << "SHIT PANIC" << endl;
for ( unsigned int selection = 0; selection < passSelections.size(); ++selection ) {
if ( passSelections[selection] != 2 && passSelections[selection] != 4 )
cout << selection << " " << passSelections[selection] << endl;
Expand Down

0 comments on commit 78a858d

Please sign in to comment.