Belle II Software development
MeasurementAdder Class Reference

Algorithm class to translate the added detector hits (e.g. More...

#include <MeasurementAdder.h>

Public Member Functions

 MeasurementAdder (const std::string &storeArrayNameOfPXDHits, const std::string &storeArrayNameOfSVDHits, const std::string &storeArrayNameOfCDCHits, const std::string &storeArrayNameOfBKLMHits, const std::string &storeArrayNameOfEKLMHits, const bool initializeCDCTranslators=true)
 Create a new instance of the measurement adder.
 
void resetMeasurementCreatorsToDefaultSettings ()
 Reset the internal measurement creator storage to the default settings.
 
void resetMeasurementCreators (const std::vector< std::shared_ptr< PXDBaseMeasurementCreator > > &pxdMeasurementCreators, const std::vector< std::shared_ptr< SVDBaseMeasurementCreator > > &svdMeasurementCreators, const std::vector< std::shared_ptr< CDCBaseMeasurementCreator > > &cdcMeasurementCreators, const std::vector< std::shared_ptr< BKLMBaseMeasurementCreator > > &bklmMeasurementCreators, const std::vector< std::shared_ptr< EKLMBaseMeasurementCreator > > &eklmMeasurementCreators, const std::vector< std::shared_ptr< BaseMeasurementCreator > > &additionalMeasurementCreators)
 If you want to use non-default settings for the store arrays, you can create your own instances of the measurement creators for the different detectors and use them here.
 
void resetMeasurementCreatorsUsingFactories (const std::map< std::string, std::map< std::string, std::string > > &pxdMeasurementCreators, const std::map< std::string, std::map< std::string, std::string > > &svdMeasurementCreators, const std::map< std::string, std::map< std::string, std::string > > &cdcMeasurementCreators, const std::map< std::string, std::map< std::string, std::string > > &bklmMeasurementCreators, const std::map< std::string, std::map< std::string, std::string > > &eklmMeasurementCreators, const std::map< std::string, std::map< std::string, std::string > > &additionalMeasurementCreators)
 If you want to use non-default settings for the store arrays, you can create your own instances of the measurement creators for the different detectors and use them here.
 
bool addMeasurements (RecoTrack &recoTrack) const
 After you have filled the internal storage with measurement creators (either by providing your own or by using the default settings), you can use then to add measurements to the reco tracks with this function.
 

Private Member Functions

void createGenfitMeasurementFactory ()
 Helper function to create a genfit::MeasurementFactory, needed in the MeasurementCreators.
 
template<class HitType , Const::EDetector detector>
void addMeasurementsFromHitToRecoTrack (RecoTrack &recoTrack, RecoHitInformation &recoHitInformation, HitType *hit, const std::vector< std::shared_ptr< BaseMeasurementCreatorFromHit< HitType, detector > > > &measurementCreators, std::map< genfit::TrackPoint *, RecoHitInformation * > &trackPointHitMapping) const
 Helper: Go through all measurement creators in the given list and create the measurement with a given hit.
 
void addMeasurementsToRecoTrack (RecoTrack &recoTrack, const std::vector< std::shared_ptr< BaseMeasurementCreator > > &measurementCreators) const
 Helper: Go through all measurement creators in the given list and create the measurement without a given hit.
 

Private Attributes

std::string m_param_storeArrayNameOfPXDHits = ""
 The name of the store array for the PXD hits.
 
std::string m_param_storeArrayNameOfSVDHits = ""
 The name of the store array for the SVD hits.
 
std::string m_param_storeArrayNameOfCDCHits = ""
 The name of the store array for the CDC hits.
 
std::string m_param_storeArrayNameOfBKLMHits = ""
 The name of the store array for the BKLM hits.
 
std::string m_param_storeArrayNameOfEKLMHits = ""
 The name of the store array for the EKLM hits.
 
bool m_skipDirtyCheck = false
 Flag to skip the dirty check. Useful when using non default measurement creators.
 
std::vector< std::shared_ptr< PXDBaseMeasurementCreator > > m_pxdMeasurementCreators
 Internal storage of the PXD measurement creators.
 
std::vector< std::shared_ptr< SVDBaseMeasurementCreator > > m_svdMeasurementCreators
 Internal storage of the SVD measurement creators.
 
std::vector< std::shared_ptr< CDCBaseMeasurementCreator > > m_cdcMeasurementCreators
 Internal storage of the CDC measurement creators.
 
std::vector< std::shared_ptr< BKLMBaseMeasurementCreator > > m_bklmMeasurementCreators
 Internal storage of the BKLM measurement creators.
 
std::vector< std::shared_ptr< EKLMBaseMeasurementCreator > > m_eklmMeasurementCreators
 Internal storage of the EKLM measurement creators.
 
std::vector< std::shared_ptr< BaseMeasurementCreator > > m_additionalMeasurementCreators
 Internal storage of the additional measurement creators.
 
genfit::MeasurementFactory< genfit::AbsMeasurement > m_genfitMeasurementFactory
 Internal storage of the genfit measurement factory;.
 

Detailed Description

Algorithm class to translate the added detector hits (e.g.

CDCHits) to internal TrackPoints before fitting. This can be - depending on your setting - a non trivial process and should be taken care only by this class.

You probably do not have to use this class on your own but use the TrackFitter for that.

Before fitting a reco track with the track fitter class, you have to translate all detector signals into measurements (contained in TrackPoints) for genfit. This is done using predefined measurement creator classes.

If you do not want non-default settings, you can call the measurement adder class with the following lines of code:

MeasurementAdder measurementAdder; measurementAdder.setMeasurementCreatorsToDefaultSettings()

measurementAdder.addMeasurements(recoTrack);

After that, you can fit the track (see the TrackFitter class).

If you want to provide special settings, you can either create a list of MeasurementCreators for the three detectors and for the case without detector by yourself or you use the MeasurementCreatorFactories. Both cases are shown below:

MeasurementAdder measurementAdder; // Possibility 1 measurementAdder.setMeasurementCreators({ cdcMeasurementCreatorSharedPointer1, cdcMeasurementCreatorSharedPointer2, ...}, { svdMeasurementCreatorSharedPointer1, ...}, { pxdMeasurementCreatorSharedPointer1, ...}, { additionalMeasurementCreatorSharedPointer1, ...})

// Possibility 2 measurementAdder.setMeasurementCreatorsUsingFactories( mapOfCreatorNamesAndSettingsForCDC, mapOfCreatorNamesAndSettingsForSVD, mapOfCreatorNamesAndSettingsForPXD, mapOfCreatorNamesAndSettingsForAdditionalMeasurements )

measurementAdder.addMeasurements(recoTrack);

Definition at line 76 of file MeasurementAdder.h.

Constructor & Destructor Documentation

◆ MeasurementAdder()

MeasurementAdder ( const std::string &  storeArrayNameOfPXDHits,
const std::string &  storeArrayNameOfSVDHits,
const std::string &  storeArrayNameOfCDCHits,
const std::string &  storeArrayNameOfBKLMHits,
const std::string &  storeArrayNameOfEKLMHits,
const bool  initializeCDCTranslators = true 
)

Create a new instance of the measurement adder.

You probably only have to do this once in your module, except the case you want to test out different settings.

Configures whether the CDC Translators should be initialized by the FitterModule especially useful for VXD-only beamtest. In the future this could be changed to check implicitly if the cdc is available in the geometry.

Definition at line 38 of file MeasurementAdder.cc.

44 :
45 m_param_storeArrayNameOfPXDHits(storeArrayNameOfPXDHits),
46 m_param_storeArrayNameOfSVDHits(storeArrayNameOfSVDHits),
47 m_param_storeArrayNameOfCDCHits(storeArrayNameOfCDCHits),
48 m_param_storeArrayNameOfBKLMHits(storeArrayNameOfBKLMHits),
49 m_param_storeArrayNameOfEKLMHits(storeArrayNameOfEKLMHits)
50{
54 if (initializeCDCTranslators) {
55 // Create new Translators and give them to the CDCRecoHits.
59 true);
60 }
63}
static void setTranslators(CDC::ADCCountTranslatorBase *const adcCountTranslator, CDC::CDCGeometryTranslatorBase *const cdcGeometryTranslator, CDC::TDCCountTranslatorBase *const tdcCountTranslator, bool useTrackTime=false, bool cosmics=false)
Setter for the Translators.
Definition: CDCRecoHit.cc:33
This class simply assumes a linear translation through (0,0)
This class uses the realistic detector geometry (the one after alignment procedure) for the translati...
Translator mirroring the realistic Digitization.
void createGenfitMeasurementFactory()
Helper function to create a genfit::MeasurementFactory, needed in the MeasurementCreators.
std::string m_param_storeArrayNameOfPXDHits
The name of the store array for the PXD hits.
std::string m_param_storeArrayNameOfBKLMHits
The name of the store array for the BKLM hits.
void resetMeasurementCreatorsToDefaultSettings()
Reset the internal measurement creator storage to the default settings.
std::string m_param_storeArrayNameOfSVDHits
The name of the store array for the SVD hits.
std::string m_param_storeArrayNameOfEKLMHits
The name of the store array for the EKLM hits.
std::string m_param_storeArrayNameOfCDCHits
The name of the store array for the CDC hits.

