10#include <tracking/ckf/general/findlets/ResultStorer.dcl.h>
12#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
13#include <tracking/ckf/general/utilities/SearchDirection.h>
14#include <tracking/dataobjects/RecoTrack.h>
16#include <framework/core/ModuleParamList.templateDetails.h>
24 template <
class AResult>
27 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"exportTracks"), m_param_exportTracks,
28 "Export the result tracks into a StoreArray.",
29 m_param_exportTracks);
31 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"outputRecoTrackStoreArrayName"),
32 m_param_outputRecoTrackStoreArrayName,
33 "StoreArray name of the output Track Store Array.");
34 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"outputRelationRecoTrackStoreArrayName"),
35 m_param_outputRelationRecoTrackStoreArrayName,
36 "StoreArray name of the tracks, the output reco tracks should be related to.");
38 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"writeOutDirection"),
39 m_param_writeOutDirectionAsString,
40 "Write out the relations with the direction of the VXD part as weight");
44 template <
class AResult>
49 if (not m_param_exportTracks) {
53 m_outputRecoTracks.registerInDataStore(m_param_outputRecoTrackStoreArrayName);
59 m_param_writeOutDirection =
fromString(m_param_writeOutDirectionAsString);
63 template <
class AResult>
66 if (not m_param_exportTracks) {
70 for (
const auto& result : results) {
72 const ROOT::Math::XYZVector& trackPosition = result.getPosition();
73 const ROOT::Math::XYZVector& trackMomentum = result.getMomentum();
74 const short& trackCharge = result.getCharge();
76 RecoTrack* newRecoTrack = m_outputRecoTracks.appendNew(trackPosition, trackMomentum, trackCharge);
77 result.addToRecoTrack(*newRecoTrack);
83 seed->addRelationTo(newRecoTrack, m_param_writeOutDirection);
The Module parameter list class.
This is the Reconstruction Event-Data Model Track.
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.
Accessor to arrays stored in the data store.
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.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
void initialize() override
Create the store arrays.
TrackFindingCDC::EForwardBackward fromString(const std::string &directionString)
Helper function to turn a direction string into a valid forward backward information.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
void apply(std::vector< AResult > &results) override
Load in the reco tracks and the hits.
Abstract base class for different kinds of events.