154 |
|
pSubDirectory=pDirectory->mkdir( "ElectronInfos" ); |
155 |
|
plots.allElectrons_.book( pSubDirectory ); |
156 |
|
|
157 |
+ |
pSubDirectory=pDirectory->mkdir( "IsolationStudy" ); |
158 |
+ |
plots.isolationStudy_.book( pSubDirectory ); |
159 |
+ |
|
160 |
|
pSubDirectory=pDirectory->mkdir( "MonteCarloTruth" ); |
161 |
|
plots.monteCarloInfo_.book( pSubDirectory ); |
162 |
|
|
173 |
|
} |
174 |
|
} |
175 |
|
|
176 |
< |
void trkupgradeanalysis::LightweightAnalyser::fillAllPlotsStructure( AllPlots* pPlotsToFill, const VHbbEvent& vhbbEvent, const std::vector<VHbbCandidate>& zCandidates, const std::vector<VHbbCandidate>& wCandidates ) |
176 |
> |
void trkupgradeanalysis::LightweightAnalyser::fillAllPlotsStructure( AllPlots* pPlotsToFill, const VHbbEvent& vhbbEvent, const VHbbEventAuxInfo* pVHbbEventAuxInfo, const std::vector<VHbbCandidate>& zCandidates, const std::vector<VHbbCandidate>& wCandidates ) |
177 |
|
{ |
178 |
|
pPlotsToFill->allMuons_.fill( vhbbEvent.muInfo ); |
179 |
|
pPlotsToFill->allElectrons_.fill( vhbbEvent.eleInfo ); |
180 |
+ |
if( pVHbbEventAuxInfo ) pPlotsToFill->monteCarloInfo_.fill( *pVHbbEventAuxInfo ); |
181 |
+ |
pPlotsToFill->isolationStudy_.fill( vhbbEvent, pVHbbEventAuxInfo ); // This class checks if is null itself |
182 |
|
|
183 |
|
for( std::vector<VHbbCandidate>::const_iterator iCandidate=zCandidates.begin(); iCandidate!=zCandidates.end(); ++iCandidate ) |
184 |
|
{ |
216 |
|
if( pVHbbEventAuxInfo == 0 ) std::cerr << "Couldn't get the VHbbEventAuxInfo" << std::endl; |
217 |
|
else |
218 |
|
{ |
214 |
– |
pPlotsForEverything_->allEventTypes_.monteCarloInfo_.fill( *pVHbbEventAuxInfo ); |
219 |
|
std::string eventType=eventTypeFromMC( *pVHbbEventAuxInfo ); |
220 |
|
|
221 |
|
std::map<std::string,AllPlots>::iterator iPlotsForThisEventType=pPlotsForEverything_->mcEventTypePlots_.find(eventType); |
235 |
|
zFinder_.run( pVHbbEvent, zCandidates ); |
236 |
|
wFinder_.run( pVHbbEvent, wCandidates ); |
237 |
|
|
238 |
< |
fillAllPlotsStructure( &pPlotsForEverything_->allEventTypes_, *pVHbbEvent, zCandidates, wCandidates ); |
239 |
< |
if( pCurrentPlotsForThisEventType!=NULL ) fillAllPlotsStructure( pCurrentPlotsForThisEventType, *pVHbbEvent, zCandidates, wCandidates ); |
238 |
> |
fillAllPlotsStructure( &pPlotsForEverything_->allEventTypes_, *pVHbbEvent, pVHbbEventAuxInfo, zCandidates, wCandidates ); |
239 |
> |
if( pCurrentPlotsForThisEventType!=NULL ) fillAllPlotsStructure( pCurrentPlotsForThisEventType, *pVHbbEvent, pVHbbEventAuxInfo, zCandidates, wCandidates ); |
240 |
|
|
241 |
|
|
242 |
|
if( !zCandidates.empty() || !wCandidates.empty() ) ++numberOfEventsWithAtLeastOneZOrWCandidate_; |