Member Function Documentation

◆ addMeasurements()

bool addMeasurements ( RecoTrack recoTrack) const

After you have filled the internal storage with measurement creators (either by providing your own or by using the default settings), you can use then to add measurements to the reco tracks with this function.

Attention
If you are using default measurement creators and the dirty flag of the reco track is not set, this method will return and not nothing, as we do not want to recreate all measurements twice. If you want to create all measurements again (because you used different settings before), you have to set the dirty flag of the reco track manually.

Returns true, if the track should be refitted afterwards and false else.

Definition at line 160 of file MeasurementAdder.cc.

161{
162 B2ASSERT("Reco Track was built with another CDC store array: Reco Track "
163 << recoTrack.getStoreArrayNameOfCDCHits()
164 << ", this class " << m_param_storeArrayNameOfCDCHits,
165 checkTwoStoreArrayNames<RecoHitInformation::UsedCDCHit>(recoTrack.getStoreArrayNameOfCDCHits(), m_param_storeArrayNameOfCDCHits));
166 B2ASSERT("Reco Track was built with another SVD store array: Reco Track "
167 << recoTrack.getStoreArrayNameOfSVDHits()
168 << ", this class " << m_param_storeArrayNameOfSVDHits,
169 checkTwoStoreArrayNames<RecoHitInformation::UsedSVDHit>(recoTrack.getStoreArrayNameOfSVDHits(), m_param_storeArrayNameOfSVDHits));
170 B2ASSERT("Reco Track was built with another PXD store array: Reco Track "
171 << recoTrack.getStoreArrayNameOfPXDHits()
172 << ", this class " << m_param_storeArrayNameOfPXDHits,
173 checkTwoStoreArrayNames<RecoHitInformation::UsedPXDHit>(recoTrack.getStoreArrayNameOfPXDHits(), m_param_storeArrayNameOfPXDHits));
174 B2ASSERT("Reco Track was built with another BKLM store array: Reco Track "
175 << recoTrack.getStoreArrayNameOfBKLMHits()
176 << ", this class " << m_param_storeArrayNameOfBKLMHits,
177 checkTwoStoreArrayNames<RecoHitInformation::UsedBKLMHit>(recoTrack.getStoreArrayNameOfBKLMHits(),
179 B2ASSERT("Reco Track was built with another EKLM store array: Reco Track "
180 << recoTrack.getStoreArrayNameOfEKLMHits()
181 << ", this class " << m_param_storeArrayNameOfEKLMHits,
182 checkTwoStoreArrayNames<RecoHitInformation::UsedEKLMHit>(recoTrack.getStoreArrayNameOfEKLMHits(),
184
185 if (m_cdcMeasurementCreators.size() == 0 and m_svdMeasurementCreators.size() == 0 and m_pxdMeasurementCreators.size() == 0 and
186 m_bklmMeasurementCreators.size() == 0 and m_eklmMeasurementCreators.size() == 0 and m_additionalMeasurementCreators.size() == 0) {
187 B2WARNING("No measurement creators where added to this instance, so no measurements where created. Did you forget to call setMeasurementCreators?");
188 return false;
189 }
190
191 if (not recoTrack.getDirtyFlag() and not m_skipDirtyCheck) {
192 B2DEBUG(100, "Hit content did not change since last measurement adding and you are using default parameters." <<
193 "I will not add the measurements again. " <<
194 "If you still want to do so, set the dirty flag to true.");
195 return false;
196 }
197
198 // Delete all other measurements.
199 RecoTrackGenfitAccess::getGenfitTrack(recoTrack).deleteTrackPointsAndFitStatus();
200 recoTrack.setDirtyFlag();
201
202 std::map<genfit::TrackPoint*, RecoHitInformation*> trackPointHitMapping;
203
204 // Add the measurements created by the CDC, SVD and PXD measurement creators.
207 addMeasurementsFromHitToRecoTrack<RecoHitInformation::UsedPXDHit, Const::PXD>(recoTrack, recoHitInformation, pxdHit,
208 m_pxdMeasurementCreators, trackPointHitMapping);
209 });
212 addMeasurementsFromHitToRecoTrack<RecoHitInformation::UsedSVDHit, Const::SVD>(recoTrack, recoHitInformation, svdHit,
213 m_svdMeasurementCreators, trackPointHitMapping);
214 });
217 addMeasurementsFromHitToRecoTrack<RecoHitInformation::UsedCDCHit, Const::CDC>(recoTrack, recoHitInformation, cdcHit,
218 m_cdcMeasurementCreators, trackPointHitMapping);
219 });
222 addMeasurementsFromHitToRecoTrack<RecoHitInformation::UsedBKLMHit, Const::BKLM>(recoTrack, recoHitInformation, bklmHit,
223 m_bklmMeasurementCreators, trackPointHitMapping);
224 });
227 addMeasurementsFromHitToRecoTrack<RecoHitInformation::UsedEKLMHit, Const::EKLM>(recoTrack, recoHitInformation, EKLMHit,
228 m_eklmMeasurementCreators, trackPointHitMapping);
229 });
230
231 // Special case is with the additional measurement creator factories. They do not need any hits:
233
234 auto& genfitTrack = RecoTrackGenfitAccess::getGenfitTrack(recoTrack);
235
236 genfitTrack.sort();
237
238 // FIXME: hotfix:
239 // after we have a mapping between created track points and reco track information, we can use this mapping to
240 // write it back to the reco hit information. Please note, that we only store a single index for each
241 // reco hit information (although there could be multiple track points).
242 // We also assume that the track point vector is never changed again!
243 int counter = 0;
244 for (genfit::TrackPoint* trackPoint : genfitTrack.getPoints()) {
245 trackPointHitMapping[trackPoint]->setCreatedTrackPointID(counter);
246 counter += 1;
247 }
248
249 return true;
250}
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition: CDCHit.h:40
This dataobject is used only for EKLM alignment.
KLM 2d hit.
Definition: KLMHit2d.h:33
std::vector< std::shared_ptr< BKLMBaseMeasurementCreator > > m_bklmMeasurementCreators
Internal storage of the BKLM measurement creators.
std::vector< std::shared_ptr< CDCBaseMeasurementCreator > > m_cdcMeasurementCreators
Internal storage of the CDC measurement creators.
std::vector< std::shared_ptr< PXDBaseMeasurementCreator > > m_pxdMeasurementCreators
Internal storage of the PXD measurement creators.
std::vector< std::shared_ptr< EKLMBaseMeasurementCreator > > m_eklmMeasurementCreators
Internal storage of the EKLM measurement creators.
std::vector< std::shared_ptr< BaseMeasurementCreator > > m_additionalMeasurementCreators
Internal storage of the additional measurement creators.
bool m_skipDirtyCheck
Flag to skip the dirty check. Useful when using non default measurement creators.
std::vector< std::shared_ptr< SVDBaseMeasurementCreator > > m_svdMeasurementCreators
Internal storage of the SVD measurement creators.
void addMeasurementsToRecoTrack(RecoTrack &recoTrack, const std::vector< std::shared_ptr< BaseMeasurementCreator > > &measurementCreators) const
Helper: Go through all measurement creators in the given list and create the measurement without a gi...
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Definition: PXDCluster.h:30
This class stores additional information to every CDC/SVD/PXD hit stored in a RecoTrack.
static genfit::Track & getGenfitTrack(RecoTrack &recoTrack)
Give access to the RecoTrack's genfit::Track.
Definition: RecoTrack.cc:404
void mapOnHits(const std::string &storeArrayNameOfHits, std::function< void(RecoHitInformation &, HitType *)> const &mapFunction, std::function< bool(const RecoHitInformation &, const HitType *)> const &pickFunction)
Call a function on all hits of the given type in the store array, that are related to this track.
Definition: RecoTrack.h:766
const std::string & getStoreArrayNameOfEKLMHits() const
Name of the store array of the eklm hits.
Definition: RecoTrack.h:744
const std::string & getStoreArrayNameOfSVDHits() const
Name of the store array of the svd hits.
Definition: RecoTrack.h:735
const std::string & getStoreArrayNameOfPXDHits() const
Name of the store array of the pxd hits.
Definition: RecoTrack.h:732
void setDirtyFlag(const bool &dirtyFlag=true)
Set to true, if you want to rebuild the measurements and do the fit independent on changes of the hit...
Definition: RecoTrack.h:722
const std::string & getStoreArrayNameOfBKLMHits() const
Name of the store array of the bklm hits.
Definition: RecoTrack.h:741
const std::string & getStoreArrayNameOfCDCHits() const
Name of the store array of the cdc hits.
Definition: RecoTrack.h:738
bool getDirtyFlag() const
This returns true, if a hit was added after the last fit and measurement creation and a refit should ...
Definition: RecoTrack.h:715
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:29

