34 const unsigned int minPlane = clust.
MinPlane();
35 for(
unsigned int p = 0;
p < minPlane; ++
p)
fPlanes.erase(
p);
37 for(
unsigned int p = maxPlane+1;
p < geom->
NPlanes(); ++
p)
46 for(std::set<unsigned int>::iterator
it =
fPlanes.begin();
52 assert(plane < geom->NPlanes());
58 if(considerBadChans &&
67 for(
unsigned int n = 0;
n < chits.
size(); ++
n){
81 std::vector<unsigned int> deadPlanes;
82 for(std::set<unsigned int>::iterator
it =
fPlanes.begin();
93 if(alldead) deadPlanes.push_back(plane);
96 for(
unsigned int n = 0;
n < deadPlanes.size(); ++
n)
103 std::set<unsigned int>::iterator
it =
fPlanes.find(plane);
104 if(it ==
fPlanes.end())
return -1;
105 if(it ==
fPlanes.begin())
return -1;
113 std::set<unsigned int>::iterator
it =
fPlanes.find(plane);
114 if(it ==
fPlanes.end())
return -1;
116 if(it ==
fPlanes.end())
return -1;
152 for(std::set<unsigned int>::iterator
it =
fPlanes.begin();
169 chunks_map[
plane].insert(chunks_map[plane].begin(),
170 chunks.begin(), chunks.end());
175 chunks_map[
plane].insert(chunks_map[plane].begin(),
176 chunks.begin(), chunks.end());
185 int begin,
int end)
const 187 std::vector<Chunk>
ret;
192 std::vector<std::pair<int, int> > lows, highs;
195 for(
int k = begin; k <
end; ++k){
216 for(
unsigned int i = 0;
i < lows.size(); ++
i){
217 for(
unsigned int j = 0;
j < highs.size(); ++
j){
218 if(lows[
i].
second > highs[
j].first)
continue;
221 for(
int k = lows[
i].
second; k <= highs[
j].first; ++k){
226 for(
bool up: {
false,
true}){
228 if(up) chunk =
Chunk(plane, lows[
i].first, lows[
i].
second, highs[
j].first, highs[
j].second, up, hits);
229 else chunk =
Chunk(plane, highs[
j].first, highs[
j].second, lows[
i].first, lows[
i].second, up, hits);
231 ret.push_back(chunk);
241 for(
int i = begin;
i <
end; ++
i){
249 for(
bool up: {
false,
true}){
250 const Chunk chunk(plane, from, to, from, to, up,
252 ret.push_back(chunk);
263 return (plane < 0 || cell <
int(
fMinCell) ||
264 plane >=
int(
fChans.size()) ||
bool Outside(int plane, int cell) const
T max(const caf::Proxy< T > &a, T b)
unsigned short Plane() const
Sequence of contiguous hits and dead cells all on the same plane.
unsigned int Ncells() const
Number of cells in this plane.
dt::Channel Channel(int plane, int cell) const
A collection of associated CellHits.
std::vector< Chunk > MakeChunkCombos(int plane, int begin, int end) const
std::map< int, std::vector< Chunk > > ChunkMap
unsigned int MaxCell(geo::View_t view) const
std::set< unsigned int > fPlanes
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
const PlaneGeo * Plane(unsigned int i) const
int AdjacentPlane(unsigned int plane, Direction dir) const
int NextPlane(unsigned int plane) const
Representation of the state of a single detector channel.
unsigned short Cell() const
ChunkMap MakeChunks() const
void SetHit(art::Ptr< rb::CellHit > chit)
void push_back(Ptr< U > const &p)
View(art::PtrVector< rb::CellHit > chits, bool considerBadChans)
unsigned int MinPlane(geo::View_t view=geo::kXorY) const
int PrevPlane(unsigned int plane) const
unsigned int MinCell(geo::View_t view) const
const std::set< unsigned int > & GetPlanesByView(View_t v=kXorY) const
assert(nhit_max >=nhit_nbins)
unsigned int MaxPlane(geo::View_t view=geo::kXorY) const
unsigned int NPlanes() const
T min(const caf::Proxy< T > &a, T b)
bool IsBad(int plane, int cell)
std::vector< std::vector< dt::Channel > > fChans
Should access this via Channel function.
Encapsulate the geometry of one entire detector (near, far, ndos)
bool IsLowEfficiency(int plane, int cell)