ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/TreeMod/src/AnaFwkMod.cc
(Generate patch)

Comparing UserCode/MitAna/TreeMod/src/AnaFwkMod.cc (file contents):
Revision 1.18 by bendavid, Wed May 30 16:23:54 2012 UTC vs.
Revision 1.23 by bendavid, Mon Aug 26 22:43:59 2013 UTC

# Line 33 | Line 33 | AnaFwkMod::AnaFwkMod(const char *name, c
33    fPileupInfoName("PileupInfo"),
34    fDoPUInfo(kFALSE),
35    hNPU(0),
36 <  hNPU50ns(0)
36 >  hNPU50ns(0),
37 >  hNPUTrue(0),
38 >  fMCEventInfo(0),
39 >  fMCEventInfoName(Names::gkMCEvtInfoBrn),
40 >  hDTotalMCWeight(0)
41   {
42    // Constructor.
43   }
# Line 210 | Line 214 | void AnaFwkMod::Process()
214  
215    if (GetEventHeader()->IsMC()) {
216      LoadBranch(fPileupInfoName);  
217 <    Int_t npu[3] = {0,0,0};
217 >    Double_t npu[4] = {0.,0.,0.,0.};
218      for (UInt_t i=0; i<fPileupInfo->GetEntries(); ++i) {
219        const PileupInfo *puinfo = fPileupInfo->At(i);
220        if (puinfo->GetBunchCrossing()==0) npu[0]= puinfo->GetPU_NumInteractions();
221        else if (puinfo->GetBunchCrossing()==-1) npu[1] = puinfo->GetPU_NumInteractions();
222        else if (puinfo->GetBunchCrossing()==1) npu[2] = puinfo->GetPU_NumInteractions();
223 +      if (puinfo->GetBunchCrossing()==0) npu[3]= puinfo->GetPU_NumMean();
224      }
220    
225      hNPU->Fill(npu[0]);
226      hNPU50ns->Fill(npu[0],npu[1],npu[2]);
227 +    hNPUTrue->Fill(npu[3]);
228 +    
229 +    LoadBranch(fMCEventInfoName);
230 +    hDTotalMCWeight->Fill(0., fMCEventInfo->Weight());
231 +
232    }
233  
234  
# Line 258 | Line 267 | void AnaFwkMod::SlaveBegin()
267    hNPU50ns = new TH3D("hNPU50ns", "hNPU50ns", 201, -0.5, 200.5, 201, -0.5, 200.5, 201, -0.5, 200.5);
268    AddOutput(hNPU50ns);  
269    
270 +  hNPUTrue = new TH1D("hNPUTrue", "hNPUTrue", 2000, 0.0, 200.0);
271 +  AddOutput(hNPUTrue);  
272 +  
273 +  hDTotalMCWeight = new TH1D("hDTotalMCWeight","hDTotalMCWeight",1,-0.5,0.5);
274 +  AddOutput(hDTotalMCWeight);
275 +  
276   }
277  
278   //--------------------------------------------------------------------------------------------------

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines