ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPhysics/Mods/src/SeparatePileUpMod.cc
(Generate patch)

Comparing UserCode/MitPhysics/Mods/src/SeparatePileUpMod.cc (file contents):
Revision 1.1 by ceballos, Fri Apr 27 21:03:35 2012 UTC vs.
Revision 1.2 by ceballos, Fri Apr 27 22:41:41 2012 UTC

# Line 15 | Line 15 | SeparatePileUpMod::SeparatePileUpMod(con
15    fPFCandidatesName(Names::gkPFCandidatesBrn),
16    fPFPileUpName("PFPileUp"),
17    fPFNoPileUpName("PFNoPileUp"),
18 +  fAllVertexName(Names::gkPVBrn),
19    fVertexName(ModNames::gkGoodVertexesName),
20    fPFCandidates(0),
21 +  fAllVertices(0),
22    fVertices(0),
23    fCheckClosestZVertex(kTRUE)
24   {
# Line 36 | Line 38 | void SeparatePileUpMod::Process()
38    PFCandidateOArr *pfNoPileUp = new PFCandidateOArr;
39    pfNoPileUp->SetName(fPFNoPileUpName);
40  
41 +  LoadBranch(fAllVertexName);
42    fVertices = GetObjThisEvt<VertexOArr>(fVertexName);
43  
44    for(UInt_t i = 0; i < fPFCandidates->GetEntries(); i++) {
# Line 54 | Line 57 | void SeparatePileUpMod::Process()
57          const Vertex *closestVtx = 0;
58          Double_t dzmin = 10000;
59  
60 <        for(UInt_t j = 0; j < fVertices->GetEntries(); j++) {
61 <          const Vertex *vtx = fVertices->At(j);
60 >        for(UInt_t j = 0; j < fAllVertices->GetEntries(); j++) {
61 >          const Vertex *vtx = fAllVertices->At(j);
62            assert(vtx);
63  
64            if(pf->HasTrackerTrk() &&
# Line 104 | Line 107 | void SeparatePileUpMod::SlaveBegin()
107    // Run startup code on the computer (slave) doing the actual analysis. Here,
108    // we just request the Tau collection branch.
109  
110 +  ReqBranch(fAllVertexName,    fAllVertices);
111    ReqBranch(fPFCandidatesName, fPFCandidates);
112   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines