Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunecore
dunecore
Geometry
IcebergChannelGeo.cxx
Go to the documentation of this file.
1
// IcebergChannelGeo.cxx
2
3
#include "
IcebergChannelGeo.h
"
4
5
#include "
art/Framework/Services/Registry/ServiceHandle.h
"
6
#include "
larcore/Geometry/Geometry.h
"
7
#include <string>
8
#include <iostream>
9
10
using
std::string
;
11
using
std::cout;
12
using
std::endl
;
13
14
//**********************************************************************
15
16
IcebergChannelGeo::IcebergChannelGeo
(
Index
icha)
17
:
IcebergChannelGeo
(icha, &*
art
::ServiceHandle<
geo
::Geometry>()) { }
18
19
//**********************************************************************
20
21
IcebergChannelGeo::IcebergChannelGeo
(
Index
icha,
const
geo::GeometryCore
* pgeo)
22
:
m_icha
(icha),
m_valid
(false) {
23
const
string
myname =
"IcebergChannelGeo::ctor: "
;
24
if
( pgeo ==
nullptr
)
return
;
25
if
( icha >= pgeo->
Nchannels
() )
return
;
26
m_valid
=
true
;
27
if
( pgeo->
DetectorName
() !=
"iceberg"
) {
28
cout << myname <<
"WARNING: Iceberg mod is applied to non-Iceberg detector channels."
<<
endl
;
29
}
30
double
ylo = 173.819 - 95.23;
31
for
(
geo::WireID
wid : pgeo->
ChannelToWire
(icha) ) {
32
EndPoints
ends = pgeo->
WireEndPoints
<TVector3>(wid);
33
if
( ends.first.y() > ends.second.y() ) {
34
Point
firstPoint = ends.first;
35
ends.first = ends.second;
36
ends.second = firstPoint;
37
}
38
Point
& plo = ends.first;
39
Point
& phi = ends.second;
40
if
( phi.y() < ylo )
continue
;
41
if
( plo.y() < ylo ) {
42
// Set lower limit to ylo.
43
double
slop = (plo.z() - phi.z())/(plo.y() - phi.y());
44
double
zlo = phi.z() + slop*(ylo - phi.y());
45
plo.SetY(ylo);
46
plo.SetZ(zlo);
47
}
48
if
(
m_ends
.size() == 0 ) {
49
m_bot
= ends.first;
50
m_top
= ends.second;
51
}
else
{
52
if
( ends.first.y() <
m_bot
.y() )
m_bot
= ends.first;
53
if
( ends.second.y() >
m_top
.y() )
m_top
= ends.second;
54
}
55
m_ends
.push_back(ends);
56
}
57
}
58
59
//**********************************************************************
IcebergChannelGeo::Index
unsigned int Index
Definition:
IcebergChannelGeo.h:27
string
std::string string
Definition:
nybbler.cc:12
geo::GeometryCore::ChannelToWire
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
Definition:
GeometryCore.cxx:1107
IcebergChannelGeo
Definition:
IcebergChannelGeo.h:23
geo::WireID
Definition:
geo_types.h:560
IcebergChannelGeo::m_top
Point m_top
Definition:
IcebergChannelGeo.h:59
Geometry.h
art framework interface to geometry description
geo::GeometryCore::Nchannels
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
Definition:
GeometryCore.cxx:208
ServiceHandle.h
geo::GeometryCore::DetectorName
std::string DetectorName() const
Returns a string with the name of the detector, as configured.
Definition:
GeometryCore.h:1761
IcebergChannelGeo::IcebergChannelGeo
IcebergChannelGeo(Index icha, const geo::GeometryCore *pgeo)
Definition:
IcebergChannelGeo.cxx:21
IcebergChannelGeo::m_valid
bool m_valid
Definition:
IcebergChannelGeo.h:57
geo::GeometryCore
Description of geometry of one entire detector.
Definition:
GeometryCore.h:1468
IcebergChannelGeo::m_icha
Index m_icha
Definition:
IcebergChannelGeo.h:56
IcebergChannelGeo.h
IcebergChannelGeo::m_bot
Point m_bot
Definition:
IcebergChannelGeo.h:60
IcebergChannelGeo::m_ends
EndPointsVector m_ends
Definition:
IcebergChannelGeo.h:58
Point
Definition:
HitHandScan_module.cc:39
geo::GeometryCore::WireEndPoints
void WireEndPoints(geo::WireID const &wireid, double *xyzStart, double *xyzEnd) const
Fills two arrays with the coordinates of the wire end points.
Definition:
GeometryCore.cxx:1243
art
Definition:
BasicOptionsHandler.h:9
IcebergChannelGeo::EndPoints
std::pair< Point, Point > EndPoints
Definition:
IcebergChannelGeo.h:29
if
if(!yymsg) yymsg
geo
LArSoft geometry interface.
Definition:
ChannelGeo.h:16
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
Generated by
1.8.11