ATLAS Offline Software
Functions
TFCSHitCellMappingWiggle.cxx File Reference
#include "CLHEP/Random/RandFlat.h"
#include "ISF_FastCaloSimEvent/TFCSHitCellMappingWiggle.h"
#include "ISF_FastCaloSimEvent/TFCSSimulationState.h"
#include "ISF_FastCaloSimEvent/TFCSTruthState.h"
#include "ISF_FastCaloSimEvent/TFCSExtrapolationState.h"
#include "ISF_FastCaloSimEvent/TFCS1DFunctionInt32Histogram.h"
#include "TH1.h"
#include "TVector2.h"
#include "TMath.h"
#include <TClass.h>

Go to the source code of this file.

Functions

void TFCSHitCellMappingWiggle::unit_test ATLAS_NOT_THREAD_SAFE (TFCSSimulationState *simulstate, TFCSTruthState *truth, TFCSExtrapolationState *extrapol)
 

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

void TFCSHitCellMappingWiggle::unit_test ATLAS_NOT_THREAD_SAFE ( TFCSSimulationState simulstate,
TFCSTruthState truth,
TFCSExtrapolationState extrapol 
)

Definition at line 212 of file TFCSHitCellMappingWiggle.cxx.

213  {
214  if (!simulstate)
215  simulstate = new TFCSSimulationState();
216  if (!truth)
217  truth = new TFCSTruthState();
218  if (!extrapol)
220 
221  int nbin = 10;
222  float maxeta = 5.0;
223  std::vector<const TFCS1DFunction *> functions;
224  std::vector<float> bin_low_edges;
225 
226  TFCSHitCellMappingWiggle wiggle_test("WiggleTest", "WiggleTest");
227 
228  for (float eta = 0; eta < maxeta; eta += maxeta / nbin) {
229  TH1 *hist = TFCS1DFunction::generate_histogram_random_gauss(
230  16, 100000, -0.0125, 0.0125, 0, 0.005);
231  bin_low_edges.push_back(eta);
232  functions.push_back(new TFCS1DFunctionInt32Histogram(hist));
233  delete hist;
234  }
235  bin_low_edges.push_back(100);
236  wiggle_test.initialize(functions, bin_low_edges);
237  wiggle_test.set_calosample(2);
238  wiggle_test.setLevel(MSG::DEBUG);
239  wiggle_test.Print();
240 
241 #if 0 // defined(__FastCaloSimStandAlone__)
243 
244 // * load geometry files
245  geo->LoadGeometryFromFile("/afs/cern.ch/atlas/groups/Simulation/FastCaloSimV2/Geometry-ATLAS-R2-2016-01-00-01.root", "ATLAS-R2-2016-01-00-01");
246  TString path_to_fcal_geo_files = "/afs/cern.ch/atlas/groups/Simulation/FastCaloSimV2/";
247  geo->LoadFCalGeometryFromFiles(path_to_fcal_geo_files + "FCal1-electrodes.sorted.HV.09Nov2007.dat", path_to_fcal_geo_files + "FCal2-electrodes.sorted.HV.April2011.dat", path_to_fcal_geo_files + "FCal3-electrodes.sorted.HV.09Nov2007.dat");
248 
249  wiggle_test.set_geometry(geo);
250  for(float eta=-maxeta+0.01;eta<maxeta;eta+=maxeta/nbin) {
251  Hit hit;
252  hit.eta()=eta;
253  hit.phi()=0;
254  hit.E()=1;
255  wiggle_test.simulate_hit(hit,*simulstate,truth,extrapol);
256  }
257 #endif
258 }
TFCSHitCellMappingWiggle
Definition: TFCSHitCellMappingWiggle.h:20
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
plotmaker.hist
hist
Definition: plotmaker.py:148
TFCSExtrapolationState
Definition: TFCSExtrapolationState.h:13
RunActsMaterialValidation.extrapol
extrapol
Definition: RunActsMaterialValidation.py:90
Hit
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloGpu/ISF_FastCaloGpu/Hit.h:16
CaloGeometryFromFile
Definition: CaloGeometryFromFile.h:11
TFCS1DFunctionInt32Histogram
Definition: TFCS1DFunctionInt32Histogram.h:15
Hit::phi
CUDA_HOSTDEV float & phi()
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloGpu/ISF_FastCaloGpu/Hit.h:72
LArCellConditions.geo
bool geo
Definition: LArCellConditions.py:46
TH1
Definition: rootspy.cxx:268
DEBUG
#define DEBUG
Definition: page_access.h:11
Hit::E
CUDA_HOSTDEV float & E()
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloGpu/ISF_FastCaloGpu/Hit.h:75
Hit::eta
CUDA_HOSTDEV float & eta()
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloGpu/ISF_FastCaloGpu/Hit.h:71
TFCSTruthState
Definition: TFCSTruthState.h:13
TFCSSimulationState
Definition: TFCSSimulationState.h:32