-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathFMWKInterface.h
143 lines (113 loc) · 3.56 KB
/
FMWKInterface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#ifndef __FMWKINTERFACE_H__
#define __FMWKINTERFACE_H__
//#include "larcoreobj/SimpleTypesAndConstants/geo_vectors.h"
#include "larcore/Geometry/Geometry.h"
//#include "fhiclcpp/ParameterSet.h"
#include "larcv/core/Base/PSet.h"
#include "larcv/core/DataFormat/DataFormatTypes.h"
#include "nusimdata/SimulationBase/MCTruth.h"
#include "nusimdata/SimulationBase/MCParticle.h"
//#include "lardataobj/MCBase/MCMiniPart.h"
#include "lardataobj/MCBase/MCParticleLite.h"
#include "lardataobj/RecoBase/Hit.h"
#include "lardataobj/RecoBase/OpFlash.h"
#include "lardataobj/RecoBase/Wire.h"
#include "lardataobj/RecoBase/SpacePoint.h"
#include "lardataobj/RawData/OpDetWaveform.h"
#include "lardataobj/MCBase/MCShower.h"
#include "lardataobj/MCBase/MCTrack.h"
#include "lardataobj/Simulation/SimChannel.h"
#include "lardataobj/Simulation/SimEnergyDeposit.h"
#include "lardataobj/Simulation/SimEnergyDepositLite.h"
#include "larcore/CoreUtils/ServiceUtil.h"
#include "ExperimentTypes.h"
namespace supera {
typedef larcv::PSet Config_t;
typedef recob::Wire LArWire_t;
typedef raw::OpDetWaveform LArOpDigit_t;
typedef recob::Hit LArHit_t;
typedef simb::MCTruth LArMCTruth_t;
typedef simb::MCParticle LArMCParticle_t;
typedef sim::MCParticleLite LArMCMiniPart_t;
typedef sim::MCTrack LArMCTrack_t;
typedef sim::MCShower LArMCShower_t;
typedef sim::SimChannel LArSimCh_t;
typedef sim::MCStep LArMCStep_t;
typedef sim::SimEnergyDeposit LArSimEnergyDeposit_t;
typedef sim::SimEnergyDepositLite LArSimEnergyDepositLite_t;
typedef recob::SpacePoint LArSpacePoint_t;
typedef recob::OpFlash LArOpFlash_t;
}
//
// Utility functions (geometry, lar properties, etc.)
//
namespace supera {
//typedef ::fhicl::ParameterSet Config_t;
//
// LArProperties
//
/// DriftVelocity in cm/us
double DriftVelocity();
//
// Geometry
//
/// Channel number to wire ID
::geo::WireID ChannelToWireID(unsigned int ch);
/// Channel number to image column number
double ChannelToImageX(unsigned int ch);
/// Channel number to projection ID
larcv::ProjectionID_t ChannelToProjectionID(unsigned int ch);
/// Number of channels
unsigned int Nchannels();
/*
/// Number of planes (deprecated)
unsigned int Nplanes();
/// Number of projections
unsigned int NProjections();
/// Number of wires
unsigned int Nwires(unsigned int plane);
/// Nearest wire
unsigned int NearestWire(const TVector3& xyz, unsigned int plane);
/// Nearest wire
unsigned int NearestWire(const double* xyz, unsigned int plane);
/// Angle from z-axis
double WireAngleToVertical(unsigned int plane);
/// Wire pitch
double WirePitch(size_t plane);
/// Detector height
double DetHalfHeight();
/// Detector width
double DetHalfWidth();
/// Detector length
double DetLength();
*/
//
// DetectorClockService
//
/// Number of time ticks
unsigned int NumberTimeSamples();
/// G4 time to TPC tick
int TPCG4Time2Tick(double ns);
/// G4 time to TPC tick
int TPCG4Time2TDC(double ns);
/// per-plane tick offset
double PlaneTickOffset(size_t plane0, size_t plane1);
/// TPC TDC to Tick
double TPCTDC2Tick(double tdc);
/// Trigger time [us] offset
double TriggerOffsetTPC();
/// TPC sampling period
double TPCTickPeriod();
/// Trigger time
double TriggerTime();
//
// SpaceChargeService
//
/// Truth position to shifted
void ApplySCE(double& x, double& y, double& z);
/// Truth position to shifted
void ApplySCE(double* xyz);
/// Truth position to shifted
void ApplySCE(TVector3& xyz);
}
#endif