Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:16

0001 #ifndef DataFormats_ParticleFlowReco_PFSimParticle_h
0002 #define DataFormats_ParticleFlowReco_PFSimParticle_h
0003 
0004 #include "DataFormats/ParticleFlowReco/interface/PFTrack.h"
0005 
0006 #include <iostream>
0007 
0008 namespace reco {
0009 
0010   /**\class PFSimParticle
0011      \brief true particle for particle flow
0012      
0013      Additional information w/r to PFTrack: 
0014      - pdg code 
0015      - information about mother and daughters
0016      \author Renaud Bruneliere
0017      \date   July 2006
0018   */
0019   class PFSimParticle : public PFTrack {
0020   public:
0021     PFSimParticle();
0022 
0023     PFSimParticle(double charge,
0024                   int pdgCode,
0025                   unsigned id,
0026                   int motherId,
0027                   const std::vector<int>& daughterIds,
0028                   unsigned rectrackId,
0029                   const std::vector<unsigned>& recHitContrib,
0030                   const std::vector<double>& recHitContribFrac);
0031 
0032     PFSimParticle(const PFSimParticle& other);
0033 
0034     /// \return pdg code
0035     int pdgCode() const { return pdgCode_; }
0036 
0037     /// \return id
0038     unsigned id() const { return id_; }
0039 
0040     /// \return mother id
0041     int motherId() const { return motherId_; }
0042 
0043     /// \return vector of daughter ids
0044     const std::vector<int>& daughterIds() const { return daughterIds_; }
0045 
0046     //accessing MCTruth Matching Info
0047     unsigned rectrackId() const { return rectrackId_; }
0048     std::vector<unsigned> recHitContrib() const { return recHitContrib_; }
0049     std::vector<double> recHitContribFrac() const { return recHitContribFrac_; }
0050 
0051   private:
0052     /// pdg code
0053     int pdgCode_;
0054 
0055     /// position in particle vector
0056     unsigned id_;
0057 
0058     /// id of mother particle. -1 if no mother
0059     int motherId_;
0060 
0061     /// id of daughter particles (can be > 2 in hadron showers)
0062     std::vector<int> daughterIds_;
0063 
0064     unsigned rectrackId_;
0065     std::vector<unsigned> recHitContrib_;
0066     std::vector<double> recHitContribFrac_;
0067   };
0068 
0069   std::ostream& operator<<(std::ostream& out, const PFSimParticle& track);
0070 
0071 }  // namespace reco
0072 
0073 #endif