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.3 by ceballos, Fri May 4 20:28:33 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)
23 >  fCheckClosestZVertex(kTRUE),
24 >  fUseAllVertices(kTRUE)
25   {
26    // Constructor.
27   }
# Line 36 | Line 39 | void SeparatePileUpMod::Process()
39    PFCandidateOArr *pfNoPileUp = new PFCandidateOArr;
40    pfNoPileUp->SetName(fPFNoPileUpName);
41  
42 <  fVertices = GetObjThisEvt<VertexOArr>(fVertexName);
42 >  LoadBranch(fAllVertexName);
43 >  
44 >  if(fUseAllVertices == kTRUE) fVertices = fAllVertices;
45 >  else                         fVertices = GetObjThisEvt<VertexOArr>(fVertexName);
46  
47    for(UInt_t i = 0; i < fPFCandidates->GetEntries(); i++) {
48      const PFCandidate *pf = fPFCandidates->At(i);
# Line 54 | Line 60 | void SeparatePileUpMod::Process()
60          const Vertex *closestVtx = 0;
61          Double_t dzmin = 10000;
62  
63 <        for(UInt_t j = 0; j < fVertices->GetEntries(); j++) {
64 <          const Vertex *vtx = fVertices->At(j);
63 >        for(UInt_t j = 0; j < fAllVertices->GetEntries(); j++) {
64 >          const Vertex *vtx = fAllVertices->At(j);
65            assert(vtx);
66  
67            if(pf->HasTrackerTrk() &&
# Line 104 | Line 110 | void SeparatePileUpMod::SlaveBegin()
110    // Run startup code on the computer (slave) doing the actual analysis. Here,
111    // we just request the Tau collection branch.
112  
113 +  ReqBranch(fAllVertexName,    fAllVertices);
114    ReqBranch(fPFCandidatesName, fPFCandidates);
115   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines