BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
rotateAxis.C
Go to the documentation of this file.
1
/*
2
* To change this license header, choose License Headers in Project Properties.
3
* To change this template file, choose Tools | Templates
4
* and open the template in the editor.
5
*/
6
7
/*
8
* File: rotateAxis.C
9
* Author: mikhailr
10
*
11
* Created on May 22, 2018, 4:52 PM
12
*/
13
14
#include <
TMath.h
>
15
#include <cstdlib>
16
17
using namespace
std
;
18
19
void
rotateAxis
(
Double_t
X = 0,
Double_t
Y = 0,
Double_t
Z = 0,
Double_t
angle = 0)
20
{
21
22
// gROOT->LoadMacro("$VMCWORKDIR/macro/run/bmnloadlibs.C");
23
// bmnloadlibs(); // load libraries
24
25
Double_t
XX, YY, ZZ, AngleRad;
26
AngleRad = angle *
TMath::DegToRad
();
27
// z- beam, y - vertical
28
// Rotate around Y
29
XX = X *
TMath::Cos
(AngleRad) - Z *
TMath::Sin
(AngleRad);
30
YY = Y;
31
ZZ = X *
TMath::Sin
(AngleRad) + Z *
TMath::Cos
(AngleRad);
32
cout <<
"New X = "
<< XX <<
"; New Y = "
<< YY <<
"; New Z = "
<< ZZ << endl;
33
}
Double_t
double Double_t
TMath.h
rotateAxis
void rotateAxis(Double_t X=0, Double_t Y=0, Double_t Z=0, Double_t angle=0)
Definition
rotateAxis.C:19
TMath::DegToRad
constexpr Double_t DegToRad()
TMath::Cos
Double_t Cos(Double_t)
TMath::Sin
Double_t Sin(Double_t)
std
Definition
json.hpp:4446
macro
detectors
tof_400
rotateAxis.C
Generated on
for BmnRoot by
1.17.0