Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-10 10:18:05

0001 #pragma once
0002 
0003 #include <set>
0004 
0005 #include "ChargedParticle.h"
0006 
0007 class OpticalPhoton;
0008 
0009 namespace IRT2 {
0010 
0011 class CherenkovEvent: public TObject {
0012  public:
0013   CherenkovEvent() {};
0014   ~CherenkovEvent() { Reset(); };
0015 
0016   void Reset( void ) { 
0017     for(auto particle: m_ChargedParticles)
0018       delete particle;
0019     m_ChargedParticles.clear();
0020 
0021     for(auto photon: m_OrphanPhotons)
0022       delete photon;
0023     m_OrphanPhotons.clear();
0024   };
0025 
0026   inline void AddChargedParticle(ChargedParticle *particle) { m_ChargedParticles.insert(particle); };
0027   std::set<ChargedParticle*> &ChargedParticles( void ) { return m_ChargedParticles; };
0028 
0029   inline void AddOrphanPhoton(OpticalPhoton *photon) { m_OrphanPhotons.push_back(photon); };
0030   std::vector<OpticalPhoton*> &OrphanPhotons( void ) { return m_OrphanPhotons; };
0031 
0032  private:
0033   std::set<ChargedParticle*> m_ChargedParticles;
0034 
0035   std::vector<OpticalPhoton*> m_OrphanPhotons; 
0036 
0037 #ifndef DISABLE_ROOT_IO
0038   ClassDef(CherenkovEvent, 2);
0039 #endif
0040 };
0041 
0042 } // namespace IRT2