Belle II Software  release-05-01-25
CDCTrack.test.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Oliver Frost <oliver.frost@desy.de> *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #include <tracking/trackFindingCDC/testFixtures/TrackFindingCDCTestWithTopology.h>
11 
12 #include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
13 
14 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
15 
16 #include <cdc/dataobjects/WireID.h>
17 
18 using namespace Belle2;
19 using namespace TrackFindingCDC;
20 
21 TEST_F(TrackFindingCDCTestWithTopology, eventdata_tracks_CDCTrack_modifyable)
22 {
23  CDCWireHit wireHit(WireID(0, 0, 0), 0.01);
24 
25  // Create a track and add one hit
26  CDCTrack track;
27  {
28  CDCRLWireHit rlWireHit(&wireHit, ERightLeft::c_Right);
29  double perpS = 0;
30  CDCRecoHit3D recoHit3D(rlWireHit, wireHit.getRefPos3D(), perpS);
31  track.push_back(recoHit3D);
32  }
33  // Try to iterate over the track
34  for (CDCRecoHit3D& recoHit3D : track) {
35  recoHit3D.setRecoPos3D(Vector3D(0.0, 0.0, 0.0));
36  }
37 
38  EXPECT_ALL_NEAR(Vector3D(0.0, 0.0, 0.0), track[0].getRecoPos3D(), 1);
39 }
Belle2::WireID
Class to identify a wire inside the CDC.
Definition: WireID.h:44
Belle2::Vector3D
HepGeom::Vector3D< double > Vector3D
3D Vector
Definition: Cell.h:35
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TEST_F
TEST_F(GlobalLabelTest, LargeNumberOfTimeDependentParameters)
Test large number of time-dep params for registration and retrieval.
Definition: globalLabel.cc:65
Belle2::TrackFindingCDC::CDCWireHit
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:65