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.19 by ceballos, Sat Sep 22 07:55:22 2012 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   {
39    // Constructor.
40   }
# Line 210 | Line 211 | void AnaFwkMod::Process()
211  
212    if (GetEventHeader()->IsMC()) {
213      LoadBranch(fPileupInfoName);  
214 <    Int_t npu[3] = {0,0,0};
214 >    Int_t npu[4] = {0,0,0,0};
215      for (UInt_t i=0; i<fPileupInfo->GetEntries(); ++i) {
216        const PileupInfo *puinfo = fPileupInfo->At(i);
217        if (puinfo->GetBunchCrossing()==0) npu[0]= puinfo->GetPU_NumInteractions();
218        else if (puinfo->GetBunchCrossing()==-1) npu[1] = puinfo->GetPU_NumInteractions();
219        else if (puinfo->GetBunchCrossing()==1) npu[2] = puinfo->GetPU_NumInteractions();
220 +      if (puinfo->GetBunchCrossing()==0) npu[3]= puinfo->GetPU_NumMean();
221      }
222      
223      hNPU->Fill(npu[0]);
224      hNPU50ns->Fill(npu[0],npu[1],npu[2]);
225 +    hNPUTrue->Fill(npu[3]);
226    }
227  
228  
# Line 258 | Line 261 | void AnaFwkMod::SlaveBegin()
261    hNPU50ns = new TH3D("hNPU50ns", "hNPU50ns", 201, -0.5, 200.5, 201, -0.5, 200.5, 201, -0.5, 200.5);
262    AddOutput(hNPU50ns);  
263    
264 +  hNPUTrue = new TH1D("hNPUTrue", "hNPUTrue", 201, -0.5, 200.5);
265 +  AddOutput(hNPUTrue);  
266 +  
267   }
268  
269   //--------------------------------------------------------------------------------------------------

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines