Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65527
b: "refs/heads/CMSSW_7_1_X"
c: cd6f6fa
h: "refs/heads/CMSSW_7_1_X"
i:
  65525: 4d87cf9
  65523: ea70936
  65519: 5f0a3db
v: v3
  • Loading branch information
chiorbo committed Apr 27, 2009
1 parent c830fc5 commit bb05071
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 38 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e
"refs/heads/CMSSW_7_1_X": ce0c6c7cb24205e3dd86eefce425c4c0c69a0a7f
"refs/heads/CMSSW_7_1_X": cd6f6fac649c3ceef65fe8bf1910f0370e07c540
90 changes: 53 additions & 37 deletions trunk/HLTriggerOffline/SUSYBSM/src/TriggerValidator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Description: Class to validate the Trigger Performance of the SUSYBSM group
// Maurizio Pierini
// Maria Spiropulu
// Created: Wed Aug 29 15:10:56 CEST 2007
// $Id: TriggerValidator.cc,v 1.12 2009/04/10 18:11:39 chiorbo Exp $
// $Id: TriggerValidator.cc,v 1.13 2009/04/24 13:07:01 chiorbo Exp $
//
//

Expand Down Expand Up @@ -209,6 +209,12 @@ TriggerValidator::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu
}
l1Names_[L1GTRR->decisionWord().size()] = "Total";

//set the names of the bins for the "path" histos
for(unsigned int i=0; i<l1Names_.size(); ++i) {
hL1PathsBeforeCuts->setBinLabel(i+1,l1Names_[i].c_str(),1);
hL1PathsAfterRecoCuts->setBinLabel(i+1,l1Names_[i].c_str(),1);
hL1PathsAfterMcCuts->setBinLabel(i+1,l1Names_[i].c_str(),1);
}
}

//fill the eff vectors and histos for L1
Expand All @@ -217,13 +223,16 @@ TriggerValidator::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu
if(L1GTRR->decisionWord()[i]) {
numTotL1BitsBeforeCuts[i]++;
hL1BitsBeforeCuts->Fill(i);
hL1PathsBeforeCuts->Fill(i);
if(eventRecoSelected) {
numTotL1BitsAfterRecoCuts[i]++;
hL1BitsAfterRecoCuts->Fill(i);
hL1PathsAfterRecoCuts->Fill(i);
}
if(eventMcSelected) {
numTotL1BitsAfterMcCuts[i]++;
hL1BitsAfterMcCuts->Fill(i);
hL1PathsAfterMcCuts->Fill(i);
}
}
}
Expand All @@ -238,13 +247,16 @@ TriggerValidator::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu
//fill the last bin with the total of events
numTotL1BitsBeforeCuts[nL1size]++;
hL1BitsBeforeCuts->Fill(nL1size);
hL1PathsBeforeCuts->Fill(nL1size);
if(eventRecoSelected) {
numTotL1BitsAfterRecoCuts[nL1size]++;
hL1BitsAfterRecoCuts->Fill(nL1size);
hL1BitsAfterRecoCuts->Fill(nL1size);
hL1PathsAfterRecoCuts->Fill(nL1size);
}
if(eventMcSelected) {
numTotL1BitsAfterMcCuts[nL1size]++;
hL1BitsAfterMcCuts->Fill(nL1size);
hL1PathsAfterMcCuts->Fill(nL1size);
}


Expand Down Expand Up @@ -283,6 +295,13 @@ TriggerValidator::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu
triggerNames_.init(*trhv);
hlNames_=triggerNames_.triggerNames();
hlNames_.push_back("Total");

//set the bin names for the "path" histos
for (unsigned int i=0; i<hlNames_.size(); ++i) {
hHltPathsBeforeCuts->setBinLabel(i+1,hlNames_[i].c_str(),1);
hHltPathsAfterRecoCuts->setBinLabel(i+1,hlNames_[i].c_str(),1);
hHltPathsAfterMcCuts->setBinLabel(i+1,hlNames_[i].c_str(),1);
}
}

//fill the eff vectors and histos for HLT
Expand All @@ -291,13 +310,16 @@ TriggerValidator::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu
if(trhv->at(i).accept()) {
numTotHltBitsBeforeCuts[i]++;
hHltBitsBeforeCuts->Fill(i);
hHltPathsBeforeCuts->Fill(i);
if(eventRecoSelected) {
numTotHltBitsAfterRecoCuts[i]++;
hHltBitsAfterRecoCuts->Fill(i);
hHltPathsAfterRecoCuts->Fill(i);
}
if(eventMcSelected) {
numTotHltBitsAfterMcCuts[i]++;
hHltBitsAfterMcCuts->Fill(i);
hHltPathsAfterMcCuts->Fill(i);
}
}
}
Expand All @@ -318,13 +340,16 @@ TriggerValidator::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetu
//fill the last bin with the total of events
numTotHltBitsBeforeCuts[trhv->size()]++;
hHltBitsBeforeCuts->Fill(trhv->size());
hHltPathsBeforeCuts->Fill(trhv->size());
if(eventRecoSelected) {
numTotHltBitsAfterRecoCuts[trhv->size()]++;
hHltBitsAfterRecoCuts->Fill(trhv->size());
hHltPathsAfterRecoCuts->Fill(trhv->size());
}
if(eventMcSelected) {
numTotHltBitsAfterMcCuts[trhv->size()]++;
hHltBitsAfterMcCuts->Fill(trhv->size());
hHltPathsAfterMcCuts->Fill(trhv->size());
}


