Fork me on GitHub

source: git/external/Hector/H_Drift.cc@ c526439

ImprovedOutputFile Timing dual_readout llp
Last change on this file since c526439 was 5b822e5, checked in by pavel <pavel@…>, 11 years ago

add Hector module

  • Property mode set to 100644
File size: 2.3 KB
Line 
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * *
3* --<--<-- A fast simulator --<--<-- *
4* / --<--<-- of particle --<--<-- *
5* ----HECTOR----< *
6* \ -->-->-- transport through -->-->-- *
7* -->-->-- generic beamlines -->-->-- *
8* *
9* JINST 2:P09005 (2007) *
10* X Rouby, J de Favereau, K Piotrzkowski (CP3) *
11* http://www.fynu.ucl.ac.be/hector.html *
12* *
13* Center for Cosmology, Particle Physics and Phenomenology *
14* Universite catholique de Louvain *
15* Louvain-la-Neuve, Belgium *
16 * *
17 * * * * * * * * * * * * * * * * * * * * * * * * * * * */
18
19/// \file H_Drift.cc
20/// \brief Class aiming at simulating LHC beam drift.
21
22// local includes
23#include "H_Drift.h"
24#include "H_TransportMatrices.h"
25
26
27void H_Drift::init() {
28 // must be in public section
29 element_mat.ResizeTo(MDIM,MDIM);
30 setTypeString();
31 setMatrix(0,MP,QP);
32 return;
33}
34
35std::ostream& operator<< (std::ostream& os, const H_Drift& el) {
36 os << el.typestring << el.name << "\t\t at s = " << el.fs << "\t length = " << el.element_length <<endl;
37 if(el.element_aperture->getType()!=NONE) {
38 os << *(el.element_aperture) << endl;
39 }
40 if(el.element_length<0 && VERBOSE) os <<"<H_Drift> ERROR : Interpenetration of elements !"<<endl;
41 else if(el.element_length==0 && VERBOSE) os <<"<H_Drift> WARNING : 0-length "<< el.name << " !" << endl;
42 return os;
43}
44
45//void H_Drift::setMatrix(const float eloss, const float p_mass, const float p_charge) {
46void H_Drift::setMatrix(const float , const float , const float ) {
47 element_mat = driftmat(element_length);
48 return ;
49}
50
51H_Drift* H_Drift::clone() const {
52 H_Drift* temp_drift = new H_Drift(name,fs,element_length);
53 temp_drift->setX(xpos);
54 temp_drift->setY(ypos);
55 temp_drift->setTX(txpos);
56 temp_drift->setTY(typos);
57 temp_drift->setBetaX(betax);
58 temp_drift->setBetaY(betay);
59 return temp_drift;
60}
61
Note: See TracBrowser for help on using the repository browser.