Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ Root_IO_Performance.root
/Testing/
AnalysisSoftware_test
CTest*
condor/job_mapperc
Binary file removed condor/job_mapperc
Binary file not shown.
216 changes: 108 additions & 108 deletions python/analysis_info.py

Large diffs are not rendered by default.

23 changes: 8 additions & 15 deletions src/Event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void Event::setJetTTBarPartons() {

FourVector partonFV = jet->matched_parton()->getFourVector();

if ( partonFV == quark->getFourVector() ) jet->set_ttbar_decay_parton( TTPartons::partonType::Quark );
if ( partonFV == quark->getFourVector() ) jet->set_ttbar_decay_parton( TTPartons::partonType::Quark );
else if ( partonFV == quarkBar->getFourVector() ) jet->set_ttbar_decay_parton( TTPartons::partonType::QuarkBar );
else if ( partonFV == hadronicB->getFourVector() ) jet->set_ttbar_decay_parton( TTPartons::partonType::HadB );
else if ( partonFV == leptonicB->getFourVector() ) jet->set_ttbar_decay_parton( TTPartons::partonType::LepB );
Expand Down Expand Up @@ -314,10 +314,10 @@ const LeptonPointer Event::getSignalLepton( unsigned int selectionCriteria ) con
}
else if ( selection == SelectionCriteria::MuonPlusJetsQCDNonIsolated ) {
unsigned int signalLeptonIndex = selectionOutputInfo_muonQCDNonisolated.getSignalLeptonIndex();
return allMuons[signalLeptonIndex];
return allMuons[signalLeptonIndex];
}


return LeptonPointer();
}

Expand Down Expand Up @@ -463,7 +463,7 @@ void Event::setPassOfflineSelectionInfo( std::vector<unsigned int> passSelection
if ( passSelections[selection] != 2 && passSelections[selection] != 4 )
cout << selection << " " << passSelections[selection] << endl;
}

}

