9#include <tracking/modules/recoTracksReverter/RecoTracksReverterModule.h>
18 setDescription(
"Revert the RecoTracks, including changing of the seed position, reverting the momentum and revising the hits Order");
22 "Name of the input StoreArray");
24 "Name of the output StoreArray");
42 B2WARNING(
"DBobjects : TrackFlippingCuts not found!");
47 if (!(*m_flipCutsFromDB).getOnOffInfo())
return;
51 if (not recoTrack.wasFitSuccessful()) {
55 double mvaFlipCut = (*m_flipCutsFromDB).getFirstCut();
57 if (recoTrack.getFlipQualityIndicator() < mvaFlipCut)
continue;
61 const auto& measuredStateOnPlane = recoTrack.getMeasuredStateOnPlaneFromLastHit();
62 const ROOT::Math::XYZVector& currentPosition = ROOT::Math::XYZVector(measuredStateOnPlane.getPos());
63 const ROOT::Math::XYZVector& currentMomentum = ROOT::Math::XYZVector(measuredStateOnPlane.getMom());
64 const double& currentCharge = measuredStateOnPlane.getCharge();
67 recoTrack.getStoreArrayNameOfPXDHits(), recoTrack.getStoreArrayNameOfSVDHits(), recoTrack.getStoreArrayNameOfCDCHits(),
68 recoTrack.getStoreArrayNameOfBKLMHits(), recoTrack.getStoreArrayNameOfEKLMHits(),
69 recoTrack.getStoreArrayNameOfRecoHitInformation());
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
This is the Reconstruction Event-Data Model Track.
size_t addHitsFromRecoTrack(const RecoTrack *recoTrack, unsigned int sortingParameterOffset=0, bool reversed=false, std::optional< double > optionalMinimalWeight=std::nullopt)
Add all hits from another RecoTrack to this RecoTrack.
static void registerRequiredRelations(StoreArray< RecoTrack > &recoTracks, std::string const &pxdHitsStoreArrayName="", std::string const &svdHitsStoreArrayName="", std::string const &cdcHitsStoreArrayName="", std::string const &bklmHitsStoreArrayName="", std::string const &eklmHitsStoreArrayName="", std::string const &recoHitInformationStoreArrayName="")
Convenience method which registers all relations required to fully use a RecoTrack.
unsigned int getNumberOfTotalHits() const
Return the number of cdc + svd + pxd + bklm + eklm hits.
StoreArray< RecoTrack > m_inputRecoTracks
Store Array of the input tracks.
StoreArray< RecoTrack > m_outputRecoTracks
Store Array of the output tracks.
void initialize() override
Declare required StoreArray.
void event() override
Event processing.
RecoTracksReverterModule()
Constructor of the module. Setting up parameters and description.
std::string m_inputStoreArrayName
Name of the input StoreArray.
OptionalDBObjPtr< TrackFlippingCuts > m_flipCutsFromDB
the flipping cuts can be read from the DB
std::string m_outputStoreArrayName
Name of the output StoreArray.
void addRelationTo(const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
Add a relation from this object to another object (with caching).
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
T * appendNew()
Construct a new T object at the end of the array.
bool registerRelationTo(const StoreArray< TO > &toArray, DataStore::EDurability durability=DataStore::c_Event, DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut, const std::string &namedRelation="") const
Register a relation to the given StoreArray.
Class that bundles various TrackFitResults.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.