11#include <cdc/dataobjects/WireID.h>
12#include <simulation/dataobjects/SimHitBase.h>
13#include <framework/geometry/B2Vector3.h>
158 int zeroOrOne = (minusOneOrZeroOrOne <= 0) ? 0 : 1;
166 int zeroOrOne = (minusOneOrZeroOrOne <= 0) ? 0 : 1;
233 int zeroOrOne = (int((
m_leftRight & 0x2) >> 1) == 0) ? 0 : 1;
242 int zeroOrOne = (int((
m_leftRight & 0x4) >> 2) == 0) ? 0 : 1;
DataType Z() const
access variable Z (= .at(2) without boundary check)
DataType X() const
access variable X (= .at(0) without boundary check)
DataType Y() const
access variable Y (= .at(1) without boundary check)
int getPDGCode() const
The method to get PDG code.
void setLeftRightPassageRaw(int minusOneOrZeroOrOne)
The method to set new left/right info. for digitization.
void setPosIn(const B2Vector3D &posIn)
The method to set position of pre-step.
double getStepLength() const
The method to get step length.
float m_globalTime
Time of energy deposition.
int getTrackId() const
The method to get track id.
float m_flightTime
Flight time from IP.
void setPosFlag(int zeroOrOne)
The method to set position flag.
unsigned char m_leftRight
The flag to denote this hit is in the left or right side.
double getFlightTime() const
The method to get flight time.
B2Vector3D getPosWire() const
The method to get position on wire.
float m_posOut[3]
Position of post-step.
float getGlobalTime() const override
The method to get global time.
WireID getWireID() const
Getter for WireID object.
void setWireID(int iCLayerID, int iWireID)
Setter for Wire ID.
void setGlobalTime(double globalTime)
The method to set global time.
double getEnergyDep() const
The method to get deposited energy.
void setTrackId(int trackId)
The method to set track id.
void setPDGCode(int pdg)
The method to set PDG code.
float m_posIn[3]
Position of pre-step.
void setMomentum(const B2Vector3D &momentum)
The method to set momentum.
void setPosWire(const B2Vector3D &posWire)
The method to set position on wire.
int m_pdg
Particle PDG (can be one of secondaries).
void setEnergyDep(double edep)
The method to set deposited energy.
void setPosOut(const B2Vector3D &posOut)
The method to set position of post-step.
float m_stepLength
Step length of this hit.
void setDriftLength(double driftLength)
The method to set drift length.
CDCSimHit()
Empty constructor.
float m_posWire[3]
The position on wire which is closest to this hit.
void setStepLength(double stepLength)
The method to set step length.
ClassDefOverride(CDCSimHit, 6)
ROOT Macro.
int getPosFlag() const
The method to get old left/right info.
B2Vector3D getPosTrack() const
The method to get position on the track.
WireID m_wireID
The WireID of the hit.
double getDriftLength() const
The method to get drift length.
unsigned short m_trackId
The track id of this hit.
B2Vector3D getMomentum() const
The method to get momentum.
float m_driftLength
Drift length of this hit.
B2Vector3D getPosIn() const
The method to get position of pre-step.
B2Vector3D getPosOut() const
The method to get position of post-step.
void setFlightTime(double flightTime)
The method to set flight time.
float m_edep
Deposited energy of this hit.
virtual void shiftInTime(float delta) override
Shift the SimHit in time.
int getLeftRightPassageRaw() const
The method to get new left/right info. for digitization.
int getLeftRightPassage() const
The method to get new left/right info. for tracking.
void setPosTrack(const B2Vector3D &posTrack)
The method to set position on the track.
float m_momentum[3]
The momentum at closest point.
float m_posTrack[3]
Position on the track.
CDCSimHit(int layerId, int wireId, int trackId, int pdg, double driftLength, double flightTime, double edep, double stepLength, B2Vector3D momentum, B2Vector3D posWire, B2Vector3D posIn, B2Vector3D posOut, B2Vector3D posTrack, int leftRight, double globalTime)
Useful Constructor.
void setLeftRightPassage(int minusOneOrZeroOrOne)
The method to set new left/right info. for tracking.
Class SimHitBase - A common base for subdetector SimHits.
Class to identify a wire inside the CDC.
void setWireID(unsigned short iSuperLayer, unsigned short iLayer, unsigned short iWire)
Setter using official numbering.
B2Vector3< double > B2Vector3D
typedef for common usage with double
Abstract base class for different kinds of events.