for ( unsigned int selection = 0; selection < passSelections.size(); ++selection ) {
Expand Down Expand Up @@ -919,18 +919,11 @@ double Event::HT(const JetCollection jets) {

double Event::ST(const JetCollection jets, const ParticlePointer lepton, const METPointer met) {
// ST = HT + MET + lepton pt
double ht = 0;
if ( jets.size() > 0 ) ht = Event::HT(jets);

if ( lepton == 0 && met == 0 )
return ht;
else if ( lepton == 0 )
return ht + met->et();
else if ( met == 0 )
return ht + lepton->pt();
else
return ht + met->et() + lepton->pt();
double ht = Event::HT(jets);
double MET = met == 0 ? 0 : met->et();
double lpt = lepton == 0 ? 0 : lepton->pt();

return ht + MET + lpt;
}

double Event::MT(const ParticlePointer particle, const METPointer met) {
Expand Down
50 changes: 24 additions & 26 deletions src/HistHelpers/HistogramManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>

using namespace boost;
namespace BAT {

HistogramManager::HistogramManager() : //
Expand Down Expand Up @@ -354,17 +353,17 @@ void HistogramManager::writeToDisk() {
// createJetSummedHistograms((DataType::value) type);
// createBJetSummedHistograms((DataType::value) type);

for (unordered_map<std::string, TH1Array>::iterator iter = collection1D.begin(); iter != collection1D.end();
for (boost::unordered_map<std::string, TH1Array>::iterator iter = collection1D.begin(); iter != collection1D.end();
++iter) {
iter->second[type]->writeToFile(histFiles.at(type));
}

for (unordered_map<std::string, TH2Array>::iterator iter = collection2D.begin(); iter != collection2D.end();
for (boost::unordered_map<std::string, TH2Array>::iterator iter = collection2D.begin(); iter != collection2D.end();
++iter) {
iter->second[type]->writeToFile(histFiles.at(type));
}

for (unordered_map<std::string, TH3Array>::iterator iter = collection3D.begin(); iter != collection3D.end();
for (boost::unordered_map<std::string, TH3Array>::iterator iter = collection3D.begin(); iter != collection3D.end();
++iter) {
iter->second[type]->writeToFile(histFiles.at(type));
}
Expand All @@ -384,13 +383,13 @@ void HistogramManager::createJetSummedHistograms(DataType::value type) {

void HistogramManager::createJetSummedHistograms1D(DataType::value type) {
for (unsigned short jetbinSum = 0; jetbinSum < JetBinSummed::NUMBER_OF_SUMMED_JET_BINS; ++jetbinSum) {
for (unordered_map<std::string, TH1Array>::iterator iter = collection1D.begin(); iter != collection1D.end();
for (boost::unordered_map<std::string, TH1Array>::iterator iter = collection1D.begin(); iter != collection1D.end();
++iter) {
string collectionName = iter->first;
TH1CollectionRef coll = iter->second[type];
unordered_map<std::string, TH1Ptr> histMap = coll->getAllHistograms();
boost::unordered_map<std::string, TH1Ptr> histMap = coll->getAllHistograms();

for (unordered_map<std::string, TH1Ptr>::const_iterator histIter = histMap.begin();
for (boost::unordered_map<std::string, TH1Ptr>::const_iterator histIter = histMap.begin();
histIter != histMap.end(); ++histIter) {
string name = histIter->first;
//check if it is a jet-binned histogram
Expand All @@ -417,13 +416,13 @@ void HistogramManager::createJetSummedHistograms1D(DataType::value type) {

void HistogramManager::createJetSummedHistograms2D(DataType::value type) {
for (unsigned short jetbinSum = 0; jetbinSum < JetBinSummed::NUMBER_OF_SUMMED_JET_BINS; ++jetbinSum) {
for (unordered_map<std::string, TH2Array>::iterator iter = collection2D.begin(); iter != collection2D.end();
for (boost::unordered_map<std::string, TH2Array>::iterator iter = collection2D.begin(); iter != collection2D.end();
++iter) {
string collectionName = iter->first;
TH2CollectionRef coll = iter->second[type];
unordered_map<std::string, TH2Ptr> histMap = coll->getAllHistograms();
boost::unordered_map<std::string, TH2Ptr> histMap = coll->getAllHistograms();

for (unordered_map<std::string, TH2Ptr>::const_iterator histIter = histMap.begin();
for (boost::unordered_map<std::string, TH2Ptr>::const_iterator histIter = histMap.begin();
histIter != histMap.end(); ++histIter) {
string name = histIter->first;
//check if it is a jet-binned histogram
Expand All @@ -450,13 +449,13 @@ void HistogramManager::createJetSummedHistograms2D(DataType::value type) {

void HistogramManager::createJetSummedHistograms3D(DataType::value type) {
for (unsigned short jetbinSum = 0; jetbinSum < JetBinSummed::NUMBER_OF_SUMMED_JET_BINS; ++jetbinSum) {
for (unordered_map<std::string, TH3Array>::iterator iter = collection3D.begin(); iter != collection3D.end();
for (boost::unordered_map<std::string, TH3Array>::iterator iter = collection3D.begin(); iter != collection3D.end();
++iter) {
string collectionName = iter->first;
TH3CollectionRef coll = iter->second[type];
unordered_map<std::string, TH3Ptr> histMap = coll->getAllHistograms();
boost::unordered_map<std::string, TH3Ptr> histMap = coll->getAllHistograms();

for (unordered_map<std::string, TH3Ptr>::const_iterator histIter = histMap.begin();
for (boost::unordered_map<std::string, TH3Ptr>::const_iterator histIter = histMap.begin();
histIter != histMap.end(); ++histIter) {
string name = histIter->first;
//check if it is a jet-binned histogram
Expand Down Expand Up @@ -496,13 +495,13 @@ void HistogramManager::createBJetSummedHistograms(DataType::value type) {
*/
void HistogramManager::createBJetSummedHistograms1D(DataType::value type) {
for (unsigned short jetbinSum = 0; jetbinSum < BJetBinSummed::NUMBER_OF_SUMMED_BJET_BINS; ++jetbinSum) {
for (unordered_map<std::string, TH1Array>::iterator iter = collection1D.begin(); iter != collection1D.end();
for (boost::unordered_map<std::string, TH1Array>::iterator iter = collection1D.begin(); iter != collection1D.end();
++iter) {
string collectionName = iter->first;
TH1CollectionRef coll = iter->second[type];
unordered_map<std::string, TH1Ptr> histMap = coll->getAllHistograms();
boost::unordered_map<std::string, TH1Ptr> histMap = coll->getAllHistograms();

for (unordered_map<std::string, TH1Ptr>::const_iterator histIter = histMap.begin();
for (boost::unordered_map<std::string, TH1Ptr>::const_iterator histIter = histMap.begin();
histIter != histMap.end(); ++histIter) {
string name = histIter->first;
//check if it is a Bjet-binned histogram
Expand Down Expand Up @@ -531,13 +530,13 @@ void HistogramManager::createBJetSummedHistograms1D(DataType::value type) {

void HistogramManager::createBJetSummedHistograms2D(DataType::value type) {
for (unsigned short jetbinSum = 0; jetbinSum < BJetBinSummed::NUMBER_OF_SUMMED_BJET_BINS; ++jetbinSum) {
for (unordered_map<std::string, TH2Array>::iterator iter = collection2D.begin(); iter != collection2D.end();
for (boost::unordered_map<std::string, TH2Array>::iterator iter = collection2D.begin(); iter != collection2D.end();
++iter) {
string collectionName = iter->first;
TH2CollectionRef coll = iter->second[type];
unordered_map<std::string, TH2Ptr> histMap = coll->getAllHistograms();
boost::unordered_map<std::string, TH2Ptr> histMap = coll->getAllHistograms();

for (unordered_map<std::string, TH2Ptr>::const_iterator histIter = histMap.begin();
for (boost::unordered_map<std::string, TH2Ptr>::const_iterator histIter = histMap.begin();
histIter != histMap.end(); ++histIter) {
string name = histIter->first;
//check if it is a Bjet-binned histogram
Expand Down Expand Up @@ -566,13 +565,13 @@ void HistogramManager::createBJetSummedHistograms2D(DataType::value type) {

void HistogramManager::createBJetSummedHistograms3D(DataType::value type) {
for (unsigned short jetbinSum = 0; jetbinSum < BJetBinSummed::NUMBER_OF_SUMMED_BJET_BINS; ++jetbinSum) {
for (unordered_map<std::string, TH3Array>::iterator iter = collection3D.begin(); iter != collection3D.end();
for (boost::unordered_map<std::string, TH3Array>::iterator iter = collection3D.begin(); iter != collection3D.end();
++iter) {
string collectionName = iter->first;
TH3CollectionRef coll = iter->second[type];
unordered_map<std::string, TH3Ptr> histMap = coll->getAllHistograms();
boost::unordered_map<std::string, TH3Ptr> histMap = coll->getAllHistograms();

for (unordered_map<std::string, TH3Ptr>::const_iterator histIter = histMap.begin();
for (boost::unordered_map<std::string, TH3Ptr>::const_iterator histIter = histMap.begin();
histIter != histMap.end(); ++histIter) {
string name = histIter->first;
//check if it is a Bjet-binned histogram
Expand Down Expand Up @@ -649,7 +648,7 @@ unsigned int HistogramManager::size() const {

unsigned int HistogramManager::size1D(DataType::value type) const {
unsigned int size(0);
for (unordered_map<std::string, TH1Array>::const_iterator iter = collection1D.begin(); iter != collection1D.end();
for (boost::unordered_map<std::string, TH1Array>::const_iterator iter = collection1D.begin(); iter != collection1D.end();
++iter) {
size += iter->second[type]->size();
}
Expand All @@ -658,7 +657,7 @@ unsigned int HistogramManager::size1D(DataType::value type) const {

unsigned int HistogramManager::size2D(DataType::value type) const {
unsigned int size(0);
for (unordered_map<std::string, TH2Array>::const_iterator iter = collection2D.begin(); iter != collection2D.end();
for (boost::unordered_map<std::string, TH2Array>::const_iterator iter = collection2D.begin(); iter != collection2D.end();
++iter) {
size += iter->second[type]->size();
}
Expand All @@ -667,7 +666,7 @@ unsigned int HistogramManager::size2D(DataType::value type) const {

unsigned int HistogramManager::size3D(DataType::value type) const {
unsigned int size(0);
for (unordered_map<std::string, TH3Array>::const_iterator iter = collection3D.begin(); iter != collection3D.end();
for (boost::unordered_map<std::string, TH3Array>::const_iterator iter = collection3D.begin(); iter != collection3D.end();
++iter) {
size += iter->second[type]->size();
}
Expand All @@ -691,4 +690,3 @@ bool HistogramManager::hasFolder(std::string folder) const {
}

} //end namespace BAT

File renamed without changes.