◆ addMeasurementsFromHitToRecoTrack()

void addMeasurementsFromHitToRecoTrack ( RecoTrack recoTrack,
RecoHitInformation recoHitInformation,
HitType *  hit,
const std::vector< std::shared_ptr< BaseMeasurementCreatorFromHit< HitType, detector > > > &  measurementCreators,
std::map< genfit::TrackPoint *, RecoHitInformation * > &  trackPointHitMapping 
) const
inlineprivate

Helper: Go through all measurement creators in the given list and create the measurement with a given hit.

Definition at line 187 of file MeasurementAdder.h.

190 {
191 if (not recoHitInformation.useInFit()) {
192 return;
193 }
194
195 genfit::Track& genfitTrack = RecoTrackGenfitAccess::getGenfitTrack(recoTrack);
196
197 for (const auto& measurementCreator : measurementCreators) {
198 const std::vector<genfit::TrackPoint*>& trackPoints = measurementCreator->createMeasurementPoints(hit, recoTrack,
199 recoHitInformation);
200 for (genfit::TrackPoint* trackPoint : trackPoints) {
201 genfitTrack.insertPoint(trackPoint);
202 // FIXME: hotfix: to get a correct mapping between reco hit information and the track point.
203 // We are not able to store the TrackPoint in the RecoHitInformation directly because of problems in streaming
204 // the genfit::TrackPoint. So what we do is store the index of the track points in the vector of the genfit::Track.
205 // As this vector is sorted after this function, we can not set it here directly.
206 trackPointHitMapping[trackPoint] = &recoHitInformation;
207 }
208 }
209 }

