Belle II Software  release-08-01-10
CDCTrack.test.cc
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 <tracking/trackFindingCDC/testFixtures/TrackFindingCDCTestWithTopology.h>
9 
10 #include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
11 
12 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
13 
14 #include <cdc/dataobjects/WireID.h>
15 
16 using namespace Belle2;
17 using namespace TrackFindingCDC;
18 
19 TEST_F(TrackFindingCDCTestWithTopology, eventdata_tracks_CDCTrack_modifyable)
20 {
21  CDCWireHit wireHit(WireID(0, 0, 0), 0.01);
22 
23  // Create a track and add one hit
24  CDCTrack track;
25  {
26  CDCRLWireHit rlWireHit(&wireHit, ERightLeft::c_Right);
27  double perpS = 0;
28  CDCRecoHit3D recoHit3D(rlWireHit, wireHit.getRefPos3D(), perpS);
29  track.push_back(recoHit3D);
30  }
31  // Try to iterate over the track
32  for (CDCRecoHit3D& recoHit3D : track) {
33  recoHit3D.setRecoPos3D(Vector3D(0.0, 0.0, 0.0));
34  }
35 
36  EXPECT_ALL_NEAR(Vector3D(0.0, 0.0, 0.0), track[0].getRecoPos3D(), 1);
37 }
Class representing an oriented hit wire including a hypotheses whether the causing track passes left ...
Definition: CDCRLWireHit.h:41
Class representing a three dimensional reconstructed hit.
Definition: CDCRecoHit3D.h:52
Class representing a sequence of three dimensional reconstructed hits.
Definition: CDCTrack.h:41
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
This class provides the declaration of the common test fixture to all test of the track finding in th...
Class to identify a wire inside the CDC.
Definition: WireID.h:34
TEST_F(GlobalLabelTest, LargeNumberOfTimeDependentParameters)
Test large number of time-dep params for registration and retrieval.
Definition: globalLabel.cc:72
HepGeom::Vector3D< double > Vector3D
3D Vector
Definition: Cell.h:34
Abstract base class for different kinds of events.