-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #314 from project8/feature/testScattering
expand event types
- Loading branch information
Showing
7 changed files
with
209 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* LMCTrackHold.cc | ||
* | ||
* Created on: Apr 25, 2024 | ||
* Author: pslocum | ||
*/ | ||
|
||
#include "logger.hh" | ||
#include "LMCTrackHold.hh" | ||
|
||
|
||
namespace locust | ||
{ | ||
|
||
LOGGER( lmclog, "TrackHold" ); | ||
|
||
TrackHold::TrackHold() : | ||
fTrackCounter( 0 ), | ||
fInterface( KLInterfaceBootstrapper::get_instance()->GetInterface() ) | ||
{} | ||
|
||
|
||
TrackHold::TrackHold( const TrackHold& aOrig ) : KSComponent(), | ||
fTrackCounter( 0 ), | ||
fInterface( aOrig.fInterface ) | ||
{} | ||
|
||
|
||
TrackHold::~TrackHold() | ||
{ | ||
} | ||
|
||
TrackHold* TrackHold::Clone() const | ||
{ | ||
return new TrackHold( *this ); | ||
} | ||
|
||
bool TrackHold::ConfigureByInterface() | ||
{ | ||
|
||
if (fInterface->fConfigureKass) | ||
{ | ||
const scarab::param_node* aParam = fInterface->fConfigureKass->GetParameters(); | ||
if (!this->Configure( *aParam )) | ||
{ | ||
LERROR(lmclog,"Error configuring TrackHold class"); | ||
return false; | ||
} | ||
} | ||
else | ||
{ | ||
LPROG(lmclog,"TrackHold class did not need to be configured."); | ||
return true; | ||
} | ||
return true; | ||
} | ||
|
||
bool TrackHold::Configure( const scarab::param_node& aParam ) | ||
{ | ||
return true; | ||
} | ||
|
||
|
||
bool TrackHold::ExecutePreTrackModification(Kassiopeia::KSTrack &aTrack) | ||
{ | ||
double tPitchAngle = aTrack.GetInitialParticle().GetPolarAngleToB(); | ||
LWARN(lmclog,"LMCTrack " << fTrackCounter << " is starting, with instantaneous pitch angle " << tPitchAngle); | ||
return true; | ||
} | ||
|
||
bool TrackHold::ExecutePostTrackModification(Kassiopeia::KSTrack &aTrack) | ||
{ | ||
double tPitchAngle = aTrack.GetFinalParticle().GetPolarAngleToB(); | ||
double tTime = aTrack.GetFinalParticle().GetTime(); | ||
LWARN(lmclog,"LMCTrack " << fTrackCounter << " is complete at Kass time " << tTime << ", with instantaneous pitch angle " << tPitchAngle); | ||
fTrackCounter += 1; | ||
return true; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
} // namespace locust |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* LMCTrackHoldBuilder.cc | ||
* | ||
* Created on: Apr 25, 2024 | ||
* Author: pslocum | ||
*/ | ||
|
||
|
||
#ifndef LOCUST_LMCTRACKHOLD_HH_ | ||
#define LOCUST_LMCTRACKHOLD_HH_ | ||
|
||
#include "KSTrackModifier.h" | ||
#include "KSTrack.h" | ||
|
||
#include "KSComponentTemplate.h" | ||
#include "LMCKassLocustInterface.hh" | ||
|
||
|
||
namespace locust | ||
{ | ||
|
||
class TrackHold : | ||
public Kassiopeia::KSComponentTemplate< TrackHold, Kassiopeia::KSTrackModifier > | ||
{ | ||
public: | ||
TrackHold(); | ||
TrackHold( const TrackHold& aOrig ); | ||
virtual ~TrackHold(); | ||
TrackHold* Clone() const; | ||
|
||
bool ConfigureByInterface(); | ||
bool Configure( const scarab::param_node& aParam ); | ||
|
||
|
||
|
||
|
||
public: | ||
|
||
virtual bool ExecutePreTrackModification(Kassiopeia::KSTrack &aTrack); | ||
virtual bool ExecutePostTrackModification(Kassiopeia::KSTrack &aTrack); | ||
|
||
protected: | ||
kl_interface_ptr_t fInterface; | ||
|
||
private: | ||
|
||
int fTrackCounter; | ||
|
||
|
||
}; | ||
|
||
} /* namespace locust */ | ||
|
||
|
||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* LMCTrackHoldBuilder.cc | ||
* | ||
* Created on: Apr 25, 2024 | ||
* Author: pslocum | ||
*/ | ||
|
||
#include "LMCTrackHoldBuilder.hh" | ||
|
||
#include "KSRootBuilder.h" | ||
|
||
template< > | ||
locust::TrackHoldBuilder::~KComplexElement() | ||
{ | ||
} | ||
|
||
namespace locust | ||
{ | ||
|
||
STATICINT SLMCTrackHoldStructure = | ||
locust::TrackHoldBuilder::Attribute< std::string >( "name" ); | ||
|
||
STATICINT sLMCTrackHold = | ||
katrin::KSRootBuilder::ComplexElement< locust::TrackHold >( "mod_track_hold" ); | ||
|
||
} /* namespace locust */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* LMCTrackHoldBuilder.hh | ||
* | ||
* Created on: Mar 13, 2016 | ||
* Author: nsoblath | ||
*/ | ||
|
||
#ifndef LOCUST_LMCTRACKHOLDBUILDER_HH_ | ||
#define LOCUST_LMCTRACKHOLDBUILDER_HH_ | ||
|
||
#include "KComplexElement.hh" | ||
|
||
#include "LMCTrackHold.hh" | ||
|
||
namespace locust | ||
{ | ||
|
||
typedef katrin::KComplexElement< locust::TrackHold > TrackHoldBuilder; | ||
|
||
} /* namespace locust */ | ||
|
||
template< > | ||
inline bool locust::TrackHoldBuilder::AddAttribute(KContainer *aContainer) | ||
{ | ||
if( aContainer->GetName() == "name" ) | ||
{ | ||
aContainer->CopyTo( fObject, &KNamed::SetName ); | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
|
||
#endif /* LOCUST_LMCTRACKHOLDBUILDER_HH_ */ |