ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/grimes/VHbbAnalysisCode/src/LightweightAnalyser.cpp
(Generate patch)

Comparing UserCode/grimes/VHbbAnalysisCode/src/LightweightAnalyser.cpp (file contents):
Revision 1.3 by grimes, Tue Mar 27 23:50:44 2012 UTC vs.
Revision 1.4 by grimes, Fri Apr 27 13:52:14 2012 UTC

# Line 154 | Line 154 | void trkupgradeanalysis::LightweightAnal
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  
# Line 170 | Line 173 | void trkupgradeanalysis::LightweightAnal
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          {
# Line 211 | Line 216 | void trkupgradeanalysis::LightweightAnal
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);
# Line 231 | Line 235 | void trkupgradeanalysis::LightweightAnal
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_;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines