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

Comparing UserCode/grimes/VHbbAnalysisCode/src/MCInfoPlotSet.cpp (file contents):
Revision 1.1 by grimes, Tue Feb 14 01:43:15 2012 UTC vs.
Revision 1.2 by grimes, Mon Feb 27 11:01:07 2012 UTC

# Line 27 | Line 27 | void trkupgradeanalysis::MCInfoPlotSet::
27          pEventString_=new TH1F( "mcEventType", "Event type from MC", 10, 0.5, 10.5 );
28          pEventString_->SetDirectory(pDirectory);
29  
30 +        pNumberOfPrimaryVertices_=new TH1F( "numberOfPrimaryVertices", "Number of primary vertices", 71, -0.5, 70.5 );
31 +        pNumberOfPrimaryVertices_->SetDirectory(pDirectory);
32 +
33 +        pNumberOfBunchCrossings_=new TH1F( "numberOfBunchCrossings", "Number of bunch crossings", 71, -0.5, 70.5 );
34 +        pNumberOfInteractionsPerBunchCrossing_=new TH1F( "numberOfInteractionsPerBunchCrossing", "Number of interactions per bunch crossing", 71, -0.5, 70.5 );
35 +        pTotalInteractionsPerEvent_=new TH1F( "totalInteractionsPerEvent", "Total number of interactions per event", 71, -0.5, 70.5 );
36 +        pNumberOfBunchCrossings_->SetDirectory(pDirectory);
37 +        pNumberOfInteractionsPerBunchCrossing_->SetDirectory(pDirectory);
38 +        pTotalInteractionsPerEvent_->SetDirectory(pDirectory);
39 +
40          histogramHaveBeenBooked_=true;
41   }
42  
# Line 88 | Line 98 | void trkupgradeanalysis::MCInfoPlotSet::
98          else binNumber=iBinNumber->second;
99  
100          pEventString_->Fill( binNumber );
101 +
102 +        pNumberOfPrimaryVertices_->Fill( eventAuxInfo.pvInfo.nVertices );
103 +
104 +        // Loop over the pile up data
105 +        unsigned int totalNumberOfInteractions=0;
106 +        unsigned int numberOfBunchCrossings=0;
107 +        for( std::map<int,unsigned int>::const_iterator iBXInteractionPair=eventAuxInfo.puInfo.pus.begin(); iBXInteractionPair!=eventAuxInfo.puInfo.pus.end(); ++iBXInteractionPair )
108 +        {
109 +                const unsigned int& numberOfInteractions=iBXInteractionPair->second;
110 +                totalNumberOfInteractions+=numberOfInteractions;
111 +                pNumberOfInteractionsPerBunchCrossing_->Fill( numberOfInteractions );
112 +                ++numberOfBunchCrossings;
113 +        }
114 +        pNumberOfBunchCrossings_->Fill( numberOfBunchCrossings );
115 +        pTotalInteractionsPerEvent_->Fill( totalNumberOfInteractions );
116 +
117   }
118  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines