22 : mChargedCurrent(false)
23 , mLeptonBeamPdgCode(leptonBeamPdgCode)
24 , mScatteredPdgCode(leptonBeamPdgCode)
43 return 1 == particle.
GetStatus() && mScatteredPdgCode == particle.
Id();
57 int pdgCode = particle.
Id();
64 if (21 == kI1 && (pdgCode == 2112 || pdgCode == 2212) && parent == 2) {
68 if (21 == kI1 && pdgCode == 21) {
72 if (21 == kI1 && ::abs(pdgCode) < 10) {
83 const int pdg = abs(particle.
Id());
84 return pdg > 21 && pdg < 25 && 21 == particle.
GetStatus();
94 (2112 == particle.
Id() || 2212 == particle.
Id()) &&
103 if (!mChargedCurrent) {
106 int sign = beamType / abs(beamType);
107 return sign * (abs(beamType) + 1);
113 mLeptonBeamPdgCode = pdgCode;
114 if (mChargedCurrent) {
117 mScatteredPdgCode = pdgCode;
125 bool changed = !mChargedCurrent && cc;
126 mChargedCurrent = cc;
142 std::vector<const erhic::VirtualParticle*> particles;
144 if (particles.at(0)) {
145 beams.SetBeamLepton(particles.at(0)->Get4Vector());
147 if (particles.at(1)) {
148 beams.SetBeamHadron(particles.at(1)->Get4Vector());
150 if (particles.at(2)) {
151 beams.SetBoson(particles.at(2)->Get4Vector());
153 if (particles.at(3)) {
154 beams.SetScatteredLepton(particles.at(3)->Get4Vector());
162 std::vector<const erhic::VirtualParticle*>& beams) {
166 beams.assign(4, null);
177 bool foundExchangeBoson(
false);
178 bool foundAll(
false);
179 for (
unsigned n(0); n <
event.GetNTracks(); ++n) {
186 beams.at(1) = particle;
187 }
else if (finder.
isBeamLepton(*particle) && 0 == leptonCount) {
188 beams.at(0) = particle;
191 beams.at(3) = particle;
195 beams.at(2) = particle;
196 foundExchangeBoson =
true;
204 foundAll = std::find(beams.begin(), beams.end(), null) == beams.end();
virtual int GetLeptonBeamPdgCode() const
virtual bool isBeamLepton(const erhic::VirtualParticle &) const
virtual UShort_t GetParentIndex() const =0
virtual UShort_t GetStatus() const =0
Abstract base class for a physics event.
virtual const VirtualParticle * GetTrack(UInt_t) const =0
virtual bool isScatteredLepton(const erhic::VirtualParticle &) const
virtual void SetLeptonBeamPdgCode(int pdg)
virtual bool isBeamNucleon(const erhic::VirtualParticle &) const
virtual bool SkipParticle(const erhic::VirtualParticle &) const
virtual bool SetChargedCurrent(bool isChargedCurrent)
Int_t DetermineScatteredType(Int_t)
virtual Pid Id() const =0
virtual bool IsVirtualPhoton(const erhic::VirtualParticle &) const
Abstract base class for a general particle.
static bool IdentifyBeams(const erhic::VirtualEvent &, BeamParticles &)
ParticleIdentifier(const int leptonPdg=~unsigned(0)/2)