Skip to content

Commit

Permalink
Add in new plots and simplify trigger study code
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Farrell committed Nov 4, 2012
1 parent 82179ec commit 06e5270
Show file tree
Hide file tree
Showing 4 changed files with 667 additions and 293 deletions.
11 changes: 11 additions & 0 deletions SUSYBSMAnalysis/HSCP/test/ICHEP_Analysis/Analysis_Samples.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ void keepOnlySamplesOfNameX(std::vector<stSample>& samples, string NameX){
for(unsigned int s=0;s<samples.size();s++){if(samples[s].Name!=NameX){samples.erase(samples.begin()+s);s--;} }
}

void keepOnlySamplesOfNamesXtoY(std::vector<stSample>& samples, std::vector<string> NamesXtoY){
for(unsigned int s=0;s<samples.size();s++){
bool keep=false;
for(unsigned int i=0;i<NamesXtoY.size();i++){
if(samples[s].Name==NamesXtoY[i]) {keep=true; break;}
}
if(!keep) {samples.erase(samples.begin()+s);s--;}
}
}

void keepOnlySamplesAt7and8TeVX(std::vector<stSample>& samples, double SQRTS_){
if(SQRTS_==78 || SQRTS_==87){
std::vector<stSample> samples_tmp;
Expand Down Expand Up @@ -250,6 +260,7 @@ double GetPUWeight(const fwlite::ChainEvent& ev, const std::string& pileup, doub
double PUWeight_thisevent=1;
std::vector<PileupSummaryInfo>::const_iterator PVI;
int npv = -1; float Tnpv = -1;

if(pileup=="S4"){
float sum_nvtx = 0;
for(PVI = PupInfo->begin(); PVI != PupInfo->end(); ++PVI) {
Expand Down
55 changes: 45 additions & 10 deletions SUSYBSMAnalysis/HSCP/test/UsefulScripts/TriggerStudy/Launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,52 @@
print 'please setup your CMSSW environement'
sys.exit(0)

print 'EFFICIENCIENCY'
FarmDirectory = "FARM"
JobName = "HSCPEFFICIENCYCheck"
LaunchOnCondor.Jobs_RunHere = 1
LaunchOnCondor.SendCluster_Create(FarmDirectory, JobName)
f= open('../../ICHEP_Analysis/Analysis_Samples.txt','r')
index = -1
for line in f :
if len(sys.argv)==1:
print "Please pass in argument a number between 0 and 2"
print " 0 - Run TriggerStudy.C"
print " 1 - Run TriggerEfficiency.C"
sys.exit()

elif sys.argv[1]=='0':
print 'STUDY'
FarmDirectory = "FARM"
JobName = "HSCPTRIGGERSTUDY"
LaunchOnCondor.Jobs_RunHere = 1
LaunchOnCondor.SendCluster_Create(FarmDirectory, JobName)
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_8TeV_Gluino"', '"Gluino_8TeV_M400_f10"', '"Gluino_8TeV_M800_f10"', '"Gluino_8TeV_M1200_f10"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_8TeV_GluinoN"', '"Gluino_8TeV_M400N_f10"', '"Gluino_8TeV_M800N_f10"', '"Gluino_8TeV_M1200N_f10"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_8TeV_Gluino"', '"Gluino_8TeV_M400_f100"', '"Gluino_8TeV_M800_f100"', '"Gluino_8TeV_M1200_f100"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_8TeV_Stop"', '"Stop_8TeV_M200"', '"Stop_8TeV_M500"', '"Stop_8TeV_M800"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_8TeV_StopN"', '"StopN_8TeV_M200"', '"StopN_8TeV_M500"', '"StopN_8TeV_M800"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_8TeV_GMStau"', '"GMStau_8TeV_M100"', '"GMStau_8TeV_M308"', '"GMStau_8TeV_M494"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_8TeV_PPStau"', '"PPStau_8TeV_M100"', '"PPStau_8TeV_M200"', '"PPStau_8TeV_M100"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_8TeV_DYLQ"', '"DY_8TeV_M100_Q1o3"', '"DY_8TeV_M600_Q1o3"', '"DY_8TeV_M100_Q2o3"', '"DY_8TeV_M600_Q2o3"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_8TeV_DYHQ"', '"DY_8TeV_M100_Q2"', '"DY_8TeV_M600_Q2"', '"DY_8TeV_M100_Q5"', '"DY_8TeV_M600_Q5"'])

LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_7TeV_Gluino"', '"Gluino_7TeV_M400_f10"', '"Gluino_7TeV_M800_f10"', '"Gluino_7TeV_M1200_f10"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_7TeV_GluinoN"', '"Gluino_7TeV_M400N_f10"', '"Gluino_7TeV_M800N_f10"', '"Gluino_7TeV_M1200N_f10"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_7TeV_Gluino"', '"Gluino_7TeV_M400_f100"', '"Gluino_7TeV_M800_f100"', '"Gluino_7TeV_M1200_f100"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_7TeV_Stop"', '"Stop_7TeV_M200"', '"Stop_7TeV_M500"', '"Stop_7TeV_M800"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_7TeV_StopN"', '"StopN_7TeV_M200"', '"StopN_7TeV_M500"', '"StopN_7TeV_M800"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_7TeV_GMStau"', '"GMStau_7TeV_M100"', '"GMStau_7TeV_M308"', '"GMStau_7TeV_M494"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_7TeV_PPStau"', '"PPStau_7TeV_M100"', '"PPStau_7TeV_M200"', '"PPStau_7TeV_M100"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_7TeV_DYLQ"', '"DY_7TeV_M100_Q1o3"', '"DY_7TeV_M600_Q1o3"', '"DY_7TeV_M100_Q2o3"', '"DY_7TeV_M600_Q2o3"'])
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerStudy.C", '"summary_7TeV_DYHQ"', '"DY_7TeV_M100_Q2"', '"DY_7TeV_M600_Q2"', '"DY_7TeV_M100_Q5"', '"DY_7TeV_M600_Q5"'])

LaunchOnCondor.SendCluster_Submit()

elif sys.argv[1]=='1':
print 'EFFICIENCIENCY'
FarmDirectory = "FARM"
JobName = "HSCPEFFICIENCYCheck"
LaunchOnCondor.Jobs_RunHere = 1
LaunchOnCondor.SendCluster_Create(FarmDirectory, JobName)
f= open('../../ICHEP_Analysis/Analysis_Samples.txt','r')
index = -1
for line in f :
index+=1
vals=line.split(',')
if((vals[0].replace('"','')) in CMSSW_VERSION and int(vals[1])==0):
LaunchOnCondor.SendCluster_Push(["FWLITE", os.getcwd()+"/TriggerEfficiency.C", '"ANALYSE_'+str(index)+'_to_'+str(index)+'"'])
f.close()
LaunchOnCondor.SendCluster_Submit()
f.close()
LaunchOnCondor.SendCluster_Submit()
Loading

0 comments on commit 06e5270

Please sign in to comment.