◆ addMeasurementsToRecoTrack()

void addMeasurementsToRecoTrack ( RecoTrack recoTrack,
const std::vector< std::shared_ptr< BaseMeasurementCreator > > &  measurementCreators 
) const
private

Helper: Go through all measurement creators in the given list and create the measurement without a given hit.

Definition at line 252 of file MeasurementAdder.cc.

254{
255 for (const auto& measurementCreator : measurementCreators) {
256 const std::vector<genfit::TrackPoint*>& trackPoints = measurementCreator->createMeasurementPoints(recoTrack);
257 for (genfit::TrackPoint* trackPoint : trackPoints) {
258 RecoTrackGenfitAccess::getGenfitTrack(recoTrack).insertPoint(trackPoint);
259 }
260 }
261}

◆ createGenfitMeasurementFactory()

void createGenfitMeasurementFactory ( )
private

Helper function to create a genfit::MeasurementFactory, needed in the MeasurementCreators.

Definition at line 65 of file MeasurementAdder.cc.

66{
72
73 // Create the related measurement factory
74 if (pxdHits.isOptional())
75 m_genfitMeasurementFactory.addProducer(Const::PXD,
76 new genfit::MeasurementProducer<RecoHitInformation::UsedPXDHit, PXDRecoHit>(pxdHits.getPtr()));
77 if (svdHits.isOptional())
78 m_genfitMeasurementFactory.addProducer(Const::SVD,
79 new genfit::MeasurementProducer<RecoHitInformation::UsedSVDHit, SVDRecoHit>(svdHits.getPtr()));
80 if (cdcHits.isOptional())
81 m_genfitMeasurementFactory.addProducer(Const::CDC,
82 new genfit::MeasurementProducer<RecoHitInformation::UsedCDCHit, CDCRecoHit>(cdcHits.getPtr()));
83 if (bklmHits.isOptional())
84 m_genfitMeasurementFactory.addProducer(Const::BKLM,
85 new genfit::MeasurementProducer<RecoHitInformation::UsedBKLMHit, AlignableBKLMRecoHit>(bklmHits.getPtr()));
86 if (eklmHits.isOptional())
87 m_genfitMeasurementFactory.addProducer(Const::EKLM,
88 new genfit::MeasurementProducer<RecoHitInformation::UsedEKLMHit, AlignableEKLMRecoHit>(eklmHits.getPtr()));
89}
genfit::MeasurementFactory< genfit::AbsMeasurement > m_genfitMeasurementFactory
Internal storage of the genfit measurement factory;.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113

