Belle II Software  release-08-01-10
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_storeArrayNameOfPXDHits
 name of storeArray with PXD hits
 
std::string m_storeArrayNameOfSVDHits
 name of storeArray with SVD hits
 
std::string m_storeArrayNameOfCDCHits
 name of storeArray with CDC 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 26 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 PXD hits store array.

Name of the SVD hits store array.

Name of the CDC 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 29 of file recoTrack.cc.

30  {
32  m_storeArrayNameOfRecoTracks = "ILoveRecoTracks";
34  m_storeArrayNameOfPXDHits = "PXDsILike";
36  m_storeArrayNameOfSVDHits = "WhatAboutSVD";
38  m_storeArrayNameOfCDCHits = "CDCHitsAreCool";
40  m_storeArrayNameOfBKLMHits = "KeepBKLMsAlive";
42  m_storeArrayNameOfEKLMHits = "EKLMsAreImportant";
44  m_storeArrayNameOfHitInformation = "ConnectingAll";
45 
46  //--- Setup -----------------------------------------------------------------------
47  // We do not use the KLM store arrays to test, if the RecoTrack can be used without them.
49  StoreArray<PXDCluster> pxdHits(m_storeArrayNameOfPXDHits);
50  pxdHits.registerInDataStore();
51  StoreArray<SVDCluster> svdHits(m_storeArrayNameOfSVDHits);
52  svdHits.registerInDataStore();
53  StoreArray<CDCHit> cdcHits(m_storeArrayNameOfCDCHits);
54  cdcHits.registerInDataStore();
55  StoreArray<RecoTrack> recoTracks(m_storeArrayNameOfRecoTracks);
56  recoTracks.registerInDataStore();
57  StoreArray<RecoHitInformation> recoHitInformations(m_storeArrayNameOfHitInformation);
58  recoHitInformations.registerInDataStore();
59 
60  pxdHits.registerRelationTo(recoTracks);
61  svdHits.registerRelationTo(recoTracks);
62  cdcHits.registerRelationTo(recoTracks);
63  recoHitInformations.registerRelationTo(pxdHits);
64  recoHitInformations.registerRelationTo(svdHits);
65  recoHitInformations.registerRelationTo(cdcHits);
66 
67  recoTracks.registerRelationTo(recoHitInformations);
68 
69  //"CDCHit(tdcCount, adcCount, superLayer, layer, wire)"
70  //Indices range from 0-7
71  cdcHits.appendNew(100, 100, 0, 0, 0);
72  cdcHits.appendNew(100, 100, 2, 0, 0);
73  cdcHits.appendNew(100, 100, 4, 0, 0);
74  cdcHits.appendNew(100, 100, 6, 0, 0);
75  cdcHits.appendNew(100, 100, 8, 0, 0);
76  cdcHits.appendNew(100, 100, 1, 1, 0);
77  cdcHits.appendNew(100, 100, 3, 0, 0);
78  cdcHits.appendNew(100, 100, 5, 0, 0);
79 
80  // We add some hits to the track. Then we assure they were added properly and the hit information objects are correct.
81  ROOT::Math::XYZVector position(0, 1, 2);
82  ROOT::Math::XYZVector momentum(-1, -0.5, 1.123);
83  short int charge = 1;
84  m_recoTrack = recoTracks.appendNew(position, momentum, charge,
87  m_recoTrack2 = recoTracks.appendNew(position, momentum, charge,
90  }
static DataStore & Instance()
Instance of singleton Store.
Definition: DataStore.cc:54
void setInitializeActive(bool active)
Setter for m_initializeActive.
Definition: DataStore.cc:94
std::string m_storeArrayNameOfHitInformation
name of storeArray with hit information
Definition: recoTrack.cc:100
std::string m_storeArrayNameOfCDCHits
name of storeArray with CDC hits
Definition: recoTrack.cc:97
std::string m_storeArrayNameOfBKLMHits
name of storeArray with BKLM hits
Definition: recoTrack.cc:98
std::string m_storeArrayNameOfRecoTracks
name of recoTracks storeArray
Definition: recoTrack.cc:94
std::string m_storeArrayNameOfSVDHits
name of storeArray with SVD hits
Definition: recoTrack.cc:96
RecoTrack * m_recoTrack2
pointer to other recoTrack
Definition: recoTrack.cc:93
std::string m_storeArrayNameOfEKLMHits
name of storeArray with EKLM hits
Definition: recoTrack.cc:99
RecoTrack * m_recoTrack
pointer to recoTrack
Definition: recoTrack.cc:92
std::string m_storeArrayNameOfPXDHits
name of storeArray with PXD hits
Definition: recoTrack.cc:95
double charge(int pdgCode)
Returns electric charge of a particle with given pdg code.
Definition: EvtPDLUtil.cc:44

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