8#include "trg/cdc/modules/mcmatcher/CDCTriggerRecoHitMatcherModule.h"
10#include <cdc/dataobjects/CDCHit.h>
12#include <framework/gearbox/Const.h>
18 struct iter_pair_range : std::pair<Iter, Iter> {
19 explicit iter_pair_range(std::pair<Iter, Iter>
const& x) :
std::pair<Iter, Iter>(x) {}
20 Iter begin()
const {
return this->first;}
21 Iter end()
const {
return this->second;}
25 inline iter_pair_range<Iter> as_range(std::pair<Iter, Iter>
const& x)
27 return iter_pair_range<Iter>(x);
33 typedef float Efficiency;
47 setDescription(
"A module to match CDCTriggerTracks to RecoTracks.\n"
48 "First makes relations from RecoTracks to CDCTriggerSegmentHits, "
49 "then makes relations from RecoTracks to CDCTriggerTracks "
53 "Name of the RecoTrack StoreArray to be matched.",
54 string(
"RecoTracks"));
56 "Name of the MCParticle StoreArray to be matched.",
57 string(
"MCParticles"));
59 "Name of a new StoreArray holding MCParticles considered as trackable.",
63 "Name of the StoreArray holding primary MCParticle matched to a RecoTrack, but the vertex and momentum is overridden with the RecoTrack values.",
64 string(
"RecoTrackable"));
66 "Name of the StoreArray of CDCTriggerSegmentHits used for the matching.",
69 "Name of the Track StoreArray.",
StoreArray< MCParticle > m_recoTrackable
list of MCParticles where x and p is overriden with the matched RecoTrack values
std::string m_MCParticleCollectionName
Name of the MCParticle StoreArray to be matched.
StoreArray< Track > m_mdstTracks
list of mdst Tracks
std::string m_MCTrackableCollectionName
Name of a new StoreArray holding MCParticles considered as trackable.
virtual void initialize() override
Initialize the module.
CDCTriggerRecoHitMatcherModule()
Constructor, for setting module description and parameters.
std::string m_RecoTrackCollectionName
Name of the RecoTrack StoreArray to be matched.
virtual void event() override
Called once for each event.
StoreArray< CDCTriggerSegmentHit > m_segmentHits
list of hits that are used for the matching
std::string m_RecoTrackableCollectionName
Name of the StoreArray holding primary MCParticle matched to a RecoTrack, but the vertex and momentum...
std::string m_TrackCollectionName
Name of a new StoreArray holding Tracks.
StoreArray< RecoTrack > m_recoTracks
list of RecoTracks to be matched
std::string m_hitCollectionName
Name of the StoreArray containing the hits that are used for the matching.
void setDescription(const std::string &description)
Sets the description of the module.
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.
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 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.