 |
Belle II Software
release-05-01-25
|
11 #include <tracking/ckf/cdc/findlets/CDCCKFResultStorer.h>
13 #include <tracking/ckf/general/utilities/SearchDirection.h>
14 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
15 #include <tracking/dataobjects/RecoTrack.h>
17 #include <framework/core/ModuleParamList.h>
26 "Export the result tracks into a StoreArray.",
29 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"outputRecoTrackStoreArrayName"),
31 "StoreArray name of the output Track Store Array.");
32 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"outputRelationRecoTrackStoreArrayName"),
34 "StoreArray name of the tracks, the output reco tracks should be related to.");
36 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"writeOutDirection"),
38 "Write out the relations with the direction of the CDC part as weight");
40 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"trackFindingDirection"),
42 "Direction in which the track is reconstructed (SVD/ECL seed)",
45 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"exportAllTracks"),
47 "Export all tracks, even if they did not reach the center of the CDC",
50 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"seedComponent"),
52 "Where does the seed track come from (typically SVD, ECL)",
55 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"setTakenFlag"),
57 "Set flag that hit is taken",
85 B2FATAL(
"CDCCKFResultStorer: No valid seed component specified. Please use SVD/ECL.");
92 if (result.size() < 2) {
98 trackState = &result.at(1).getTrackState();
100 trackState = &result.back().getTrackState();
102 B2FATAL(
"CDCCKFResultStorer: No valid direction specified. Please use forward/backward.");
108 && result.back().getWireHit()->getWire().getICLayer() > 2) {
112 const TVector3& trackPosition = trackState->getPos();
113 const TVector3& trackMomentum = trackState->getMom();
114 const double trackCharge = trackState->getCharge();
118 unsigned int sortingParameter = 0;
120 if (state.isSeed()) {
126 auto rl = state.getRLinfo() == TrackFindingCDC::ERightLeft::c_Right ?
127 RecoHitInformation::RightLeftInformation::c_right :
128 RecoHitInformation::RightLeftInformation::c_left;
138 const RecoTrack* seed = result.front().getSeed();
TrackFindingCDC::EForwardBackward fromString(const std::string &directionString)
Helper function to turn a direction string into a valid forward backward information.
TrackFindingCDC::EForwardBackward m_param_trackFindingDirection
Direction parameter converted from the string parameters.
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.
CDCCKFPath CDCCKFResult
Alias for the collection of CDC CKF-algorithm states.
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.
#StateOnPlane with additional covariance matrix.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
bool m_param_exportTracks
Export the tracks or not.
std::string m_param_writeOutDirectionAsString
Parameter for the distance given to the framework (can not handle EForwardBackward directly)
TrackFindingCDC::EForwardBackward m_param_writeOutDirection
Direction parameter converted from the string parameters.
bool m_param_setTakenFlag
Set flag that hit is taken.
void setTakenFlag(bool setTo=true)
Sets the taken flag to the given value. Default value true.
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).
std::string m_param_trackFindingDirectionAsString
Parameter for the direction of the CKF.
std::string m_param_outputRelationRecoTrackStoreArrayName
StoreArray name of the tracks, the output reco tracks should be related to.
void initialize() override
Receive and dispatch signal before the start of the event processing.
void apply(const std::vector< CDCCKFResult > &results) override
Do the track/hit finding/merging.
bool addCDCHit(const UsedCDCHit *cdcHit, const unsigned int sortingParameter, RightLeftInformation rightLeftInformation=RightLeftInformation::c_undefinedRightLeftInformation, OriginTrackFinder foundByTrackFinder=OriginTrackFinder::c_undefinedTrackFinder)
Adds a cdc hit with the given information to the reco track.
This is the Reconstruction Event-Data Model Track.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.
virtual void exposeParameters(ModuleParamList *moduleParamList __attribute__((unused)), const std::string &prefix __attribute__((unused)))
Forward prefixed parameters of this findlet to the module parameter list.
StoreArray< RecoTrack > m_outputRecoTracks
Output Reco Tracks Store Array.
std::string m_seedComponentString
Where does the seed track for the CKF come from (typically SVD, ECL)
bool m_param_exportAllTracks
Export all tracks, even if they did not reach the center of the CDC.
Accessor to arrays stored in the data store.
Define states for CKF algorithm, which can be seed track or CDC wire hit.
std::string m_param_outputRecoTrackStoreArrayName
StoreArray name of the output Track Store Array.
Class representing a hit wire in the central drift chamber.
The Module parameter list class.
void initialize() override
Register the store arrays.
RecoHitInformation::OriginTrackFinder m_trackFinderType
What was used to seed the CKF (typically c_SVDtoCDCCKF, c_ECLtoCDCCKF)