Changeset a5af1df in git
- Timestamp:
- Dec 9, 2021, 7:38:54 AM (3 years ago)
- Children:
- d612dec
- Parents:
- a5ff49f
- Files:
-
- 7 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
ra5ff49f ra5af1df 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),) … … 444 445 modules/VertexFinder.h \ 445 446 modules/VertexFinderDA4D.h \ 446 modules/ExampleModule.h 447 modules/ExampleModule.h \ 448 modules/LLPFilter.h \ 449 modules/CscClusterEfficiency.h \ 450 modules/CscClusterId.h 447 451 tmp/modules/ModulesDict$(PcmSuf): \ 448 452 tmp/modules/ModulesDict.$(SrcSuf) … … 695 699 external/ExRootAnalysis/ExRootFilter.h \ 696 700 external/ExRootAnalysis/ExRootResult.h 701 tmp/modules/CscClusterEfficiency.$(ObjSuf): \ 702 modules/CscClusterEfficiency.$(SrcSuf) \ 703 modules/CscClusterEfficiency.h \ 704 classes/DelphesClasses.h \ 705 classes/DelphesFactory.h \ 706 classes/DelphesFormula.h \ 707 external/ExRootAnalysis/ExRootClassifier.h \ 708 external/ExRootAnalysis/ExRootFilter.h \ 709 external/ExRootAnalysis/ExRootResult.h 710 tmp/modules/CscClusterId.$(ObjSuf): \ 711 modules/CscClusterId.$(SrcSuf) \ 712 modules/CscClusterId.h \ 713 classes/DelphesClasses.h \ 714 classes/DelphesFactory.h \ 715 classes/DelphesFormula.h \ 716 external/ExRootAnalysis/ExRootClassifier.h \ 717 external/ExRootAnalysis/ExRootFilter.h \ 718 external/ExRootAnalysis/ExRootResult.h 697 719 tmp/modules/Delphes.$(ObjSuf): \ 698 720 modules/Delphes.$(SrcSuf) \ … … 820 842 modules/JetPileUpSubtractor.$(SrcSuf) \ 821 843 modules/JetPileUpSubtractor.h \ 844 classes/DelphesClasses.h \ 845 classes/DelphesFactory.h \ 846 classes/DelphesFormula.h \ 847 external/ExRootAnalysis/ExRootClassifier.h \ 848 external/ExRootAnalysis/ExRootFilter.h \ 849 external/ExRootAnalysis/ExRootResult.h 850 tmp/modules/LLPFilter.$(ObjSuf): \ 851 modules/LLPFilter.$(SrcSuf) \ 852 modules/LLPFilter.h \ 822 853 classes/DelphesClasses.h \ 823 854 classes/DelphesFactory.h \ … … 1127 1158 tmp/modules/Cloner.$(ObjSuf) \ 1128 1159 tmp/modules/ConstituentFilter.$(ObjSuf) \ 1160 tmp/modules/CscClusterEfficiency.$(ObjSuf) \ 1161 tmp/modules/CscClusterId.$(ObjSuf) \ 1129 1162 tmp/modules/Delphes.$(ObjSuf) \ 1130 1163 tmp/modules/DenseTrackFilter.$(ObjSuf) \ … … 1141 1174 tmp/modules/JetFlavorAssociation.$(ObjSuf) \ 1142 1175 tmp/modules/JetPileUpSubtractor.$(ObjSuf) \ 1176 tmp/modules/LLPFilter.$(ObjSuf) \ 1143 1177 tmp/modules/LeptonDressing.$(ObjSuf) \ 1144 1178 tmp/modules/Merger.$(ObjSuf) \ … … 1823 1857 @touch $@ 1824 1858 1859 modules/LLPFilter.h: \ 1860 classes/DelphesModule.h 1861 @touch $@ 1862 1825 1863 external/fastjet/internal/MinHeap.hh: \ 1826 1864 external/fastjet/internal/base.hh … … 2136 2174 @touch $@ 2137 2175 2176 modules/CscClusterEfficiency.h: \ 2177 classes/DelphesModule.h 2178 @touch $@ 2179 2138 2180 external/fastjet/PseudoJetStructureBase.hh: \ 2139 2181 external/fastjet/internal/base.hh … … 2252 2294 external/fastjet/config.h: \ 2253 2295 external/fastjet/config_win.h 2296 @touch $@ 2297 2298 modules/CscClusterId.h: \ 2299 classes/DelphesModule.h 2254 2300 @touch $@ 2255 2301 -
classes/ClassesLinkDef.h
ra5ff49f ra5af1df 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+; … … 65 67 66 68 #endif 67 -
classes/DelphesClasses.cc
ra5ff49f ra5af1df 36 36 CompBase *Electron::fgCompare = CompPT<Electron>::Instance(); 37 37 CompBase *Muon::fgCompare = CompPT<Muon>::Instance(); 38 38 39 CompBase *Jet::fgCompare = CompPT<Jet>::Instance(); 39 40 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 //------------------------------------------------------------------------------ … … 128 130 Position(0.0, 0.0, 0.0, 0.0), 129 131 InitialPosition(0.0, 0.0, 0.0, 0.0), 132 DecayPosition(0.0, 0.0, 0.0, 0.0), 130 133 PositionError(0.0, 0.0, 0.0, 0.0), 131 134 Area(0.0, 0.0, 0.0, 0.0), … … 290 293 object.Position = Position; 291 294 object.InitialPosition = InitialPosition; 295 object.DecayPosition = DecayPosition; 292 296 object.PositionError = PositionError; 293 297 object.Area = Area; … … 418 422 Position.SetXYZT(0.0, 0.0, 0.0, 0.0); 419 423 InitialPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 424 DecayPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 420 425 Area.SetXYZT(0.0, 0.0, 0.0, 0.0); 421 426 L = 0.0; -
classes/DelphesClasses.h
ra5ff49f ra5af1df 162 162 Float_t Z; // particle vertex position (z component) | hepevt.vhep[number][2] 163 163 164 Float_t decayX; 165 Float_t decayY; 166 Float_t decayZ; 167 Float_t decayT; 168 169 Float_t ctau; 170 164 171 static CompBase *fgCompare; //! 165 172 const CompBase *GetCompare() const { return fgCompare; } … … 533 540 ClassDef(HectorHit, 1) 534 541 }; 542 //--------------------------------------------------------------------------- 543 544 class CscCluster: public SortableObject 545 { 546 public: 547 Int_t NHits; //nCSC hits 548 Float_t Eta; // eta of LLP 549 Float_t Phi; // phi of LLP 550 Float_t PT; // pt of LLP 551 Float_t Px;// px of LLP 552 Float_t Py;// py of LLP 553 Float_t Pz;// pz of LLP 554 Float_t E; // E of LLP 555 Float_t Ehad; // had energy of LLP 556 Float_t Eem; // em energy of LLP 557 558 Float_t pid; // LLP pid 559 560 Float_t T; // LLP decay time-photon travel time 561 Float_t X; // LLP decay x 562 Float_t Y; // LLP decay y 563 Float_t Z; // LLP decay z 564 Float_t R; // LLP decay z 565 Float_t beta; 566 Float_t ctau; 567 568 569 static CompBase *fgCompare; //! 570 const CompBase *GetCompare() const { return fgCompare; } 571 572 ClassDef(CscCluster, 4) 573 }; 535 574 536 575 //--------------------------------------------------------------------------- … … 576 615 Float_t DeltaPhi; 577 616 578 TLorentzVector Momentum, Position, InitialPosition, PositionError, Area;617 TLorentzVector Momentum, Position, InitialPosition, DecayPosition, PositionError, Area; 579 618 580 619 Float_t L; // path length -
modules/ModulesLinkDef.h
ra5ff49f ra5af1df 73 73 #include "modules/VertexFinderDA4D.h" 74 74 #include "modules/ExampleModule.h" 75 #include "modules/LLPFilter.h" 76 #include "modules/CscClusterEfficiency.h" 77 #include "modules/CscClusterId.h" 75 78 76 79 #ifdef __CINT__ … … 127 130 #pragma link C++ class VertexFinderDA4D+; 128 131 #pragma link C++ class ExampleModule+; 132 #pragma link C++ class LLPFilter+; 133 #pragma link C++ class CscClusterEfficiency+; 134 #pragma link C++ class CscClusterId+; 129 135 130 136 #endif -
modules/TreeWriter.cc
ra5ff49f ra5af1df 75 75 fClassMap[Electron::Class()] = &TreeWriter::ProcessElectrons; 76 76 fClassMap[Muon::Class()] = &TreeWriter::ProcessMuons; 77 fClassMap[CscCluster::Class()] = &TreeWriter::ProcessCscCluster; 77 78 fClassMap[Jet::Class()] = &TreeWriter::ProcessJets; 78 79 fClassMap[MissingET::Class()] = &TreeWriter::ProcessMissingET; … … 182 183 const TLorentzVector &momentum = candidate->Momentum; 183 184 const TLorentzVector &position = candidate->Position; 185 const TLorentzVector &DecayPosition = candidate->DecayPosition; 184 186 185 187 entry = static_cast<GenParticle *>(branch->NewEntry()); … … 215 217 entry->D0 = candidate->D0; 216 218 entry->DZ = candidate->DZ; 217 entry->P = candidate->P;219 entry->P = momentum.P(); 218 220 entry->PT = candidate->PT; 219 221 entry->CtgTheta = candidate->CtgTheta; … … 230 232 entry->Z = position.Z(); 231 233 entry->T = position.T() * 1.0E-3 / c_light; 234 235 entry->decayX = DecayPosition.X(); 236 entry->decayY = DecayPosition.Y(); 237 entry->decayZ = DecayPosition.Z(); 238 entry->decayT = DecayPosition.T()* 1.0E-3 / c_light; 239 float beta = entry->P/momentum.E(); 240 float gamma = 1./sqrt(1-beta*beta); 241 entry->ctau = sqrt(pow(entry->decayX-entry->X,2)+pow(entry->decayY-entry->Y,2)+pow(entry->decayZ-entry->Z,2))/(beta*gamma);// in millimeter 232 242 } 233 243 } … … 730 740 } 731 741 } 742 //------------------------------------------------------------------------------ 743 744 void TreeWriter::ProcessCscCluster(ExRootTreeBranch *branch, TObjArray *array) 745 { 746 TIter iterator(array); 747 Candidate *candidate = 0; 748 CscCluster *entry = 0; 749 Double_t pt, signPz, cosTheta, eta, rapidity; 750 751 const Double_t c_light = 2.99792458E8; // in unit of m/s 752 753 array->Sort(); 754 755 756 // loop over all clusters 757 iterator.Reset(); 758 while((candidate = static_cast<Candidate *>(iterator.Next()))) 759 { 760 const TLorentzVector &momentum = candidate->Momentum; 761 const TLorentzVector &position = candidate->DecayPosition; 762 763 pt = momentum.Pt(); 764 cosTheta = TMath::Abs(momentum.CosTheta()); 765 signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0; 766 eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta()); 767 768 entry = static_cast<CscCluster *>(branch->NewEntry()); 769 770 entry->SetBit(kIsReferenced); 771 entry->SetUniqueID(candidate->GetUniqueID()); 772 773 entry->Eta = eta; 774 entry->Phi = momentum.Phi(); 775 776 777 // entry->Eta = position.Eta(); 778 // entry->Phi = position.Phi(); 779 780 entry->PT = momentum.Pt(); // pt of LLP 781 entry->Px = momentum.Px();// px of LLP 782 entry->Py = momentum.Py();// py of LLP 783 entry->Pz = momentum.Pz();// pz of LLP 784 entry->E = momentum.E(); // E of LLP 785 entry->pid = candidate->PID; // LLP pid 786 entry->Eem = candidate->Eem; // LLP pid 787 entry->Ehad = candidate->Ehad; // LLP pid 788 Double_t beta = momentum.P()/momentum.E(); 789 Double_t gamma = 1.0/sqrt(1-beta*beta); 790 Double_t decayDistance = sqrt(pow(position.X(),2)+pow(position.Y(),2)+pow(position.Z(),2)); // mm 791 entry->beta = beta; // LLP pid 792 entry->ctau = decayDistance/(beta * gamma);; // LLP pid 793 794 // entry->T = (position.T()-sqrt(pow(position.X(),2)+pow(position.Y(),2)+pow(position.Z(),2)))* 1.0E-3 / c_light; // LLP decay time-photon travel time 795 796 entry->T = decayDistance*(1./beta-1)* 1.0E-3/c_light*1e9; // ns 797 entry->X = position.X(); // LLP decay x 798 entry->Y = position.Y(); // LLP decay y 799 entry->Z = position.Z(); // LLP decay z 800 // entry->Size = 100; 801 } 802 } 732 803 733 804 //------------------------------------------------------------------------------ -
modules/TreeWriter.h
ra5ff49f ra5af1df 59 59 void ProcessElectrons(ExRootTreeBranch *branch, TObjArray *array); 60 60 void ProcessMuons(ExRootTreeBranch *branch, TObjArray *array); 61 void ProcessCscCluster(ExRootTreeBranch *branch, TObjArray *array); 61 62 void ProcessTauJets(ExRootTreeBranch *branch, TObjArray *array); 62 63 void ProcessJets(ExRootTreeBranch *branch, TObjArray *array); … … 66 67 void ProcessWeight(ExRootTreeBranch *branch, TObjArray *array); 67 68 void ProcessHectorHit(ExRootTreeBranch *branch, TObjArray *array); 69 68 70 69 71 #if !defined(__CINT__) && !defined(__CLING__)
Note:
See TracChangeset
for help on using the changeset viewer.