Expand Down Expand Up @@ -411,6 +436,32 @@ TriggerValidator::beginJob(const edm::EventSetup&)
dbe_->setCurrentFolder(dirname_+mcSelBitsDir);
hL1BitsAfterMcCuts = dbe_->book1D("L1Bits", "L1 Trigger Bits",nL1Bits+1, 0, nL1Bits+1);
hHltBitsAfterMcCuts = dbe_->book1D("HltBits","HL Trigger Bits",nHltPaths+1, 0, nHltPaths+1);


//create the histos with paths
//identical to the ones with "bits"
//but with the names in the x axis
//instead of the numbers

dbe_->setCurrentFolder(dirname_+triggerBitsDir);
TH1F* hTemp = (TH1F*) (hL1BitsBeforeCuts->getTH1F())->Clone("L1Paths");
hL1PathsBeforeCuts = dbe_->book1D("L1Paths", hTemp);
// hL1PathsBeforeCuts = dbe_->book1D("L1Paths", hL1BitsBeforeCuts->getTH1F());
hTemp = (TH1F*) (hHltBitsBeforeCuts->getTH1F())->Clone("HltPaths");
hHltPathsBeforeCuts = dbe_->book1D("HltPaths", hTemp);

dbe_->setCurrentFolder(dirname_+recoSelBitsDir);
hTemp = (TH1F*) (hL1BitsAfterRecoCuts->getTH1F())->Clone("L1Paths");
hL1PathsAfterRecoCuts = dbe_->book1D("L1Paths", hTemp);
hTemp = (TH1F*) (hHltBitsAfterRecoCuts->getTH1F())->Clone("HltPaths");
hHltPathsAfterRecoCuts = dbe_->book1D("HltPaths", hTemp);

dbe_->setCurrentFolder(dirname_+mcSelBitsDir);
hTemp = (TH1F*) (hL1BitsAfterMcCuts->getTH1F())->Clone("L1Paths");
hL1PathsAfterMcCuts = dbe_->book1D("L1Paths", hTemp);
hTemp = (TH1F*) (hHltBitsAfterMcCuts->getTH1F())->Clone("HltPaths");
hHltPathsAfterMcCuts = dbe_->book1D("HltPaths", hTemp);

}


Expand Down Expand Up @@ -486,41 +537,6 @@ TriggerValidator::endRun(const edm::Run& run, const edm::EventSetup& c)



//create the histos with paths
//identical to the ones with "bits"
//but with the names in the x axis
//instead of the numbers

dbe_->setCurrentFolder(dirname_+triggerBitsDir);
TH1F* hTemp = (TH1F*) (hL1BitsBeforeCuts->getTH1F())->Clone("L1Paths");
hL1PathsBeforeCuts = dbe_->book1D("L1Paths", hTemp);
// hL1PathsBeforeCuts = dbe_->book1D("L1Paths", hL1BitsBeforeCuts->getTH1F());
hTemp = (TH1F*) (hHltBitsBeforeCuts->getTH1F())->Clone("HltPaths");
hHltPathsBeforeCuts = dbe_->book1D("HltPaths", hTemp);

dbe_->setCurrentFolder(dirname_+recoSelBitsDir);
hTemp = (TH1F*) (hL1BitsAfterRecoCuts->getTH1F())->Clone("L1Paths");
hL1PathsAfterRecoCuts = dbe_->book1D("L1Paths", hTemp);
hTemp = (TH1F*) (hHltBitsAfterRecoCuts->getTH1F())->Clone("HltPaths");
hHltPathsAfterRecoCuts = dbe_->book1D("HltPaths", hTemp);

dbe_->setCurrentFolder(dirname_+mcSelBitsDir);
hTemp = (TH1F*) (hL1BitsAfterMcCuts->getTH1F())->Clone("L1Paths");
hL1PathsAfterMcCuts = dbe_->book1D("L1Paths", hTemp);
hTemp = (TH1F*) (hHltBitsAfterMcCuts->getTH1F())->Clone("HltPaths");
hHltPathsAfterMcCuts = dbe_->book1D("HltPaths", hTemp);

for(unsigned int i=0; i<l1Names_.size(); ++i) {
hL1PathsBeforeCuts->setBinLabel(i+1,l1Names_[i].c_str(),1);
hL1PathsAfterRecoCuts->setBinLabel(i+1,l1Names_[i].c_str(),1);
hL1PathsAfterMcCuts->setBinLabel(i+1,l1Names_[i].c_str(),1);
}
for (unsigned int i=0; i<hlNames_.size(); ++i) {
hHltPathsBeforeCuts->setBinLabel(i+1,hlNames_[i].c_str(),1);
hHltPathsAfterRecoCuts->setBinLabel(i+1,hlNames_[i].c_str(),1);
hHltPathsAfterMcCuts->setBinLabel(i+1,hlNames_[i].c_str(),1);
}




Expand Down

0 comments on commit bb05071

Please sign in to comment.