ATLAS Offline Software
Loading...
Searching...
No Matches
EfieldInterpolator.cxx File Reference
#include "EfieldInterpolator.h"
#include "TROOT.h"
#include "TH1.h"
#include "TF1.h"
#include "TVectorD.h"
#include <TFile.h>
#include "TTreeReader.h"
#include "TTreeReaderValue.h"
#include "TTreeReaderArray.h"
#include <TMath.h>
#include <TGraph.h>
#include <TPRegexp.h>
#include <TSystemDirectory.h>
#include <TSystemFile.h>
#include <TGraph2D.h>
#include <algorithm>
#include <TString.h>
#include <fstream>

Go to the source code of this file.

Functions

TVectorD CastStdVec (const std::vector< double > &vin)
int isContainedAt (const std::vector< double > &v, double val)

Function Documentation

◆ CastStdVec()

TVectorD CastStdVec ( const std::vector< double > & vin)

Definition at line 43 of file EfieldInterpolator.cxx.

43 {
44 TVectorD tmp(vin.size());
45 //for(uint i = 0; i<vin.size(); i++ ){
46 uint index = 0;
47
48 for (auto i : vin) {
49 tmp[index] = i;
50 index++;
51 }
52 return tmp;
53}
unsigned int uint
Definition index.py:1

◆ isContainedAt()

int isContainedAt ( const std::vector< double > & v,
double val )

Definition at line 56 of file EfieldInterpolator.cxx.

56 {
57 for (uint i = 0; i < v.size(); i++) {
58 //Equality for decimals
59 if (v[i] - 0.00001 < val && val < v[i] + 0.00001) return i;
60 }
61 return -1;
62}