ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Vertex.h
(Generate patch)

Comparing UserCode/MitAna/DataTree/interface/Vertex.h (file contents):
Revision 1.15 by bendavid, Fri Oct 22 00:05:25 2010 UTC vs.
Revision 1.17 by mhchan, Fri Oct 7 23:00:04 2011 UTC

# Line 29 | Line 29 | namespace mithep
29        Vertex(const ThreeVector &pos) :
30          BaseVertex(pos), fChi2(0), fNdof(0), fAdaptiveNdof(0), fNTracks(0) {}
31        
32 <      void                AddTrack(const Track *t) { fTracks.Add(t);           }
32 >      void                AddTrack(const Track *t, Double32_t wgt = -1) { fTracks.Add(t); fTrkWeights.Add(wgt); }
33        Double_t            Chi2()      const { return fChi2;                    }
34        Int_t               Compare(const TObject *o) const;
35        Bool_t              HasTrack(const Track *t)  const { return fTracks.HasObject(t); }
# Line 45 | Line 45 | namespace mithep
45        void                SetNdof(Double_t nDof)     { fAdaptiveNdof = nDof;   }
46        void                SetNTracksFit(UInt_t n)    { fNTracks = n;           }
47        const Track        *Trk(UInt_t i) const        { return fTracks.At(i);   }
48 +      Double32_t          TrackWeight(const Track *t) const;
49 +      const FArrDouble32 &GetTrkWeights() const { return fTrkWeights; }
50              
51      protected:
52        Double32_t          fChi2;     //[0,0,12]chi squared of conversion vertex fit
# Line 52 | Line 54 | namespace mithep
54        UShort_t            fNdof;     //number of degrees of freedom of conversion vertex fit
55        Double32_t          fAdaptiveNdof; //number of degrees of freedom of vertex fit (can be non-integer for weighted components)
56        UShort_t            fNTracks;  //number of tracks used for the fit
57 +      FArrDouble32        fTrkWeights; //||array of track weights
58        RefArray<Track>     fTracks;   //tracks associated with the PV
59          
60 <    ClassDef(Vertex, 3) // Vertex class
60 >    ClassDef(Vertex, 4) // Vertex class
61    };
62   }
63  
# Line 85 | Line 88 | inline Int_t mithep::Vertex::Compare(con
88    
89    return 0;
90   }
91 +
92 + //--------------------------------------------------------------------------------------------------
93 + inline Double_t mithep::Vertex::TrackWeight(const Track *t) const
94 + {
95 +  for(UInt_t i = 0; i < fTracks.Entries(); i++)
96 +  {
97 +    if(t == fTracks.At(i))
98 +      return fTrkWeights.At(i);
99 +  }
100 +
101 +  return -1;
102 + }
103   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines