18 #include "classes/DelphesFactory.h"
19 #include "classes/SortableObject.h"
28 CompBase *Candidate::fgCompare = CompMomentumPt<Candidate>::Instance();
95 Candidate::Candidate() :
96 PID(0), Status(0), M1(-1), M2(-1), D1(-1), D2(-1),
98 IsPU(0), IsConstituent(0),
99 EfficiencyFlags(0), IsolationFlags(0), MiscellaneousFlags(0), BFlags(0), BFlagProb(0), TauFlags(0), TauFlagProb(0), Eem(0.0), Ehad(0.0),
100 DeltaEta(0.0), DeltaPhi(0.0),
101 Momentum(0.0, 0.0, 0.0, 0.0),
102 Position(0.0, 0.0, 0.0, 0.0),
103 Area(0.0, 0.0, 0.0, 0.0),
115 void Candidate::AddCandidate(Candidate *
object)
117 if(!fArray) fArray = fFactory->NewArray();
123 TObjArray *Candidate::GetCandidates()
125 if(!fArray) fArray = fFactory->NewArray();
131 Bool_t Candidate::Overlaps(
const Candidate *
object)
const
133 const Candidate *candidate;
135 if(object->GetUniqueID() == GetUniqueID())
return kTRUE;
140 while((candidate = static_cast<Candidate *>(it.Next())))
142 if(candidate->Overlaps(
object))
return kTRUE;
148 TIter it(object->fArray);
149 while((candidate = static_cast<Candidate *>(it.Next())))
151 if(candidate->Overlaps(
this))
return kTRUE;
161 TObject *Candidate::Clone(
const char *newname)
const
163 Candidate *
object = fFactory->NewCandidate();
170 void Candidate::Copy(TObject &obj)
const
172 Candidate &
object =
static_cast<Candidate &
>(obj);
173 Candidate *candidate;
176 object.Status = Status;
181 object.Charge = Charge;
184 object.IsConstituent = IsConstituent;
185 object.EfficiencyFlags = EfficiencyFlags;
186 object.IsolationFlags = IsolationFlags;
187 object.MiscellaneousFlags = MiscellaneousFlags;
188 object.BFlags = BFlags;
189 object.BFlagProb = BFlagProb;
190 object.TauFlags = TauFlags;
191 object.TauFlagProb = TauFlagProb;
194 object.Edges[0] = Edges[0];
195 object.Edges[1] = Edges[1];
196 object.Edges[2] = Edges[2];
197 object.Edges[3] = Edges[3];
198 object.DeltaEta = DeltaEta;
199 object.DeltaPhi = DeltaPhi;
200 object.Momentum = Momentum;
201 object.Position = Position;
204 object.fFactory = fFactory;
207 if(fArray && fArray->GetEntriesFast() > 0)
209 TIter itArray(fArray);
210 TObjArray *array =
object.GetCandidates();
211 while((candidate = static_cast<Candidate *>(itArray.Next())))
213 array->Add(candidate);
220 void Candidate::Clear(Option_t* option)
223 ResetBit(kIsReferenced);
226 M1 = -1; M2 = -1; D1 = -1; D2 = -1;
233 MiscellaneousFlags = 0;
246 Momentum.SetXYZT(0.0, 0.0, 0.0, 0.0);
247 Position.SetXYZT(0.0, 0.0, 0.0, 0.0);
248 Area.SetXYZT(0.0, 0.0, 0.0, 0.0);
static CompBase * fgCompare
static CompBase * fgCompare
static CompBase * fgCompare
static CompBase * fgCompare
static CompBase * fgCompare
static CompBase * fgCompare
static CompBase * fgCompare