Belle II Software  release-05-01-25
RecoTrackTest Class Reference

Test class for the RecoTrack object. More...

Inheritance diagram for RecoTrackTest:
Collaboration diagram for RecoTrackTest:

Protected Member Functions

void SetUp () override
 Setup a "working environment" with store arrays for the hits and the correct relations. More...
 

Protected Attributes

RecoTrackm_recoTrack
 pointer to recoTrack
 
RecoTrackm_recoTrack2
 pointer to other recoTrack
 
std::string m_storeArrayNameOfRecoTracks
 name of recoTracks storeArray
 
std::string m_storeArrayNameOfCDCHits
 name of storeArray with CDC hits
 
std::string m_storeArrayNameOfSVDHits
 name of storeArray with SVD hits
 
std::string m_storeArrayNameOfPXDHits
 name of storeArray with PXD hits
 
std::string m_storeArrayNameOfBKLMHits
 name of storeArray with BKLM hits
 
std::string m_storeArrayNameOfEKLMHits
 name of storeArray with EKLM hits
 
std::string m_storeArrayNameOfHitInformation
 name of storeArray with hit information
 

Detailed Description

Test class for the RecoTrack object.

Definition at line 28 of file recoTrack.cc.

Member Function Documentation

◆ SetUp()

void SetUp ( )
inlineoverrideprotected

Setup a "working environment" with store arrays for the hits and the correct relations.

Name of the RecoTrack store array.

Name of the CDC hits store array.

Name of the SVD hits store array.

Name of the PXD hits store array.

Name of the BKLM hits store array.

Name of the EKLM hits store array.

Name of the reco hit information store array.

Definition at line 31 of file recoTrack.cc.

32  {
34  m_storeArrayNameOfRecoTracks = "ILoveRecoTracks";
36  m_storeArrayNameOfCDCHits = "CDCHitsAreCool";
38  m_storeArrayNameOfSVDHits = "WhatAboutSVD";
40  m_storeArrayNameOfPXDHits = "PXDsILike";
42  m_storeArrayNameOfBKLMHits = "KeepBKLMsAlive";
44  m_storeArrayNameOfEKLMHits = "EKLMsAreImportant";
46  m_storeArrayNameOfHitInformation = "ConnectingAll";
47 
48  //--- Setup -----------------------------------------------------------------------
49  // We do not use the KLM store arrays to test, if the RecoTrack can be used without them.
51  StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
52  cdcHits.registerInDataStore();
53  StoreArray<SVDCluster> svdHits(m_storeArrayNameOfSVDHits);
54  svdHits.registerInDataStore();
55  StoreArray<PXDCluster> pxdHits(m_storeArrayNameOfPXDHits);
56  pxdHits.registerInDataStore();
57  StoreArray<RecoTrack> recoTracks(m_storeArrayNameOfRecoTracks);
58  recoTracks.registerInDataStore();
59  StoreArray<RecoHitInformation> recoHitInformations(m_storeArrayNameOfHitInformation);
60  recoHitInformations.registerInDataStore();
61 
62  cdcHits.registerRelationTo(recoTracks);
63  svdHits.registerRelationTo(recoTracks);
64  pxdHits.registerRelationTo(recoTracks);
65  recoHitInformations.registerRelationTo(cdcHits);
66  recoHitInformations.registerRelationTo(svdHits);
67  recoHitInformations.registerRelationTo(pxdHits);
68 
69  recoTracks.registerRelationTo(recoHitInformations);
70 
71  //"CDCHit(tdcCount, adcCount, superLayer, layer, wire)"
72  //Indices range from 0-7
73  cdcHits.appendNew(100, 100, 0, 0, 0);
74  cdcHits.appendNew(100, 100, 2, 0, 0);
75  cdcHits.appendNew(100, 100, 4, 0, 0);
76  cdcHits.appendNew(100, 100, 6, 0, 0);
77  cdcHits.appendNew(100, 100, 8, 0, 0);
78  cdcHits.appendNew(100, 100, 1, 1, 0);
79  cdcHits.appendNew(100, 100, 3, 0, 0);
80  cdcHits.appendNew(100, 100, 5, 0, 0);
81 
82  // We add some hits to the track. Then we assure they were added properly and the hit information objects are correct.
83  TVector3 position(0, 1, 2);
84  TVector3 momentum(-1, -0.5, 1.123);
85  short int charge = 1;
86  m_recoTrack = recoTracks.appendNew(position, momentum, charge,
89  m_recoTrack2 = recoTracks.appendNew(position, momentum, charge,
92  }

The documentation for this class was generated from the following file:
Belle2::EvtPDLUtil::charge
double charge(int pdgCode)
Returns electric charge of a particle with given pdg code.
Definition: EvtPDLUtil.cc:46
Belle2::DataStore::Instance
static DataStore & Instance()
Instance of singleton Store.
Definition: DataStore.cc:54
Belle2::RecoTrackTest::m_storeArrayNameOfPXDHits
std::string m_storeArrayNameOfPXDHits
name of storeArray with PXD hits
Definition: recoTrack.cc:99
Belle2::RecoTrackTest::m_recoTrack2
RecoTrack * m_recoTrack2
pointer to other recoTrack
Definition: recoTrack.cc:95
Belle2::DataStore::setInitializeActive
void setInitializeActive(bool active)
Setter for m_initializeActive.
Definition: DataStore.cc:94
Belle2::RecoTrackTest::m_storeArrayNameOfHitInformation
std::string m_storeArrayNameOfHitInformation
name of storeArray with hit information
Definition: recoTrack.cc:102
Belle2::RecoTrackTest::m_storeArrayNameOfSVDHits
std::string m_storeArrayNameOfSVDHits
name of storeArray with SVD hits
Definition: recoTrack.cc:98
Belle2::RecoTrackTest::m_storeArrayNameOfRecoTracks
std::string m_storeArrayNameOfRecoTracks
name of recoTracks storeArray
Definition: recoTrack.cc:96
Belle2::RecoTrackTest::m_storeArrayNameOfBKLMHits
std::string m_storeArrayNameOfBKLMHits
name of storeArray with BKLM hits
Definition: recoTrack.cc:100
Belle2::RecoTrackTest::m_storeArrayNameOfEKLMHits
std::string m_storeArrayNameOfEKLMHits
name of storeArray with EKLM hits
Definition: recoTrack.cc:101
Belle2::RecoTrackTest::m_recoTrack
RecoTrack * m_recoTrack
pointer to recoTrack
Definition: recoTrack.cc:94
Belle2::RecoTrackTest::m_storeArrayNameOfCDCHits
std::string m_storeArrayNameOfCDCHits
name of storeArray with CDC hits
Definition: recoTrack.cc:97