◆ resetMeasurementCreators()

void resetMeasurementCreators ( const std::vector< std::shared_ptr< PXDBaseMeasurementCreator > > &  pxdMeasurementCreators,
const std::vector< std::shared_ptr< SVDBaseMeasurementCreator > > &  svdMeasurementCreators,
const std::vector< std::shared_ptr< CDCBaseMeasurementCreator > > &  cdcMeasurementCreators,
const std::vector< std::shared_ptr< BKLMBaseMeasurementCreator > > &  bklmMeasurementCreators,
const std::vector< std::shared_ptr< EKLMBaseMeasurementCreator > > &  eklmMeasurementCreators,
const std::vector< std::shared_ptr< BaseMeasurementCreator > > &  additionalMeasurementCreators 
)

If you want to use non-default settings for the store arrays, you can create your own instances of the measurement creators for the different detectors and use them here.

For this method, you have to create the measurement creators by yourself.

It is assumed, that you only do this for non-default settings. This is why all measurement points will be recreated (independent on the dirty flag) and the track must be refitted afterwards.

Definition at line 103 of file MeasurementAdder.cc.

110{
111 m_pxdMeasurementCreators = pxdMeasurementCreators;
112 m_svdMeasurementCreators = svdMeasurementCreators;
113 m_cdcMeasurementCreators = cdcMeasurementCreators;
114 m_bklmMeasurementCreators = bklmMeasurementCreators;
115 m_eklmMeasurementCreators = eklmMeasurementCreators;
116 m_additionalMeasurementCreators = additionalMeasurementCreators;
117
118 m_skipDirtyCheck = true;
119}

