45 #ifndef G4MoleculeCounter_h
46 #define G4MoleculeCounter_h
71 typedef std::map<G4double, G4int, compDoubleWithPrecision>
85 typedef std::unique_ptr<std::vector<G4MolecularConfiguration*> >
111 #ifdef MOLECULE_COUNTER_TESTING
133 int number = 1)
override;
137 int number = 1)
override;
172 fCheckTimeIsConsistentWithScheduler = flag;
187 G4cout <<
" ---> G4MoleculeCounter::ResetCounter" <<
G4endl;
void AddAMoleculeAtTime(G4MolecularConfiguration *, G4double time, const G4ThreeVector *position=nullptr, int number=1) override
The pointer G4MolecularConfiguration will be shared by all the molecules having the same molecule def...
void CheckTimeForConsistency(G4bool flag)
int SearchUpperBoundTime(double time, bool sameTypeOfMolecule)
CLHEP::Hep3Vector G4ThreeVector
std::vector< ExP01TrackerHit * > a
void ResetCounter() override
CounterMapType fCounterMap
std::set< G4double >::iterator RecordedTimesIterator
bool IsRegistered(const G4MoleculeDefinition *) override
std::unique_ptr< std::vector< G4MolecularConfiguration * > > RecordedMolecules
void RemoveAMoleculeAtTime(G4MolecularConfiguration *, G4double time, const G4ThreeVector *position=nullptr, int number=1) override
G4bool SearchTimeMap(G4MolecularConfiguration *molecule)
std::map< const G4MoleculeDefinition *, G4bool > fDontRegister
int GetNMoleculesAtTime(G4MolecularConfiguration *molecule, double time)
std::unique_ptr< Search > fpLastSearch
void RegisterAll() override
RecordedMolecules GetRecordedMolecules()
const NbMoleculeAgainstTime & GetNbMoleculeAgainstTime(G4MolecularConfiguration *molecule)
G4GLOB_DLL std::ostream G4cout
static G4MoleculeCounter * Instance()
std::map< G4MolecularConfiguration *, NbMoleculeAgainstTime > CounterMapType
void Initialize() override
G4bool IsTimeCheckedForConsistency() const
bool operator()(const double &a, const double &b) const
CounterMapType::iterator fLastMoleculeSearched
std::unique_ptr< std::set< G4double > > RecordedTimes
static G4ThreadLocal double fPrecision
NbMoleculeAgainstTime::iterator fLowerBoundTime
void DontRegister(const G4MoleculeDefinition *) override
std::map< G4double, G4int, compDoubleWithPrecision > NbMoleculeAgainstTime
G4bool fCheckTimeIsConsistentWithScheduler
RecordedTimes GetRecordedTimes()
Class Description The dynamic molecule holds all the data that change for a molecule It has a pointer...
virtual ~G4MoleculeCounter()
void SetTimeSlice(double)