PandaRoot
PndCAParam.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //-*- Mode: C++ -*-
14 // @(#) $Id: PndCAParam.h,v 1.4 2011/10/01 00:23:44 perev Exp $
15 // ************************************************************************
16 // This file is property of and copyright by the ALICE HLT Project *
17 // ALICE Experiment at CERN, All rights reserved. *
18 // See cxx source for full Copyright notice *
19 // *
20 //*************************************************************************
21 
22 #ifndef PNDCAPARAM_H
23 #define PNDCAPARAM_H
24 
25 #include "PndCADef.h"
26 #include "PndCAVector.h"
27 #include "PndCAMath.h"
28 //#include "PndCATrackParam.h";
29 class PndCATrackParam;
31 #include "PndCAParameters.h"
32 #include "PndCAStation.h"
33 #include "PndCAFieldValue.h"
34 #include <cstdio>
35 #include <sstream>
36 
45 class PndCAParam {
46  friend std::istringstream &operator>>(std::istringstream &, PndCAParam &);
47  // friend std::ostream &operator<<( std::ostream &, const PndCAParam & );
48  public:
49  PndCAParam();
51  {
52  if (fStations)
53  delete[] fStations;
54  }
55  int NStations() const { return fNStations; }
56 
57  const PndCAStation &Station(short i) const { return fStations[i]; }
58 
59  float Bz() const { return fBz; }
60  float cBz() const { return fBz * 0.000299792458; }
61 
62  void SetBz(float v) { fBz = v; }
63 
64  void SetBoundaries(float z, float r)
65  {
66  fMaxZ = z;
67  fMaxR = r;
68  }
69 
70  float GetBz() const { return fBz; }
71  float GetBz(float x, float y, float z) const;
72  float_v GetBz(float_v x, float_v y, float_v z) const;
73  float GetBz(const PndCATrackParam &t) const;
74  float_v GetBz(const PndCATrackParamVector &t) const;
75 
76  float GetXOverX0(short iSt) const { return fStations[iSt].xOverX0; };
77  float GetXTimesRho(short iSt) const { return fStations[iSt].xTimesRho; };
78  float GetR(short iSt) const { return fStations[iSt].r; };
79  float_v GetXOverX0(int_v iSt, float_m mask) const
80  {
81  float_v r;
82  r.gather(fStations, &PndCAStation::xOverX0, static_cast<uint_v>(iSt), mask);
83  return r;
84  };
85  float_v GetXTimesRho(int_v iSt, float_m mask) const
86  {
87  float_v r;
88  r.gather(fStations, &PndCAStation::xTimesRho, static_cast<uint_v>(iSt), mask);
89  return r;
90  };
91  float_v GetR(int_v iSt, const float_m &mask) const
92  {
93  float_v r;
94  r.gather(fStations, &PndCAStation::r, static_cast<uint_v>(iSt), mask);
95  return r;
96  }
97 
98  float MinZ() const { return fMinZ; }
99  float MaxZ() const { return fMaxZ; }
100  float MinR() const { return fMinR; }
101  float MaxR() const { return fMaxR; }
102 
103  const PndCAFieldValue &VtxFieldValue() const { return fVtxFieldValue; }
104 
105  protected:
108  float fBz;
109 
110  PndCAFieldValue fVtxFieldValue; // field at the vertex position.
111 
112  float fMinZ, fMaxZ, fMinR, fMaxR;
113 };
114 
115 std::istringstream &operator>>(std::istringstream &, PndCAParam &);
116 // std::ostream &operator<<( std::ostream &, const PndCAParam & );
117 
118 #endif
float MinR() const
Definition: PndCAParam.h:100
float GetXOverX0(short iSt) const
Definition: PndCAParam.h:76
float GetXTimesRho(short iSt) const
Definition: PndCAParam.h:77
float xTimesRho
Definition: PndCAStation.h:35
float GetR(short iSt) const
Definition: PndCAParam.h:78
float fBz
Definition: PndCAParam.h:108
float_v GetXOverX0(int_v iSt, float_m mask) const
Definition: PndCAParam.h:79
__m128 v
Definition: P4_F32vec4.h:15
float cBz() const
Definition: PndCAParam.h:60
unsigned int i
Definition: P4_F32vec4.h:33
const PndCAFieldValue & VtxFieldValue() const
Definition: PndCAParam.h:103
float MaxR() const
Definition: PndCAParam.h:101
float MinZ() const
Definition: PndCAParam.h:98
void SetBz(float v)
Definition: PndCAParam.h:62
float Bz() const
Definition: PndCAParam.h:59
float fMinR
Definition: PndCAParam.h:112
int NStations() const
Definition: PndCAParam.h:55
const PndCAStation & Station(short i) const
Definition: PndCAParam.h:57
int fNStations
Definition: PndCAParam.h:106
float fMaxR
Definition: PndCAParam.h:112
float fMinZ
Definition: PndCAParam.h:112
float fMaxZ
Definition: PndCAParam.h:112
friend std::istringstream & operator>>(std::istringstream &, PndCAParam &)
PndCAFieldValue fVtxFieldValue
Definition: PndCAParam.h:110
float_v GetR(int_v iSt, const float_m &mask) const
Definition: PndCAParam.h:91
float GetBz() const
Definition: PndCAParam.h:70
PndCAStation * fStations
Definition: PndCAParam.h:107
float_v GetXTimesRho(int_v iSt, float_m mask) const
Definition: PndCAParam.h:85
float MaxZ() const
Definition: PndCAParam.h:99
void SetBoundaries(float z, float r)
Definition: PndCAParam.h:64