◆ resetMeasurementCreatorsToDefaultSettings()

void resetMeasurementCreatorsToDefaultSettings ( )

Reset the internal measurement creator storage to the default settings.

The measurements will not be recreated if the dirty flag is not set (the hit content did not change).

Definition at line 91 of file MeasurementAdder.cc.

92{
93 m_pxdMeasurementCreators = { std::shared_ptr<PXDBaseMeasurementCreator>(new PXDCoordinateMeasurementCreator(m_genfitMeasurementFactory)) };
94 m_svdMeasurementCreators = { std::shared_ptr<SVDBaseMeasurementCreator>(new SVDCoordinateMeasurementCreator(m_genfitMeasurementFactory)) };
95 m_cdcMeasurementCreators = { std::shared_ptr<CDCBaseMeasurementCreator>(new CDCCoordinateMeasurementCreator(m_genfitMeasurementFactory)) };
96 m_bklmMeasurementCreators = { std::shared_ptr<BKLMBaseMeasurementCreator>(new BKLMCoordinateMeasurementCreator(m_genfitMeasurementFactory)) };
97 m_eklmMeasurementCreators = { std::shared_ptr<EKLMBaseMeasurementCreator>(new EKLMCoordinateMeasurementCreator(m_genfitMeasurementFactory)) };
99
100 m_skipDirtyCheck = false;
101}
CoordinateMeasurementCreator< RecoHitInformation::UsedSVDHit, Const::SVD > SVDCoordinateMeasurementCreator
Hit to reco hit measurement creator for the SVD.
CoordinateMeasurementCreator< RecoHitInformation::UsedPXDHit, Const::PXD > PXDCoordinateMeasurementCreator
Hit to reco hit measurement creator for the PXD.
CoordinateMeasurementCreator< RecoHitInformation::UsedBKLMHit, Const::BKLM > BKLMCoordinateMeasurementCreator
Hit to reco hit measurement creator for the BKLM.
CoordinateMeasurementCreator< RecoHitInformation::UsedCDCHit, Const::CDC > CDCCoordinateMeasurementCreator
Needed for templating.
CoordinateMeasurementCreator< RecoHitInformation::UsedEKLMHit, Const::EKLM > EKLMCoordinateMeasurementCreator
Hit to reco hit measurement creator for the EKLM.

