Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:10:13

0001 #ifndef RECONNECTIONS_Main_Reconnection_Weights_H
0002 #define RECONNECTIONS_Main_Reconnection_Weights_H
0003 
0004 #include "ATOOLS/Phys/Particle.H"
0005 
0006 namespace RECONNECTIONS {
0007   typedef std::map<ATOOLS::Particle *, double>  distances;
0008 
0009   class Reconnection_Base;
0010   
0011   class Reconnection_Weights {
0012   private:
0013     Reconnection_Base * p_reconnector;
0014 
0015     ATOOLS::ParticleSet                     * p_parts[2];
0016     std::map<ATOOLS::Particle *,distances * > m_distances;
0017 
0018     void   SetLists();
0019     void   OutputWeightTable();
0020   public:
0021     Reconnection_Weights(Reconnection_Base * reconnector);
0022     ~Reconnection_Weights() {}
0023     
0024     void FillTables();
0025     void Reset();
0026 
0027     inline const double operator()(ATOOLS::Particle * part1,
0028                    ATOOLS::Particle * part2) {
0029       if (part1==part2) return 1.;
0030       distances * dist = m_distances[part1];
0031       return (*dist)[part2];
0032     }
0033     inline void SetWeight(ATOOLS::Particle * part1,
0034               ATOOLS::Particle * part2,const double & wt) {
0035       (*m_distances[part1])[part2] = wt;
0036     }
0037   };
0038 }
0039 #endif