Project
Loading...
Searching...
No Matches
testTRDDiffusionCoefficient.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
15
16#define BOOST_TEST_MODULE Test TRD DiffusionCoefficient
17#define BOOST_TEST_MAIN
18#define BOOST_TEST_DYN_LINK
19#include <boost/test/unit_test.hpp>
22
23#include "Field/MagneticField.h"
24#include <TGeoGlobalMagField.h>
25
26namespace o2
27{
28namespace trd
29{
30
32BOOST_AUTO_TEST_CASE(TRDDiffusionCoefficient_test1)
33{
35 TGeoGlobalMagField::Instance()->SetField(fld);
36 TGeoGlobalMagField::Instance()->Lock();
37
40 DiffusionAndTimeStructEstimator estimator(param.getGasMixture(), param.getCachedField());
41 float dl = 0;
42 float dt = 0;
43 float vd = 1.48;
44 estimator.getDiffCoeff(dl, dt, vd);
45 // check whether the values match the expected AliRoot known output
46 BOOST_CHECK_CLOSE(dl, 0.0255211, 0.1);
47 BOOST_CHECK_CLOSE(dt, 0.0179734, 0.1);
48}
49
50} // namespace trd
51} // namespace o2
Definition of the MagF class.
static MagneticField * createFieldMap(float l3Current=-30000., float diCurrent=-6000., Int_t convention=0, Bool_t uniform=kFALSE, float beamenergy=7000, const Char_t *btype="pp", const std::string path=std::string(gSystem->Getenv("VMCWORKDIR"))+std::string("/Common/maps/mfchebKGI_sym.root"))
bool getDiffCoeff(float &dl, float &dt, float vdrift)
determines the diffusion coefficients as a function of drift velocity
Constant parameters for the TRD simulation.
Definition SimParam.h:28
GLenum GLfloat param
Definition glcorearb.h:271
BOOST_AUTO_TEST_CASE(TRDDigit_test)
Definition testDigit.cxx:48
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...