src/objects/PixelCharge.hpp
Definition of object with set of particles at pixel. More…
Namespaces
Name |
---|
allpix Helper class to hold support layers for a detector model. |
Classes
Name | |
---|---|
class | allpix::PixelCharge Set of charges at a pixel. |
Types
Name | |
---|---|
using Message< PixelCharge > | PixelChargeMessage Typedef for message carrying pixel charges. |
Detailed Description
Definition of object with set of particles at pixel.
Copyright: Copyright (c) 2017-2024 CERN and the Allpix Squared authors. This software is distributed under the terms of the MIT License, copied verbatim in the file “LICENSE.md”. In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction. SPDX-License-Identifier: MIT
Types Documentation
using PixelChargeMessage
using allpix::PixelChargeMessage = typedef Message<PixelCharge>;
Typedef for message carrying pixel charges.
Source code
#ifndef ALLPIX_PIXEL_CHARGE_H
#define ALLPIX_PIXEL_CHARGE_H
#include <Math/DisplacementVector2D.h>
#include <TRef.h>
#include <algorithm>
#include "MCParticle.hpp"
#include "Object.hpp"
#include "Pixel.hpp"
#include "PropagatedCharge.hpp"
#include "Pulse.hpp"
namespace allpix {
class PixelCharge : public Object {
friend class PixelHit;
friend class PixelPulse;
public:
PixelCharge(Pixel pixel,
long charge,
const std::vector<const PropagatedCharge*>& propagated_charges = std::vector<const PropagatedCharge*>());
PixelCharge(Pixel pixel,
Pulse pulse,
const std::vector<const PropagatedCharge*>& propagated_charges = std::vector<const PropagatedCharge*>());
const Pixel& getPixel() const;
Pixel::Index getIndex() const;
long getCharge() const;
unsigned long getAbsoluteCharge() const;
std::vector<const PropagatedCharge*> getPropagatedCharges() const;
std::vector<const MCParticle*> getMCParticles() const;
std::vector<const MCParticle*> getPrimaryMCParticles() const;
const Pulse& getPulse() const;
double getGlobalTime() const;
double getLocalTime() const;
void print(std::ostream& out) const override;
ClassDefOverride(PixelCharge, 9); // NOLINT
PixelCharge() = default;
void loadHistory() override;
void petrifyHistory() override;
private:
Pixel pixel_;
long charge_{};
Pulse pulse_{};
double local_time_{std::numeric_limits<double>::infinity()};
double global_time_{std::numeric_limits<double>::infinity()};
std::vector<PointerWrapper<PropagatedCharge>> propagated_charges_;
std::vector<PointerWrapper<MCParticle>> mc_particles_;
};
using PixelChargeMessage = Message<PixelCharge>;
} // namespace allpix
#endif /* ALLPIX_PIXEL_CHARGE_H */
Updated on 2025-02-27 at 14:14:46 +0000