Skip to content

Commit

Permalink
Merge pull request #41 from OSU-CMS/usingCRAB
Browse files Browse the repository at this point in the history
Changing CRAB config to send files to jobs
  • Loading branch information
carriganm95 authored May 30, 2024
2 parents f5441a6 + c6ab97e commit 5e56925
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
3 changes: 3 additions & 0 deletions BackgroundEstimation/test/crab_BGEstSelections.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
config.General.workArea = 'crab'
config.General.transferOutputs = True
config.General.transferLogs = True
config.General.requestName = 'MuonTagPt55' # this is the name of the crab folder; useful to keep track of what is happening

config.JobType.pluginName = 'Analysis'
config.JobType.psetName = 'config_2022_cfg.py'
config.JobType.allowUndistributedCMSSW = True
# List of files that are in the repos, but are used for the selections
config.JobType.inputFiles = [os.environ['CMSSW_BASE'] + '/src/OSUT3Analysis/AnaTools/data/electronSFs.root', os.environ['CMSSW_BASE'] + '/src/OSUT3Analysis/AnaTools/data/muonSFs.root', os.environ['CMSSW_BASE'] + '/src/OSUT3Analysis/Collections/data/Fall15_25nsV2_MC_SF_AK4PFchs.txt', os.environ['CMSSW_BASE'] + '/src/OSUT3Analysis/Collections/data/Fall15_25nsV2_MC_PtResolution_AK4PFchs.txt', '/data/users/mcarrigan/condor/run3Inputs/Summer22EE_23Sep2023_RunEFG_v1.root']

config.Data.inputDataset = '/WtoLNu-4Jets_TuneCP5_13p6TeV_madgraphMLM-pythia8/borzari-Test2CRAB-6c2551f7c8575c19e6da935800c0d62f/USER'
config.Data.inputDBS = 'phys03'
Expand Down
7 changes: 6 additions & 1 deletion StandardAnalysis/plugins/EventJetVarProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class EventJetVarProducer : public EventVariableProducer {
bool jetTightID (const TYPE(jets)&) const;

vector<string> triggerNames;
bool isCRAB_ = false;

};

Expand All @@ -75,6 +76,7 @@ EventJetVarProducer::EventJetVarProducer(const edm::ParameterSet &cfg) :
tokenMuons_ = consumes<vector<TYPE(muons)> > (collections_.getParameter<edm::InputTag> ("muons"));

triggerNames = cfg.getParameter<vector<string> >("triggerNames");
isCRAB_ = cfg.getParameter<bool>("isCRAB");

}

Expand Down Expand Up @@ -135,7 +137,10 @@ EventJetVarProducer::AddVariables (const edm::Event &event, const edm::EventSetu
edm::Handle<edm::TriggerResults> triggerBits;
event.getByToken(tokenTriggerBits_, triggerBits);

TFile* f_jetVeto = TFile::Open("/data/users/mcarrigan/condor/run3Inputs/Summer22EE_23Sep2023_RunEFG_v1.root", "read");
string jetVetoName = "";
if (isCRAB_) {jetVetoName = "Summer22EE_23Sep2023_RunEFG_v1.root";}
else {jetVetoName = "/data/users/mcarrigan/condor/run3Inputs/Summer22EE_23Sep2023_RunEFG_v1.root";}
TFile* f_jetVeto = TFile::Open(jetVetoName.c_str(), "read");
TH2D* jetVetoMap = (TH2D*)f_jetVeto->Get("jetvetomap");

vector<PhysicsObject> validJets;
Expand Down
14 changes: 6 additions & 8 deletions StandardAnalysis/test/crab_StdAnaSelections.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,21 @@
config.General.workArea = 'crab'
config.General.transferOutputs = True
config.General.transferLogs = True
config.General.requestName = 'Skimming' # this is the name of the crab folder; useful to keep track of what is happening

config.JobType.pluginName = 'Analysis'
config.JobType.psetName = 'config_2022_cfg.py'
config.JobType.allowUndistributedCMSSW = True
# List of files that are in the repos, but are used for the selections
config.JobType.inputFiles = [os.environ['CMSSW_BASE'] + '/src/OSUT3Analysis/AnaTools/data/electronSFs.root', os.environ['CMSSW_BASE'] + '/src/OSUT3Analysis/AnaTools/data/muonSFs.root', os.environ['CMSSW_BASE'] + '/src/OSUT3Analysis/Collections/data/Fall15_25nsV2_MC_SF_AK4PFchs.txt', os.environ['CMSSW_BASE'] + '/src/OSUT3Analysis/Collections/data/Fall15_25nsV2_MC_PtResolution_AK4PFchs.txt', '/data/users/mcarrigan/condor/run3Inputs/Summer22EE_23Sep2023_RunEFG_v1.root']

# always use MINIAOD as inputDataset and AOD as secondaryInputDataset

# config.Data.inputDataset = '/ZZ_TuneCP5_13p6TeV_pythia8/Run3Summer22EEMiniAODv3-124X_mcRun3_2022_realistic_postEE_v1-v3/MINIAODSIM'
# config.Data.secondaryInputDataset = '/ZZ_TuneCP5_13p6TeV_pythia8/Run3Summer22EEDRPremix-124X_mcRun3_2022_realistic_postEE_v1-v3/AODSIM'

# config.Data.inputDataset = '/WtoLNu-4Jets_TuneCP5_13p6TeV_madgraphMLM-pythia8/Run3Summer22EEMiniAODv3-124X_mcRun3_2022_realistic_postEE_v1-v2/MINIAODSIM'
# config.Data.secondaryInputDataset = '/WtoLNu-4Jets_TuneCP5_13p6TeV_madgraphMLM-pythia8/Run3Summer22EEDRPremix-124X_mcRun3_2022_realistic_postEE_v1-v2/AODSIM'

config.Data.inputDataset = '/DYJetsToLL_M-50_TuneCP5_13p6TeV-madgraphMLM-pythia8/Run3Summer22EEMiniAODv3-forPOG_124X_mcRun3_2022_realistic_postEE_v1-v3/MINIAODSIM'
config.Data.secondaryInputDataset = '/DYJetsToLL_M-50_TuneCP5_13p6TeV-madgraphMLM-pythia8/Run3Summer22EEDRPremix-forPOG_124X_mcRun3_2022_realistic_postEE_v1-v3/AODSIM'

config.Data.inputDBS = 'global'
# config.Data.inputDBS = 'phys03'
config.Data.splitting = 'FileBased'
config.Data.unitsPerJob = 1 # leave this as one to avoid too much wall time and jobs failing

Expand All @@ -42,5 +40,5 @@
#config.Data.outLFNDirBase = '/store/group/phys_exotica/disappearingTracks/'
#config.Site.storageSite = 'T2_CH_CERN'

#config.Data.outLFNDirBase = '/store/user/borzari/'
#config.Site.storageSite = 'T2_BR_SPRACE'
# config.Data.outLFNDirBase = '/store/user/borzari/'
# config.Site.storageSite = 'T2_BR_SPRACE'

0 comments on commit 5e56925

Please sign in to comment.