10#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
12#include <tracking/trackFindingCDC/utilities/VectorRange.h>
14#include <tracking/trackFindingCDC/geometry/Vector3D.h>
23 namespace TrackFindingCDC {
27 class CDCTrajectory3D;
71 double arcLength2D = NAN,
72 double trueDriftLength = NAN) :
111 std::vector<CDCTrack>
simulate(
const std::vector<CDCTrajectory3D>& trajectories3D);
121 std::vector<CDCTrack>
constructMCTracks(
int nMCTracks, std::vector<SimpleSimHit> simpleSimHits);
124 std::vector<SimpleSimHit>
createHits(
const Helix& globalHelix,
double arcLength2DOffset)
const;
128 const Helix& globalHelix,
129 double arcLength2DOffset)
const;
133 const Helix& globalHelix,
134 double arcLength2DOffset)
const;
Class providing a simple simulation of the CDC mainly for quick unit test checks.
void activateTOFDelay(bool activate=true)
Activate the TOF time delay.
ConstVectorRange< CDCWireHit > getWireHits() const
Getter for the wire hits created in the simulation.
void setMaxNHitOnWire(int maxNHitOnWire)
Setter for the maximal number of hits that are allowed on each layer.
std::vector< CDCTrack > constructMCTracks(int nMCTracks, std::vector< SimpleSimHit > simpleSimHits)
Creates CDCWireHits and uses them to construct the true CDCTracks.
std::vector< CDCTrack > simulate(const std::vector< CDCTrajectory3D > &trajectories3D)
Propagates the trajectories through the CDC as without energy loss until they first leave the CDC.
int getMaxNHitOnWire() const
Getter for the maximal number of hits that are allowed on each layer.
bool m_addInWireSignalDelay
Switch to activate the in wire signal delay.
double m_propSpeed
Electrical current propagation speed in the wires.
std::shared_ptr< const std::vector< CDCWireHit > > m_sharedWireHits
Space for the memory of the generated wire hits.
void setEventTime(double eventTime)
Setter for a global event time offset.
double getEventTime() const
Getter for a global event time offset.
double m_driftLengthVariance
Variance by which the drift length should be smeared.
std::vector< SimpleSimHit > createHitsForLayer(const CDCWire &nearWire, const Helix &globalHelix, double arcLength2DOffset) const
Generate connected hits for wires in the same layer close to the given wire.
const double s_nominalPropSpeed
Default in wire signal propagation speed - 27.25 cm / ns.
void activateInWireSignalDelay(bool activate=true)
Activate the in wire signal delay.
double m_eventTime
A global event time.
bool m_addTOFDelay
Switch to activate the addition of the time of flight.
SimpleSimHit createHitForCell(const CDCWire &wire, const Helix &globalHelix, double arcLength2DOffset) const
Generate a hit for the given wire.
int m_maxNHitOnWire
Maximal number of hits allowed on each wire (0 means all).
const double s_nominalDriftLengthVariance
Default drift length variance.
double m_driftLengthSigma
Standard deviation by which the drift length should be smeared.
std::vector< CDCTrack > loadPreparedEvent()
Fills the wire hits with a hard coded event from the real simulation.
double m_driftSpeed
Electron drift speed in the cdc gas.
std::vector< SimpleSimHit > createHits(const Helix &globalHelix, double arcLength2DOffset) const
Generate hits for the given helix in starting from the two dimensional arc length.
const double s_nominalDriftSpeed
Default electron drift speed in cdc gas - 4 * 10^-3 cm / ns.
Class representing a sequence of three dimensional reconstructed hits.
Particle full three dimensional trajectory.
Class representing a hit wire in the central drift chamber.
const Vector3D & getRefPos3D() const
The three dimensional reference position of the underlying wire.
Class representing a sense wire in the central drift chamber.
Extension of the generalized circle also caching the perigee coordinates.
A pair of iterators usable with the range base for loop.
A three dimensional vector.
ERightLeft
Enumeration to represent the distinct possibilities of the right left passage.
Abstract base class for different kinds of events.
Structure to accommodate information about the individual hits during the simulation.
Vector3D m_pos3D
Memory for the true position on the track closest to the wire.
double m_arcLength2D
Memory for the true two dimensional arc length on the helix to this hit.
CDCWireHit m_wireHit
Memory for the wire hit instance that will be given to the reconstruction.
ERightLeft m_rlInfo
Memory for the true right left passage information.
SimpleSimHit(const CDCWireHit &wireHit, size_t iMCTrack, ERightLeft rlInfo)
Constructor from limited truth information Mainly used by the manually prepared event.
double m_trueDriftLength
Memory for the true drift length from the true position to the wire.
SimpleSimHit(const CDCWireHit &wireHit, size_t iMCTrack, ERightLeft rlInfo, const Vector3D &pos3D, double arcLength2D=NAN, double trueDriftLength=NAN)
Constructor from complete truth information.
size_t m_iMCTrack
Memory for the true index of the track this hit is contained in.