9#ifndef TPCDIGITIZERMODULE_H
10#define TPCDIGITIZERMODULE_H
12#include <framework/core/Module.h>
13#include <framework/datastore/StoreArray.h>
14#include <beast/microtpc/dataobjects/MicrotpcHit.h>
17#include <Math/Vector3D.h>
18#include <Math/Vector2D.h>
25constexpr int MAXSIZE = 26880;
27constexpr int MAXtSIZE = 10000;
65 virtual void event()
override;
69 virtual void endRun()
override;
90 virtual void Drift(
double,
double,
double,
double&,
double&,
double&,
double&,
double,
double,
double);
93 ROOT::Math::XYVector
GEMGeo1(
double x1,
double y1);
96 ROOT::Math::XYVector
GEMGeo2(
double x1,
double y1);
182 std::map<std::tuple<int, int, int>,
int>
m_dchip;
Accessor to arrays stored in the data store.
double m_GEMGainRMS2
GEM 2 RMS.
double m_TOTC1
TOT factor C1.
double m_lowerTimingCut
Lower timing cut.
double m_ChipRowY
Chip row y dimension.
std::map< std::tuple< int, int >, int > m_dchip_pdg_map
chip pdg map arrays
double m_GEMGain1
GEM 1 gain.
int m_LookAtRec
Flag 0/1 only look at nuclear recoils.
double m_Dl_CG
Longitudinal diffusion in collection gap.
double m_TOTA1
TOT factor A1.
double m_Dl_DG
Longitudinal diffusion in drift gap.
std::map< std::tuple< int, int >, int > m_dchip_trkID_map
chip track ID map arrays
double m_PixelTimeBin
Pixel time bin.
ROOT::Math::XYVector GEMGeo1(double x1, double y1)
GEMazition of GEM1.
double m_z_TG
z transfer gap
virtual void initialize() override
Initialize the Module.
TF1 * fctToT_Calib1
Define ToT calib 1.
virtual void event() override
This method is the core of the module.
double m_TOTB1
TOT factor B1.
double m_v_DG
Drift velocity in drift gap.
double m_GEMGain2
GEM 2 gain.
virtual void endRun() override
This method is called if the current run ends.
double m_ChipColumnX
Chip column x dimension.
void getXMLData()
reads data from MICROTPC.xml: tube location, drift data filename, sigma of impulse response function
double m_ScaleGain2
Scale GEM 2 gain.
TpcDigitizerModule()
Constructor: Sets the description, the properties and the parameters of the module.
virtual void terminate() override
This method is called at the end of the event processing.
double m_TOTQ2
TOT factor Q2.
double m_upperTimingCut
Upper timing cut.
std::map< std::tuple< int, int, int >, int > m_dchip
chip store arrays
int m_nTPC
number of detectors.
TF1 * fctToT_Calib2
Define ToT calib 2.
std::map< std::tuple< int, int >, int > m_dchip_detNb_map
chip Nb map arrays
virtual void beginRun() override
Called when entering a new run.
double m_TOTC2
TOT factor C2.
double m_Dt_CG
Transverse diffusion in collection gap.
std::vector< float > m_TPCAngleZ
TPC angle Z.
double m_z_CG
z collection gap
int m_ChipRowNb
Chip row number.
std::map< std::tuple< int, int >, int > m_dchip_map
chip map arrays
double m_GEMGainRMS1
GEM 1 RMS.
double m_Dt_TG
Transverse diffusion in transfer gap.
std::vector< float > m_TPCAngleX
TPC angle X.
int m_PixelTimeBinNb
Pixel time number of bin.
int olddetNb
Old detector counter.
std::vector< ROOT::Math::XYZVector > m_TPCCenter
TPC coordinate.
int m_ChipColumnNb
Chip column number.
double m_Dt_DG
Transverse diffusion in drift gap.
void Pixelization()
Produces the pixelization.
double m_Workfct
Work function.
ROOT::Math::XYVector GEMGeo2(double x1, double y1)
GEMazition of GEM2.
StoreArray< MicrotpcHit > m_microtpcHit
Array for MicrotpcHit.
double m_ScaleGain1
Scale GEM 1 gain.
double m_TOTA2
TOT factor A2.
int m_PixelThresholdRMS
Pixel threshold RMS.
int m_PixelThreshold
Pixel threshold.
double m_v_CG
Drift velocity in collection gap.
double m_GasAbs
Absorption in gas.
virtual void Drift(double, double, double, double &, double &, double &, double &, double, double, double)
Drift ionization Make the ionization drifting from (x,y,z) to GEM1 top plane.
int oldtrkID
Old track ID.
double m_Dl_TG
Longitudinal diffusion in transfer gap.
double m_Fanofac
Fano factor.
double m_GEMpitch
GEM pitch.
double m_v_TG
Drift velocity in transfer gap.
double m_TOTB2
TOT factor B2.
double m_TOTQ1
TOT factor Q1.
Abstract base class for different kinds of events.