3 |
|
#include <sstream> |
4 |
|
|
5 |
|
#include "TrkUpgradeAnalysis/VHbb/interface/VHbbCandidateCutSets.h" |
6 |
+ |
#include "TrkUpgradeAnalysis/VHbb/interface/AdditionalJetStudyCutSets.h" |
7 |
|
|
8 |
|
#include "VHbbAnalysis/VHbbDataFormats/interface/VHbbEventAuxInfo.h" |
9 |
|
#include "VHbbAnalysis/VHbbDataFormats/src/HbbCandidateFinderAlgo.cc" // Not entirely sure why this is included and not linked to |
59 |
|
// All of these are empty smart pointers, so I need to call reset on them |
60 |
|
pOutputFile_.reset( new TFile( outputFilename.c_str(), "RECREATE" ) ); |
61 |
|
|
62 |
< |
cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::SignalSelectionZee(120)) ); |
63 |
< |
cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::SignalSelectionZmumu(120)) ); |
64 |
< |
cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::SignalSelectionWen(120)) ); |
65 |
< |
cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::SignalSelectionWmun(120)) ); |
66 |
< |
cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::SignalSelectionZmumuWithoutAdditionalJetsCut(120)) ); |
67 |
< |
// cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::VlightRegionHWmun) ); |
68 |
< |
// cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::VlightRegionHWen) ); |
69 |
< |
// cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::VlightRegionHZmumu) ); |
70 |
< |
// cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::VlightRegionHZee) ); |
71 |
< |
// cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::TTbarRegionHWmun) ); |
72 |
< |
// cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::TTbarRegionHWen) ); |
73 |
< |
// cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::TTbarRegionHZmumu) ); |
74 |
< |
// cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::TTbarRegionHZee) ); |
75 |
< |
// cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::VbbRegionHWmun) ); |
76 |
< |
// cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::VbbRegionHWen) ); |
77 |
< |
// cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::VbbRegionHZmumu) ); |
78 |
< |
// cutsToApply_.push_back( boost::shared_ptr<trkupgradeanalysis::VHbbCandidateCutSet>(new trkupgradeanalysis::VbbRegionHZee) ); |
62 |
> |
|
63 |
> |
using namespace trkupgradeanalysis; // Don't really need this but I like to be explicit (ooh err..) |
64 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new SignalSelectionZee(120)) ); |
65 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new SignalSelectionZmumu(120)) ); |
66 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new SignalSelectionWen(120)) ); |
67 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new SignalSelectionWmun(120)) ); |
68 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new SignalSelectionZmumuWithoutAdditionalJetsCut(120)) ); |
69 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new SignalSelectionZmumu(110)) ); |
70 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new SignalSelectionZmumu(115)) ); |
71 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new SignalSelectionZmumu(125)) ); |
72 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new SignalSelectionZmumu(130)) ); |
73 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new SignalSelectionZmumu(135)) ); |
74 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new SignalSelectionZmumu(110-20,135+10)) ); |
75 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new SignalSelectionZmumuWithCSVCutsSwitched(110-20,135+10)) ); |
76 |
> |
|
77 |
> |
// |
78 |
> |
// These are only temporary while I'm studying the number of additional jets |
79 |
> |
// |
80 |
> |
using namespace trkupgradeanalysis::additionaljetstudy; |
81 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>( new WilkenSlide2() ) ); |
82 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>( new WilkenSlide3Plot1() ) ); |
83 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>( new WilkenSlide3Plot2() ) ); |
84 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>( new WilkenSlide3Plot3() ) ); |
85 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>( new WilkenSlide4Plot2() ) ); |
86 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>( new WilkenSlide5Plot1() ) ); |
87 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>( new WilkenSlide5Plot2() ) ); |
88 |
> |
cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>( new WilkenSlide5Plot2AssumingTypo() ) ); |
89 |
> |
|
90 |
> |
// |
91 |
> |
// Don't need the following because I'm not studying the background estimation regions |
92 |
> |
// |
93 |
> |
|
94 |
> |
//cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new VlightRegionHWmun) ); |
95 |
> |
//cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new VlightRegionHWen) ); |
96 |
> |
//cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new VlightRegionHZmumu) ); |
97 |
> |
//cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new VlightRegionHZee) ); |
98 |
> |
//cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new TTbarRegionHWmun) ); |
99 |
> |
//cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new TTbarRegionHWen) ); |
100 |
> |
//cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new TTbarRegionHZmumu) ); |
101 |
> |
//cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new TTbarRegionHZee) ); |
102 |
> |
//cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new VbbRegionHWmun) ); |
103 |
> |
//cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new VbbRegionHWen) ); |
104 |
> |
//cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new VbbRegionHZmumu) ); |
105 |
> |
//cutsToApply_.push_back( boost::shared_ptr<VHbbCandidateCutSet>(new VbbRegionHZee) ); |
106 |
|
} |
107 |
|
|
108 |
|
trkupgradeanalysis::LightweightAnalyser::~LightweightAnalyser() |
208 |
|
fwlite::Handle<VHbbEventAuxInfo> vhbbAuxInfoHandle; |
209 |
|
vhbbAuxInfoHandle.getByLabel( event, "HbbAnalyzerNew" ); |
210 |
|
const VHbbEventAuxInfo* pVHbbEventAuxInfo=vhbbAuxInfoHandle.product(); |
211 |
< |
if( pVHbbEventAuxInfo == 0 ) |
184 |
< |
{ |
185 |
< |
std::cerr << "Couldn't get the VHbbEventAuxInfo" << std::endl; |
186 |
< |
return; |
187 |
< |
} |
211 |
> |
if( pVHbbEventAuxInfo == 0 ) std::cerr << "Couldn't get the VHbbEventAuxInfo" << std::endl; |
212 |
|
else |
213 |
|
{ |
214 |
|
pPlotsForEverything_->allEventTypes_.monteCarloInfo_.fill( *pVHbbEventAuxInfo ); |
231 |
|
zFinder_.run( pVHbbEvent, zCandidates ); |
232 |
|
wFinder_.run( pVHbbEvent, wCandidates ); |
233 |
|
|
210 |
– |
// fwlite::Handle<edm::View<pat::Muon> > muonHandle; |
211 |
– |
// muonHandle.getByLabel( event, "muons" ); |
212 |
– |
// const edm::View<pat::Muon>& muons=*muonHandle; |
213 |
– |
// std::cout << "muons.size()=" << muons.size() << std::endl; |
214 |
– |
|
234 |
|
fillAllPlotsStructure( &pPlotsForEverything_->allEventTypes_, *pVHbbEvent, zCandidates, wCandidates ); |
235 |
|
if( pCurrentPlotsForThisEventType!=NULL ) fillAllPlotsStructure( pCurrentPlotsForThisEventType, *pVHbbEvent, zCandidates, wCandidates ); |
236 |
|
|
218 |
– |
// // This loops over all of the muons in the event and plots some things about them |
219 |
– |
// pCurrentPlots_->allMuons_.fill( pVHbbEvent->muInfo ); |
220 |
– |
// pCurrentPlots_->allElectrons_.fill( pVHbbEvent->eleInfo ); |
221 |
– |
// |
222 |
– |
// for( std::vector<VHbbCandidate>::const_iterator iCandidate=zCandidates.begin(); iCandidate!=zCandidates.end(); ++iCandidate ) |
223 |
– |
// { |
224 |
– |
// pCurrentPlots_->candidateHistogramsForAllEvents_.fill( *iCandidate ); |
225 |
– |
// |
226 |
– |
// // Loop over all of the cuts. If this candidate passes the cuts then fill the plots |
227 |
– |
// for( std::vector<CutSetPlotSet>::iterator iCutPlotSet=pCurrentPlots_->cutCollectionPlotSets_.begin(); |
228 |
– |
// iCutPlotSet!=pCurrentPlots_->cutCollectionPlotSets_.end(); ++iCutPlotSet ) |
229 |
– |
// { |
230 |
– |
// iCutPlotSet->fill( *iCandidate ); |
231 |
– |
// } |
232 |
– |
// } |
237 |
|
|
238 |
|
if( !zCandidates.empty() || !wCandidates.empty() ) ++numberOfEventsWithAtLeastOneZOrWCandidate_; |
239 |
|
|
236 |
– |
// pCurrentPlots_->pNumberOfCandidates_->Fill( zCandidates.size(), wCandidates.size() ); |
240 |
|
} |
241 |
|
|
242 |
|
void trkupgradeanalysis::LightweightAnalyser::processFile( TFile* pInputFile ) |
289 |
|
eventStringStream << ") "; |
290 |
|
} |
291 |
|
|
292 |
< |
return eventStringStream.str(); |
292 |
> |
if( eventStringStream.str().empty() ) return "otherBackground"; |
293 |
> |
else return eventStringStream.str(); |
294 |
|
} |
295 |
|
|