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