◆ resetMeasurementCreatorsUsingFactories()

void resetMeasurementCreatorsUsingFactories ( const std::map< std::string, std::map< std::string, std::string > > &  pxdMeasurementCreators,
const std::map< std::string, std::map< std::string, std::string > > &  svdMeasurementCreators,
const std::map< std::string, std::map< std::string, std::string > > &  cdcMeasurementCreators,
const std::map< std::string, std::map< std::string, std::string > > &  bklmMeasurementCreators,
const std::map< std::string, std::map< std::string, std::string > > &  eklmMeasurementCreators,
const std::map< std::string, std::map< std::string, std::string > > &  additionalMeasurementCreators 
)

If you want to use non-default settings for the store arrays, you can create your own instances of the measurement creators for the different detectors and use them here.

In this method, the measurement creators are created by MeasurementCreatorFactories. For this, you have to give a map in the form { "creatorName" : { "parameterName1": parameterValue1, "parameterName2": parameterValue2, ... }, "otherCreatorName" : { "otherParameterName1": otherParameterValue1, ... }, ... } for each detector and for additional measurements. See the MeasurementCreatorFactories for more details.

It is assumed, that you only do this for non-default settings. This is why all measurement points will be recreated (independent on the dirty flag) and the track must be refitted afterwards.

Definition at line 121 of file MeasurementAdder.cc.

128{
129 PXDMeasurementCreatorFactory pxdMeasurementCreatorFactory(m_genfitMeasurementFactory);
130 SVDMeasurementCreatorFactory svdMeasurementCreatorFactory(m_genfitMeasurementFactory);
131 CDCMeasurementCreatorFactory cdcMeasurementCreatorFactory(m_genfitMeasurementFactory);
132 BKLMMeasurementCreatorFactory bklmMeasurementCreatorFactory(m_genfitMeasurementFactory);
133 EKLMMeasurementCreatorFactory eklmMeasurementCreatorFactory(m_genfitMeasurementFactory);
134 AdditionalMeasurementCreatorFactory additionalMeasurementCreatorFactory;
135
136 pxdMeasurementCreatorFactory.setParameters(pxdMeasurementCreators);
137 svdMeasurementCreatorFactory.setParameters(svdMeasurementCreators);
138 cdcMeasurementCreatorFactory.setParameters(cdcMeasurementCreators);
139 bklmMeasurementCreatorFactory.setParameters(bklmMeasurementCreators);
140 eklmMeasurementCreatorFactory.setParameters(eklmMeasurementCreators);
141 additionalMeasurementCreatorFactory.setParameters(additionalMeasurementCreators);
142
143 pxdMeasurementCreatorFactory.initialize();
144 svdMeasurementCreatorFactory.initialize();
145 cdcMeasurementCreatorFactory.initialize();
146 bklmMeasurementCreatorFactory.initialize();
147 eklmMeasurementCreatorFactory.initialize();
148 additionalMeasurementCreatorFactory.initialize();
149
150 m_pxdMeasurementCreators = pxdMeasurementCreatorFactory.getCreators();
151 m_svdMeasurementCreators = svdMeasurementCreatorFactory.getCreators();
152 m_cdcMeasurementCreators = cdcMeasurementCreatorFactory.getCreators();
153 m_bklmMeasurementCreators = bklmMeasurementCreatorFactory.getCreators();
154 m_eklmMeasurementCreators = eklmMeasurementCreatorFactory.getCreators();
155 m_additionalMeasurementCreators = additionalMeasurementCreatorFactory.getCreators();
156
157 m_skipDirtyCheck = true;
158}
Add measurement creators that do not rely on a specific hit type, but rather add measurements without...
Add all measurement creators related to BKLM hits.
Add all measurement creators related to CDC hits.
Add all measurement creators related to EKLM hits.
void initialize()
Use the parameters given to the module and create the measurement creators from them.
const std::vector< std::shared_ptr< BaseMeasurementCreatorType > > & getCreators() const
Return the creators to the module.
void setParameters(const std::map< std::string, std::map< std::string, std::string > > &creatorsWithParametersDictionary)
Set the parameters.
Add all measurement creators related to PXD hits.
Add all measurement creators related to SVD hits.

