Changeset cc8716b in git
- Timestamp:
- Mar 7, 2022, 8:51:45 PM (3 years ago)
- Branches:
- master
- Children:
- 7dbc149
- Parents:
- 4e8e72b
- git-author:
- Christinaw97 <cwang5@…> (03/07/22 20:51:45)
- git-committer:
- GitHub <noreply@…> (03/07/22 20:51:45)
- Files:
-
- 10 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r4e8e72b rcc8716b 22 22 HAS_CMSSW = true 23 23 CXXFLAGS += -std=c++0x -I$(subst :, -I,$(CMSSW_FWLITE_INCLUDE_PATH)) 24 CXXFLAGS += -std=c++1y 24 25 OPT_LIBS += -L$(subst include,lib,$(subst :, -L,$(CMSSW_FWLITE_INCLUDE_PATH))) 25 26 ifneq ($(CMSSW_RELEASE_BASE),) … … 461 462 modules/VertexFinder.h \ 462 463 modules/VertexFinderDA4D.h \ 464 modules/LLPFilter.h \ 465 modules/CscClusterEfficiency.h \ 466 modules/CscClusterId.h \ 463 467 modules/DecayFilter.h \ 464 468 modules/ParticleDensity.h \ … … 518 522 classes/DelphesFactory.h \ 519 523 classes/SortableObject.h 524 tmp/classes/DelphesCscClusterFormula.$(ObjSuf): \ 525 classes/DelphesCscClusterFormula.$(SrcSuf) \ 526 classes/DelphesCscClusterFormula.h 520 527 tmp/classes/DelphesCylindricalFormula.$(ObjSuf): \ 521 528 classes/DelphesCylindricalFormula.$(SrcSuf) \ … … 734 741 external/TrackCovariance/TrkUtil.h 735 742 tmp/modules/ConstituentFilter.$(ObjSuf): \ 736 modules/ConstituentFilter.$(SrcSuf) \ 737 modules/ConstituentFilter.h \ 738 classes/DelphesClasses.h \ 739 classes/DelphesFactory.h \ 740 classes/DelphesFormula.h \ 743 modules/ConstituentFilter.$(SrcSuf) \ 744 modules/ConstituentFilter.h \ 745 classes/DelphesClasses.h \ 746 classes/DelphesFactory.h \ 747 classes/DelphesFormula.h \ 748 external/ExRootAnalysis/ExRootClassifier.h \ 749 external/ExRootAnalysis/ExRootFilter.h \ 750 external/ExRootAnalysis/ExRootResult.h 751 tmp/modules/CscClusterEfficiency.$(ObjSuf): \ 752 modules/CscClusterEfficiency.$(SrcSuf) \ 753 modules/CscClusterEfficiency.h \ 754 classes/DelphesClasses.h \ 755 classes/DelphesFactory.h \ 756 classes/DelphesCscClusterFormula.h \ 757 external/ExRootAnalysis/ExRootClassifier.h \ 758 external/ExRootAnalysis/ExRootFilter.h \ 759 external/ExRootAnalysis/ExRootResult.h 760 tmp/modules/CscClusterId.$(ObjSuf): \ 761 modules/CscClusterId.$(SrcSuf) \ 762 modules/CscClusterId.h \ 763 classes/DelphesClasses.h \ 764 classes/DelphesFactory.h \ 765 classes/DelphesCscClusterFormula.h \ 741 766 external/ExRootAnalysis/ExRootClassifier.h \ 742 767 external/ExRootAnalysis/ExRootFilter.h \ … … 882 907 external/ExRootAnalysis/ExRootFilter.h \ 883 908 external/ExRootAnalysis/ExRootResult.h 909 tmp/modules/LLPFilter.$(ObjSuf): \ 910 modules/LLPFilter.$(SrcSuf) \ 911 modules/LLPFilter.h \ 912 classes/DelphesClasses.h \ 913 classes/DelphesFactory.h \ 914 classes/DelphesFormula.h \ 915 external/ExRootAnalysis/ExRootClassifier.h \ 916 external/ExRootAnalysis/ExRootFilter.h \ 917 external/ExRootAnalysis/ExRootResult.h 884 918 tmp/modules/LeptonDressing.$(ObjSuf): \ 885 919 modules/LeptonDressing.$(SrcSuf) \ … … 1163 1197 DELPHES_OBJ += \ 1164 1198 tmp/classes/DelphesClasses.$(ObjSuf) \ 1199 tmp/classes/DelphesCscClusterFormula.$(ObjSuf) \ 1165 1200 tmp/classes/DelphesCylindricalFormula.$(ObjSuf) \ 1166 1201 tmp/classes/DelphesFactory.$(ObjSuf) \ … … 1227 1262 tmp/modules/ClusterCounting.$(ObjSuf) \ 1228 1263 tmp/modules/ConstituentFilter.$(ObjSuf) \ 1264 tmp/modules/CscClusterEfficiency.$(ObjSuf) \ 1265 tmp/modules/CscClusterId.$(ObjSuf) \ 1229 1266 tmp/modules/DecayFilter.$(ObjSuf) \ 1230 1267 tmp/modules/Delphes.$(ObjSuf) \ … … 1242 1279 tmp/modules/JetFlavorAssociation.$(ObjSuf) \ 1243 1280 tmp/modules/JetPileUpSubtractor.$(ObjSuf) \ 1281 tmp/modules/LLPFilter.$(ObjSuf) \ 1244 1282 tmp/modules/LeptonDressing.$(ObjSuf) \ 1245 1283 tmp/modules/Merger.$(ObjSuf) \ … … 1767 1805 ifeq ($(HAS_PYTHIA8),true) 1768 1806 FASTJET_OBJ += \ 1769 1807 1770 1808 endif 1771 1809 … … 1814 1852 ifeq ($(HAS_PYTHIA8),true) 1815 1853 DISPLAY_OBJ += \ 1816 1854 1817 1855 endif 1818 1856 … … 1928 1966 @touch $@ 1929 1967 1968 modules/LLPFilter.h: \ 1969 classes/DelphesModule.h 1970 @touch $@ 1971 1930 1972 external/fastjet/internal/MinHeap.hh: \ 1931 1973 external/fastjet/internal/base.hh … … 2257 2299 @touch $@ 2258 2300 2301 modules/CscClusterEfficiency.h: \ 2302 classes/DelphesModule.h 2303 @touch $@ 2304 2259 2305 external/fastjet/PseudoJetStructureBase.hh: \ 2260 2306 external/fastjet/internal/base.hh … … 2381 2427 external/fastjet/config.h: \ 2382 2428 external/fastjet/config_win.h 2429 @touch $@ 2430 2431 modules/CscClusterId.h: \ 2432 classes/DelphesModule.h 2383 2433 @touch $@ 2384 2434 … … 2548 2598 2549 2599 ### 2550 2551 -
classes/ClassesLinkDef.h
r4e8e72b rcc8716b 57 57 #pragma link C++ class Electron+; 58 58 #pragma link C++ class Muon+; 59 #pragma link C++ class CscCluster+; 60 59 61 #pragma link C++ class Jet+; 60 62 #pragma link C++ class Track+; … … 66 68 67 69 #endif 68 -
classes/DelphesClasses.cc
r4e8e72b rcc8716b 35 35 CompBase *Electron::fgCompare = CompPT<Electron>::Instance(); 36 36 CompBase *Muon::fgCompare = CompPT<Muon>::Instance(); 37 37 38 CompBase *Jet::fgCompare = CompPT<Jet>::Instance(); 38 39 CompBase *Track::fgCompare = CompPT<Track>::Instance(); … … 42 43 CompBase *Vertex::fgCompare = CompSumPT2<Vertex>::Instance(); 43 44 CompBase *Candidate::fgCompare = CompMomentumPt<Candidate>::Instance(); 45 CompBase *CscCluster::fgCompare = CompE<CscCluster>::Instance(); 44 46 45 47 //------------------------------------------------------------------------------ … … 218 220 Position(0.0, 0.0, 0.0, 0.0), 219 221 InitialPosition(0.0, 0.0, 0.0, 0.0), 222 DecayPosition(0.0, 0.0, 0.0, 0.0), 220 223 PositionError(0.0, 0.0, 0.0, 0.0), 221 224 Area(0.0, 0.0, 0.0, 0.0), … … 389 392 object.Position = Position; 390 393 object.InitialPosition = InitialPosition; 394 object.DecayPosition = DecayPosition; 391 395 object.PositionError = PositionError; 392 396 object.Area = Area; … … 527 531 Position.SetXYZT(0.0, 0.0, 0.0, 0.0); 528 532 InitialPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 533 DecayPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 529 534 Area.SetXYZT(0.0, 0.0, 0.0, 0.0); 530 535 TrackCovariance.Zero(); -
classes/DelphesClasses.h
r4e8e72b rcc8716b 158 158 Float_t Z; // particle vertex position (z component) | hepevt.vhep[number][2] 159 159 160 Float_t decayX; 161 Float_t decayY; 162 Float_t decayZ; 163 Float_t decayT; 164 160 165 static CompBase *fgCompare; //! 161 166 const CompBase *GetCompare() const { return fgCompare; } … … 646 651 ClassDef(HectorHit, 1) 647 652 }; 653 //--------------------------------------------------------------------------- 654 655 class CscCluster: public SortableObject 656 { 657 public: 658 Float_t Eta; // eta of LLP 659 Float_t Phi; // phi of LLP 660 Float_t PT; // pt of LLP 661 Float_t Px;// px of LLP 662 Float_t Py;// py of LLP 663 Float_t Pz;// pz of LLP 664 Float_t E; // E of LLP 665 Float_t Ehad; // had energy of LLP 666 Float_t Eem; // em energy of LLP 667 Float_t pid; // LLP pid 668 Float_t T; // LLP decay time-photon travel time 669 Float_t X; // LLP decay x 670 Float_t Y; // LLP decay y 671 Float_t Z; // LLP decay z 672 Float_t R; // LLP decay z 673 Float_t beta; // LLP beta 674 Float_t ctau; //LLP ctau 675 676 677 static CompBase *fgCompare; //! 678 const CompBase *GetCompare() const { return fgCompare; } 679 680 ClassDef(CscCluster, 5) 681 }; 648 682 649 683 //--------------------------------------------------------------------------- … … 690 724 Float_t DeltaPhi; 691 725 692 TLorentzVector Momentum, Position, InitialPosition, PositionError, Area;726 TLorentzVector Momentum, Position, InitialPosition, PositionError, DecayPosition, Area; 693 727 694 728 Float_t L; // path length -
classes/DelphesHepMC2Reader.cc
r4e8e72b rcc8716b 438 438 { 439 439 Candidate *candidate; 440 Candidate *candidateDaughter; 440 441 map<int, pair<int, int> >::iterator itMotherMap; 441 442 map<int, pair<int, int> >::iterator itDaughterMap; … … 446 447 candidate = static_cast<Candidate *>(allParticleOutputArray->At(i)); 447 448 449 448 450 if(candidate->M1 > 0) 449 451 { … … 477 479 candidate->D1 = -1; 478 480 candidate->D2 = -1; 479 } 481 const TLorentzVector &decayPosition = candidate->Position; 482 candidate->DecayPosition.SetXYZT(decayPosition.X(), decayPosition.Y(), decayPosition.Z(), decayPosition.T());// decay position 483 } 480 484 else 481 485 { 482 486 candidate->D1 = itDaughterMap->second.first; 483 487 candidate->D2 = itDaughterMap->second.second; 484 } 485 } 486 } 487 } 488 489 //--------------------------------------------------------------------------- 488 candidateDaughter = static_cast<Candidate *>(allParticleOutputArray->At(candidate->D1)); 489 const TLorentzVector &decayPosition = candidateDaughter->Position; 490 candidate->DecayPosition.SetXYZT(decayPosition.X(), decayPosition.Y(), decayPosition.Z(), decayPosition.T());// decay position 491 492 493 } 494 } 495 } 496 } 497 498 //--------------------------------------------------------------------------- -
classes/DelphesHepMC3Reader.cc
r4e8e72b rcc8716b 458 458 TObjArray *array; 459 459 Candidate *candidate; 460 Candidate *candidateDaughter; 460 461 TParticlePDG *pdgParticle; 461 462 int pdgCode; … … 573 574 candidate->D1 = -1; 574 575 candidate->D2 = -1; 576 const TLorentzVector &decayPosition = candidate->Position; 577 candidate->DecayPosition.SetXYZT(decayPosition.X(), decayPosition.Y(), decayPosition.Z(), decayPosition.T());// decay position 575 578 } 576 579 else … … 578 581 candidate->D1 = itDaughterMap->second.first; 579 582 candidate->D2 = itDaughterMap->second.second; 580 } 581 } 582 } 583 } 584 585 //--------------------------------------------------------------------------- 583 candidateDaughter = static_cast<Candidate *>(allParticleOutputArray->At(candidate->D1)); 584 const TLorentzVector &decayPosition = candidateDaughter->Position; 585 candidate->DecayPosition.SetXYZT(decayPosition.X(), decayPosition.Y(), decayPosition.Z(), decayPosition.T());// decay position 586 } 587 } 588 } 589 } 590 591 //--------------------------------------------------------------------------- -
modules/ModulesLinkDef.h
r4e8e72b rcc8716b 79 79 #include "modules/TruthVertexFinder.h" 80 80 #include "modules/ExampleModule.h" 81 #include "modules/LLPFilter.h" 82 #include "modules/CscClusterEfficiency.h" 83 #include "modules/CscClusterId.h" 81 84 82 85 #ifdef __CINT__ … … 139 142 #pragma link C++ class TruthVertexFinder+; 140 143 #pragma link C++ class ExampleModule+; 144 #pragma link C++ class LLPFilter+; 145 #pragma link C++ class CscClusterEfficiency+; 146 #pragma link C++ class CscClusterId+; 141 147 142 148 #endif -
modules/TreeWriter.cc
r4e8e72b rcc8716b 77 77 fClassMap[Electron::Class()] = &TreeWriter::ProcessElectrons; 78 78 fClassMap[Muon::Class()] = &TreeWriter::ProcessMuons; 79 fClassMap[CscCluster::Class()] = &TreeWriter::ProcessCscCluster; 79 80 fClassMap[Jet::Class()] = &TreeWriter::ProcessJets; 80 81 fClassMap[MissingET::Class()] = &TreeWriter::ProcessMissingET; … … 251 252 entry->Z = position.Z(); 252 253 entry->T = position.T() * 1.0E-3 / c_light; 254 253 255 } 254 256 } … … 907 909 } 908 910 } 911 //------------------------------------------------------------------------------ 912 913 void TreeWriter::ProcessCscCluster(ExRootTreeBranch *branch, TObjArray *array) 914 { 915 TIter iterator(array); 916 Candidate *candidate = 0; 917 CscCluster *entry = 0; 918 Double_t pt, signPz, cosTheta, eta, rapidity; 919 920 const Double_t c_light = 2.99792458E8; // in unit of m/s 921 922 array->Sort(); 923 924 925 // loop over all clusters 926 iterator.Reset(); 927 while((candidate = static_cast<Candidate *>(iterator.Next()))) 928 { 929 const TLorentzVector &momentum = candidate->Momentum; 930 const TLorentzVector &position = candidate->DecayPosition; 931 932 pt = momentum.Pt(); 933 cosTheta = TMath::Abs(momentum.CosTheta()); 934 signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0; 935 eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta()); 936 937 entry = static_cast<CscCluster *>(branch->NewEntry()); 938 939 entry->SetBit(kIsReferenced); 940 entry->SetUniqueID(candidate->GetUniqueID()); 941 942 entry->Eta = eta; 943 entry->Phi = momentum.Phi(); 944 945 entry->PT = momentum.Pt(); // pt of LLP 946 entry->Px = momentum.Px();// px of LLP 947 entry->Py = momentum.Py();// py of LLP 948 entry->Pz = momentum.Pz();// pz of LLP 949 entry->E = momentum.E(); // E of LLP 950 entry->pid = candidate->PID; // LLP pid 951 entry->Eem = candidate->Eem; // LLP Eem 952 entry->Ehad = candidate->Ehad; // LLP Ehad 953 Double_t beta = momentum.P()/momentum.E(); 954 Double_t gamma = 1.0/sqrt(1-beta*beta); 955 Double_t decayDistance = sqrt(pow(position.X(),2)+pow(position.Y(),2)+pow(position.Z(),2)); // mm 956 entry->beta = beta; // LLP pid 957 entry->ctau = decayDistance/(beta * gamma); // LLP travel time in its rest frame 958 entry->T = decayDistance*(1./beta-1)* 1.0E-3/c_light*1e9; // ns 959 entry->X = position.X(); // LLP decay x 960 entry->Y = position.Y(); // LLP decay y 961 entry->Z = position.Z(); // LLP decay z 962 } 963 } 909 964 910 965 //------------------------------------------------------------------------------ -
modules/TreeWriter.h
r4e8e72b rcc8716b 60 60 void ProcessElectrons(ExRootTreeBranch *branch, TObjArray *array); 61 61 void ProcessMuons(ExRootTreeBranch *branch, TObjArray *array); 62 void ProcessCscCluster(ExRootTreeBranch *branch, TObjArray *array); 62 63 void ProcessTauJets(ExRootTreeBranch *branch, TObjArray *array); 63 64 void ProcessJets(ExRootTreeBranch *branch, TObjArray *array); … … 67 68 void ProcessWeight(ExRootTreeBranch *branch, TObjArray *array); 68 69 void ProcessHectorHit(ExRootTreeBranch *branch, TObjArray *array); 70 69 71 70 72 #if !defined(__CINT__) && !defined(__CLING__)
Note:
See TracChangeset
for help on using the changeset viewer.