13 #include "Stl3Util/ftf/FtfMcTrack.h"
15 void FtfMcTrack::set (
int _id,
float _r0,
float _z0,
float _phi0,
16 float _pt,
float _tanl,
float _psi,
17 int _q,
int _nHits ) {
32 void FtfMcTrack::setPrimary (
short qIn,
float ptIn,
float eta,
float psiIn ) {
34 float theta = 2 * atan(exp(-eta )) ;
35 tanl = 1./ tan(theta);
45 void FtfMcTrack::setRandomPrimary (
float ptMin,
float ptMax,
46 float etaMin,
float etaMax,
float psiMin,
float psiMax,
48 pt = ptMin + (ptMax - ptMin ) * (
float)rand() / (
float)RAND_MAX ;
49 double eta = etaMin + (etaMax - etaMin ) * (
float)rand() / (
float)RAND_MAX ;
50 double theta = 2 * atan(exp(-eta )) ;
51 tanl = 1./ tan(theta);
52 psi = psiMin + (psiMax - psiMin ) * (
float)rand() / (
float)RAND_MAX ;
57 if ( (
float)rand()/(
float)RAND_MAX > 0.5 ) q = -1 ;