ATLAS Offline Software
Functions
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 }

◆ 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 }
index
Definition: index.py:1
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
lumiFormat.i
int i
Definition: lumiFormat.py:92
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
python.PyAthena.v
v
Definition: PyAthena.py:157
DeMoScan.index
string index
Definition: DeMoScan.py:362
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14