Belle II Software  release-05-02-19
GenfitTrackCandidatesCreatorModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Nils Braun *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 #include <framework/core/Module.h>
13 #include <framework/datastore/StoreArray.h>
14 #include <string>
15 
16 namespace genfit {
17  class TrackCand;
18 }
19 
20 namespace Belle2 {
26  class RecoTrack;
27  class MCParticle;
28  class RelationArray;
29 
35 
36  public:
39 
41  void initialize() override;
42 
44  void event() override;
45 
46  private:
48  std::string m_param_genfitTrackCandsStoreArrayName = "TrackCands";
50  std::string m_param_recoTracksStoreArrayName = "RecoTracks";
52  std::string m_param_mcGenfitTrackCandsStoreArrayName = "MCTrackCands";
54  std::string m_param_mcRecoTracksStoreArrayName = "MCRecoTracks";
57 
59  void outputPRAndMCTrackCands(const StoreArray<RecoTrack>& prRecoTracks, StoreArray<genfit::TrackCand>& prGenfitTrackCands,
60  const StoreArray<MCParticle>& mcParticles, RelationArray& relationsFromPRTrackCandsToPRRecoTracks,
61  RelationArray& relationsFromPRTrackCandsToMCParticle) const;
62 
64  void outputPRTrackCands(const StoreArray<RecoTrack>& recoTracks, StoreArray<genfit::TrackCand>& genfitTrackCands,
65  const StoreArray<MCParticle>& mcParticles, RelationArray& relationsFromTrackCandsToRecoTracks,
66  RelationArray& relationsFromTrackCandsToMCParticle) const;
67  };
69 }
70 
Belle2::GenfitTrackCandidatesCreatorModule::outputPRAndMCTrackCands
void outputPRAndMCTrackCands(const StoreArray< RecoTrack > &prRecoTracks, StoreArray< genfit::TrackCand > &prGenfitTrackCands, const StoreArray< MCParticle > &mcParticles, RelationArray &relationsFromPRTrackCandsToPRRecoTracks, RelationArray &relationsFromPRTrackCandsToMCParticle) const
Private helper to output both the MC and the PR reco tracks into TrackCands and make the relations co...
Definition: GenfitTrackCandidatesCreatorModule.cc:76
Belle2::RelationArray
Low-level class to create/modify relations between StoreArrays.
Definition: RelationArray.h:72
Belle2::GenfitTrackCandidatesCreatorModule::m_param_genfitTrackCandsStoreArrayName
std::string m_param_genfitTrackCandsStoreArrayName
StoreArray name of the output genfit trackcands.
Definition: GenfitTrackCandidatesCreatorModule.h:48
Belle2::GenfitTrackCandidatesCreatorModule::m_param_mcGenfitTrackCandsStoreArrayName
std::string m_param_mcGenfitTrackCandsStoreArrayName
StoreArray name of the output MC genfit trackcands.
Definition: GenfitTrackCandidatesCreatorModule.h:52
genfit
Defines for I/O streams used for error and debug printing.
Definition: AlignablePXDRecoHit.h:19
Belle2::GenfitTrackCandidatesCreatorModule::event
void event() override
Loop over all reco tracks and create a genfit track candidates.
Definition: GenfitTrackCandidatesCreatorModule.cc:174
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::GenfitTrackCandidatesCreatorModule::m_param_outputMCTrackCandidates
bool m_param_outputMCTrackCandidates
Flag to turn on combined conversion of PR and MCTrackCands.
Definition: GenfitTrackCandidatesCreatorModule.h:56
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::GenfitTrackCandidatesCreatorModule::initialize
void initialize() override
Initialize the needed StoreArrays and ensure they are created properly.
Definition: GenfitTrackCandidatesCreatorModule.cc:43
Belle2::GenfitTrackCandidatesCreatorModule::m_param_recoTracksStoreArrayName
std::string m_param_recoTracksStoreArrayName
StoreArray name of the input reco tracks.
Definition: GenfitTrackCandidatesCreatorModule.h:50
Belle2::GenfitTrackCandidatesCreatorModule::GenfitTrackCandidatesCreatorModule
GenfitTrackCandidatesCreatorModule()
Initialize the module parameters.
Definition: GenfitTrackCandidatesCreatorModule.cc:21
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::GenfitTrackCandidatesCreatorModule::outputPRTrackCands
void outputPRTrackCands(const StoreArray< RecoTrack > &recoTracks, StoreArray< genfit::TrackCand > &genfitTrackCands, const StoreArray< MCParticle > &mcParticles, RelationArray &relationsFromTrackCandsToRecoTracks, RelationArray &relationsFromTrackCandsToMCParticle) const
Private helper to output the PR reco tracks into TrackCands and make the relations correctly.
Definition: GenfitTrackCandidatesCreatorModule.cc:154
Belle2::GenfitTrackCandidatesCreatorModule
Module turning reco tracks to genfit trackcands (will be unneeded once we use reco tracks everywhere)...
Definition: GenfitTrackCandidatesCreatorModule.h:34
Belle2::GenfitTrackCandidatesCreatorModule::m_param_mcRecoTracksStoreArrayName
std::string m_param_mcRecoTracksStoreArrayName
StoreArray name of the input reco MC tracks.
Definition: GenfitTrackCandidatesCreatorModule.h:54