- Timestamp:
- Dec 9, 2021, 7:52:15 AM (3 years ago)
- Children:
- 29b722a
- Parents:
- a5af1df (diff), 0c0c9af (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- classes
- Files:
-
- 2 added
- 11 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
classes/CMakeLists.txt
ra5af1df rd612dec 9 9 list(REMOVE_ITEM headers ${CMAKE_CURRENT_SOURCE_DIR}/ClassesLinkDef.h) 10 10 11 DELPHES_GENERATE_DICTIONARY(ClassesDict 11 # the macro invocation for ROOT6 ensures that the headers are relocatable 12 if (NOT ${ROOT_VERSION} VERSION_LESS "6.0.0") 13 DELPHES_GENERATE_DICTIONARY(ClassesDict 14 classes/DelphesModule.h 15 classes/DelphesFactory.h 16 classes/SortableObject.h 17 classes/DelphesClasses.h 18 LINKDEF ClassesLinkDef.h 19 ) 20 else() 21 # for ROOT5 the above fails, keep the following as workaround 22 DELPHES_GENERATE_DICTIONARY(ClassesDict 12 23 ${CMAKE_CURRENT_SOURCE_DIR}/DelphesModule.h 13 24 ${CMAKE_CURRENT_SOURCE_DIR}/DelphesFactory.h 14 25 ${CMAKE_CURRENT_SOURCE_DIR}/SortableObject.h 15 26 ${CMAKE_CURRENT_SOURCE_DIR}/DelphesClasses.h 16 LINKDEF ClassesLinkDef.h 17 ) 27 LINKDEF ClassesLinkDef.h 28 ) 29 endif() 18 30 19 31 add_library(classes OBJECT ${sources} ClassesDict.cxx) -
classes/ClassesLinkDef.h
ra5af1df rd612dec 62 62 #pragma link C++ class Track+; 63 63 #pragma link C++ class Tower+; 64 #pragma link C++ class ParticleFlowCandidate+; 64 65 #pragma link C++ class HectorHit+; 65 66 -
classes/DelphesClasses.cc
ra5af1df rd612dec 28 28 29 29 #include "classes/DelphesClasses.h" 30 31 30 #include "classes/DelphesFactory.h" 32 31 #include "classes/SortableObject.h" … … 40 39 CompBase *Track::fgCompare = CompPT<Track>::Instance(); 41 40 CompBase *Tower::fgCompare = CompE<Tower>::Instance(); 41 CompBase *ParticleFlowCandidate::fgCompare = CompE<ParticleFlowCandidate>::Instance(); 42 42 CompBase *HectorHit::fgCompare = CompE<HectorHit>::Instance(); 43 43 CompBase *Vertex::fgCompare = CompSumPT2<Vertex>::Instance(); … … 104 104 { 105 105 TLorentzVector vec; 106 vec.SetPtEtaPhiM(PT, Eta, Phi, 0.0); 107 return vec; 108 } 106 vec.SetPtEtaPhiM(PT, Eta, Phi, Mass); 107 return vec; 108 } 109 110 //------------------------------------------------------------------------------ 111 112 TMatrixDSym Track::CovarianceMatrix() const 113 { 114 TMatrixDSym Cv; 115 Cv.ResizeTo(5, 5); 116 117 // convert diagonal term to original units 118 Cv(0, 0)=TMath::Power(ErrorD0, 2.); 119 Cv(1, 1)=TMath::Power(ErrorPhi, 2.); 120 Cv(2, 2)=TMath::Power(ErrorC, 2.); 121 Cv(3, 3)=TMath::Power(ErrorDZ, 2.); 122 Cv(4, 4)=TMath::Power(ErrorCtgTheta, 2.); 123 124 // off diagonal terms 125 Cv(0, 1)=ErrorD0Phi; 126 Cv(0, 2)=ErrorD0C; 127 Cv(0, 3)=ErrorD0DZ; 128 Cv(0, 4)=ErrorD0CtgTheta; 129 Cv(1, 2)=ErrorPhiC; 130 Cv(1, 3)=ErrorPhiDZ; 131 Cv(1, 4)=ErrorPhiCtgTheta; 132 Cv(2, 3)=ErrorCDZ; 133 Cv(2, 4)=ErrorCCtgTheta; 134 Cv(3, 4)=ErrorDZCtgTheta; 135 136 Cv(1, 0)=Cv(0, 1); 137 Cv(2, 0)=Cv(0, 2); 138 Cv(3, 0)=Cv(0, 3); 139 Cv(4, 0)=Cv(0, 4); 140 Cv(2, 1)=Cv(1, 2); 141 Cv(3, 1)=Cv(1, 3); 142 Cv(4, 1)=Cv(1, 4); 143 Cv(3, 2)=Cv(2, 3); 144 Cv(4, 2)=Cv(2, 4); 145 Cv(4, 3)=Cv(3, 4); 146 147 return Cv; 148 } 149 109 150 110 151 //------------------------------------------------------------------------------ … … 115 156 vec.SetPtEtaPhiM(ET, Eta, Phi, 0.0); 116 157 return vec; 158 } 159 160 //------------------------------------------------------------------------------ 161 162 TLorentzVector ParticleFlowCandidate::P4() const 163 { 164 TLorentzVector vec; 165 vec.SetPtEtaPhiM(PT, Eta, Phi, Mass); 166 return vec; 167 } 168 169 //------------------------------------------------------------------------------ 170 171 TMatrixDSym ParticleFlowCandidate::CovarianceMatrix() const 172 { 173 TMatrixDSym Cv; 174 Cv.ResizeTo(5, 5); 175 176 // convert diagonal term to original units 177 Cv(0, 0)=TMath::Power(ErrorD0, 2.); 178 Cv(1, 1)=TMath::Power(ErrorPhi, 2.); 179 Cv(2, 2)=TMath::Power(ErrorC, 2.); 180 Cv(3, 3)=TMath::Power(ErrorDZ, 2.); 181 Cv(4, 4)=TMath::Power(ErrorCtgTheta, 2.); 182 183 // off diagonal terms 184 Cv(0, 1)=ErrorD0Phi; 185 Cv(0, 2)=ErrorD0C; 186 Cv(0, 3)=ErrorD0DZ; 187 Cv(0, 4)=ErrorD0CtgTheta; 188 Cv(1, 2)=ErrorPhiC; 189 Cv(1, 3)=ErrorPhiDZ; 190 Cv(1, 4)=ErrorPhiCtgTheta; 191 Cv(2, 3)=ErrorCDZ; 192 Cv(2, 4)=ErrorCCtgTheta; 193 Cv(3, 4)=ErrorDZCtgTheta; 194 195 Cv(1, 0)=Cv(0, 1); 196 Cv(2, 0)=Cv(0, 2); 197 Cv(3, 0)=Cv(0, 3); 198 Cv(4, 0)=Cv(0, 4); 199 Cv(2, 1)=Cv(1, 2); 200 Cv(3, 1)=Cv(1, 3); 201 Cv(4, 1)=Cv(1, 4); 202 Cv(3, 2)=Cv(2, 3); 203 Cv(4, 2)=Cv(2, 4); 204 Cv(4, 3)=Cv(3, 4); 205 206 return Cv; 117 207 } 118 208 … … 125 215 Flavor(0), FlavorAlgo(0), FlavorPhys(0), 126 216 BTag(0), BTagAlgo(0), BTagPhys(0), 127 TauTag(0), TauWeight(0.0), Eem(0.0), Ehad(0.0), 217 TauTag(0), TauWeight(0.0), Eem(0.0), Ehad(0.0), Etrk(0.0), 128 218 DeltaEta(0.0), DeltaPhi(0.0), 129 219 Momentum(0.0, 0.0, 0.0, 0.0), … … 133 223 PositionError(0.0, 0.0, 0.0, 0.0), 134 224 Area(0.0, 0.0, 0.0, 0.0), 225 TrackCovariance(5), 135 226 L(0), 136 227 D0(0), ErrorD0(0), 137 228 DZ(0), ErrorDZ(0), 138 229 P(0), ErrorP(0), 230 C(0), ErrorC(0), 139 231 PT(0), ErrorPT(0), 140 232 CtgTheta(0), ErrorCtgTheta(0), 141 233 Phi(0), ErrorPhi(0), 142 234 Xd(0), Yd(0), Zd(0), 235 Nclusters(0.0), 236 dNdx(0.0), 143 237 TrackResolution(0), 144 238 NCharged(0), 145 239 NNeutrals(0), 240 NeutralEnergyFraction(0), // charged energy fraction 241 ChargedEnergyFraction(0), // neutral energy fraction 146 242 Beta(0), 147 243 BetaStar(0), … … 163 259 ExclYmerge45(0), 164 260 ExclYmerge56(0), 261 ParticleDensity(0), 165 262 fFactory(0), 166 263 fArray(0) … … 284 381 object.Eem = Eem; 285 382 object.Ehad = Ehad; 383 object.Etrk = Etrk; 286 384 object.Edges[0] = Edges[0]; 287 385 object.Edges[1] = Edges[1]; … … 304 402 object.P = P; 305 403 object.ErrorP = ErrorP; 404 object.C = C; 405 object.ErrorC = ErrorC; 306 406 object.PT = PT; 307 407 object.ErrorPT = ErrorPT; … … 313 413 object.Yd = Yd; 314 414 object.Zd = Zd; 415 object.Nclusters = Nclusters; 416 object.dNdx = dNdx; 315 417 object.TrackResolution = TrackResolution; 316 418 object.NCharged = NCharged; 317 419 object.NNeutrals = NNeutrals; 420 object.NeutralEnergyFraction = NeutralEnergyFraction; 421 object.ChargedEnergyFraction = ChargedEnergyFraction; 318 422 object.Beta = Beta; 319 423 object.BetaStar = BetaStar; … … 366 470 object.SoftDroppedSubJet1 = SoftDroppedSubJet1; 367 471 object.SoftDroppedSubJet2 = SoftDroppedSubJet2; 368 472 object.TrackCovariance = TrackCovariance; 369 473 object.fFactory = fFactory; 370 474 object.fArray = 0; … … 413 517 Eem = 0.0; 414 518 Ehad = 0.0; 519 Etrk = 0.0; 415 520 Edges[0] = 0.0; 416 521 Edges[1] = 0.0; … … 424 529 DecayPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 425 530 Area.SetXYZT(0.0, 0.0, 0.0, 0.0); 531 TrackCovariance.Zero(); 426 532 L = 0.0; 427 533 ErrorT = 0.0; … … 432 538 P = 0.0; 433 539 ErrorP = 0.0; 540 C = 0.0; 541 ErrorC = 0.0; 434 542 PT = 0.0; 435 543 ErrorPT = 0.0; … … 441 549 Yd = 0.0; 442 550 Zd = 0.0; 551 Nclusters = 0.0; 552 dNdx = 0.0; 443 553 TrackResolution = 0.0; 444 554 NCharged = 0; -
classes/DelphesClasses.h
ra5af1df rd612dec 33 33 34 34 #include "TLorentzVector.h" 35 #include "TMatrixDSym.h" 35 36 #include "TObject.h" 36 37 #include "TRef.h" … … 150 151 Float_t Eta; // particle pseudorapidity 151 152 Float_t Phi; // particle azimuthal angle 152 153 153 Float_t Rapidity; // particle rapidity 154 Float_t CtgTheta; // particle cotangent of theta155 156 Float_t D0; // particle transverse impact parameter157 Float_t DZ; // particle longitudinal impact parameter158 154 159 155 Float_t T; // particle vertex position (t component) | hepevt.vhep[number][3] … … 394 390 Int_t NCharged; // number of charged constituents 395 391 Int_t NNeutrals; // number of neutral constituents 392 393 Float_t NeutralEnergyFraction; // charged energy fraction 394 Float_t ChargedEnergyFraction; // neutral energy fraction 395 396 396 Float_t Beta; // (sum pt of charged pile-up constituents)/(sum pt of charged constituents) 397 397 Float_t BetaStar; // (sum pt of charged constituents coming from hard interaction)/(sum pt of charged constituents) … … 445 445 Float_t Phi; // track azimuthal angle 446 446 Float_t CtgTheta; // track cotangent of theta 447 Float_t C; // track curvature inverse 448 Float_t Mass; // particle mass 447 449 448 450 Float_t EtaOuter; // track pseudorapidity at the tracker edge … … 466 468 Float_t D0; // track transverse impact parameter 467 469 Float_t DZ; // track longitudinal impact parameter 470 Float_t Nclusters; // Number of ionization clusters 471 Float_t dNdx; // Number of ionization clusters 468 472 469 473 Float_t ErrorP; // track momentum error … … 475 479 Float_t ErrorD0; // track transverse impact parameter error 476 480 Float_t ErrorDZ; // track longitudinal impact parameter error 481 Float_t ErrorC; // track curvature error 482 483 // track covariance off-diagonal terms 484 Float_t ErrorD0Phi; 485 Float_t ErrorD0C; 486 Float_t ErrorD0DZ; 487 Float_t ErrorD0CtgTheta; 488 Float_t ErrorPhiC; 489 Float_t ErrorPhiDZ; 490 Float_t ErrorPhiCtgTheta ; 491 Float_t ErrorCDZ; 492 Float_t ErrorCCtgTheta; 493 Float_t ErrorDZCtgTheta; 477 494 478 495 TRef Particle; // reference to generated particle … … 484 501 485 502 TLorentzVector P4() const; 503 TMatrixDSym CovarianceMatrix() const; 486 504 487 505 ClassDef(Track, 3) … … 504 522 Float_t Eem; // calorimeter tower electromagnetic energy 505 523 Float_t Ehad; // calorimeter tower hadronic energy 524 Float_t Etrk; // total charged energy hitting tower 506 525 507 526 Float_t Edges[4]; // calorimeter tower edges … … 514 533 TLorentzVector P4() const; 515 534 516 ClassDef(Tower, 2) 535 ClassDef(Tower, 3) 536 }; 537 538 //--------------------------------------------------------------------------- 539 540 class ParticleFlowCandidate: public SortableObject 541 { 542 543 public: 544 Int_t PID; // HEP ID number 545 546 Int_t Charge; // track charge 547 548 Float_t E; // reconstructed energy [GeV] 549 Float_t P; // track momentum 550 Float_t PT; // track transverse momentum 551 Float_t Eta; // track pseudorapidity 552 Float_t Phi; // track azimuthal angle 553 Float_t CtgTheta; // track cotangent of theta 554 Float_t C; // track curvature inverse 555 Float_t Mass; // particle mass 556 557 Float_t EtaOuter; // track pseudorapidity at the tracker edge 558 Float_t PhiOuter; // track azimuthal angle at the tracker edge 559 560 Float_t T; // track vertex position (t component) 561 Float_t X; // track vertex position (x component) 562 Float_t Y; // track vertex position (y component) 563 Float_t Z; // track vertex position (z component) 564 565 Float_t TOuter; // track position (t component) at the tracker edge 566 Float_t XOuter; // track position (x component) at the tracker edge 567 Float_t YOuter; // track position (y component) at the tracker edge 568 Float_t ZOuter; // track position (z component) at the tracker edge 569 570 Float_t Xd; // X coordinate of point of closest approach to vertex 571 Float_t Yd; // Y coordinate of point of closest approach to vertex 572 Float_t Zd; // Z coordinate of point of closest approach to vertex 573 574 Float_t L; // track path length 575 Float_t D0; // track transverse impact parameter 576 Float_t DZ; // track longitudinal impact parameter 577 Float_t Nclusters; // Number of ionization clusters 578 Float_t dNdx; // Number of ionization clusters 579 580 Float_t ErrorP; // track momentum error 581 Float_t ErrorPT; // track transverse momentum error 582 Float_t ErrorPhi; // track azimuthal angle error 583 Float_t ErrorCtgTheta; // track cotangent of theta error 584 585 Float_t ErrorT; // time measurement error 586 Float_t ErrorD0; // track transverse impact parameter error 587 Float_t ErrorDZ; // track longitudinal impact parameter error 588 Float_t ErrorC; // track curvature error 589 590 // track covariance off-diagonal terms 591 Float_t ErrorD0Phi; 592 Float_t ErrorD0C; 593 Float_t ErrorD0DZ; 594 Float_t ErrorD0CtgTheta; 595 Float_t ErrorPhiC; 596 Float_t ErrorPhiDZ; 597 Float_t ErrorPhiCtgTheta ; 598 Float_t ErrorCDZ; 599 Float_t ErrorCCtgTheta; 600 Float_t ErrorDZCtgTheta; 601 602 Int_t VertexIndex; // reference to vertex 603 604 static CompBase *fgCompare; //! 605 const CompBase *GetCompare() const { return fgCompare; } 606 607 TLorentzVector P4() const; 608 TMatrixDSym CovarianceMatrix() const; 609 610 Int_t NTimeHits; // number of hits contributing to time measurement 611 612 Float_t Eem; // calorimeter tower electromagnetic energy 613 Float_t Ehad; // calorimeter tower hadronic energy 614 Float_t Etrk; // total charged energy hitting tower 615 616 Float_t Edges[4]; // calorimeter tower edges 617 618 TRefArray Particles; // references to generated particles 619 620 ClassDef(ParticleFlowCandidate, 3) 621 517 622 }; 518 623 … … 610 715 Float_t Eem; 611 716 Float_t Ehad; 717 Float_t Etrk; 612 718 613 719 Float_t Edges[4]; … … 618 724 619 725 Float_t L; // path length 726 Float_t DZ; 727 Float_t ErrorDZ; 620 728 Float_t ErrorT; // path length 621 729 Float_t D0; 622 730 Float_t ErrorD0; 623 Float_t DZ;624 Float_t Error DZ;731 Float_t C; 732 Float_t ErrorC; 625 733 Float_t P; 626 734 Float_t ErrorP; … … 632 740 Float_t ErrorPhi; 633 741 742 Float_t Nclusters; // Number of ionization clusters 743 Float_t dNdx; // Number of ionization clusters per unit length 744 634 745 Float_t Xd; 635 746 Float_t Yd; … … 649 760 Float_t PTD; 650 761 Float_t FracPt[5]; 762 Float_t NeutralEnergyFraction; // charged energy fraction 763 Float_t ChargedEnergyFraction; // neutral energy fraction 764 651 765 652 766 // Timing information … … 663 777 Float_t SumPtChargedPU; 664 778 Float_t SumPt; 779 780 // ACTS compliant 6x6 track covariance (D0, phi, Curvature, dz, ctg(theta)) 781 782 TMatrixDSym TrackCovariance; 665 783 666 784 // vertex variables … … 698 816 Double_t ExclYmerge56; 699 817 818 // event characteristics variables 819 Double_t ParticleDensity; // particle multiplicity density in the proximity of the particle 820 700 821 static CompBase *fgCompare; //! 701 822 const CompBase *GetCompare() const { return fgCompare; } -
classes/DelphesFormula.cc
ra5af1df rd612dec 18 18 19 19 #include "classes/DelphesFormula.h" 20 #include "classes/DelphesClasses.h" 20 21 21 22 #include "TString.h" … … 63 64 buffer.ReplaceAll("dz", "[1]"); 64 65 buffer.ReplaceAll("ctgTheta", "[2]"); 66 buffer.ReplaceAll("radius", "[3]"); 67 buffer.ReplaceAll("density", "[4]"); 65 68 66 69 #if ROOT_VERSION_CODE < ROOT_VERSION(6, 3, 0) … … 77 80 //------------------------------------------------------------------------------ 78 81 79 Double_t DelphesFormula::Eval(Double_t pt, Double_t eta, Double_t phi, 80 Double_t energy, Double_t d0, Double_t dz, 81 Double_t ctgTheta) 82 Double_t DelphesFormula::Eval(Double_t pt, Double_t eta, Double_t phi, Double_t energy, Candidate *candidate) 82 83 { 84 85 Double_t d0 = 0., dz = 0., ctgTheta = 0., radius = 0., density = 0.; 86 if (candidate) { 87 d0 = candidate->D0; 88 dz = candidate->DZ; 89 ctgTheta = candidate->CtgTheta; 90 radius = candidate->Position.Pt(); 91 density = candidate->ParticleDensity; 92 } 93 83 94 Double_t x[4] = {pt, eta, phi, energy}; 84 Double_t params[ 3] = {d0, dz, ctgTheta};95 Double_t params[5] = {d0, dz, ctgTheta, radius, density}; 85 96 return EvalPar(x, params); 86 97 } -
classes/DelphesFormula.h
ra5af1df rd612dec 22 22 #include "TFormula.h" 23 23 24 class Candidate; 25 24 26 class DelphesFormula: public TFormula 25 27 { … … 33 35 Int_t Compile(const char *expression); 34 36 35 Double_t Eval(Double_t pt, Double_t eta = 0, Double_t phi = 0, 36 Double_t energy = 0, Double_t d0 = 0, Double_t dz = 0, 37 Double_t ctgTheta = 0); 37 Double_t Eval(Double_t pt, Double_t eta = 0, Double_t phi = 0, Double_t energy = 0, Candidate *candidate = nullptr); 38 38 }; 39 39 -
classes/DelphesHepMC2Reader.cc
ra5af1df rd612dec 17 17 */ 18 18 19 /** \class DelphesHepMC Reader19 /** \class DelphesHepMC2Reader 20 20 * 21 21 * Reads HepMC file … … 25 25 */ 26 26 27 #include "classes/DelphesHepMC Reader.h"27 #include "classes/DelphesHepMC2Reader.h" 28 28 29 29 #include <iostream> … … 54 54 //--------------------------------------------------------------------------- 55 55 56 DelphesHepMC Reader::DelphesHepMCReader() :56 DelphesHepMC2Reader::DelphesHepMC2Reader() : 57 57 fInputFile(0), fBuffer(0), fPDG(0), 58 58 fVertexCounter(-1), fInCounter(-1), fOutCounter(-1), … … 66 66 //--------------------------------------------------------------------------- 67 67 68 DelphesHepMC Reader::~DelphesHepMCReader()68 DelphesHepMC2Reader::~DelphesHepMC2Reader() 69 69 { 70 70 if(fBuffer) delete[] fBuffer; … … 73 73 //--------------------------------------------------------------------------- 74 74 75 void DelphesHepMC Reader::SetInputFile(FILE *inputFile)75 void DelphesHepMC2Reader::SetInputFile(FILE *inputFile) 76 76 { 77 77 fInputFile = inputFile; … … 80 80 //--------------------------------------------------------------------------- 81 81 82 void DelphesHepMC Reader::Clear()82 void DelphesHepMC2Reader::Clear() 83 83 { 84 84 fStateSize = 0; … … 98 98 //--------------------------------------------------------------------------- 99 99 100 bool DelphesHepMC Reader::EventReady()100 bool DelphesHepMC2Reader::EventReady() 101 101 { 102 102 return (fVertexCounter == 0) && (fInCounter == 0) && (fOutCounter == 0); … … 105 105 //--------------------------------------------------------------------------- 106 106 107 bool DelphesHepMC Reader::ReadBlock(DelphesFactory *factory,107 bool DelphesHepMC2Reader::ReadBlock(DelphesFactory *factory, 108 108 TObjArray *allParticleOutputArray, 109 109 TObjArray *stableParticleOutputArray, … … 202 202 } 203 203 } 204 205 204 else if(key == 'C') 206 205 { 207 206 rc = bufferStream.ReadDbl(fCrossSection) 208 207 && bufferStream.ReadDbl(fCrossSectionError); 209 } 210 208 209 if(!rc) 210 { 211 cerr << "** ERROR: " 212 << "invalid cross section format" << endl; 213 return kFALSE; 214 } 215 } 211 216 else if(key == 'F') 212 217 { … … 317 322 //--------------------------------------------------------------------------- 318 323 319 void DelphesHepMC Reader::AnalyzeEvent(ExRootTreeBranch *branch, long long eventNumber,324 void DelphesHepMC2Reader::AnalyzeEvent(ExRootTreeBranch *branch, long long eventNumber, 320 325 TStopwatch *readStopWatch, TStopwatch *procStopWatch) 321 326 { … … 348 353 //--------------------------------------------------------------------------- 349 354 350 void DelphesHepMC Reader::AnalyzeWeight(ExRootTreeBranch *branch)355 void DelphesHepMC2Reader::AnalyzeWeight(ExRootTreeBranch *branch) 351 356 { 352 357 Weight *element; … … 363 368 //--------------------------------------------------------------------------- 364 369 365 void DelphesHepMC Reader::AnalyzeParticle(DelphesFactory *factory,370 void DelphesHepMC2Reader::AnalyzeParticle(DelphesFactory *factory, 366 371 TObjArray *allParticleOutputArray, 367 372 TObjArray *stableParticleOutputArray, … … 430 435 //--------------------------------------------------------------------------- 431 436 432 void DelphesHepMC Reader::FinalizeParticles(TObjArray *allParticleOutputArray)437 void DelphesHepMC2Reader::FinalizeParticles(TObjArray *allParticleOutputArray) 433 438 { 434 439 Candidate *candidate; -
classes/DelphesHepMC2Reader.h
ra5af1df rd612dec 17 17 */ 18 18 19 #ifndef DelphesHepMC Reader_h20 #define DelphesHepMC Reader_h19 #ifndef DelphesHepMC2Reader_h 20 #define DelphesHepMC2Reader_h 21 21 22 /** \class DelphesHepMC Reader22 /** \class DelphesHepMC2Reader 23 23 * 24 24 * Reads HepMC file … … 39 39 class DelphesFactory; 40 40 41 class DelphesHepMC Reader41 class DelphesHepMC2Reader 42 42 { 43 43 public: 44 DelphesHepMC Reader();45 ~DelphesHepMC Reader();44 DelphesHepMC2Reader(); 45 ~DelphesHepMC2Reader(); 46 46 47 47 void SetInputFile(FILE *inputFile); … … 102 102 }; 103 103 104 #endif // DelphesHepMC Reader_h104 #endif // DelphesHepMC2Reader_h -
classes/DelphesModule.cc
ra5af1df rd612dec 130 130 //------------------------------------------------------------------------------ 131 131 132 void DelphesModule::AddInfo(const char *name, Double_t value) 133 { 134 stringstream message; 135 if(!fTreeWriter) 136 { 137 fTreeWriter = static_cast<ExRootTreeWriter *>(GetObject("TreeWriter", ExRootTreeWriter::Class())); 138 if(!fTreeWriter) 139 { 140 message << "can't access access tree writer"; 141 throw runtime_error(message.str()); 142 } 143 } 144 fTreeWriter->AddInfo(name, value); 145 } 146 147 //------------------------------------------------------------------------------ 148 132 149 ExRootResult *DelphesModule::GetPlots() 133 150 { -
classes/DelphesModule.h
ra5af1df rd612dec 55 55 56 56 ExRootTreeBranch *NewBranch(const char *name, TClass *cl); 57 void AddInfo(const char *name, Double_t value); 57 58 58 59 ExRootResult *GetPlots(); -
classes/DelphesStream.cc
ra5af1df rd612dec 106 106 107 107 //------------------------------------------------------------------------------ 108 109 bool DelphesStream::FindChr(int value) 110 { 111 char *position; 112 bool result = false; 113 114 position = strchr(fBuffer, value); 115 116 if(position) 117 { 118 result = true; 119 fBuffer = position + 1; 120 } 121 122 return result; 123 } 124 125 //------------------------------------------------------------------------------ 126 127 bool DelphesStream::FindStr(const char *value) 128 { 129 char *position; 130 bool result = false; 131 132 position = strstr(fBuffer, value); 133 134 if(position) 135 { 136 result = true; 137 fBuffer = position + strlen(value); 138 } 139 140 return result; 141 } 142 143 //------------------------------------------------------------------------------ -
classes/DelphesStream.h
ra5af1df rd612dec 35 35 bool ReadDbl(double &value); 36 36 bool ReadInt(int &value); 37 bool FindChr(int value); 38 bool FindStr(const char *value); 37 39 38 40 private: -
classes/DelphesTF2.cc
ra5af1df rd612dec 32 32 { 33 33 34 #if ROOT_VERSION_CODE >= ROOT_VERSION(6, 3, 0) 34 #if ROOT_VERSION_CODE >= ROOT_VERSION(6, 22, 7) 35 fFormula = std::unique_ptr<TFormula>(new TFormula()); 36 #elif ROOT_VERSION_CODE >= ROOT_VERSION(6, 3, 0) 35 37 fFormula = new TFormula(); 36 38 #endif
Note:
See TracChangeset
for help on using the changeset viewer.