43 #include "G4RunManager.hh"
44 #include "G4SDManager.hh"
48 #include "G4PrimaryVertex.hh"
49 #include "G4VProcess.hh"
50 #include "G4HCofThisEvent.hh"
51 #include "G4UserEventAction.hh"
53 #include <CLHEP/Random/Randomize.h>
54 #include <CLHEP/Units/SystemOfUnits.h>
55 #include <CLHEP/Units/PhysicalConstants.h>
56 #include <CLHEP/Units/GlobalSystemOfUnits.h>
57 #include <CLHEP/Units/GlobalPhysicalConstants.h>
66 #include "TLorentzVector.h"
67 #include "TUnixSystem.h"
83 typedef std::vector<std::vector<std::vector<std::vector<CastorShowerEvent> > > >
SLBin3D;
89 public Observer<const BeginOfEvent*>,
159 void GetKinematics(G4PrimaryParticle*,
double& px,
double& py,
double& pz,
double& pInit,
double&
eta,
double&
phi);
160 void GetKinematics(
int,
double& px,
double& py,
double& pz,
double& pInit,
double&
eta,
double&
phi);
162 std::vector<G4PrimaryParticle*>
GetPrimary(
const G4Event*);
188 DeActivatePhysicsProcess(
false),
211 for (
unsigned int i = 0;
i < PGParticleIDs.size();
i++) {
226 std::cout <<
"============================================================================" << std::endl;
227 std::cout <<
"CastorShowerLibraryMaker:: Initialized as observer" << std::endl;
228 std::cout <<
" Event Ntuple will be created" << std::endl;
229 std::cout <<
" Event Ntuple file: " << eventNtFileName << std::endl;
236 std::cout <<
"============================================================================" << std::endl;
244 int nBinsE, nBinsEta, nBinsPhi, nEvtPerBinPhi;
246 nBinsEta = showerholder.
SLEtaBins.size();
247 nBinsPhi = showerholder.
SLPhiBins.size();
270 showerholder.
nEvtInBinEta.assign(nBinsE, std::vector<int>(0));
272 for (
int i = 0;
i < nBinsE;
i++) {
275 showerholder.
nEvtInBinPhi.at(
i).assign(nBinsEta, std::vector<int>(0));
276 for (
int j = 0;
j < nBinsEta;
j++) {
277 showerholder.
SLCollection.at(
i).at(
j).assign(nBinsPhi, std::vector<CastorShowerEvent>());
279 for (
int k = 0;
k < nBinsPhi;
k++)
290 std::cout <<
"CastorShowerLibraryMaker: End of process" << std::endl;
295 std::cout <<
" CastorShowerLibraryMaker::Starting new job " << std::endl;
300 std::cout << std::endl <<
"CastorShowerLibraryMaker: Starting Run" << std::endl;
302 std::cout <<
"CastorShowerLibraryMaker: output event root file created" << std::endl;
305 theFile =
new TFile(eventfilename,
"RECREATE");
306 theTree =
new TTree(
"CastorCherenkovPhotons",
"Cherenkov Photons");
315 theTree->Branch(
"emShowerLibInfo.",
"CastorShowerLibraryInfo", &
emInfo, bsize, split);
316 theTree->Branch(
"emParticles.",
"CastorShowerEvent", &
emShower, bsize, split);
317 theTree->Branch(
"hadShowerLibInfo.",
"CastorShowerLibraryInfo", &
hadInfo, bsize, split);
318 theTree->Branch(
"hadParticles.",
"CastorShowerEvent", &
hadShower, bsize, split);
382 G4EventManager* e_mgr = G4EventManager::GetEventManager();
390 for (
unsigned int i = 0;
i <
thePrims.size();
i++) {
391 G4PrimaryParticle* thePrim =
thePrims.at(
i);
395 if (particleType == 11) {
397 SLType =
"Electromagnetic";
402 double px = 0., py = 0., pz = 0., pInit = 0.,
eta = 0.,
phi = 0.;
408 std::cout <<
"\n========================================================================"
409 <<
"\nBeginOfEvent: E : " << pInit <<
"\t bin : " << ebin <<
"\n Eta : " <<
eta
410 <<
"\t bin : " << etabin <<
"\n Phi : " <<
phi <<
"\t bin : " << phibin
411 <<
"\n========================================================================" << std::endl;
413 if (ebin < 0 || etabin < 0 || phibin < 0)
437 <<
"Event not accepted for ebin=" << ebin <<
",etabin=" << etabin <<
",phibin=" << phibin << std::endl;
445 if (NAccepted == 0) {
446 const_cast<G4Event*
>((*evt)())->SetEventAborted();
447 const_cast<G4Event*
>((*evt)())->KeepTheEvent((G4bool)
false);
448 e_mgr->AbortCurrentEvent();
452 std::cout <<
"CastorShowerLibraryMaker: Processing Event Number: " <<
eventIndex << std::endl;
457 static thread_local
int CurrentPrimary = 0;
458 G4Track* trk = aStep->GetTrack();
460 if (trk->GetCurrentStepNumber() == 1) {
461 if (trk->GetParentID() == 0) {
462 CurrentPrimary = (int)trk->GetDynamicParticle()->GetPDGcode();
463 if (CurrentPrimary == 0)
464 SimG4Exception(
"CastorShowerLibraryMaker::update(G4Step) -> Primary particle undefined");
468 G4ProcessManager* p_mgr = trk->GetDefinition()->GetProcessManager();
469 G4ProcessVector* pvec = p_mgr->GetProcessList();
470 pvec_size = pvec->size();
471 for (
int i = 0;
i < pvec_size;
i++) {
472 G4VProcess*
proc = (*pvec)(
i);
473 if (proc->GetProcessName() !=
"Transportation" && proc->GetProcessName() !=
"Decay") {
474 std::cout <<
"DeActivating process: " << proc->GetProcessName() << std::endl;
475 p_mgr->SetProcessActivation(proc,
false);
482 double t =
std::abs((pos.z() - trk->GetPosition().z())) / trk->GetVelocity();
483 double r = (pos.z() - trk->GetPosition().z()) / trk->GetMomentum().cosTheta();
484 pos.setX(r *
sin(trk->GetMomentum().theta()) *
cos(trk->GetMomentum().phi()) + trk->GetPosition().x());
485 pos.setY(r *
sin(trk->GetMomentum().theta()) *
sin(trk->GetMomentum().phi()) + trk->GetPosition().y());
486 trk->SetPosition(pos);
487 trk->SetGlobalTime(trk->GetGlobalTime() +
t);
488 trk->AddTrackLength(r);
490 std::cout <<
"CastorShowerLibraryMaker::update(G4Step) -> Killing spurious track" << std::endl;
491 trk->SetTrackStatus(fKillTrackAndSecondaries);
497 std::string CurVolume = trk->GetVolume()->GetName();
502 CurVolume ==
"CAST")) {
507 G4ProcessManager* p_mgr = trk->GetDefinition()->GetProcessManager();
508 G4ProcessVector* pvec = p_mgr->GetProcessList();
509 pvec_size = pvec->size();
510 for (
int i = 0;
i < pvec_size;
i++) {
511 G4VProcess*
proc = (*pvec)(
i);
512 if (proc->GetProcessName() !=
"Transportation" && proc->GetProcessName() !=
"Decay") {
513 std::cout <<
" Activating process: " << proc->GetProcessName() << std::endl;
514 p_mgr->SetProcessActivation(proc,
true);
520 if (trk->GetMomentum().phi() >
MaxPhi || trk->GetMomentum().eta() >
MaxEta) {
521 trk->SetTrackStatus(fKillTrackAndSecondaries);
531 if (CurrentPrimary != 0 && trk->GetParentID() == 0 && !
InsideCastor) {
534 double pre_phi = aStep->GetPreStepPoint()->GetMomentum().phi();
535 double cur_phi = trk->GetMomentum().phi();
536 if (pre_phi != cur_phi) {
537 std::cout <<
"Primary track phi : " << pre_phi <<
" changed in current step: " << cur_phi
538 <<
" by processes:" << std::endl;
539 const G4VProcess*
proc = aStep->GetPreStepPoint()->GetProcessDefinedStep();
540 std::cout <<
" " << proc->GetProcessName() <<
" In volume " << CurVolume << std::endl;
561 if ((*evt)()->IsAborted()) {
562 std::cout <<
"\n========================================================================"
563 <<
"\nEndOfEvent: EVENT ABORTED"
564 <<
"\n========================================================================" << std::endl;
577 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"No valid primary particle found. Skipping event" << std::endl;
581 G4HCofThisEvent* allHC = (*evt)()->GetHCofThisEvent();
582 int CAFIid = G4SDManager::GetSDMpointer()->GetCollectionID(
"CastorFI");
585 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
" update(*evt) --> accessed all HC ";
586 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"Found " << theCAFI->entries() <<
" hits in G4HitCollection";
587 if (theCAFI->entries() == 0) {
593 int NEvtAccepted = 0;
595 for (
unsigned int i = 0;
i <
thePrims.size();
i++) {
596 G4PrimaryParticle* thePrim =
thePrims.at(
i);
598 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"nullptr Pointer to the primary" << std::endl;
606 if (particleType == 11) {
608 SLType =
"Electromagnetic";
613 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"\n Primary (thePrim) trackID is " << thePrim->GetTrackID() <<
"\n";
616 double px = 0., py = 0., pz = 0., pInit = 0.,
eta = 0.,
phi = 0.;
621 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"Primary did not hit CASTOR" << std::endl;
631 <<
"Event not accepted for ebin=" << ebin <<
",etabin=" << etabin <<
",phibin=" << phibin <<
"(" << pInit
632 <<
"," <<
eta <<
"," <<
phi <<
")" << std::endl;
640 <<
"\n CastorShowerLibraryMaker::update(EndOfEvent * evt) - event #" << (*evt)()->GetEventID();
669 NHitInEvent += shower->
getNhit();
676 int thecafi_entries = theCAFI->entries();
677 if (NEvtAccepted ==
int(
thePrims.size()) && thecafi_entries != NHitInEvent) {
678 std::cout <<
"WARNING: Inconsistent Number of Hits -> Hits in collection: " << theCAFI->entries()
679 <<
" Hits in the showers: " << NHitInEvent << std::endl;
680 double miss_energy = 0;
681 double tot_energy = 0;
683 if (miss_energy > 0) {
684 std::cout <<
"Total missing energy: " << miss_energy <<
" for an incident energy: " << tot_energy << std::endl;
714 unsigned int ibine, ibineta, ibinphi, ievt;
715 unsigned int jbine, jbineta, jbinphi, jevt;
717 ibine = ibineta = ibinphi = ievt = jbine = jbineta = jbinphi = jevt = 0;
722 int maxEvtInTree =
std::max(nEMevt, nHadevt);
727 while (nEvtInTree < maxEvtInTree) {
768 if (nEvtInTree == 1) {
769 theTree->SetBranchStatus(
"emShowerLibInfo.",
false);
770 theTree->SetBranchStatus(
"hadShowerLibInfo.",
false);
775 throw SimG4Exception(
"\n\nNumber of needed trigger events reached in CastorShowerLibraryMaker\n\n");
783 theTree->Write(
"", TObject::kOverwrite);
784 std::cout <<
"CastorShowerLibraryMaker: Ntuple event written" << std::endl;
786 std::cout <<
"CastorShowerLibraryMaker: Event file closed" << std::endl;
800 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"\n\nFindEnergyBin can be called only after BeginOfEvent\n\n";
801 throw SimG4Exception(
"\n\nnullptr Pointer to the shower library.\n\n");
804 if (energy >= SLenergies.back())
805 return SLenergies.size() - 1;
808 for (; i < SLenergies.size() - 1; i++)
809 if (energy >= SLenergies.at(i) && energy < SLenergies.at(i + 1))
813 if (energy >= SLenergies.at(i))
824 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"\n\nFindEtaBin can be called only after BeginOfEvent\n\n";
825 throw SimG4Exception(
"\n\nnullptr Pointer to the shower library.\n\n");
828 if (eta >= SLetas.back())
829 return SLetas.size() - 1;
831 for (; i < SLetas.size() - 1; i++)
832 if (eta >= SLetas.at(i) && eta < SLetas.at(i + 1))
835 if (eta >= SLetas.at(i))
848 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"\n\nFindPhiBin can be called only after BeginOfEvent\n\n";
849 throw SimG4Exception(
"\n\nnullptr Pointer to the shower library.\n\n");
852 if (phi >= SLphis.back())
853 return SLphis.size() - 1;
855 for (; i < SLphis.size() - 1; i++)
856 if (phi >= SLphis.at(i) && phi < SLphis.at(i + 1))
859 if (phi >= SLphis.at(i))
867 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"\n\nIsSLReady must be called when a new event starts.\n\n";
868 throw SimG4Exception(
"\n\nNOT nullptr Pointer to the shower library.\n\n");
893 int thePrim,
double& px,
double& py,
double& pz,
double& pInit,
double&
eta,
double&
phi) {
904 double costheta = pz / pInit;
906 eta = -
log(
tan(theta / 2.0));
907 phi = (px == 0 && py == 0) ? 0 : atan2(py, px);
911 G4PrimaryParticle* thePrim,
double& px,
double& py,
double& pz,
double& pInit,
double&
eta,
double&
phi) {
912 px = py = pz = phi = eta = 0.0;
913 if (thePrim ==
nullptr)
915 px = thePrim->GetMomentum().x() /
GeV;
916 py = thePrim->GetMomentum().y() /
GeV;
917 pz = thePrim->GetMomentum().z() /
GeV;
918 pInit = thePrim->GetMomentum().mag() /
GeV;
922 double costheta = pz / pInit;
924 eta = -
log(
tan(theta / 2.0));
925 phi = (px == 0 && py == 0) ? 0 : atan2(py, px);
926 phi = thePrim->GetMomentum().phi();
932 std::vector<G4PrimaryParticle*>
thePrims;
933 G4PrimaryParticle* thePrim =
nullptr;
934 G4int nvertex = evt->GetNumberOfPrimaryVertex();
935 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"Event has " << nvertex <<
" vertex";
937 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"CastorShowerLibraryMaker::GetPrimary ERROR: no vertex";
941 for (
int i = 0;
i < nvertex;
i++) {
942 G4PrimaryVertex* avertex = evt->GetPrimaryVertex(
i);
943 if (avertex ==
nullptr) {
945 <<
"CastorShowerLibraryMaker::GetPrimary ERROR: pointer to vertex = 0";
948 unsigned int npart = avertex->GetNumberOfParticle();
951 for (
unsigned int j = 0;
j <
npart;
j++) {
955 thePrim = avertex->GetPrimary(trackID);
961 thePrims.push_back(thePrim);
968 edm::LogVerbatim(
"CastorShowerLibraryInfo") <<
"nullptr shower pointer. Printing both";
969 std::cout <<
"Electromagnetic" << std::endl;
982 for (
int n = 0;
n < 11 + (nBinsEta * nBinsPhi);
n++)
985 for (
int i = 0;
i < nBinsE;
i++) {
986 std::cout <<
"E bin " << std::setw(6) << SLenergies.at(
i) <<
" : ";
987 for (
int j = 0;
j < nBinsEta;
j++) {
988 for (
int k = 0;
k < nBinsPhi;
k++) {
991 if (
j < nBinsEta - 1)
999 for (
int j = 0;
j < nBinsEta;
j++) {
1000 for (
int k = 0;
k < nBinsPhi;
k++) {
1003 if (
j < nBinsEta - 1)
1008 for (
int n = 0;
n < 11 + (nBinsEta * nBinsPhi);
n++)
1014 edm::LogVerbatim(
"CastorShowerLibraryMaker::SLacceptEvent:") <<
"Error. nullptr pointer to CastorShowerEvent";
1034 unsigned int volumeID = 0;
1035 double en_in_fi = 0.;
1038 int nentries = theCAFI->entries();
1048 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"Error. nullptr pointer to CastorShowerEvent";
1058 for (
int ihit = 0; ihit < nentries; ihit++) {
1063 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"Skipping hit from trackID " << hit_particleID;
1070 int zside, sector, zmodule;
1071 theCastorNumScheme->
unpackIndex(volumeID, zside, sector, zmodule);
1075 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"\n side , sector , module = " << zside <<
" , " << sector
1076 <<
" , " << zmodule <<
"\n nphotons = " << hitEnergy;
1080 <<
"\n packIndex = " << theCastorNumScheme->
packIndex(zside, sector, zmodule);
1084 <<
"\n nentries = " << nentries <<
"\n time[" << ihit <<
"] = " << time <<
"\n trackID[" << ihit
1085 <<
"] = " << aHit->
getTrackID() <<
"\n volumeID[" << ihit <<
"] = " << volumeID <<
"\n nphotons[" << ihit
1086 <<
"] = " << hitEnergy <<
"\n side, sector, module = " << zside <<
", " << sector <<
", " << zmodule
1087 <<
"\n packIndex " << theCastorNumScheme->
packIndex(zside, sector, zmodule) <<
"\n X,Y,Z = " << entry.x()
1088 <<
"," << entry.y() <<
"," << entry.z();
1103 <<
"No hits found for this track (trackID=" << ipart <<
")." << std::endl;
1104 if (theCastorNumScheme)
1105 delete theCastorNumScheme;
1111 if (theCastorNumScheme)
1112 delete theCastorNumScheme;
1117 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"\n\nSLnEvtInBinE can be called only after BeginOfEvent\n\n";
1118 throw SimG4Exception(
"\n\nnullptr Pointer to the shower library.");
1125 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"\n\nSLnEvtInBinEta can be called only after BeginOfEvent\n\n";
1126 throw SimG4Exception(
"\n\nnullptr Pointer to the shower library.");
1133 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"\n\nSLnEvtInBinPhi can be called only after BeginOfEvent\n\n";
1134 throw SimG4Exception(
"\n\nnullptr Pointer to the shower library.");
1140 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"\n\nSLisEBinFilled can be called only after BeginOfEvent\n\n";
1141 throw SimG4Exception(
"\n\nnullptr Pointer to the shower library.");
1149 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"\n\nSLisEtaBinFilled can be called only after BeginOfEvent\n\n";
1150 throw SimG4Exception(
"\n\nnullptr Pointer to the shower library.");
1158 edm::LogVerbatim(
"CastorShowerLibraryMaker") <<
"\n\nSLisPhiBinFilled can be called only after BeginOfEvent\n\n";
1159 throw SimG4Exception(
"\n\nnullptr Pointer to the shower library.");
1166 const G4TrackVector* p_sec = aStep->GetSecondary();
1167 for (
int i = 0;
i < int(p_sec->size());
i++) {
1168 std::cout <<
"Killing track ID " << p_sec->at(
i)->GetTrackID() <<
" and its secondaries"
1169 <<
" Produced by Process " << p_sec->at(
i)->GetCreatorProcess()->GetProcessName()
1170 <<
" in the volume " << aStep->GetTrack()->GetVolume()->GetName() << std::endl;
1171 p_sec->at(
i)->SetTrackStatus(fKillTrackAndSecondaries);
1179 int nhits = theCAFI->entries();
1180 for (
int ihit = 0; ihit <
nhits; ihit++) {
1181 int id = (*theCAFI)[ihit]->getTrackID();
1182 tot_energy += (*theCAFI)[ihit]->getEnergyDeposit();
1184 for (
unsigned int i = 0;
i <
thePrims.size();
i++) {
1189 if (hit_prim == 0) {
1190 std::cout <<
"Track ID " <<
id <<
" produced a hit which is not associated with a primary." << std::endl;
1191 miss_energy += (*theCAFI)[ihit]->getEnergyDeposit();
std::string eventNtFileName
std::vector< double > SLEtaBins
void Clear(Option_t *option="") override
Log< level::Info, true > LogVerbatim
void setNBins(unsigned int n)
#define DEFINE_SIMWATCHER(type)
math::XYZPoint getPosition() const
static std::vector< std::string > checklist log
bool DeActivatePhysicsProcess
void setPrimEta(float eta)
int & SLnEvtInBinE(int ebin)
void setDetID(unsigned int id)
CastorShowerEvent * hadShower
std::vector< double > SLPhiBins
int & SLnEvtInBinEta(int ebin, int etabin)
void setPrimPhi(float phi)
std::vector< G4PrimaryParticle * > thePrims
CastorShowerLibraryInfo SLInfo
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
bool FillShowerEvent(CaloG4HitCollection *, CastorShowerEvent *, int)
double getIncidentEnergy() const
std::map< int, G4ThreeVector > PrimaryPosition
void KillSecondaries(const G4Step *step)
void InitSLHolder(ShowerLib &)
void printSLstatus(int, int, int)
std::vector< std::vector< std::vector< std::vector< CastorShowerEvent > > > > SLBin3D
bool SLacceptEvent(int, int, int)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
bool SLisEtaBinFilled(int ebin, int etabin)
static void unpackIndex(const uint32_t &idx, int &z, int §or, int &zmodule)
void setNEvtPerBin(unsigned int n)
std::map< int, std::set< int > > MapOfSecondaries
std::vector< G4PrimaryParticle * > GetPrimary(const G4Event *)
bool SLisEBinFilled(int ebin)
CastorShowerLibraryInfo * hadInfo
std::vector< int > nEvtInBinE
int FindEnergyBin(double e)
~CastorShowerLibraryMaker() override
Cos< T >::type cos(const T &t)
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
std::vector< std::vector< std::vector< int > > > nEvtInBinPhi
unsigned int nEvtPerBinPhi
CastorShowerLibraryInfo * emInfo
CastorShowerLibraryMaker(const edm::ParameterSet &p)
void GetMissingEnergy(CaloG4HitCollection *, double &, double &)
void GetKinematics(G4PrimaryParticle *, double &px, double &py, double &pz, double &pInit, double &eta, double &phi)
int & SLnEvtInBinPhi(int ebin, int etabin, int phibin)
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< std::vector< int > > nEvtInBinEta
T getParameter(std::string const &) const
caConstants::TupleMultiplicity const CAHitNtupletGeneratorKernelsGPU::HitToTuple const cms::cuda::AtomicPairCounter GPUCACell const *__restrict__ uint32_t const *__restrict__ gpuPixelDoublets::CellNeighborsVector const gpuPixelDoublets::CellTracksVector const GPUCACell::OuterHitOfCell const int32_t nHits
int FindPhiBin(double phi)
void setNEvts(unsigned int n)
unsigned int nEvtPerBinEta
G4THitsCollection< CaloG4Hit > CaloG4HitCollection
static int position[264][3]
bool SLisPhiBinFilled(int ebin, int etabin, int phibin)
std::map< int, G4ThreeVector > PrimaryMomentum
double getTimeSlice() const
std::vector< double > SLEnergyBins
int FindEtaBin(double eta)
math::XYZPoint getEntry() const
std::vector< int > PGParticleIDs
void update(const BeginOfJob *run) override
This routine will be called when the appropriate signal arrives.
uint32_t getUnitID() const
static uint32_t packIndex(int z, int sector, int zmodule)
void setNphotons(float np)
CastorShowerEvent * emShower
void setNhit(unsigned int i)
void setHitPosition(const Point &p)
double getEnergyDeposit() const