1 ///////////////////////////////////////////////////////////////////////////
5 // This file is part of starlight.
7 // starlight is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
12 // starlight is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with starlight. If not, see <http://www.gnu.org/licenses/>.
20 ///////////////////////////////////////////////////////////////////////////
22 // File and Version Information:
23 // $Rev:: $: revision of last commit
24 // $Author:: $: author of last commit
25 // $Date:: $: date of last commit
28 // Class needed for root output
31 ///////////////////////////////////////////////////////////////////////////
38 #include "eventchannel.h"
44 //______________________________________________________________________________
45 eventChannel::eventChannel(beamBeamSystem& bbsystem)
51 _ptCutEnabled = inputParametersInstance.ptCutEnabled();
52 _ptCutMin = inputParametersInstance.ptCutMin();
53 _ptCutMax = inputParametersInstance.ptCutMax();
54 _etaCutEnabled = inputParametersInstance.etaCutEnabled();
55 _etaCutMin = inputParametersInstance.etaCutMin();
56 _etaCutMax = inputParametersInstance.etaCutMax();
60 //______________________________________________________________________________
61 eventChannel::~eventChannel()
65 //______________________________________________________________________________
67 eventChannel::transform(const double betax,
76 // carries out a lorentz transform of the frame. (Not a boost!)???
78 const double px0 = px;
79 const double py0 = py;
80 const double pz0 = pz;
82 const double beta = sqrt(betax * betax + betay * betay + betaz * betaz);
85 const double gamma = 1. / sqrt(1. - beta * beta);
86 const double gob = (gamma - 1) / (beta * beta);
88 E = gamma * (E0 - betax * px0 - betay * py0 - betaz* pz0);
89 px = -gamma * betax * E0 + (1. + gob * betax * betax) * px0
90 + gob * betax * betay * py0 + gob * betax * betaz * pz0;
91 py = -gamma * betay * E0 + gob * betay * betax * px0
92 + (1. + gob * betay * betay) * py0 + gob * betay * betaz *pz0;
93 pz = -gamma * betaz * E0 + gob * betaz * betax * px0
94 + gob * betaz * betay * py0 + (1. + gob * betaz * betaz) * pz0;
98 //______________________________________________________________________________
100 eventChannel::pseudoRapidity(const double px,
104 const double pT= sqrt(px * px + py * py);
105 const double p = sqrt(pz * pz + pT * pT);
106 double eta = -99.9; // instead of special value, std::numeric_limits<double>::quiet_NaN() should be used
108 eta = 0.5 * log((p + pz)/(p - pz));