Project
Loading...
Searching...
No Matches
testLTOFIntegration.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
12#define BOOST_TEST_MODULE Test TrackLTIntegral class
13#define BOOST_TEST_MAIN
14#define BOOST_TEST_DYN_LINK
15#include <boost/test/unit_test.hpp>
20
21namespace o2
22{
23
24// L,ToF container update test
25BOOST_AUTO_TEST_CASE(TrackLTIntegral)
26{
28 trc.setQ2Pt(2);
29 trc.setSnp(0.1);
30 auto trc1 = trc;
31 trc1.setTgl(0.5);
33 const int nStep = 100;
34 const float dx2x0 = 0.01f;
35 for (int i = 0; i < nStep; i++) {
36 lt.addStep(1., trc.getQ2P2());
37 lt1.addStep(1., trc1.getQ2P2());
38 lt1.addX2X0(dx2x0);
39 }
40 trc.printParam();
41 lt.print();
42 trc1.printParam();
43 lt1.print();
44 float tc = lt.getL() * 1000.f / o2::constants::physics::LightSpeedCm2NS; // fastest time
45 printf("TOF @ speed of light: %7.1f ps\n", tc);
46 for (int i = 1; i < lt.getNTOFs(); i++) {
47 BOOST_CHECK(tc < lt.getTOF(i)); // nothing is faster than the light
48 BOOST_CHECK(lt1.getTOF(i) < lt.getTOF(i)); // higher P track is faster
49 }
50 BOOST_CHECK_CLOSE(lt1.getX2X0(), nStep * dx2x0, 1e-4);
51}
52
53} // namespace o2
particle ids, masses, names class definition
Base track model for the Barrel, params only, w/o covariance.
int32_t i
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
Header to collect physics constants.
Track Length and TOF integral.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
BOOST_AUTO_TEST_CASE(FlatHisto)
BOOST_CHECK(tree)