Member Data Documentation

◆ m_additionalMeasurementCreators

std::vector<std::shared_ptr<BaseMeasurementCreator> > m_additionalMeasurementCreators
private

Internal storage of the additional measurement creators.

Definition at line 177 of file MeasurementAdder.h.

◆ m_bklmMeasurementCreators

std::vector<std::shared_ptr<BKLMBaseMeasurementCreator> > m_bklmMeasurementCreators
private

Internal storage of the BKLM measurement creators.

Definition at line 173 of file MeasurementAdder.h.

◆ m_cdcMeasurementCreators

std::vector<std::shared_ptr<CDCBaseMeasurementCreator> > m_cdcMeasurementCreators
private

Internal storage of the CDC measurement creators.

Definition at line 171 of file MeasurementAdder.h.

◆ m_eklmMeasurementCreators

std::vector<std::shared_ptr<EKLMBaseMeasurementCreator> > m_eklmMeasurementCreators
private

Internal storage of the EKLM measurement creators.

Definition at line 175 of file MeasurementAdder.h.

◆ m_genfitMeasurementFactory

genfit::MeasurementFactory<genfit::AbsMeasurement> m_genfitMeasurementFactory
private

Internal storage of the genfit measurement factory;.

Definition at line 180 of file MeasurementAdder.h.

◆ m_param_storeArrayNameOfBKLMHits

std::string m_param_storeArrayNameOfBKLMHits = ""
private

The name of the store array for the BKLM hits.

Definition at line 160 of file MeasurementAdder.h.

◆ m_param_storeArrayNameOfCDCHits

std::string m_param_storeArrayNameOfCDCHits = ""
private

The name of the store array for the CDC hits.

Definition at line 158 of file MeasurementAdder.h.

◆ m_param_storeArrayNameOfEKLMHits

std::string m_param_storeArrayNameOfEKLMHits = ""
private

The name of the store array for the EKLM hits.

Definition at line 162 of file MeasurementAdder.h.

◆ m_param_storeArrayNameOfPXDHits

std::string m_param_storeArrayNameOfPXDHits = ""
private

The name of the store array for the PXD hits.

Definition at line 154 of file MeasurementAdder.h.

◆ m_param_storeArrayNameOfSVDHits

std::string m_param_storeArrayNameOfSVDHits = ""
private

The name of the store array for the SVD hits.

Definition at line 156 of file MeasurementAdder.h.

◆ m_pxdMeasurementCreators

std::vector<std::shared_ptr<PXDBaseMeasurementCreator> > m_pxdMeasurementCreators
private

Internal storage of the PXD measurement creators.

Definition at line 167 of file MeasurementAdder.h.

◆ m_skipDirtyCheck

bool m_skipDirtyCheck = false
private

Flag to skip the dirty check. Useful when using non default measurement creators.

Definition at line 164 of file MeasurementAdder.h.

◆ m_svdMeasurementCreators

std::vector<std::shared_ptr<SVDBaseMeasurementCreator> > m_svdMeasurementCreators
private

Internal storage of the SVD measurement creators.

Definition at line 169 of file MeasurementAdder.h.


The documentation for this class was generated from the following files: