Skip to content

Commit

Permalink
Add starting kinetic energy to track properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
pslocum committed Jul 18, 2024
1 parent a639de0 commit c347479
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/IO/LMCEvent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ namespace locust

void Event::AddTrack(const Track aTrack)
{
fOutputStartFrequencies.push_back( aTrack.OutputStartFrequency );
fStartingEnergies_eV.push_back( aTrack.StartingEnergy_eV );
fOutputStartFrequencies.push_back( aTrack.OutputStartFrequency );
fStartFrequencies.push_back( aTrack.StartFrequency );
fEndFrequencies.push_back( aTrack.EndFrequency );
fAvgFrequencies.push_back( aTrack.AvgFrequency );
Expand Down
1 change: 1 addition & 0 deletions Source/IO/LMCEvent.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ namespace locust
double fLOFrequency;
int fRandomSeed;

std::vector<double> fStartingEnergies_eV;
std::vector<double> fOutputStartFrequencies;
std::vector<double> fStartFrequencies;
std::vector<double> fEndFrequencies;
Expand Down
1 change: 1 addition & 0 deletions Source/IO/LMCRootTreeWriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ namespace locust
TTree *aTree = new TTree(treename,"Locust Tree");
aTree->Branch("EventID", &anEvent->fEventID, "EventID/I");
aTree->Branch("ntracks", &anEvent->fNTracks, "ntracks/I");
aTree->Branch("StartingEnergieseV", "std::vector<double>", &anEvent->fStartingEnergies_eV);
aTree->Branch("OutputStartFrequencies", "std::vector<double>", &anEvent->fOutputStartFrequencies);
aTree->Branch("StartFrequencies", "std::vector<double>", &anEvent->fStartFrequencies);
aTree->Branch("EndFrequencies", "std::vector<double>", &anEvent->fEndFrequencies);
Expand Down
1 change: 1 addition & 0 deletions Source/IO/LMCTrack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace locust
StartTime = -99.;
EndTime = -99.;
TrackLength = -99.;
StartingEnergy_eV = -99.;
OutputStartFrequency = -99.;
StartFrequency = -99.;
EndFrequency = -99.;
Expand Down
1 change: 1 addition & 0 deletions Source/IO/LMCTrack.hh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace locust
double StartTime = -99.;
double EndTime = -99.;
double TrackLength = -99.;
double StartingEnergy_eV = -99.;
double OutputStartFrequency = -99.;
double StartFrequency = -99.;
double EndFrequency = -99.;
Expand Down
1 change: 1 addition & 0 deletions Source/Kassiopeia/LMCCyclotronRadiationExtractor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ namespace locust
double tY = aFinalParticle.GetPosition().Y();
fInterface->aTrack.Radius = pow(tX*tX + tY*tY, 0.5);
fInterface->aTrack.RadialPhase = calcOrbitPhase(tX, tY);
fInterface->aTrack.StartingEnergy_eV = LMCConst::kB_eV() / LMCConst::kB() * aFinalParticle.GetKineticEnergy();
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
}
else
Expand Down

0 comments on commit c347479

Please sign in to comment.