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.24 by bendavid, Tue Aug 27 14:13:15 2013 UTC vs.
Revision 1.25 by bendavid, Fri Sep 13 10:16:35 2013 UTC

# Line 37 | Line 37 | AnaFwkMod::AnaFwkMod(const char *name, c
37    hNPUTrue(0),
38    fMCEventInfo(0),
39    fMCEventInfoName(Names::gkMCEvtInfoBrn),
40 <  hDTotalMCWeight(0)
40 >  hDTotalMCWeight(0),
41 >  hNPURunABObs(0),
42 >  hNPURunCObs(0),
43 >  hNPURunDObs(0),
44 >  hNPURunABTrue(0),
45 >  hNPURunCTrue(0),
46 >  hNPURunDTrue(0)
47   {
48    // Constructor.
49   }
# Line 222 | Line 228 | void AnaFwkMod::Process()
228        else if (puinfo->GetBunchCrossing()==1) npu[2] = puinfo->GetPU_NumInteractions();
229        if (puinfo->GetBunchCrossing()==0) npu[3]= puinfo->GetPU_NumMean();
230      }
225    hNPU->Fill(npu[0]);
226    hNPU50ns->Fill(npu[0],npu[1],npu[2]);
227    hNPUTrue->Fill(npu[3]);
231      
232      LoadBranch(fMCEventInfoName);
233 <    hDTotalMCWeight->Fill(0., fMCEventInfo->Weight());
233 >    double mcweight = fMCEventInfo->Weight();
234 >    
235 >    hNPU->Fill(npu[0],mcweight);
236 >    hNPU50ns->Fill(npu[0],npu[1],npu[2],mcweight);
237 >    hNPUTrue->Fill(npu[3],mcweight);
238 >    
239 >    UInt_t run = GetEventHeader()->RunNum();
240 >    
241 >    //Josh: fill pileup histograms for 2012 run-dependent Monte Carlo which currently has one of three run numbers
242 >    //More generic solution to be implemented depending on future run/lumi dependent Monte Carlo production strategy
243 >    if (run==194533) {
244 >      hNPURunABObs->Fill(npu[0],mcweight);
245 >      hNPURunABTrue->Fill(npu[3],mcweight);
246 >    }
247 >    else if (run==200519) {
248 >      hNPURunCObs->Fill(npu[0],mcweight);
249 >      hNPURunCTrue->Fill(npu[3],mcweight);      
250 >    }
251 >    else if (run==206859) {
252 >      hNPURunDObs->Fill(npu[0],mcweight);
253 >      hNPURunDTrue->Fill(npu[3],mcweight);      
254 >    }    
255 >    
256 >    hDTotalMCWeight->Fill(0., mcweight);
257  
258    }
259  
# Line 274 | Line 300 | void AnaFwkMod::SlaveBegin()
300    hDTotalMCWeight = new TH1D("hDTotalMCWeight","hDTotalMCWeight",1,-0.5,0.5);
301    AddOutput(hDTotalMCWeight);
302    
303 +  hNPURunABObs = new TH1D("hNPURunABObs","hNPURunABObs",201, -0.5, 200.5);
304 +  AddOutput(hNPURunABObs);  
305 +
306 +  hNPURunCObs = new TH1D("hNPURunCObs","hNPURunCObs",201, -0.5, 200.5);
307 +  AddOutput(hNPURunCObs);    
308 +  
309 +  hNPURunDObs = new TH1D("hNPURunDObs","hNPURunDObs",201, -0.5, 200.5);
310 +  AddOutput(hNPURunDObs);    
311 +  
312 +  hNPURunABTrue = new TH1D("hNPURunABTrue","hNPURunABTrue",2000, 0.0, 200.0);
313 +  AddOutput(hNPURunABTrue);  
314 +
315 +  hNPURunCTrue = new TH1D("hNPURunCTrue","hNPURunCTrue",2000, 0.0, 200.0);
316 +  AddOutput(hNPURunCTrue);    
317 +  
318 +  hNPURunDTrue = new TH1D("hNPURunDTrue","hNPURunDTrue",2000, 0.0, 200.0);
319 +  AddOutput(hNPURunDTrue);      
320 +  
321   }
322  
323   //--------------------------------------------------------------------------------------------------

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines