15 ev.gname =
"dune10kt_workspace_geo";
16 ev.fullname =
"dune10kt_v1_workspace";
26 for (
Index icry=0; icry<ev.ncry; ++icry ) {
27 for (
Index itpc=0; itpc<ev.ntpc; ++itpc ) {
28 for (
Index ipla=0; ipla<ev.npla; ++ipla ) {
31 ev.view[icry][itpc][0] =
geo::kU;
32 ev.view[icry][itpc][1] =
geo::kV;
33 ev.view[icry][itpc][2] =
geo::kZ;
37 resize(ev.nwirPerPlane, ev.ntpc, ev.npla, 0);
38 ev.nwirPerPlane[0][0] = 1149;
39 ev.nwirPerPlane[0][1] = 1148;
40 ev.nwirPerPlane[0][2] = 480;
41 for (
Index itpc=1; itpc<ev.ntpc; ++itpc ) {
42 for (
Index ipla=0; ipla<ev.npla; ++ipla ) ev.nwirPerPlane[itpc][ipla] = ev.nwirPerPlane[0][ipla];
45 resize(ev.nchaPerRop, ev.nrop, 0);
46 ev.nchaPerRop[0] = 800;
47 ev.nchaPerRop[1] = 800;
48 ev.nchaPerRop[2] = 480;
49 ev.nchaPerRop[3] = 480;
50 for (
Index irop=0; irop<ev.nrop; ++irop ) ev.nchaPerApa += ev.nchaPerRop[irop];
51 ev.nchatot = ev.napa*ev.nchaPerApa;
56 for (
Index icry=0; icry<ev.ncry; ++icry ) {
57 for (
Index iapa=0; iapa<ev.napa; ++iapa ) {
58 for (
Index irop=0; irop<ev.nrop; ++irop ) {
59 for (
Index kcha=0; kcha<ev.nchaPerRop[irop]; ++kcha ) {
60 ev.chacry[icha] = icry;
61 ev.chaapa[icha] = iapa;
62 ev.charop[icha] = irop;
70 for (
Index icry=0; icry<ev.ncry; ++icry ) {
71 for (
Index iapa=0; iapa<ev.napa; ++iapa ) {
72 for (
Index irop=0; irop<ev.nrop; ++irop ) {
73 ev.firstchan[icry][iapa][irop] = chan;
74 chan += ev.nchaPerRop[irop];
79 #include "setWorkspaceSpacePoints.dat" 81 ev.nopdet = 10*ev.napa;
82 ev.nopdetcha.resize(ev.nopdet, 1);
83 ev.nopcha = ev.nopdet;
84 resize(ev.opdetcha, ev.nopdet, 1, 0);
85 for (
Index iopt=0; iopt<ev.nopdet; ++iopt ) {
87 for (
Index ioch=0; ioch<ev.nopdetcha[iopt]; ++ ioch ) {
88 ev.opdetcha[iopt][ioch] = icha++;
96 const string myname =
"setExpectedValuesSpacePoints: ";
97 string ofname =
"setExpectedValuesSpacePoints.dat";
98 cout << myname <<
"Writing " << ofname <<
endl;
101 double crypos[3] = {0.0};
103 double cxlo = crypos[0] - crygeo.
HalfWidth();
104 double cxhi = crypos[0] + crygeo.
HalfWidth();
105 double cylo = crypos[1] - crygeo.
HalfHeight();
106 double cyhi = crypos[1] + crygeo.
HalfHeight();
107 double czlo = crypos[2] - 0.5*crygeo.
Length();
108 double czhi = crypos[2] + 0.5*crygeo.
Length();
109 cout <<
"Cryostat limits: " 110 <<
"(" << cxlo <<
", " << cylo <<
", " << czlo <<
"), " 111 <<
"(" << cxhi <<
", " << cyhi <<
", " << czhi <<
")" <<
endl;
115 ofstream
fout(ofname.c_str());
116 for (
double zf : zfs ) {
117 double z = czlo + zf*(czhi-czlo);
118 for (
double yf : yfs ) {
119 double y = cylo + yf*(cyhi-cylo);
120 for (
double xf : xfs ) {
121 double x = cxlo + xf*(cxhi-cxlo);
122 double xyz[3] = {
x,
y, z};
123 cout <<
" (" << x <<
", " << y <<
", " << z <<
")" <<
endl;
125 unsigned int itpc = tpcid.
TPC;
126 if ( itpc == TPCID::InvalidID )
continue;
128 unsigned int npla = tpcgeo.
Nplanes();
129 fout <<
" ev.posXyz.push_back(SpacePoint(" << x <<
", " << y <<
", " << z <<
"));" <<
endl;
130 for (
unsigned int ipla=0; ipla<npla; ++ipla ) {
133 fout <<
" ev.posTpc.push_back(" << itpc <<
");" <<
endl;
134 fout <<
" ev.posPla.push_back(" << ipla <<
");" <<
endl;
135 fout <<
" ev.posWco.push_back(" << xwire <<
");" <<
endl;
geo::Length_t WireCoordinate(double YPos, double ZPos, geo::PlaneID const &planeid) const
Returns the index of the nearest wire to the specified position.
unsigned int Nplanes() const
Number of planes in this tpc.
The data type to uniquely identify a Plane.
Geometry information for a single TPC.
void setExpectedValuesSpacePoints(Geometry *pgeo)
Planes which measure Z direction.
Geometry information for a single cryostat.
void resize(Vector< T > &vec1, Index n1, const V &val)
geo::TPCID FindTPCAtPosition(double const worldLoc[3]) const
Returns the ID of the TPC at specified location.
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
Signal from induction planes.
double HalfWidth() const
Half width of the cryostat [cm].
CryostatGeo const & Cryostat(geo::CryostatID const &cryoid) const
Returns the specified cryostat.
The geometry of one entire detector, as served by art.
The data type to uniquely identify a TPC.
double HalfHeight() const
Half height of the cryostat [cm].
void LocalToWorld(const double *cryo, double *world) const
Transform point from local cryostat frame to world frame.
TPCGeo const & TPC(unsigned int const tpc=0, unsigned int const cstat=0) const
Returns the specified TPC.
TPCID_t TPC
Index of the TPC within its cryostat.
constexpr Point origin()
Returns a origin position with a point of the specified type.
double Length() const
Length of the cryostat [cm].
QTextStream & endl(QTextStream &s)
Signal from collection planes.
void setExpectedValues(ExpectedValues &ev)