Changes in / [bc14a10:c0756c4] in git
- Files:
-
- 11 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
rbc14a10 rc0756c4 319 319 modules/EnergySmearing.h \ 320 320 modules/MomentumSmearing.h \ 321 modules/TrackSmearing.h \ 321 322 modules/ImpactParameterSmearing.h \ 322 323 modules/TimeSmearing.h \ … … 341 342 modules/StatusPidFilter.h \ 342 343 modules/PdgCodeFilter.h \ 344 modules/BeamSpotFilter.h \ 343 345 modules/Cloner.h \ 344 346 modules/Weighter.h \ … … 346 348 modules/JetFlavorAssociation.h \ 347 349 modules/JetFakeParticle.h \ 350 modules/VertexSorter.h \ 351 modules/VertexFinder.h \ 348 352 modules/ExampleModule.h 349 353 tmp/modules/ModulesDict$(PcmSuf): \ … … 552 556 classes/DelphesFactory.h \ 553 557 classes/DelphesFormula.h 558 tmp/modules/BeamSpotFilter.$(ObjSuf): \ 559 modules/BeamSpotFilter.$(SrcSuf) \ 560 modules/BeamSpotFilter.h \ 561 classes/DelphesClasses.h \ 562 classes/DelphesFactory.h \ 563 classes/DelphesFormula.h \ 564 external/ExRootAnalysis/ExRootResult.h \ 565 external/ExRootAnalysis/ExRootFilter.h \ 566 external/ExRootAnalysis/ExRootClassifier.h 554 567 tmp/modules/Calorimeter.$(ObjSuf): \ 555 568 modules/Calorimeter.$(SrcSuf) \ … … 842 855 external/ExRootAnalysis/ExRootFilter.h \ 843 856 external/ExRootAnalysis/ExRootClassifier.h 857 tmp/modules/TrackSmearing.$(ObjSuf): \ 858 modules/TrackSmearing.$(SrcSuf) \ 859 modules/TrackSmearing.h \ 860 classes/DelphesClasses.h \ 861 classes/DelphesFactory.h \ 862 classes/DelphesFormula.h \ 863 external/ExRootAnalysis/ExRootResult.h \ 864 external/ExRootAnalysis/ExRootFilter.h \ 865 external/ExRootAnalysis/ExRootClassifier.h 844 866 tmp/modules/TreeWriter.$(ObjSuf): \ 845 867 modules/TreeWriter.$(SrcSuf) \ … … 858 880 classes/DelphesFactory.h \ 859 881 classes/DelphesFormula.h \ 882 external/ExRootAnalysis/ExRootResult.h \ 883 external/ExRootAnalysis/ExRootFilter.h \ 884 external/ExRootAnalysis/ExRootClassifier.h 885 tmp/modules/VertexFinder.$(ObjSuf): \ 886 modules/VertexFinder.$(SrcSuf) \ 887 modules/VertexFinder.h \ 888 classes/DelphesClasses.h \ 889 classes/DelphesFactory.h \ 890 classes/DelphesFormula.h \ 891 classes/DelphesPileUpReader.h \ 892 external/ExRootAnalysis/ExRootResult.h \ 893 external/ExRootAnalysis/ExRootFilter.h \ 894 external/ExRootAnalysis/ExRootClassifier.h 895 tmp/modules/VertexSorter.$(ObjSuf): \ 896 modules/VertexSorter.$(SrcSuf) \ 897 modules/VertexSorter.h \ 898 classes/DelphesClasses.h \ 899 classes/DelphesFactory.h \ 900 classes/DelphesFormula.h \ 901 classes/DelphesPileUpReader.h \ 860 902 external/ExRootAnalysis/ExRootResult.h \ 861 903 external/ExRootAnalysis/ExRootFilter.h \ … … 921 963 tmp/modules/AngularSmearing.$(ObjSuf) \ 922 964 tmp/modules/BTagging.$(ObjSuf) \ 965 tmp/modules/BeamSpotFilter.$(ObjSuf) \ 923 966 tmp/modules/Calorimeter.$(ObjSuf) \ 924 967 tmp/modules/Cloner.$(ObjSuf) \ … … 952 995 tmp/modules/TrackCountingTauTagging.$(ObjSuf) \ 953 996 tmp/modules/TrackPileUpSubtractor.$(ObjSuf) \ 997 tmp/modules/TrackSmearing.$(ObjSuf) \ 954 998 tmp/modules/TreeWriter.$(ObjSuf) \ 955 999 tmp/modules/UniqueObjectFinder.$(ObjSuf) \ 1000 tmp/modules/VertexFinder.$(ObjSuf) \ 1001 tmp/modules/VertexSorter.$(ObjSuf) \ 956 1002 tmp/modules/Weighter.$(ObjSuf) 957 1003 … … 1558 1604 tmp/external/tcl/tclVar.$(ObjSuf) 1559 1605 1606 modules/TrackSmearing.h: \ 1607 classes/DelphesModule.h 1608 @touch $@ 1609 1560 1610 external/fastjet/ClusterSequence.hh: \ 1561 1611 external/fastjet/PseudoJet.hh \ … … 1815 1865 @touch $@ 1816 1866 1867 modules/VertexSorter.h: \ 1868 classes/DelphesModule.h \ 1869 classes/DelphesClasses.h 1870 @touch $@ 1871 1817 1872 modules/Delphes.h: \ 1818 1873 classes/DelphesModule.h 1874 @touch $@ 1875 1876 modules/VertexFinder.h: \ 1877 classes/DelphesModule.h \ 1878 classes/DelphesClasses.h 1819 1879 @touch $@ 1820 1880 … … 1983 2043 1984 2044 modules/FastJetFinder.h: \ 2045 classes/DelphesModule.h 2046 @touch $@ 2047 2048 modules/BeamSpotFilter.h: \ 1985 2049 classes/DelphesModule.h 1986 2050 @touch $@ -
classes/DelphesClasses.cc
rbc14a10 rc0756c4 41 41 CompBase *Tower::fgCompare = CompE<Tower>::Instance(); 42 42 CompBase *HectorHit::fgCompare = CompE<HectorHit>::Instance(); 43 CompBase *Vertex::fgCompare = CompSumPT2<Vertex>::Instance(); 43 44 CompBase *Candidate::fgCompare = CompMomentumPt<Candidate>::Instance(); 44 45 … … 121 122 Charge(0), Mass(0.0), 122 123 IsPU(0), IsRecoPU(0), IsConstituent(0), IsFromConversion(0), 124 ClusterIndex(-1), ClusterNDF(0), ClusterSigma(0), SumPT2(0), BTVSumPT2(0), GenDeltaZ(0), GenSumPT2(0), 123 125 Flavor(0), FlavorAlgo(0), FlavorPhys(0), 124 126 BTag(0), BTagAlgo(0), BTagPhys(0), … … 127 129 Momentum(0.0, 0.0, 0.0, 0.0), 128 130 Position(0.0, 0.0, 0.0, 0.0), 131 PositionError(0.0, 0.0, 0.0, 0.0), 132 InitialPosition(0.0, 0.0, 0.0, 0.0), 129 133 Area(0.0, 0.0, 0.0, 0.0), 130 Dxy(0), SDxy(0), Xd(0), Yd(0), Zd(0), 134 L(0), 135 D0(0), ErrorD0(0), 136 DZ(0), ErrorDZ(0), 137 P(0), ErrorP(0), 138 PT(0), ErrorPT(0), 139 CtgTheta(0), ErrorCtgTheta(0), 140 Phi(0), ErrorPhi(0), 141 Xd(0), Yd(0), Zd(0), 131 142 TrackResolution(0), 132 143 NCharged(0), … … 245 256 object.IsConstituent = IsConstituent; 246 257 object.IsFromConversion = IsFromConversion; 258 object.ClusterIndex = ClusterIndex; 259 object.ClusterNDF = ClusterNDF; 260 object.ClusterSigma = ClusterSigma; 261 object.SumPT2 = SumPT2; 262 object.BTVSumPT2 = BTVSumPT2; 263 object.GenDeltaZ = GenDeltaZ; 264 object.GenSumPT2 = GenSumPT2; 247 265 object.Flavor = Flavor; 248 266 object.FlavorAlgo = FlavorAlgo; … … 262 280 object.Momentum = Momentum; 263 281 object.Position = Position; 282 object.InitialPosition = InitialPosition; 283 object.PositionError = PositionError; 264 284 object.Area = Area; 265 object.Dxy = Dxy; 266 object.SDxy = SDxy; 285 object.L = L; 286 object.ErrorT = ErrorT; 287 object.D0 = D0; 288 object.ErrorD0 = ErrorD0; 289 object.DZ = DZ; 290 object.ErrorDZ = ErrorDZ; 291 object.P = P; 292 object.ErrorP = ErrorP; 293 object.PT = PT; 294 object.ErrorPT = ErrorPT; 295 object.CtgTheta = CtgTheta ; 296 object.ErrorCtgTheta = ErrorCtgTheta; 297 object.Phi = Phi; 298 object.ErrorPhi = ErrorPhi; 267 299 object.Xd = Xd; 268 300 object.Yd = Yd; … … 282 314 object.SumPtChargedPU = SumPtChargedPU; 283 315 object.SumPt = SumPt; 284 316 object.ClusterIndex = ClusterIndex; 317 object.ClusterNDF = ClusterNDF; 318 object.ClusterSigma = ClusterSigma; 319 object.SumPT2 = SumPT2; 320 285 321 object.FracPt[0] = FracPt[0]; 286 322 object.FracPt[1] = FracPt[1]; … … 363 399 Momentum.SetXYZT(0.0, 0.0, 0.0, 0.0); 364 400 Position.SetXYZT(0.0, 0.0, 0.0, 0.0); 401 InitialPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 365 402 Area.SetXYZT(0.0, 0.0, 0.0, 0.0); 366 Dxy = 0.0; 367 SDxy = 0.0; 403 L = 0.0; 404 ErrorT = 0.0; 405 D0 = 0.0; 406 ErrorD0 = 0.0; 407 DZ = 0.0; 408 ErrorDZ = 0.0; 409 P =0.0; 410 ErrorP =0.0; 411 PT = 0.0; 412 ErrorPT = 0.0; 413 CtgTheta = 0.0; 414 ErrorCtgTheta = 0.0; 415 Phi = 0.0; 416 ErrorPhi = 0.0; 368 417 Xd = 0.0; 369 418 Yd = 0.0; … … 387 436 SumPt = -999; 388 437 438 ClusterIndex = -1; 439 ClusterNDF = -99; 440 ClusterSigma = 0.0; 441 SumPT2 = 0.0; 442 BTVSumPT2 = 0.0; 443 GenDeltaZ = 0.0; 444 GenSumPT2 = 0.0; 445 389 446 FracPt[0] = 0.0; 390 447 FracPt[1] = 0.0; -
classes/DelphesClasses.h
rbc14a10 rc0756c4 147 147 Float_t Pz; // particle momentum vector (z component) | hepevt.phep[number][2] 148 148 149 Float_t PT; // particle transverse momentum 149 Float_t D0; 150 Float_t DZ; 151 Float_t P; 152 Float_t PT; 153 Float_t CtgTheta; 154 Float_t Phi; 150 155 Float_t Eta; // particle pseudorapidity 151 Float_t Phi; // particle azimuthal angle152 153 156 Float_t Rapidity; // particle rapidity 154 157 … … 168 171 //--------------------------------------------------------------------------- 169 172 170 class Vertex: public TObject173 class Vertex: public SortableObject 171 174 { 172 175 public: … … 175 178 Float_t Y; // vertex position (y component) 176 179 Float_t Z; // vertex position (z component) 177 178 ClassDef(Vertex, 1) 180 181 Double_t ErrorX; 182 Double_t ErrorY; 183 Double_t ErrorZ; 184 185 Int_t Index; 186 Int_t NDF; 187 Double_t Sigma; 188 Double_t SumPT2; 189 Double_t BTVSumPT2; 190 Double_t GenDeltaZ; 191 Double_t GenSumPT2; 192 193 static CompBase *fgCompare; //! 194 const CompBase *GetCompare() const { return fgCompare; } 195 196 ClassDef(Vertex, 3) 179 197 }; 180 198 … … 397 415 Int_t Charge; // track charge 398 416 399 Float_t PT; // track transverse momentum400 401 417 Float_t Eta; // track pseudorapidity 402 Float_t Phi; // track azimuthal angle 403 418 404 419 Float_t EtaOuter; // track pseudorapidity at the tracker edge 405 420 Float_t PhiOuter; // track azimuthal angle at the tracker edge … … 415 430 Float_t TOuter; // track position (z component) at the tracker edge 416 431 417 Float_t Dxy; // track signed transverse impact parameter 418 Float_t SDxy; // signed error on the track signed transverse impact parameter 432 Float_t L; // track path length 433 Float_t ErrorT; // error on the time measurement 434 435 Float_t D0; // track signed transverse impact parameter 436 Float_t ErrorD0; // signed error on the track signed transverse impact parameter 437 438 Float_t DZ; // track transverse momentum 439 Float_t ErrorDZ; // track transverse momentum error 440 441 Float_t P; // track transverse momentum 442 Float_t ErrorP; // track transverse momentum error 443 444 Float_t PT; // track transverse momentum 445 Float_t ErrorPT; // track transverse momentum error 446 447 Float_t CtgTheta; // track transverse momentum 448 Float_t ErrorCtgTheta; // track transverse momentum error 449 450 Float_t Phi; // track azimuthal angle 451 Float_t ErrorPhi; // track azimuthal angle 452 419 453 Float_t Xd; // X coordinate of point of closest approach to vertex 420 454 Float_t Yd; // Y coordinate of point of closest approach to vertex … … 423 457 TRef Particle; // reference to generated particle 424 458 459 Int_t VertexIndex; // reference to vertex 460 425 461 static CompBase *fgCompare; //! 426 462 const CompBase *GetCompare() const { return fgCompare; } … … 526 562 Float_t DeltaPhi; 527 563 528 TLorentzVector Momentum, Position, Area; 529 530 Float_t Dxy; 531 Float_t SDxy; 564 TLorentzVector Momentum, Position, InitialPosition, PositionError, Area; 565 566 Float_t L; // path length 567 Float_t ErrorT; // path length 568 Float_t D0; 569 Float_t ErrorD0; 570 Float_t DZ; 571 Float_t ErrorDZ; 572 Float_t P; 573 Float_t ErrorP; 574 Float_t PT; 575 Float_t ErrorPT; 576 Float_t CtgTheta; 577 Float_t ErrorCtgTheta; 578 Float_t Phi; 579 Float_t ErrorPhi; 580 532 581 Float_t Xd; 533 582 Float_t Yd; … … 562 611 Float_t SumPt; 563 612 613 // vertex variables 614 615 Int_t ClusterIndex; 616 Int_t ClusterNDF; 617 Double_t ClusterSigma; 618 Double_t SumPT2; 619 Double_t BTVSumPT2; 620 Double_t GenDeltaZ; 621 Double_t GenSumPT2; 622 564 623 // N-subjettiness variables 565 624 … … 595 654 void SetFactory(DelphesFactory *factory) { fFactory = factory; } 596 655 597 ClassDef(Candidate, 4)656 ClassDef(Candidate, 5) 598 657 }; 599 658 -
classes/SortableObject.h
rbc14a10 rc0756c4 156 156 return -1; 157 157 else if(t1->ET < t2->ET) 158 return 1; 159 else 160 return 0; 161 } 162 }; 163 164 //--------------------------------------------------------------------------- 165 166 template <typename T> 167 class CompSumPT2: public CompBase 168 { 169 CompSumPT2() {} 170 public: 171 static CompSumPT2 *Instance() 172 { 173 static CompSumPT2 single; 174 return &single; 175 } 176 177 Int_t Compare(const TObject *obj1, const TObject *obj2) const 178 { 179 const T *t1 = static_cast<const T*>(obj1); 180 const T *t2 = static_cast<const T*>(obj2); 181 if(t1->SumPT2 > t2->SumPT2) 182 return -1; 183 else if(t1->SumPT2 < t2->SumPT2) 158 184 return 1; 159 185 else -
doc/genMakefile.tcl
rbc14a10 rc0756c4 263 263 executableDeps {converters/*.cpp} {examples/*.cpp} 264 264 265 executableDeps {readers/DelphesHepMC.cpp} {readers/DelphesLHEF.cpp} {readers/DelphesSTDHEP.cpp} 265 executableDeps {readers/DelphesHepMC.cpp} {readers/DelphesLHEF.cpp} {readers/DelphesSTDHEP.cpp} {readers/DelphesROOT.cpp} 266 266 267 267 puts {ifeq ($(HAS_CMSSW),true)} -
modules/ImpactParameterSmearing.cc
rbc14a10 rc0756c4 96 96 { 97 97 Candidate *candidate, *particle, *mother; 98 Double_t xd, yd, zd, d xy, sx, sy, sz, ddxy;98 Double_t xd, yd, zd, d0, sx, sy, sz, dd0; 99 99 Double_t pt, eta, px, py, phi, e; 100 100 … … 103 103 { 104 104 105 // take momentum before smearing (otherwise apply double smearing on d xy)105 // take momentum before smearing (otherwise apply double smearing on d0) 106 106 particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0)); 107 107 … … 131 131 132 132 // calculate impact parameter (after-smearing) 133 d xy= (xd*py - yd*px)/pt;133 d0 = (xd*py - yd*px)/pt; 134 134 135 dd xy= gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e));135 dd0 = gRandom->Gaus(0.0, fFormula->Eval(pt, eta, phi, e)); 136 136 137 137 // fill smeared values in candidate … … 143 143 candidate->Zd = zd; 144 144 145 candidate->D xy = dxy;146 candidate-> SDxy = ddxy;145 candidate->D0 = d0; 146 candidate->ErrorD0 = dd0; 147 147 148 148 candidate->AddCandidate(mother); -
modules/ModulesLinkDef.h
rbc14a10 rc0756c4 35 35 #include "modules/EnergySmearing.h" 36 36 #include "modules/MomentumSmearing.h" 37 #include "modules/TrackSmearing.h" 37 38 #include "modules/ImpactParameterSmearing.h" 38 39 #include "modules/TimeSmearing.h" … … 57 58 #include "modules/StatusPidFilter.h" 58 59 #include "modules/PdgCodeFilter.h" 60 #include "modules/BeamSpotFilter.h" 59 61 #include "modules/Cloner.h" 60 62 #include "modules/Weighter.h" … … 62 64 #include "modules/JetFlavorAssociation.h" 63 65 #include "modules/JetFakeParticle.h" 66 #include "modules/VertexSorter.h" 67 #include "modules/VertexFinder.h" 68 #include "modules/VertexFinderDA4D.h" 64 69 #include "modules/ExampleModule.h" 65 70 … … 79 84 #pragma link C++ class EnergySmearing+; 80 85 #pragma link C++ class MomentumSmearing+; 86 #pragma link C++ class TrackSmearing+; 81 87 #pragma link C++ class ImpactParameterSmearing+; 82 88 #pragma link C++ class TimeSmearing+; … … 101 107 #pragma link C++ class StatusPidFilter+; 102 108 #pragma link C++ class PdgCodeFilter+; 109 #pragma link C++ class BeamSpotFilter+; 103 110 #pragma link C++ class Cloner+; 104 111 #pragma link C++ class Weighter+; … … 106 113 #pragma link C++ class JetFlavorAssociation+; 107 114 #pragma link C++ class JetFakeParticle+; 115 #pragma link C++ class VertexSorter+; 116 #pragma link C++ class VertexFinder+; 117 #pragma link C++ class VertexFinderDA4D+; 108 118 #pragma link C++ class ExampleModule+; 109 119 -
modules/ParticlePropagator.cc
rbc14a10 rc0756c4 67 67 } 68 68 69 69 70 //------------------------------------------------------------------------------ 70 71 … … 91 92 fItInputArray = fInputArray->MakeIterator(); 92 93 94 // import beamspot 95 try 96 { 97 fBeamSpotInputArray = ImportArray(GetString("BeamSpotInputArray", "BeamSpotFilter/beamSpotParticle")); 98 } 99 catch(runtime_error &e) 100 { 101 fBeamSpotInputArray = 0; 102 } 93 103 // create output arrays 94 104 … … 111 121 { 112 122 Candidate *candidate, *mother; 113 TLorentzVector candidatePosition, candidateMomentum ;123 TLorentzVector candidatePosition, candidateMomentum, beamSpotPosition; 114 124 Double_t px, py, pz, pt, pt2, e, q; 115 125 Double_t x, y, z, t, r, phi; … … 120 130 Double_t tmp, discr, discr2; 121 131 Double_t delta, gammam, omega, asinrho; 122 Double_t rcu, rc2, dxy, xd, yd, zd; 123 132 Double_t rcu, rc2, xd, yd, zd; 133 Double_t l, d0, dz, p, ctgTheta, phip, etap, alpha; 134 Double_t bsx, bsy, bsz; 135 124 136 const Double_t c_light = 2.99792458E8; 125 137 138 if (!fBeamSpotInputArray || fBeamSpotInputArray->GetSize () == 0) 139 beamSpotPosition.SetXYZT(0.0, 0.0, 0.0, 0.0); 140 else 141 { 142 Candidate &beamSpotCandidate = *((Candidate *) fBeamSpotInputArray->At(0)); 143 beamSpotPosition = beamSpotCandidate.Position; 144 } 145 126 146 fItInputArray->Reset(); 127 147 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) … … 132 152 y = candidatePosition.Y()*1.0E-3; 133 153 z = candidatePosition.Z()*1.0E-3; 154 155 bsx = beamSpotPosition.X()*1.0E-3; 156 bsy = beamSpotPosition.Y()*1.0E-3; 157 bsz = beamSpotPosition.Z()*1.0E-3; 158 134 159 q = candidate->Charge; 135 160 … … 181 206 y_t = y + py*t; 182 207 z_t = z + pz*t; 208 209 l = TMath::Sqrt( (x_t - x)*(x_t - x) + (y_t - y)*(y_t - y) + (z_t - z)*(z_t - z)); 183 210 184 211 mother = candidate; 185 212 candidate = static_cast<Candidate*>(candidate->Clone()); 186 213 214 candidate->InitialPosition = candidatePosition; 187 215 candidate->Position.SetXYZT(x_t*1.0E3, y_t*1.0E3, z_t*1.0E3, candidatePosition.T() + t*e*1.0E3); 188 216 candidate->L = l*1.0E3; 217 189 218 candidate->Momentum = candidateMomentum; 190 219 candidate->AddCandidate(mother); … … 238 267 yd = (rc2 > 0.0) ? yd / rc2 : -999; 239 268 zd = z + (TMath::Sqrt(xd*xd + yd*yd) - TMath::Sqrt(x*x + y*y))*pz/pt; 240 241 // calculate impact paramater 242 dxy = (xd*py - yd*px)/pt; 243 269 270 // use perigee momentum rather than original particle 271 // momentum, since the orignal particle momentum isn't known 272 273 px = TMath::Sign(1.0,r) * pt * (-y_c / r_c); 274 py = TMath::Sign(1.0,r) * pt * (x_c / r_c); 275 etap = candidateMomentum.Eta(); 276 phip = TMath::ATan2(py, px); 277 278 candidateMomentum.SetPtEtaPhiE(pt, etap, phip, candidateMomentum.E()); 279 280 // calculate additional track parameters (correct for beamspot position) 281 282 d0 = ( (x - bsx) * py - (y - bsy) * px) / pt; 283 dz = z - ((x - bsx) * px + (y - bsy) * py) / pt * (pz / pt); 284 p = candidateMomentum.P(); 285 ctgTheta = 1.0 / TMath::Tan (candidateMomentum.Theta ()); 286 244 287 // 3. time evaluation t = TMath::Min(t_r, t_z) 245 288 // t_r : time to exit from the sides … … 287 330 r_t = TMath::Hypot(x_t, y_t); 288 331 332 333 // compute path length for an helix 334 335 alpha = pz*1.0E9 / c_light / gammam; 336 l = t * TMath::Sqrt(alpha*alpha + r*r*omega*omega); 337 289 338 if(r_t > 0.0) 290 339 { 340 341 // store these variables before cloning 342 343 candidate->D0 = d0*1.0E3; 344 candidate->DZ = dz*1.0E3; 345 candidate->P = p; 346 candidate->PT = pt; 347 candidate->CtgTheta = ctgTheta; 348 candidate->Phi = phip; 349 291 350 mother = candidate; 292 351 candidate = static_cast<Candidate*>(candidate->Clone()); 293 352 353 candidate->InitialPosition = candidatePosition; 294 354 candidate->Position.SetXYZT(x_t*1.0E3, y_t*1.0E3, z_t*1.0E3, candidatePosition.T() + t*c_light*1.0E3); 295 355 296 356 candidate->Momentum = candidateMomentum; 297 candidate->Dxy = dxy*1.0E3; 298 candidate->Xd = xd*1.0E3; 357 358 candidate->L = l*1.0E3; 359 360 candidate->Xd = xd*1.0E3; 299 361 candidate->Yd = yd*1.0E3; 300 362 candidate->Zd = zd*1.0E3; -
modules/ParticlePropagator.h
rbc14a10 rc0756c4 35 35 class TClonesArray; 36 36 class TIterator; 37 class TLorentzVector; 37 38 38 39 class ParticlePropagator: public DelphesModule … … 55 56 56 57 const TObjArray *fInputArray; //! 58 const TObjArray *fBeamSpotInputArray; //! 57 59 58 60 TObjArray *fOutputArray; //! -
modules/PileUpMerger.cc
rbc14a10 rc0756c4 115 115 TDatabasePDG *pdg = TDatabasePDG::Instance(); 116 116 TParticlePDG *pdgParticle; 117 Int_t pid ;117 Int_t pid, nch, nvtx = -1; 118 118 Float_t x, y, z, t, vx, vy; 119 Float_t px, py, pz, e ;120 Double_t dz, dphi, dt ;119 Float_t px, py, pz, e, pt; 120 Double_t dz, dphi, dt, sumpt2, dz0, dt0; 121 121 Int_t numberOfEvents, event, numberOfParticles; 122 122 Long64_t allEntries, entry; … … 132 132 fFunction->GetRandom2(dz, dt); 133 133 134 dz0 = -1.0e6; 135 dt0 = -1.0e6; 136 134 137 dt *= c_light*1.0E3; // necessary in order to make t in mm/c 135 138 dz *= 1.0E3; // necessary in order to make z in mm 139 140 //cout<<dz<<","<<dt<<endl; 141 136 142 vx = 0.0; 137 143 vy = 0.0; 144 138 145 numberOfParticles = fInputArray->GetEntriesFast(); 146 nch = 0; 147 sumpt2 = 0.0; 148 139 149 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 140 150 { … … 143 153 z = candidate->Position.Z(); 144 154 t = candidate->Position.T(); 145 candidate->Position.SetZ(z + dz); 146 candidate->Position.SetT(t + dt); 155 pt = candidate->Momentum.Pt(); 156 157 // take postion and time from first stable particle 158 if (dz0 < -999999.0) 159 dz0 = z; 160 if (dt0 < -999999.0) 161 dt0 = t; 162 163 // cancel any possible offset in position and time the input file 164 candidate->Position.SetZ(z - dz0 + dz); 165 candidate->Position.SetT(t - dt0 + dt); 166 147 167 fParticleOutputArray->Add(candidate); 148 } 149 168 169 if(TMath::Abs(candidate->Charge) > 1.0E-9) 170 { 171 nch++; 172 sumpt2 += pt*pt; 173 } 174 } 175 150 176 if(numberOfParticles > 0) 151 177 { 152 vx /= numberOfParticles; 153 vy /= numberOfParticles; 154 } 155 178 vx /= sumpt2; 179 vy /= sumpt2; 180 } 181 182 nvtx++; 156 183 factory = GetFactory(); 157 184 158 185 vertex = factory->NewCandidate(); 159 186 vertex->Position.SetXYZT(vx, vy, dz, dt); 187 vertex->ClusterIndex = nvtx; 188 vertex->ClusterNDF = nch; 189 vertex->SumPT2 = sumpt2; 190 vertex->GenSumPT2 = sumpt2; 191 160 192 fVertexOutputArray->Add(vertex); 161 193 … … 170 202 numberOfEvents = gRandom->Integer(2*fMeanPileUp + 1); 171 203 break; 204 case 2: 205 numberOfEvents = fMeanPileUp; 206 break; 172 207 default: 173 208 numberOfEvents = gRandom->Poisson(fMeanPileUp); … … 198 233 vx = 0.0; 199 234 vy = 0.0; 235 200 236 numberOfParticles = 0; 237 sumpt2 = 0.0; 238 201 239 while(fReader->ReadParticle(pid, x, y, z, t, px, py, pz, e)) 202 240 { … … 224 262 vx += candidate->Position.X(); 225 263 vy += candidate->Position.Y(); 264 226 265 ++numberOfParticles; 227 266 if(TMath::Abs(candidate->Charge) > 1.0E-9) 267 { 268 nch++; 269 sumpt2 += pt*pt; 270 } 271 228 272 fParticleOutputArray->Add(candidate); 229 273 } … … 234 278 vy /= numberOfParticles; 235 279 } 280 281 nvtx++; 236 282 237 283 vertex = factory->NewCandidate(); 238 284 vertex->Position.SetXYZT(vx, vy, dz, dt); 285 286 vertex->ClusterIndex = nvtx; 287 vertex->ClusterNDF = nch; 288 vertex->SumPT2 = sumpt2; 289 vertex->GenSumPT2 = sumpt2; 290 239 291 vertex->IsPU = 1; 240 292 241 293 fVertexOutputArray->Add(vertex); 242 } 243 } 244 245 //------------------------------------------------------------------------------ 294 295 } 296 } 297 298 //------------------------------------------------------------------------------ -
modules/SimpleCalorimeter.cc
rbc14a10 rc0756c4 366 366 energy = momentum.E() * fTrackFractions[number]; 367 367 368 fTrackTime += TMath::Sqrt(energy)*position.T();369 fTrackTimeWeight += TMath::Sqrt(energy);368 fTrackTime += energy*position.T(); 369 fTrackTimeWeight += energy; 370 370 371 371 if(fTrackFractions[number] > 1.0E-9) … … 403 403 fTowerEnergy += energy; 404 404 405 fTowerTime += TMath::Sqrt(energy)*position.T();406 fTowerTimeWeight += TMath::Sqrt(energy);405 fTowerTime += energy*position.T(); 406 fTowerTimeWeight += energy; 407 407 408 408 fTower->AddCandidate(particle); -
modules/TimeSmearing.cc
rbc14a10 rc0756c4 93 93 { 94 94 Candidate *candidate, *mother; 95 Double_t t ;95 Double_t ti, tf_smeared, tf; 96 96 const Double_t c_light = 2.99792458E8; 97 97 … … 99 99 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 100 100 { 101 const TLorentzVector &candidatePosition = candidate->Position; 102 t = candidatePosition.T()*1.0E-3/c_light; 101 const TLorentzVector &candidateInitialPosition = candidate->InitialPosition; 102 const TLorentzVector &candidateFinalPosition = candidate->Position; 103 104 ti = candidateInitialPosition.T()*1.0E-3/c_light; 105 tf = candidateFinalPosition.T()*1.0E-3/c_light; 103 106 104 107 // apply smearing formula 105 t = gRandom->Gaus(t, fTimeResolution); 108 tf_smeared = gRandom->Gaus(tf, fTimeResolution); 109 ti = ti + tf_smeared - tf; 106 110 107 111 mother = candidate; 108 112 candidate = static_cast<Candidate*>(candidate->Clone()); 109 candidate->Position.SetT(t*1.0E3*c_light); 113 candidate->InitialPosition.SetT(ti*1.0E3*c_light); 114 candidate->Position.SetT(tf*1.0E3*c_light); 115 116 candidate->ErrorT = fTimeResolution*1.0E3*c_light; 110 117 111 118 candidate->AddCandidate(mother); -
modules/TrackCountingBTagging.cc
rbc14a10 rc0756c4 96 96 97 97 Double_t jpx, jpy; 98 Double_t dr, tp x, tpy, tpt;99 Double_t xd, yd, d xy, ddxy, ip, sip;98 Double_t dr, tpt; 99 Double_t xd, yd, d0, dd0, ip, sip; 100 100 101 101 Int_t sign; … … 117 117 { 118 118 const TLorentzVector &trkMomentum = track->Momentum; 119 119 120 120 dr = jetMomentum.DeltaR(trkMomentum); 121 122 121 tpt = trkMomentum.Pt(); 123 tpx = trkMomentum.Px();124 tpy = trkMomentum.Py();125 126 122 xd = track->Xd; 127 123 yd = track->Yd; 128 d xy= TMath::Hypot(xd, yd);129 dd xy = track->SDxy;124 d0 = TMath::Hypot(xd, yd); 125 dd0 = track->ErrorD0; 130 126 131 127 if(tpt < fPtMin) continue; 132 128 if(dr > fDeltaR) continue; 133 if(d xy> fIPmax) continue;129 if(d0 > fIPmax) continue; 134 130 135 131 sign = (jpx*xd + jpy*yd > 0.0) ? 1 : -1; 136 132 137 ip = sign*d xy;138 sip = ip / TMath::Abs(dd xy);133 ip = sign*d0; 134 sip = ip / TMath::Abs(dd0); 139 135 140 136 if(sip > fSigMin) count++; -
modules/TreeWriter.cc
rbc14a10 rc0756c4 215 215 entry->Pz = momentum.Pz(); 216 216 217 entry->D0 = candidate->D0; 218 entry->DZ = candidate->DZ; 219 entry->P = candidate->P; 220 entry->PT = candidate->PT; 221 entry->CtgTheta = candidate->CtgTheta; 222 entry->Phi = candidate->Phi; 223 217 224 entry->Eta = eta; 218 225 entry->Phi = momentum.Phi(); … … 237 244 238 245 const Double_t c_light = 2.99792458E8; 239 246 247 Double_t x, y, z, t, xError, yError, zError, sigma, sumPT2, btvSumPT2, genDeltaZ, genSumPT2; 248 UInt_t index, ndf; 249 250 array->Sort(); 251 240 252 // loop over all vertices 241 253 iterator.Reset(); 242 254 while((candidate = static_cast<Candidate*>(iterator.Next()))) 243 255 { 244 const TLorentzVector &position = candidate->Position; 256 257 index = candidate->ClusterIndex; 258 ndf = candidate->ClusterNDF; 259 sigma = candidate->ClusterSigma; 260 sumPT2 = candidate->SumPT2; 261 btvSumPT2 = candidate->BTVSumPT2; 262 genDeltaZ = candidate->GenDeltaZ; 263 genSumPT2 = candidate->GenSumPT2; 264 265 x = candidate->Position.X(); 266 y = candidate->Position.Y(); 267 z = candidate->Position.Z(); 268 t = candidate->Position.T()*1.0E-3/c_light; 269 270 xError = candidate->PositionError.X (); 271 yError = candidate->PositionError.Y (); 272 zError = candidate->PositionError.Z (); 245 273 246 274 entry = static_cast<Vertex*>(branch->NewEntry()); 247 275 248 entry->X = position.X(); 249 entry->Y = position.Y(); 250 entry->Z = position.Z(); 251 entry->T = position.T()*1.0E-3/c_light; 252 } 253 } 276 entry->Index = index; 277 entry->NDF = ndf; 278 entry->Sigma = sigma; 279 entry->SumPT2 = sumPT2; 280 entry->BTVSumPT2 = btvSumPT2; 281 entry->GenDeltaZ = genDeltaZ; 282 entry->GenSumPT2 = genSumPT2; 283 284 entry->X = x; 285 entry->Y = y; 286 entry->Z = z; 287 entry->T = t; 288 289 entry->ErrorX = xError; 290 entry->ErrorY = yError; 291 entry->ErrorZ = zError; 292 } 293 } 294 254 295 255 296 //------------------------------------------------------------------------------ … … 291 332 entry->ZOuter = position.Z(); 292 333 entry->TOuter = position.T()*1.0E-3/c_light; 293 294 entry->Dxy = candidate->Dxy; 295 entry->SDxy = candidate->SDxy ; 334 335 entry->L = candidate->L; 336 337 entry->D0 = candidate->D0; 338 entry->ErrorD0 = candidate->ErrorD0; 339 entry->DZ = candidate->DZ; 340 entry->ErrorDZ = candidate->ErrorDZ; 341 entry->P = candidate->P; 342 entry->ErrorP = candidate->ErrorP; 343 entry->PT = candidate->PT; 344 entry->ErrorPT = candidate->ErrorPT; 345 entry->CtgTheta = candidate->CtgTheta; 346 entry->ErrorCtgTheta = candidate->ErrorCtgTheta; 347 entry->Phi = candidate->Phi; 348 entry->ErrorPhi = candidate->ErrorPhi; 349 296 350 entry->Xd = candidate->Xd; 297 351 entry->Yd = candidate->Yd; … … 307 361 308 362 entry->Eta = eta; 309 entry->Phi = momentum.Phi(); 310 entry->PT = pt; 311 363 312 364 particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0)); 313 365 const TLorentzVector &initialPosition = particle->Position; … … 319 371 320 372 entry->Particle = particle; 373 374 entry->VertexIndex = candidate->ClusterIndex; 375 321 376 } 322 377 } -
readers/DelphesCMSFWLite.cpp
rbc14a10 rc0756c4 240 240 241 241 branchEvent = treeWriter->NewBranch("Event", HepMCEvent::Class()); 242 branchRwgt = treeWriter->NewBranch(" Rwgt", Weight::Class());242 branchRwgt = treeWriter->NewBranch("Weight", Weight::Class()); 243 243 244 244 confReader = new ExRootConfReader;
Note:
See TracChangeset
for help on using the changeset viewer.