13 ev.gname =
"dune35t_geo";
14 ev.fullname =
"dune35t4apa_v6";
24 for (
Index icry=0; icry<ev.ncry; ++icry ) {
25 for (
Index itpc=0; itpc<ev.ntpc; ++itpc ) {
26 for (
Index ipla=0; ipla<ev.npla; ++ipla ) {
29 ev.view[icry][itpc][0] =
geo::kU;
30 ev.view[icry][itpc][1] =
geo::kV;
31 ev.view[icry][itpc][2] =
geo::kZ;
35 resize(ev.nwirPerPlane, ev.ntpc, ev.npla, 0);
36 ev.nwirPerPlane[0][0] = 359;
37 ev.nwirPerPlane[0][1] = 345;
38 ev.nwirPerPlane[0][2] = 112;
39 ev.nwirPerPlane[2][0] = 194;
40 ev.nwirPerPlane[2][1] = 188;
41 ev.nwirPerPlane[2][2] = 112;
42 ev.nwirPerPlane[4][0] = 236;
43 ev.nwirPerPlane[4][1] = 228;
44 ev.nwirPerPlane[4][2] = 112;
45 for (
Index ipla=0; ipla<ev.npla; ++ipla ) ev.nwirPerPlane[1][ipla] = ev.nwirPerPlane[0][ipla];
46 for (
Index ipla=0; ipla<ev.npla; ++ipla ) ev.nwirPerPlane[3][ipla] = ev.nwirPerPlane[2][ipla];
47 for (
Index ipla=0; ipla<ev.npla; ++ipla ) ev.nwirPerPlane[5][ipla] = ev.nwirPerPlane[4][ipla];
48 for (
Index ipla=0; ipla<ev.npla; ++ipla ) ev.nwirPerPlane[6][ipla] = ev.nwirPerPlane[0][ipla];
49 for (
Index ipla=0; ipla<ev.npla; ++ipla ) ev.nwirPerPlane[7][ipla] = ev.nwirPerPlane[0][ipla];
50 resize(ev.nchaPerRop, ev.nrop, 0);
51 ev.nchaPerRop[0] = 144;
52 ev.nchaPerRop[1] = 144;
53 ev.nchaPerRop[2] = 112;
54 ev.nchaPerRop[3] = 112;
55 for (
Index irop=0; irop<ev.nrop; ++irop ) ev.nchaPerApa += ev.nchaPerRop[irop];
56 ev.nchatot = ev.napa*ev.nchaPerApa;
61 for (
Index icry=0; icry<ev.ncry; ++icry ) {
62 for (
Index iapa=0; iapa<ev.napa; ++iapa ) {
63 for (
Index irop=0; irop<ev.nrop; ++irop ) {
64 for (
Index kcha=0; kcha<ev.nchaPerRop[irop]; ++kcha ) {
65 ev.chacry[icha] = icry;
66 ev.chaapa[icha] = iapa;
67 ev.charop[icha] = irop;
75 for (
Index icry=0; icry<ev.ncry; ++icry ) {
76 for (
Index iapa=0; iapa<ev.napa; ++iapa ) {
77 for (
Index irop=0; irop<ev.nrop; ++irop ) {
78 ev.firstchan[icry][iapa][irop] = chan;
79 chan += ev.nchaPerRop[irop];
83 #include "set35tSpacePoints.dat" 86 ev.nopdetcha.push_back( 8);
87 ev.nopdetcha.push_back(12);
88 ev.nopdetcha.push_back( 2);
89 ev.nopdetcha.push_back(12);
90 ev.nopdetcha.push_back( 8);
91 ev.nopdetcha.push_back(12);
92 ev.nopdetcha.push_back( 8);
93 ev.nopdetcha.push_back(12);
94 ev.nopcha = ev.nopdet*12;
95 resize(ev.opdetcha, ev.nopdet, 12, 0);
96 for (
Index iopt=0; iopt<ev.nopdet; ++iopt ) {
98 for (
Index ioch=0; ioch<ev.nopdetcha[iopt]; ++ ioch ) {
99 ev.opdetcha[iopt][ioch] = icha++;
107 const string myname =
"setExpectedValuespacePoints: ";
108 string ofname =
"set35tSpacePoints.dat";
109 cout << myname <<
"Writing " << ofname <<
endl;
112 double crypos[3] = {0.0};
114 double cxlo = crypos[0] - crygeo.
HalfWidth();
115 double cxhi = crypos[0] + crygeo.
HalfWidth();
116 double cylo = crypos[1] - crygeo.
HalfHeight();
117 double cyhi = crypos[1] + crygeo.
HalfHeight();
118 double czlo = crypos[2] - 0.5*crygeo.
Length();
119 double czhi = crypos[2] + 0.5*crygeo.
Length();
120 cout <<
"Cryostat limits: " 121 <<
"(" << cxlo <<
", " << cylo <<
", " << czlo <<
"), " 122 <<
"(" << cxhi <<
", " << cyhi <<
", " << czhi <<
")" <<
endl;
126 ofstream
fout(ofname.c_str());
127 for (
double zf : zfs ) {
128 double z = czlo + zf*(czhi-czlo);
129 for (
double yf : yfs ) {
130 double y = cylo + yf*(cyhi-cylo);
131 for (
double xf : xfs ) {
132 double x = cxlo + xf*(cxhi-cxlo);
133 double xyz[3] = {
x,
y, z};
135 unsigned int itpc = tpcid.
TPC;
137 unsigned int npla = tpcgeo.
Nplanes();
138 fout <<
" ev.posXyz.push_back(SpacePoint(" << x <<
", " << y <<
", " << z <<
"));" <<
endl;
139 for (
unsigned int ipla=0; ipla<npla; ++ipla ) {
142 fout <<
" ev.posTpc.push_back(" << itpc <<
");" <<
endl;
143 fout <<
" ev.posPla.push_back(" << ipla <<
");" <<
endl;
144 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.
void setExpectedValues(ExpectedValues &ev)
The data type to uniquely identify a Plane.
Geometry information for a single TPC.
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 setExpectedValuesSpacePoints(Geometry *pgeo)
void LocalToWorld(const double *cryo, double *world) const
Transform point from local cryostat frame to world frame.
for(std::string line;std::getline(inFile, line);)
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.