Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:18:13

0001 #ifndef TRACKBASEHISTORIC_PHG4PARTICLESVTXMAP_H
0002 #define TRACKBASEHISTORIC_PHG4PARTICLESVTXMAP_H
0003 
0004 #include <phool/PHObject.h>
0005 
0006 #include <iostream>
0007 #include <map>
0008 #include <set>
0009 
0010 class PHG4ParticleSvtxMap : public PHObject
0011 {
0012  public:
0013   /// Truth->reco map with structure <g4part id, std::map< weight, std::set<reco track id>>>
0014   typedef std::map<float, std::set<unsigned int>> WeightedRecoTrackMap;
0015   typedef std::map<int, WeightedRecoTrackMap> Map;
0016   typedef std::map<int, WeightedRecoTrackMap>::const_iterator ConstIter;
0017   typedef std::map<int, WeightedRecoTrackMap>::iterator Iter;
0018 
0019   ~PHG4ParticleSvtxMap() override {}
0020 
0021   void identify(std::ostream& os = std::cout) const override
0022   {
0023     os << "PHG4ParticleSvtxMap base class " << std::endl;
0024   }
0025 
0026   int isValid() const override { return 0; }
0027   PHObject* CloneMe() const override { return nullptr; }
0028   void Reset() override {}
0029 
0030   virtual bool empty() const { return true; }
0031   virtual std::size_t size() const { return 0; }
0032   virtual std::size_t count(const int) const { return 0; }
0033   virtual void clear() {}
0034 
0035   virtual bool processed() const { return false; }
0036   virtual void setProcessed(const bool) {}
0037 
0038   virtual const WeightedRecoTrackMap& get(const int) const;
0039   virtual WeightedRecoTrackMap& get(const int);
0040   virtual WeightedRecoTrackMap insert(const int, const WeightedRecoTrackMap);
0041   virtual std::size_t erase(const int) { return 0; }
0042 
0043   virtual ConstIter begin() const;
0044   virtual ConstIter find(const int) const;
0045   virtual ConstIter end() const;
0046 
0047   virtual Iter begin();
0048   virtual Iter find(const int);
0049   virtual Iter end();
0050 
0051  protected:
0052   PHG4ParticleSvtxMap() {}
0053 
0054  private:
0055   ClassDefOverride(PHG4ParticleSvtxMap, 1);
0056 };
0057 
0058 #endif