[b443089] | 1 | /*
|
---|
| 2 | * Delphes: a framework for fast simulation of a generic collider experiment
|
---|
| 3 | * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium
|
---|
[1fa50c2] | 4 | *
|
---|
[b443089] | 5 | * This program is free software: you can redistribute it and/or modify
|
---|
| 6 | * it under the terms of the GNU General Public License as published by
|
---|
| 7 | * the Free Software Foundation, either version 3 of the License, or
|
---|
| 8 | * (at your option) any later version.
|
---|
[1fa50c2] | 9 | *
|
---|
[b443089] | 10 | * This program is distributed in the hope that it will be useful,
|
---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 13 | * GNU General Public License for more details.
|
---|
[1fa50c2] | 14 | *
|
---|
[b443089] | 15 | * You should have received a copy of the GNU General Public License
|
---|
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
| 17 | */
|
---|
| 18 |
|
---|
[d7d2da3] | 19 | /**
|
---|
| 20 | *
|
---|
| 21 | * Definition of classes to be stored in the root tree.
|
---|
| 22 | * Function CompareXYZ sorts objects by the variable XYZ that MUST be
|
---|
| 23 | * present in the data members of the root tree class of the branch.
|
---|
| 24 | *
|
---|
| 25 | * \author P. Demin - UCL, Louvain-la-Neuve
|
---|
| 26 | *
|
---|
| 27 | */
|
---|
| 28 |
|
---|
| 29 | #include "classes/DelphesClasses.h"
|
---|
| 30 | #include "classes/DelphesFactory.h"
|
---|
| 31 | #include "classes/SortableObject.h"
|
---|
| 32 |
|
---|
| 33 | CompBase *GenParticle::fgCompare = 0;
|
---|
| 34 | CompBase *Photon::fgCompare = CompPT<Photon>::Instance();
|
---|
| 35 | CompBase *Electron::fgCompare = CompPT<Electron>::Instance();
|
---|
| 36 | CompBase *Muon::fgCompare = CompPT<Muon>::Instance();
|
---|
| 37 | CompBase *Jet::fgCompare = CompPT<Jet>::Instance();
|
---|
| 38 | CompBase *Track::fgCompare = CompPT<Track>::Instance();
|
---|
| 39 | CompBase *Tower::fgCompare = CompE<Tower>::Instance();
|
---|
[4d7014e] | 40 | CompBase *ParticleFlowCandidate::fgCompare = CompE<ParticleFlowCandidate>::Instance();
|
---|
[8f7db23] | 41 | CompBase *HectorHit::fgCompare = CompE<HectorHit>::Instance();
|
---|
[3c46e17] | 42 | CompBase *Vertex::fgCompare = CompSumPT2<Vertex>::Instance();
|
---|
[d7d2da3] | 43 | CompBase *Candidate::fgCompare = CompMomentumPt<Candidate>::Instance();
|
---|
| 44 |
|
---|
| 45 | //------------------------------------------------------------------------------
|
---|
| 46 |
|
---|
[2b3ef28] | 47 | TLorentzVector GenParticle::P4() const
|
---|
[d7d2da3] | 48 | {
|
---|
| 49 | TLorentzVector vec;
|
---|
| 50 | vec.SetPxPyPzE(Px, Py, Pz, E);
|
---|
| 51 | return vec;
|
---|
| 52 | }
|
---|
| 53 |
|
---|
| 54 | //------------------------------------------------------------------------------
|
---|
| 55 |
|
---|
[2b3ef28] | 56 | TLorentzVector MissingET::P4() const
|
---|
[4ad7b96] | 57 | {
|
---|
| 58 | TLorentzVector vec;
|
---|
| 59 | vec.SetPtEtaPhiM(MET, Eta, Phi, 0.0);
|
---|
| 60 | return vec;
|
---|
| 61 | }
|
---|
| 62 |
|
---|
| 63 | //------------------------------------------------------------------------------
|
---|
| 64 |
|
---|
[2b3ef28] | 65 | TLorentzVector Photon::P4() const
|
---|
[d7d2da3] | 66 | {
|
---|
| 67 | TLorentzVector vec;
|
---|
| 68 | vec.SetPtEtaPhiM(PT, Eta, Phi, 0.0);
|
---|
| 69 | return vec;
|
---|
| 70 | }
|
---|
| 71 |
|
---|
| 72 | //------------------------------------------------------------------------------
|
---|
| 73 |
|
---|
[2b3ef28] | 74 | TLorentzVector Electron::P4() const
|
---|
[d7d2da3] | 75 | {
|
---|
| 76 | TLorentzVector vec;
|
---|
| 77 | vec.SetPtEtaPhiM(PT, Eta, Phi, 0.0);
|
---|
| 78 | return vec;
|
---|
| 79 | }
|
---|
| 80 |
|
---|
| 81 | //------------------------------------------------------------------------------
|
---|
| 82 |
|
---|
[2b3ef28] | 83 | TLorentzVector Muon::P4() const
|
---|
[d7d2da3] | 84 | {
|
---|
| 85 | TLorentzVector vec;
|
---|
| 86 | vec.SetPtEtaPhiM(PT, Eta, Phi, 0.0);
|
---|
| 87 | return vec;
|
---|
| 88 | }
|
---|
| 89 |
|
---|
| 90 | //------------------------------------------------------------------------------
|
---|
| 91 |
|
---|
[2b3ef28] | 92 | TLorentzVector Jet::P4() const
|
---|
[d7d2da3] | 93 | {
|
---|
| 94 | TLorentzVector vec;
|
---|
| 95 | vec.SetPtEtaPhiM(PT, Eta, Phi, Mass);
|
---|
| 96 | return vec;
|
---|
| 97 | }
|
---|
| 98 |
|
---|
| 99 | //------------------------------------------------------------------------------
|
---|
| 100 |
|
---|
[2b3ef28] | 101 | TLorentzVector Track::P4() const
|
---|
[d7d2da3] | 102 | {
|
---|
| 103 | TLorentzVector vec;
|
---|
[9cc5aeb] | 104 | vec.SetPtEtaPhiM(PT, Eta, Phi, Mass);
|
---|
[d7d2da3] | 105 | return vec;
|
---|
| 106 | }
|
---|
| 107 |
|
---|
[2671df6] | 108 | //------------------------------------------------------------------------------
|
---|
| 109 |
|
---|
| 110 | TMatrixDSym Track::CovarianceMatrix() const
|
---|
| 111 | {
|
---|
| 112 | TMatrixDSym Cv;
|
---|
| 113 | Cv.ResizeTo(5, 5);
|
---|
[363e269] | 114 |
|
---|
[2671df6] | 115 | // convert diagonal term to original units
|
---|
[363e269] | 116 | Cv(0, 0)=TMath::Power(ErrorD0, 2.);
|
---|
[2671df6] | 117 | Cv(1, 1)=TMath::Power(ErrorPhi, 2.);
|
---|
[363e269] | 118 | Cv(2, 2)=TMath::Power(ErrorC, 2.);
|
---|
| 119 | Cv(3, 3)=TMath::Power(ErrorDZ, 2.);
|
---|
[2671df6] | 120 | Cv(4, 4)=TMath::Power(ErrorCtgTheta, 2.);
|
---|
| 121 |
|
---|
| 122 | // off diagonal terms
|
---|
| 123 | Cv(0, 1)=ErrorD0Phi;
|
---|
| 124 | Cv(0, 2)=ErrorD0C;
|
---|
| 125 | Cv(0, 3)=ErrorD0DZ;
|
---|
| 126 | Cv(0, 4)=ErrorD0CtgTheta;
|
---|
| 127 | Cv(1, 2)=ErrorPhiC;
|
---|
| 128 | Cv(1, 3)=ErrorPhiDZ;
|
---|
| 129 | Cv(1, 4)=ErrorPhiCtgTheta;
|
---|
| 130 | Cv(2, 3)=ErrorCDZ;
|
---|
| 131 | Cv(2, 4)=ErrorCCtgTheta;
|
---|
| 132 | Cv(3, 4)=ErrorDZCtgTheta;
|
---|
| 133 |
|
---|
| 134 | Cv(1, 0)=Cv(0, 1);
|
---|
| 135 | Cv(2, 0)=Cv(0, 2);
|
---|
| 136 | Cv(3, 0)=Cv(0, 3);
|
---|
| 137 | Cv(4, 0)=Cv(0, 4);
|
---|
| 138 | Cv(2, 1)=Cv(1, 2);
|
---|
| 139 | Cv(3, 1)=Cv(1, 3);
|
---|
| 140 | Cv(4, 1)=Cv(1, 4);
|
---|
| 141 | Cv(3, 2)=Cv(2, 3);
|
---|
| 142 | Cv(4, 2)=Cv(2, 4);
|
---|
| 143 | Cv(4, 3)=Cv(3, 4);
|
---|
| 144 |
|
---|
| 145 | return Cv;
|
---|
| 146 | }
|
---|
| 147 |
|
---|
| 148 |
|
---|
[d7d2da3] | 149 | //------------------------------------------------------------------------------
|
---|
| 150 |
|
---|
[2b3ef28] | 151 | TLorentzVector Tower::P4() const
|
---|
[d7d2da3] | 152 | {
|
---|
| 153 | TLorentzVector vec;
|
---|
| 154 | vec.SetPtEtaPhiM(ET, Eta, Phi, 0.0);
|
---|
| 155 | return vec;
|
---|
| 156 | }
|
---|
| 157 |
|
---|
| 158 | //------------------------------------------------------------------------------
|
---|
| 159 |
|
---|
[4d7014e] | 160 | TLorentzVector ParticleFlowCandidate::P4() const
|
---|
| 161 | {
|
---|
| 162 | TLorentzVector vec;
|
---|
[9cc5aeb] | 163 | vec.SetPtEtaPhiM(PT, Eta, Phi, Mass);
|
---|
[4d7014e] | 164 | return vec;
|
---|
| 165 | }
|
---|
| 166 |
|
---|
| 167 | //------------------------------------------------------------------------------
|
---|
| 168 |
|
---|
[2671df6] | 169 | TMatrixDSym ParticleFlowCandidate::CovarianceMatrix() const
|
---|
| 170 | {
|
---|
| 171 | TMatrixDSym Cv;
|
---|
| 172 | Cv.ResizeTo(5, 5);
|
---|
[363e269] | 173 |
|
---|
[2671df6] | 174 | // convert diagonal term to original units
|
---|
[363e269] | 175 | Cv(0, 0)=TMath::Power(ErrorD0, 2.);
|
---|
[2671df6] | 176 | Cv(1, 1)=TMath::Power(ErrorPhi, 2.);
|
---|
[363e269] | 177 | Cv(2, 2)=TMath::Power(ErrorC, 2.);
|
---|
| 178 | Cv(3, 3)=TMath::Power(ErrorDZ, 2.);
|
---|
[2671df6] | 179 | Cv(4, 4)=TMath::Power(ErrorCtgTheta, 2.);
|
---|
| 180 |
|
---|
| 181 | // off diagonal terms
|
---|
| 182 | Cv(0, 1)=ErrorD0Phi;
|
---|
| 183 | Cv(0, 2)=ErrorD0C;
|
---|
| 184 | Cv(0, 3)=ErrorD0DZ;
|
---|
| 185 | Cv(0, 4)=ErrorD0CtgTheta;
|
---|
| 186 | Cv(1, 2)=ErrorPhiC;
|
---|
| 187 | Cv(1, 3)=ErrorPhiDZ;
|
---|
| 188 | Cv(1, 4)=ErrorPhiCtgTheta;
|
---|
| 189 | Cv(2, 3)=ErrorCDZ;
|
---|
| 190 | Cv(2, 4)=ErrorCCtgTheta;
|
---|
| 191 | Cv(3, 4)=ErrorDZCtgTheta;
|
---|
| 192 |
|
---|
| 193 | Cv(1, 0)=Cv(0, 1);
|
---|
| 194 | Cv(2, 0)=Cv(0, 2);
|
---|
| 195 | Cv(3, 0)=Cv(0, 3);
|
---|
| 196 | Cv(4, 0)=Cv(0, 4);
|
---|
| 197 | Cv(2, 1)=Cv(1, 2);
|
---|
| 198 | Cv(3, 1)=Cv(1, 3);
|
---|
| 199 | Cv(4, 1)=Cv(1, 4);
|
---|
| 200 | Cv(3, 2)=Cv(2, 3);
|
---|
| 201 | Cv(4, 2)=Cv(2, 4);
|
---|
| 202 | Cv(4, 3)=Cv(3, 4);
|
---|
| 203 |
|
---|
| 204 | return Cv;
|
---|
| 205 | }
|
---|
| 206 |
|
---|
| 207 | //------------------------------------------------------------------------------
|
---|
| 208 |
|
---|
[d7d2da3] | 209 | Candidate::Candidate() :
|
---|
| 210 | PID(0), Status(0), M1(-1), M2(-1), D1(-1), D2(-1),
|
---|
| 211 | Charge(0), Mass(0.0),
|
---|
[5d2481f] | 212 | IsPU(0), IsRecoPU(0), IsConstituent(0), IsFromConversion(0),
|
---|
[fe0273c] | 213 | Flavor(0), FlavorAlgo(0), FlavorPhys(0),
|
---|
| 214 | BTag(0), BTagAlgo(0), BTagPhys(0),
|
---|
[61dccd3] | 215 | TauTag(0), TauWeight(0.0), Eem(0.0), Ehad(0.0), Etrk(0.0),
|
---|
[d7d2da3] | 216 | DeltaEta(0.0), DeltaPhi(0.0),
|
---|
| 217 | Momentum(0.0, 0.0, 0.0, 0.0),
|
---|
| 218 | Position(0.0, 0.0, 0.0, 0.0),
|
---|
[2118a6a] | 219 | InitialPosition(0.0, 0.0, 0.0, 0.0),
|
---|
[1a4956e] | 220 | PositionError(0.0, 0.0, 0.0, 0.0),
|
---|
[d7d2da3] | 221 | Area(0.0, 0.0, 0.0, 0.0),
|
---|
[3051ea17] | 222 | TrackCovariance(5),
|
---|
[80306e6] | 223 | L(0),
|
---|
[341014c] | 224 | D0(0), ErrorD0(0),
|
---|
| 225 | DZ(0), ErrorDZ(0),
|
---|
| 226 | P(0), ErrorP(0),
|
---|
[3051ea17] | 227 | C(0), ErrorC(0),
|
---|
[341014c] | 228 | PT(0), ErrorPT(0),
|
---|
| 229 | CtgTheta(0), ErrorCtgTheta(0),
|
---|
| 230 | Phi(0), ErrorPhi(0),
|
---|
| 231 | Xd(0), Yd(0), Zd(0),
|
---|
[3a105e5] | 232 | XFirstHit(0), YFirstHit(0), ZFirstHit(0),
|
---|
[a95da74] | 233 | Nclusters(0.0),
|
---|
[781af69] | 234 | dNdx(0.0),
|
---|
[a98c7ef] | 235 | TrackResolution(0),
|
---|
[24d005f] | 236 | NCharged(0),
|
---|
| 237 | NNeutrals(0),
|
---|
[c614dd7] | 238 | NeutralEnergyFraction(0), // charged energy fraction
|
---|
[363e269] | 239 | ChargedEnergyFraction(0), // neutral energy fraction
|
---|
[24d005f] | 240 | Beta(0),
|
---|
| 241 | BetaStar(0),
|
---|
| 242 | MeanSqDeltaR(0),
|
---|
[da00c35] | 243 | PTD(0),
|
---|
[839deb7] | 244 | NTimeHits(-1),
|
---|
[b62c2da] | 245 | IsolationVar(-999),
|
---|
| 246 | IsolationVarRhoCorr(-999),
|
---|
| 247 | SumPtCharged(-999),
|
---|
| 248 | SumPtNeutral(-999),
|
---|
| 249 | SumPtChargedPU(-999),
|
---|
| 250 | SumPt(-999),
|
---|
[1a4956e] | 251 | ClusterIndex(-1), ClusterNDF(0), ClusterSigma(0), SumPT2(0), BTVSumPT2(0), GenDeltaZ(0), GenSumPT2(0),
|
---|
[839deb7] | 252 | NSubJetsTrimmed(0),
|
---|
| 253 | NSubJetsPruned(0),
|
---|
| 254 | NSubJetsSoftDropped(0),
|
---|
[e9c0d73] | 255 | ExclYmerge23(0),
|
---|
| 256 | ExclYmerge34(0),
|
---|
| 257 | ExclYmerge45(0),
|
---|
| 258 | ExclYmerge56(0),
|
---|
[7e83689] | 259 | ParticleDensity(0),
|
---|
[da00c35] | 260 | fFactory(0),
|
---|
| 261 | fArray(0)
|
---|
[d7d2da3] | 262 | {
|
---|
[8d200a6] | 263 | int i;
|
---|
[d7d2da3] | 264 | Edges[0] = 0.0;
|
---|
| 265 | Edges[1] = 0.0;
|
---|
| 266 | Edges[2] = 0.0;
|
---|
| 267 | Edges[3] = 0.0;
|
---|
[24d005f] | 268 | FracPt[0] = 0.0;
|
---|
| 269 | FracPt[1] = 0.0;
|
---|
| 270 | FracPt[2] = 0.0;
|
---|
| 271 | FracPt[3] = 0.0;
|
---|
| 272 | FracPt[4] = 0.0;
|
---|
[63178fb] | 273 | Tau[0] = 0.0;
|
---|
| 274 | Tau[1] = 0.0;
|
---|
| 275 | Tau[2] = 0.0;
|
---|
| 276 | Tau[3] = 0.0;
|
---|
| 277 | Tau[4] = 0.0;
|
---|
[ba75867] | 278 |
|
---|
| 279 | SoftDroppedJet.SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
| 280 | SoftDroppedSubJet1.SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
| 281 | SoftDroppedSubJet2.SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
| 282 |
|
---|
[8d200a6] | 283 | for(i = 0; i < 5; ++i)
|
---|
| 284 | {
|
---|
| 285 | TrimmedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
| 286 | PrunedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
| 287 | SoftDroppedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
| 288 | }
|
---|
[d7d2da3] | 289 | }
|
---|
| 290 |
|
---|
| 291 | //------------------------------------------------------------------------------
|
---|
| 292 |
|
---|
| 293 | void Candidate::AddCandidate(Candidate *object)
|
---|
| 294 | {
|
---|
| 295 | if(!fArray) fArray = fFactory->NewArray();
|
---|
| 296 | fArray->Add(object);
|
---|
| 297 | }
|
---|
| 298 |
|
---|
| 299 | //------------------------------------------------------------------------------
|
---|
| 300 |
|
---|
| 301 | TObjArray *Candidate::GetCandidates()
|
---|
| 302 | {
|
---|
| 303 | if(!fArray) fArray = fFactory->NewArray();
|
---|
| 304 | return fArray;
|
---|
| 305 | }
|
---|
| 306 |
|
---|
| 307 | //------------------------------------------------------------------------------
|
---|
| 308 |
|
---|
| 309 | Bool_t Candidate::Overlaps(const Candidate *object) const
|
---|
| 310 | {
|
---|
| 311 | const Candidate *candidate;
|
---|
| 312 |
|
---|
| 313 | if(object->GetUniqueID() == GetUniqueID()) return kTRUE;
|
---|
| 314 |
|
---|
| 315 | if(fArray)
|
---|
| 316 | {
|
---|
| 317 | TIter it(fArray);
|
---|
| 318 | while((candidate = static_cast<Candidate *>(it.Next())))
|
---|
| 319 | {
|
---|
| 320 | if(candidate->Overlaps(object)) return kTRUE;
|
---|
| 321 | }
|
---|
| 322 | }
|
---|
| 323 |
|
---|
| 324 | if(object->fArray)
|
---|
| 325 | {
|
---|
| 326 | TIter it(object->fArray);
|
---|
| 327 | while((candidate = static_cast<Candidate *>(it.Next())))
|
---|
| 328 | {
|
---|
| 329 | if(candidate->Overlaps(this)) return kTRUE;
|
---|
| 330 | }
|
---|
| 331 | }
|
---|
| 332 |
|
---|
| 333 | return kFALSE;
|
---|
| 334 | }
|
---|
| 335 |
|
---|
| 336 | //------------------------------------------------------------------------------
|
---|
| 337 |
|
---|
| 338 | TObject *Candidate::Clone(const char *newname) const
|
---|
| 339 | {
|
---|
| 340 | Candidate *object = fFactory->NewCandidate();
|
---|
| 341 | Copy(*object);
|
---|
| 342 | return object;
|
---|
| 343 | }
|
---|
| 344 |
|
---|
| 345 | //------------------------------------------------------------------------------
|
---|
| 346 |
|
---|
| 347 | void Candidate::Copy(TObject &obj) const
|
---|
| 348 | {
|
---|
| 349 | Candidate &object = static_cast<Candidate &>(obj);
|
---|
| 350 | Candidate *candidate;
|
---|
| 351 |
|
---|
| 352 | object.PID = PID;
|
---|
| 353 | object.Status = Status;
|
---|
| 354 | object.M1 = M1;
|
---|
| 355 | object.M2 = M2;
|
---|
| 356 | object.D1 = D1;
|
---|
| 357 | object.D2 = D2;
|
---|
| 358 | object.Charge = Charge;
|
---|
| 359 | object.Mass = Mass;
|
---|
| 360 | object.IsPU = IsPU;
|
---|
[84733ae] | 361 | object.IsRecoPU = IsRecoPU;
|
---|
[d7d2da3] | 362 | object.IsConstituent = IsConstituent;
|
---|
[5d2481f] | 363 | object.IsFromConversion = IsFromConversion;
|
---|
[2118a6a] | 364 | object.ClusterIndex = ClusterIndex;
|
---|
| 365 | object.ClusterNDF = ClusterNDF;
|
---|
| 366 | object.ClusterSigma = ClusterSigma;
|
---|
| 367 | object.SumPT2 = SumPT2;
|
---|
| 368 | object.BTVSumPT2 = BTVSumPT2;
|
---|
| 369 | object.GenDeltaZ = GenDeltaZ;
|
---|
| 370 | object.GenSumPT2 = GenSumPT2;
|
---|
[fe0273c] | 371 | object.Flavor = Flavor;
|
---|
| 372 | object.FlavorAlgo = FlavorAlgo;
|
---|
| 373 | object.FlavorPhys = FlavorPhys;
|
---|
[d7d2da3] | 374 | object.BTag = BTag;
|
---|
[edf10ba] | 375 | object.BTagAlgo = BTagAlgo;
|
---|
[fe0273c] | 376 | object.BTagPhys = BTagPhys;
|
---|
[d7d2da3] | 377 | object.TauTag = TauTag;
|
---|
[7429c6a] | 378 | object.TauWeight = TauWeight;
|
---|
[d7d2da3] | 379 | object.Eem = Eem;
|
---|
| 380 | object.Ehad = Ehad;
|
---|
[61dccd3] | 381 | object.Etrk = Etrk;
|
---|
[d7d2da3] | 382 | object.Edges[0] = Edges[0];
|
---|
| 383 | object.Edges[1] = Edges[1];
|
---|
| 384 | object.Edges[2] = Edges[2];
|
---|
| 385 | object.Edges[3] = Edges[3];
|
---|
| 386 | object.DeltaEta = DeltaEta;
|
---|
| 387 | object.DeltaPhi = DeltaPhi;
|
---|
| 388 | object.Momentum = Momentum;
|
---|
| 389 | object.Position = Position;
|
---|
[2118a6a] | 390 | object.InitialPosition = InitialPosition;
|
---|
| 391 | object.PositionError = PositionError;
|
---|
[43c646a] | 392 | object.Area = Area;
|
---|
[80306e6] | 393 | object.L = L;
|
---|
[28c722a] | 394 | object.ErrorT = ErrorT;
|
---|
[80306e6] | 395 | object.D0 = D0;
|
---|
| 396 | object.ErrorD0 = ErrorD0;
|
---|
| 397 | object.DZ = DZ;
|
---|
| 398 | object.ErrorDZ = ErrorDZ;
|
---|
| 399 | object.P = P;
|
---|
| 400 | object.ErrorP = ErrorP;
|
---|
[3051ea17] | 401 | object.C = C;
|
---|
| 402 | object.ErrorC = ErrorC;
|
---|
[80306e6] | 403 | object.PT = PT;
|
---|
| 404 | object.ErrorPT = ErrorPT;
|
---|
[341014c] | 405 | object.CtgTheta = CtgTheta;
|
---|
[80306e6] | 406 | object.ErrorCtgTheta = ErrorCtgTheta;
|
---|
| 407 | object.Phi = Phi;
|
---|
[341014c] | 408 | object.ErrorPhi = ErrorPhi;
|
---|
[a0431dc] | 409 | object.Xd = Xd;
|
---|
| 410 | object.Yd = Yd;
|
---|
| 411 | object.Zd = Zd;
|
---|
[3a105e5] | 412 | object.XFirstHit = XFirstHit;
|
---|
| 413 | object.YFirstHit = YFirstHit;
|
---|
| 414 | object.ZFirstHit = ZFirstHit;
|
---|
[a95da74] | 415 | object.Nclusters = Nclusters;
|
---|
[781af69] | 416 | object.dNdx = dNdx;
|
---|
[a98c7ef] | 417 | object.TrackResolution = TrackResolution;
|
---|
[24d005f] | 418 | object.NCharged = NCharged;
|
---|
| 419 | object.NNeutrals = NNeutrals;
|
---|
[c614dd7] | 420 | object.NeutralEnergyFraction = NeutralEnergyFraction;
|
---|
| 421 | object.ChargedEnergyFraction = ChargedEnergyFraction;
|
---|
[24d005f] | 422 | object.Beta = Beta;
|
---|
| 423 | object.BetaStar = BetaStar;
|
---|
| 424 | object.MeanSqDeltaR = MeanSqDeltaR;
|
---|
| 425 | object.PTD = PTD;
|
---|
[839deb7] | 426 | object.NTimeHits = NTimeHits;
|
---|
[b62c2da] | 427 | object.IsolationVar = IsolationVar;
|
---|
| 428 | object.IsolationVarRhoCorr = IsolationVarRhoCorr;
|
---|
| 429 | object.SumPtCharged = SumPtCharged;
|
---|
| 430 | object.SumPtNeutral = SumPtNeutral;
|
---|
| 431 | object.SumPtChargedPU = SumPtChargedPU;
|
---|
| 432 | object.SumPt = SumPt;
|
---|
[ab3bdd9] | 433 | object.ClusterIndex = ClusterIndex;
|
---|
| 434 | object.ClusterNDF = ClusterNDF;
|
---|
[341014c] | 435 | object.ClusterSigma = ClusterSigma;
|
---|
[ab3bdd9] | 436 | object.SumPT2 = SumPT2;
|
---|
[341014c] | 437 |
|
---|
[24d005f] | 438 | object.FracPt[0] = FracPt[0];
|
---|
| 439 | object.FracPt[1] = FracPt[1];
|
---|
| 440 | object.FracPt[2] = FracPt[2];
|
---|
| 441 | object.FracPt[3] = FracPt[3];
|
---|
| 442 | object.FracPt[4] = FracPt[4];
|
---|
[63178fb] | 443 | object.Tau[0] = Tau[0];
|
---|
| 444 | object.Tau[1] = Tau[1];
|
---|
| 445 | object.Tau[2] = Tau[2];
|
---|
| 446 | object.Tau[3] = Tau[3];
|
---|
| 447 | object.Tau[4] = Tau[4];
|
---|
[839deb7] | 448 |
|
---|
[de6d698] | 449 | object.TrimmedP4[0] = TrimmedP4[0];
|
---|
| 450 | object.TrimmedP4[1] = TrimmedP4[1];
|
---|
| 451 | object.TrimmedP4[2] = TrimmedP4[2];
|
---|
| 452 | object.TrimmedP4[3] = TrimmedP4[3];
|
---|
| 453 | object.TrimmedP4[4] = TrimmedP4[4];
|
---|
| 454 | object.PrunedP4[0] = PrunedP4[0];
|
---|
| 455 | object.PrunedP4[1] = PrunedP4[1];
|
---|
| 456 | object.PrunedP4[2] = PrunedP4[2];
|
---|
| 457 | object.PrunedP4[3] = PrunedP4[3];
|
---|
| 458 | object.PrunedP4[4] = PrunedP4[4];
|
---|
| 459 | object.SoftDroppedP4[0] = SoftDroppedP4[0];
|
---|
| 460 | object.SoftDroppedP4[1] = SoftDroppedP4[1];
|
---|
| 461 | object.SoftDroppedP4[2] = SoftDroppedP4[2];
|
---|
| 462 | object.SoftDroppedP4[3] = SoftDroppedP4[3];
|
---|
| 463 | object.SoftDroppedP4[4] = SoftDroppedP4[4];
|
---|
| 464 |
|
---|
[edf10ba] | 465 | object.NSubJetsTrimmed = NSubJetsTrimmed;
|
---|
| 466 | object.NSubJetsPruned = NSubJetsPruned;
|
---|
[de6d698] | 467 | object.NSubJetsSoftDropped = NSubJetsSoftDropped;
|
---|
[e4c3fef] | 468 |
|
---|
[341014c] | 469 | object.SoftDroppedJet = SoftDroppedJet;
|
---|
[ba75867] | 470 | object.SoftDroppedSubJet1 = SoftDroppedSubJet1;
|
---|
| 471 | object.SoftDroppedSubJet2 = SoftDroppedSubJet2;
|
---|
[3051ea17] | 472 | object.TrackCovariance = TrackCovariance;
|
---|
[d7d2da3] | 473 | object.fFactory = fFactory;
|
---|
| 474 | object.fArray = 0;
|
---|
| 475 |
|
---|
[839deb7] | 476 | // copy cluster timing info
|
---|
| 477 | copy(ECalEnergyTimePairs.begin(), ECalEnergyTimePairs.end(), back_inserter(object.ECalEnergyTimePairs));
|
---|
[3db5282] | 478 |
|
---|
[d7d2da3] | 479 | if(fArray && fArray->GetEntriesFast() > 0)
|
---|
| 480 | {
|
---|
| 481 | TIter itArray(fArray);
|
---|
| 482 | TObjArray *array = object.GetCandidates();
|
---|
| 483 | while((candidate = static_cast<Candidate *>(itArray.Next())))
|
---|
| 484 | {
|
---|
| 485 | array->Add(candidate);
|
---|
| 486 | }
|
---|
| 487 | }
|
---|
| 488 | }
|
---|
| 489 |
|
---|
| 490 | //------------------------------------------------------------------------------
|
---|
| 491 |
|
---|
[341014c] | 492 | void Candidate::Clear(Option_t *option)
|
---|
[d7d2da3] | 493 | {
|
---|
[8d200a6] | 494 | int i;
|
---|
[d7d2da3] | 495 | SetUniqueID(0);
|
---|
| 496 | ResetBit(kIsReferenced);
|
---|
| 497 | PID = 0;
|
---|
| 498 | Status = 0;
|
---|
[341014c] | 499 | M1 = -1;
|
---|
| 500 | M2 = -1;
|
---|
| 501 | D1 = -1;
|
---|
| 502 | D2 = -1;
|
---|
[d7d2da3] | 503 | Charge = 0;
|
---|
| 504 | Mass = 0.0;
|
---|
| 505 | IsPU = 0;
|
---|
[d759c46] | 506 | IsRecoPU = 0;
|
---|
[d7d2da3] | 507 | IsConstituent = 0;
|
---|
[5d2481f] | 508 | IsFromConversion = 0;
|
---|
[fe0273c] | 509 | Flavor = 0;
|
---|
| 510 | FlavorAlgo = 0;
|
---|
| 511 | FlavorPhys = 0;
|
---|
[d7d2da3] | 512 | BTag = 0;
|
---|
[edf10ba] | 513 | BTagAlgo = 0;
|
---|
[fe0273c] | 514 | BTagPhys = 0;
|
---|
[d7d2da3] | 515 | TauTag = 0;
|
---|
[7429c6a] | 516 | TauWeight = 0.0;
|
---|
[d7d2da3] | 517 | Eem = 0.0;
|
---|
| 518 | Ehad = 0.0;
|
---|
[61dccd3] | 519 | Etrk = 0.0;
|
---|
[d7d2da3] | 520 | Edges[0] = 0.0;
|
---|
| 521 | Edges[1] = 0.0;
|
---|
| 522 | Edges[2] = 0.0;
|
---|
| 523 | Edges[3] = 0.0;
|
---|
| 524 | DeltaEta = 0.0;
|
---|
| 525 | DeltaPhi = 0.0;
|
---|
| 526 | Momentum.SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
| 527 | Position.SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
[80306e6] | 528 | InitialPosition.SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
[d7d2da3] | 529 | Area.SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
[3051ea17] | 530 | TrackCovariance.Zero();
|
---|
[80306e6] | 531 | L = 0.0;
|
---|
[28c722a] | 532 | ErrorT = 0.0;
|
---|
[341014c] | 533 | D0 = 0.0;
|
---|
[80306e6] | 534 | ErrorD0 = 0.0;
|
---|
| 535 | DZ = 0.0;
|
---|
| 536 | ErrorDZ = 0.0;
|
---|
[341014c] | 537 | P = 0.0;
|
---|
| 538 | ErrorP = 0.0;
|
---|
[3051ea17] | 539 | C = 0.0;
|
---|
| 540 | ErrorC = 0.0;
|
---|
[80306e6] | 541 | PT = 0.0;
|
---|
| 542 | ErrorPT = 0.0;
|
---|
| 543 | CtgTheta = 0.0;
|
---|
| 544 | ErrorCtgTheta = 0.0;
|
---|
| 545 | Phi = 0.0;
|
---|
| 546 | ErrorPhi = 0.0;
|
---|
[a0431dc] | 547 | Xd = 0.0;
|
---|
| 548 | Yd = 0.0;
|
---|
| 549 | Zd = 0.0;
|
---|
[3a105e5] | 550 | XFirstHit = 0.0;
|
---|
| 551 | YFirstHit = 0.0;
|
---|
| 552 | ZFirstHit = 0.0;
|
---|
[a95da74] | 553 | Nclusters = 0.0;
|
---|
[781af69] | 554 | dNdx = 0.0;
|
---|
[a98c7ef] | 555 | TrackResolution = 0.0;
|
---|
[24d005f] | 556 | NCharged = 0;
|
---|
| 557 | NNeutrals = 0;
|
---|
| 558 | Beta = 0.0;
|
---|
| 559 | BetaStar = 0.0;
|
---|
| 560 | MeanSqDeltaR = 0.0;
|
---|
| 561 | PTD = 0.0;
|
---|
[839deb7] | 562 |
|
---|
| 563 | NTimeHits = 0;
|
---|
| 564 | ECalEnergyTimePairs.clear();
|
---|
| 565 |
|
---|
[b62c2da] | 566 | IsolationVar = -999;
|
---|
| 567 | IsolationVarRhoCorr = -999;
|
---|
| 568 | SumPtCharged = -999;
|
---|
| 569 | SumPtNeutral = -999;
|
---|
| 570 | SumPtChargedPU = -999;
|
---|
| 571 | SumPt = -999;
|
---|
[839deb7] | 572 |
|
---|
[ab3bdd9] | 573 | ClusterIndex = -1;
|
---|
| 574 | ClusterNDF = -99;
|
---|
[341014c] | 575 | ClusterSigma = 0.0;
|
---|
[ab3bdd9] | 576 | SumPT2 = 0.0;
|
---|
| 577 | BTVSumPT2 = 0.0;
|
---|
| 578 | GenDeltaZ = 0.0;
|
---|
[341014c] | 579 | GenSumPT2 = 0.0;
|
---|
| 580 |
|
---|
[24d005f] | 581 | FracPt[0] = 0.0;
|
---|
| 582 | FracPt[1] = 0.0;
|
---|
| 583 | FracPt[2] = 0.0;
|
---|
| 584 | FracPt[3] = 0.0;
|
---|
| 585 | FracPt[4] = 0.0;
|
---|
[63178fb] | 586 | Tau[0] = 0.0;
|
---|
| 587 | Tau[1] = 0.0;
|
---|
| 588 | Tau[2] = 0.0;
|
---|
| 589 | Tau[3] = 0.0;
|
---|
| 590 | Tau[4] = 0.0;
|
---|
[839deb7] | 591 |
|
---|
[ba75867] | 592 | SoftDroppedJet.SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
| 593 | SoftDroppedSubJet1.SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
| 594 | SoftDroppedSubJet2.SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
| 595 |
|
---|
[8d200a6] | 596 | for(i = 0; i < 5; ++i)
|
---|
| 597 | {
|
---|
| 598 | TrimmedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
[839deb7] | 599 | PrunedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
[8d200a6] | 600 | SoftDroppedP4[i].SetXYZT(0.0, 0.0, 0.0, 0.0);
|
---|
| 601 | }
|
---|
| 602 |
|
---|
[edf10ba] | 603 | NSubJetsTrimmed = 0;
|
---|
| 604 | NSubJetsPruned = 0;
|
---|
[de6d698] | 605 | NSubJetsSoftDropped = 0;
|
---|
[839deb7] | 606 |
|
---|
[d7d2da3] | 607 | fArray = 0;
|
---|
| 608 | }
|
---|