Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
LArProtoShower.h
Go to the documentation of this file.
1
8#ifndef LAR_PROTO_SHOWER_H
9#define LAR_PROTO_SHOWER_H 1
10
12
13#include "Objects/CaloHit.h"
15
16namespace lar_content
17{
18
56
57//------------------------------------------------------------------------------------------------------------------------------------------
58
59inline ShowerCore::ShowerCore(const pandora::CartesianVector &startPosition, const pandora::CartesianVector &startDirection) :
60 m_startPosition(startPosition),
61 m_startDirection(startDirection)
62{
63}
64
65//------------------------------------------------------------------------------------------------------------------------------------------
66
67inline ShowerCore::ShowerCore() : m_startPosition(0.f, 0.f, 0.f), m_startDirection(0.f, 0.f, 0.f)
68{
69}
70
71//------------------------------------------------------------------------------------------------------------------------------------------
72
77
78//------------------------------------------------------------------------------------------------------------------------------------------
79
84
85//------------------------------------------------------------------------------------------------------------------------------------------
86//------------------------------------------------------------------------------------------------------------------------------------------
87
125
126typedef std::vector<ConnectionPathway> ConnectionPathwayVector;
127
128//------------------------------------------------------------------------------------------------------------------------------------------
129
131 m_startPosition(startPosition),
132 m_startDirection(startDirection)
133{
134}
135
136//------------------------------------------------------------------------------------------------------------------------------------------
137
138inline ConnectionPathway::ConnectionPathway() : m_startPosition(0.f, 0.f, 0.f), m_startDirection(0.f, 0.f, 0.f)
139{
140}
141
142//------------------------------------------------------------------------------------------------------------------------------------------
143
148
149//------------------------------------------------------------------------------------------------------------------------------------------
150
155
156//------------------------------------------------------------------------------------------------------------------------------------------
157//------------------------------------------------------------------------------------------------------------------------------------------
158
163{
164public:
175 ProtoShower(const ShowerCore &showerCore, const ConnectionPathway &connectionPathway, const pandora::CaloHitList &spineHitList,
176 const pandora::CaloHitList &ambiguousHitList, const pandora::CartesianPointVector &ambiguousDirectionVector,
177 const pandora::CaloHitList &hitsToAdd);
178
184 ProtoShower(const ProtoShower &protoShower);
185
191 const ShowerCore &GetShowerCore() const;
192
199
206
213
219 void AddAmbiguousHit(const pandora::CaloHit *const ambiguousHit);
220
227
233 void AddAmbiguousDirection(const pandora::CartesianVector &ambiguousDirection);
234
241
247 void SetHitsToAddList(const pandora::CaloHitList &hitsToAddList);
248
254 void AddHitToAdd(const pandora::CaloHit *const hitToAdd);
255
256private:
263};
264
265typedef std::vector<ProtoShower> ProtoShowerVector;
266
267//------------------------------------------------------------------------------------------------------------------------------------------
268
269inline ProtoShower::ProtoShower(const ShowerCore &showerCore, const ConnectionPathway &connectionPathway,
270 const pandora::CaloHitList &spineHitList, const pandora::CaloHitList &ambiguousHitList,
271 const pandora::CartesianPointVector &ambiguousDirectionVector, const pandora::CaloHitList &hitsToAdd) :
272 m_showerCore(showerCore),
273 m_connectionPathway(connectionPathway),
274 m_spineHitList(spineHitList),
275 m_ambiguousHitList(ambiguousHitList),
276 m_ambiguousDirectionVector(ambiguousDirectionVector),
277 m_hitsToAdd(hitsToAdd)
278{
279}
280
281//------------------------------------------------------------------------------------------------------------------------------------------
282
283inline ProtoShower::ProtoShower(const ProtoShower &protoShower) :
284 m_showerCore(ShowerCore(protoShower.GetShowerCore().GetStartPosition(), protoShower.GetShowerCore().GetStartDirection())),
285 m_connectionPathway(
286 ConnectionPathway(protoShower.GetConnectionPathway().GetStartPosition(), protoShower.GetConnectionPathway().GetStartDirection())),
287 m_spineHitList(protoShower.GetSpineHitList()),
288 m_ambiguousHitList(protoShower.GetAmbiguousHitList()),
289 m_ambiguousDirectionVector(protoShower.GetAmbiguousDirectionVector()),
290 m_hitsToAdd(protoShower.GetHitsToAddList())
291{
292}
293
294//------------------------------------------------------------------------------------------------------------------------------------------
295
297{
298 return m_showerCore;
299}
300
301//------------------------------------------------------------------------------------------------------------------------------------------
302
307
308//------------------------------------------------------------------------------------------------------------------------------------------
309
311{
312 return m_spineHitList;
313}
314
315//------------------------------------------------------------------------------------------------------------------------------------------
316
321
322//------------------------------------------------------------------------------------------------------------------------------------------
323
324inline void ProtoShower::AddAmbiguousHit(const pandora::CaloHit *const ambiguousHit)
325{
326 m_ambiguousHitList.push_back(ambiguousHit);
327}
328
329//------------------------------------------------------------------------------------------------------------------------------------------
330
335
336//------------------------------------------------------------------------------------------------------------------------------------------
337
339{
340 m_ambiguousDirectionVector.push_back(ambiguousDirection);
341}
342
343//------------------------------------------------------------------------------------------------------------------------------------------
344
346{
347 return m_hitsToAdd;
348}
349
350//------------------------------------------------------------------------------------------------------------------------------------------
351
353{
354 m_hitsToAdd = hitsToAddList;
355}
356
357//------------------------------------------------------------------------------------------------------------------------------------------
358
359inline void ProtoShower::AddHitToAdd(const pandora::CaloHit *const hitToAdd)
360{
361 m_hitsToAdd.push_back(hitToAdd);
362}
363
364//------------------------------------------------------------------------------------------------------------------------------------------
365//------------------------------------------------------------------------------------------------------------------------------------------
366
376
377//------------------------------------------------------------------------------------------------------------------------------------------
378//------------------------------------------------------------------------------------------------------------------------------------------
379
384{
385public:
390
399 ProtoShowerMatch(const ProtoShower &protoShowerU, const ProtoShower &protoShowerV, const ProtoShower &protoShowerW, const Consistency consistencyType);
400
406 const ProtoShower &GetProtoShowerU() const;
407
413 const ProtoShower &GetProtoShowerV() const;
414
420 const ProtoShower &GetProtoShowerW() const;
421
430
436 const Consistency &GetConsistencyType() const;
437
438private:
443};
444
445typedef std::vector<ProtoShowerMatch> ProtoShowerMatchVector;
446
447//------------------------------------------------------------------------------------------------------------------------------------------
448
450 const ProtoShower &protoShowerU, const ProtoShower &protoShowerV, const ProtoShower &protoShowerW, const Consistency consistencyType) :
451 m_protoShowerU(protoShowerU),
452 m_protoShowerV(protoShowerV),
453 m_protoShowerW(protoShowerW),
454 m_consistencyType(consistencyType)
455{
456}
457
458//------------------------------------------------------------------------------------------------------------------------------------------
459
461{
462 return m_protoShowerU;
463}
464
465//------------------------------------------------------------------------------------------------------------------------------------------
466
468{
469 return m_protoShowerV;
470}
471
472//------------------------------------------------------------------------------------------------------------------------------------------
473
475{
476 return m_protoShowerW;
477}
478
479//------------------------------------------------------------------------------------------------------------------------------------------
480
485
486//------------------------------------------------------------------------------------------------------------------------------------------
487
489{
490 return m_consistencyType;
491}
492
493//------------------------------------------------------------------------------------------------------------------------------------------
494
495} // namespace lar_content
496
497#endif // #ifndef LAR_PROTO_SHOWER_H
Header file for the calo hit class.
Header file for the cartesian vector class.
Header file defining relevant internal typedefs, sort and string conversion functions.
ConnectionPathway class.
const pandora::CartesianVector & GetStartDirection() const
Get the start direction of the connection pathway.
ConnectionPathway()
Default constructor.
const pandora::CartesianVector & GetStartPosition() const
Get the start position of the connection pathway.
pandora::CartesianVector m_startPosition
the start position of the connection pathway
pandora::CartesianVector m_startDirection
the initial direction of the connection pathway
void SetHitsToAddList(const pandora::CaloHitList &hitsToAddList)
Set the hits to add list.
const ShowerCore & GetShowerCore() const
Get the shower core.
pandora::CaloHitList m_ambiguousHitList
the list of ambiguous hits (those with shared energy deposits)
pandora::CartesianPointVector m_ambiguousDirectionVector
the initial directions of the ambiguous hit owners
const pandora::CaloHitList & GetHitsToAddList() const
Get the hits to add list.
const pandora::CaloHitList & GetAmbiguousHitList() const
Get the ambiguous hit list.
void AddHitToAdd(const pandora::CaloHit *const hitToAdd)
Add a hit to the hits to add list.
ProtoShower(const ShowerCore &showerCore, const ConnectionPathway &connectionPathway, const pandora::CaloHitList &spineHitList, const pandora::CaloHitList &ambiguousHitList, const pandora::CartesianPointVector &ambiguousDirectionVector, const pandora::CaloHitList &hitsToAdd)
Constructor.
const ConnectionPathway m_connectionPathway
the ConnectionPathway object
const ConnectionPathway & GetConnectionPathway() const
Get the connection pathway.
pandora::CaloHitList m_hitsToAdd
the list of hits to add to an electron shower pfo
void AddAmbiguousDirection(const pandora::CartesianVector &ambiguousDirection)
Add an ambiguous direction to the ambiguous direction vector.
void AddAmbiguousHit(const pandora::CaloHit *const ambiguousHit)
Add an ambiguous hit to the ambiguous hit list.
const pandora::CartesianPointVector & GetAmbiguousDirectionVector() const
Get the ambiguous direction vector.
const pandora::CaloHitList & GetSpineHitList() const
Get the spine hit list.
pandora::CaloHitList m_spineHitList
the shower spine hit list
const ShowerCore m_showerCore
the ShowerCore object
ProtoShowerMatch class.
Consistency m_consistencyType
the nature of the 2D->3D match
ProtoShower m_protoShowerW
the W view ProtoShower
const ProtoShower & GetProtoShowerV() const
Get the V view ProtoShower.
ProtoShowerMatch()
Default constructor.
const ProtoShower & GetProtoShowerW() const
Get the W view ProtoShower.
ProtoShower m_protoShowerV
the V view ProtoShower
const Consistency & GetConsistencyType() const
Get the consistency type.
ProtoShower & GetProtoShowerToModify(const pandora::HitType hitType)
Get a modifiable ProtoShower in a given view.
ProtoShower m_protoShowerU
the U view ProtoShower
const ProtoShower & GetProtoShowerU() const
Get the U view ProtoShower.
ShowerCore class.
pandora::CartesianVector m_startDirection
the initial 2D direction of the shower cascade
const pandora::CartesianVector & GetStartDirection() const
Get the start direction of the shower core.
ShowerCore()
Default constructor.
pandora::CartesianVector m_startPosition
the 2D position at which the cascade looks to begin
const pandora::CartesianVector & GetStartPosition() const
Get the start position of the shower core.
CaloHit class.
Definition CaloHit.h:26
CartesianVector class.
std::vector< ProtoShower > ProtoShowerVector
Consistency
Consistency enumeration.
std::vector< ProtoShowerMatch > ProtoShowerMatchVector
std::vector< ConnectionPathway > ConnectionPathwayVector
HitType
Calorimeter hit type enum.
std::vector< CartesianVector > CartesianPointVector
MANAGED_CONTAINER< const CaloHit * > CaloHitList