Changes in / [0c0c9af:d612dec] in git
- Files:
-
- 7 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r0c0c9af rd612dec 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 \ … … 734 738 external/TrackCovariance/TrkUtil.h 735 739 tmp/modules/ConstituentFilter.$(ObjSuf): \ 736 modules/ConstituentFilter.$(SrcSuf) \ 737 modules/ConstituentFilter.h \ 738 classes/DelphesClasses.h \ 739 classes/DelphesFactory.h \ 740 classes/DelphesFormula.h \ 740 modules/ConstituentFilter.$(SrcSuf) \ 741 modules/ConstituentFilter.h \ 742 classes/DelphesClasses.h \ 743 classes/DelphesFactory.h \ 744 classes/DelphesFormula.h \ 745 external/ExRootAnalysis/ExRootClassifier.h \ 746 external/ExRootAnalysis/ExRootFilter.h \ 747 external/ExRootAnalysis/ExRootResult.h 748 tmp/modules/CscClusterEfficiency.$(ObjSuf): \ 749 modules/CscClusterEfficiency.$(SrcSuf) \ 750 modules/CscClusterEfficiency.h \ 751 classes/DelphesClasses.h \ 752 classes/DelphesFactory.h \ 753 classes/DelphesFormula.h \ 754 external/ExRootAnalysis/ExRootClassifier.h \ 755 external/ExRootAnalysis/ExRootFilter.h \ 756 external/ExRootAnalysis/ExRootResult.h 757 tmp/modules/CscClusterId.$(ObjSuf): \ 758 modules/CscClusterId.$(SrcSuf) \ 759 modules/CscClusterId.h \ 760 classes/DelphesClasses.h \ 761 classes/DelphesFactory.h \ 762 classes/DelphesFormula.h \ 741 763 external/ExRootAnalysis/ExRootClassifier.h \ 742 764 external/ExRootAnalysis/ExRootFilter.h \ … … 876 898 modules/JetPileUpSubtractor.$(SrcSuf) \ 877 899 modules/JetPileUpSubtractor.h \ 900 classes/DelphesClasses.h \ 901 classes/DelphesFactory.h \ 902 classes/DelphesFormula.h \ 903 external/ExRootAnalysis/ExRootClassifier.h \ 904 external/ExRootAnalysis/ExRootFilter.h \ 905 external/ExRootAnalysis/ExRootResult.h 906 tmp/modules/LLPFilter.$(ObjSuf): \ 907 modules/LLPFilter.$(SrcSuf) \ 908 modules/LLPFilter.h \ 878 909 classes/DelphesClasses.h \ 879 910 classes/DelphesFactory.h \ … … 1227 1258 tmp/modules/ClusterCounting.$(ObjSuf) \ 1228 1259 tmp/modules/ConstituentFilter.$(ObjSuf) \ 1260 tmp/modules/CscClusterEfficiency.$(ObjSuf) \ 1261 tmp/modules/CscClusterId.$(ObjSuf) \ 1229 1262 tmp/modules/DecayFilter.$(ObjSuf) \ 1230 1263 tmp/modules/Delphes.$(ObjSuf) \ … … 1242 1275 tmp/modules/JetFlavorAssociation.$(ObjSuf) \ 1243 1276 tmp/modules/JetPileUpSubtractor.$(ObjSuf) \ 1277 tmp/modules/LLPFilter.$(ObjSuf) \ 1244 1278 tmp/modules/LeptonDressing.$(ObjSuf) \ 1245 1279 tmp/modules/Merger.$(ObjSuf) \ … … 1928 1962 @touch $@ 1929 1963 1964 modules/LLPFilter.h: \ 1965 classes/DelphesModule.h 1966 @touch $@ 1967 1930 1968 external/fastjet/internal/MinHeap.hh: \ 1931 1969 external/fastjet/internal/base.hh … … 2257 2295 @touch $@ 2258 2296 2297 modules/CscClusterEfficiency.h: \ 2298 classes/DelphesModule.h 2299 @touch $@ 2300 2259 2301 external/fastjet/PseudoJetStructureBase.hh: \ 2260 2302 external/fastjet/internal/base.hh … … 2381 2423 external/fastjet/config.h: \ 2382 2424 external/fastjet/config_win.h 2425 @touch $@ 2426 2427 modules/CscClusterId.h: \ 2428 classes/DelphesModule.h 2383 2429 @touch $@ 2384 2430 -
classes/ClassesLinkDef.h
r0c0c9af rd612dec 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
r0c0c9af rd612dec 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), … … 388 391 object.Position = Position; 389 392 object.InitialPosition = InitialPosition; 393 object.DecayPosition = DecayPosition; 390 394 object.PositionError = PositionError; 391 395 object.Area = Area; … … 523 527 Position.SetXYZT(0.0, 0.0, 0.0, 0.0); 524 528 InitialPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 529 DecayPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 525 530 Area.SetXYZT(0.0, 0.0, 0.0, 0.0); 526 531 TrackCovariance.Zero(); -
classes/DelphesClasses.h
r0c0c9af rd612dec 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 165 Float_t ctau; 166 160 167 static CompBase *fgCompare; //! 161 168 const CompBase *GetCompare() const { return fgCompare; } … … 638 645 ClassDef(HectorHit, 1) 639 646 }; 647 //--------------------------------------------------------------------------- 648 649 class CscCluster: public SortableObject 650 { 651 public: 652 Int_t NHits; //nCSC hits 653 Float_t Eta; // eta of LLP 654 Float_t Phi; // phi of LLP 655 Float_t PT; // pt of LLP 656 Float_t Px;// px of LLP 657 Float_t Py;// py of LLP 658 Float_t Pz;// pz of LLP 659 Float_t E; // E of LLP 660 Float_t Ehad; // had energy of LLP 661 Float_t Eem; // em energy of LLP 662 663 Float_t pid; // LLP pid 664 665 Float_t T; // LLP decay time-photon travel time 666 Float_t X; // LLP decay x 667 Float_t Y; // LLP decay y 668 Float_t Z; // LLP decay z 669 Float_t R; // LLP decay z 670 Float_t beta; 671 Float_t ctau; 672 673 674 static CompBase *fgCompare; //! 675 const CompBase *GetCompare() const { return fgCompare; } 676 677 ClassDef(CscCluster, 4) 678 }; 640 679 641 680 //--------------------------------------------------------------------------- … … 682 721 Float_t DeltaPhi; 683 722 684 TLorentzVector Momentum, Position, InitialPosition, PositionError, Area;723 TLorentzVector Momentum, Position, InitialPosition, DecayPosition, PositionError, Area; 685 724 686 725 Float_t L; // path length -
modules/ModulesLinkDef.h
r0c0c9af rd612dec 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
r0c0c9af rd612dec 76 76 fClassMap[Electron::Class()] = &TreeWriter::ProcessElectrons; 77 77 fClassMap[Muon::Class()] = &TreeWriter::ProcessMuons; 78 fClassMap[CscCluster::Class()] = &TreeWriter::ProcessCscCluster; 78 79 fClassMap[Jet::Class()] = &TreeWriter::ProcessJets; 79 80 fClassMap[MissingET::Class()] = &TreeWriter::ProcessMissingET; … … 197 198 const TLorentzVector &momentum = candidate->Momentum; 198 199 const TLorentzVector &position = candidate->Position; 200 const TLorentzVector &DecayPosition = candidate->DecayPosition; 199 201 200 202 entry = static_cast<GenParticle *>(branch->NewEntry()); … … 238 240 entry->Z = position.Z(); 239 241 entry->T = position.T() * 1.0E-3 / c_light; 242 243 entry->decayX = DecayPosition.X(); 244 entry->decayY = DecayPosition.Y(); 245 entry->decayZ = DecayPosition.Z(); 246 entry->decayT = DecayPosition.T()* 1.0E-3 / c_light; 247 float beta = entry->P/momentum.E(); 248 float gamma = 1./sqrt(1-beta*beta); 249 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 240 250 } 241 251 } … … 886 896 } 887 897 } 898 //------------------------------------------------------------------------------ 899 900 void TreeWriter::ProcessCscCluster(ExRootTreeBranch *branch, TObjArray *array) 901 { 902 TIter iterator(array); 903 Candidate *candidate = 0; 904 CscCluster *entry = 0; 905 Double_t pt, signPz, cosTheta, eta, rapidity; 906 907 const Double_t c_light = 2.99792458E8; // in unit of m/s 908 909 array->Sort(); 910 911 912 // loop over all clusters 913 iterator.Reset(); 914 while((candidate = static_cast<Candidate *>(iterator.Next()))) 915 { 916 const TLorentzVector &momentum = candidate->Momentum; 917 const TLorentzVector &position = candidate->DecayPosition; 918 919 pt = momentum.Pt(); 920 cosTheta = TMath::Abs(momentum.CosTheta()); 921 signPz = (momentum.Pz() >= 0.0) ? 1.0 : -1.0; 922 eta = (cosTheta == 1.0 ? signPz * 999.9 : momentum.Eta()); 923 924 entry = static_cast<CscCluster *>(branch->NewEntry()); 925 926 entry->SetBit(kIsReferenced); 927 entry->SetUniqueID(candidate->GetUniqueID()); 928 929 entry->Eta = eta; 930 entry->Phi = momentum.Phi(); 931 932 933 // entry->Eta = position.Eta(); 934 // entry->Phi = position.Phi(); 935 936 entry->PT = momentum.Pt(); // pt of LLP 937 entry->Px = momentum.Px();// px of LLP 938 entry->Py = momentum.Py();// py of LLP 939 entry->Pz = momentum.Pz();// pz of LLP 940 entry->E = momentum.E(); // E of LLP 941 entry->pid = candidate->PID; // LLP pid 942 entry->Eem = candidate->Eem; // LLP pid 943 entry->Ehad = candidate->Ehad; // LLP pid 944 Double_t beta = momentum.P()/momentum.E(); 945 Double_t gamma = 1.0/sqrt(1-beta*beta); 946 Double_t decayDistance = sqrt(pow(position.X(),2)+pow(position.Y(),2)+pow(position.Z(),2)); // mm 947 entry->beta = beta; // LLP pid 948 entry->ctau = decayDistance/(beta * gamma);; // LLP pid 949 950 // 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 951 952 entry->T = decayDistance*(1./beta-1)* 1.0E-3/c_light*1e9; // ns 953 entry->X = position.X(); // LLP decay x 954 entry->Y = position.Y(); // LLP decay y 955 entry->Z = position.Z(); // LLP decay z 956 // entry->Size = 100; 957 } 958 } 888 959 889 960 //------------------------------------------------------------------------------ -
modules/TreeWriter.h
r0c0c9af rd612dec 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.