Belle II Software  release-08-01-10
sector.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #include <framework/logging/Logger.h>
9 #include <gtest/gtest.h>
10 #include <tracking/dataobjects/FullSecID.h>
11 #include <tracking/trackFindingVXD/sectorMapTools/Sector.h>
12 
13 namespace Belle2 {
20  class SectorTest : public ::testing::Test {
21  protected:
22  };
23 
25  TEST_F(SectorTest, testConstructorSettersAndGetters)
26  {
27  VxdID vxdID = VxdID(34624); // this should be a sensor on layer 4
28  bool subLayerID = true;
29  unsigned short sectorID = 15;
30 
31 
32  B2INFO("creating FullSecIDs: ");
33  FullSecID aFullSecID = FullSecID(vxdID, subLayerID, sectorID);
34  unsigned int aFullSecInt = static_cast<unsigned int>(aFullSecID);
35 
36  FullSecID aFullSecID2 = FullSecID(vxdID, false, sectorID);
37  unsigned int aFullSecInt2 = static_cast<unsigned int>(aFullSecID2);
38 
39  FullSecID aFullSecID3 = FullSecID(vxdID, subLayerID, 7);
40  unsigned int aFullSecInt3 = static_cast<unsigned int>(aFullSecID3);
41 
42  FullSecID aFullSecID4;
43  unsigned int aFullSecInt4 = static_cast<unsigned int>(aFullSecID4);
44 
45 
46  // producing sectors which can be sorted by secID:
47  Sector aSector(aFullSecInt);
48  Sector aSector2(aFullSecInt2);
49  Sector aSector3(aFullSecInt3);
50  Sector aSector4(aFullSecInt4);
51 
52  EXPECT_EQ(aFullSecInt, aSector.getSecID());
53  EXPECT_EQ(aFullSecInt2, aSector2.getSecID());
54  EXPECT_EQ(aFullSecInt3, aSector3.getSecID());
55  EXPECT_EQ(aFullSecInt4, aSector4.getSecID());
56  EXPECT_EQ(0, aSector.getDistance());
57  EXPECT_EQ(0, aSector2.getDistance());
58  EXPECT_EQ(0, aSector3.getDistance());
59  EXPECT_EQ(0, aSector4.getDistance());
60 
61 
62  // producing sectors which can be sorted by secID:
63  Sector dSector(aFullSecInt, 3.5);
64  Sector dSector2(aFullSecInt2, 3.3, true);
65  Sector dSector3(aFullSecInt3, 3.4);
66  Sector dSector4(aFullSecInt4, 0, true);
67  }
69 }
Class to identify a sector inside of the VXD.
Definition: FullSecID.h:33
Set up a few arrays and objects in the datastore.
Definition: sector.h:20
Sector is a central part of storing information for VXD trackFinders.
Definition: Sector.h:43
unsigned getSecID() const
getter - getSecID returns the ID of the sector (for definition of secID, see m_sectorID).
Definition: Sector.h:138
float getDistance() const
getter - get distance of sector to origin defined by sectorMap
Definition: Sector.h:134
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
TEST_F(GlobalLabelTest, LargeNumberOfTimeDependentParameters)
Test large number of time-dep params for registration and retrieval.
Definition: globalLabel.cc:72
Abstract base class for different kinds of events.