Changeset 341014c in git for modules/TrackCountingBTagging.cc
- Timestamp:
- Feb 12, 2019, 9:29:17 PM (6 years ago)
- Branches:
- ImprovedOutputFile, Timing, llp, master
- Children:
- 6455202
- Parents:
- 45e58be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TrackCountingBTagging.cc
r45e58be r341014c 17 17 */ 18 18 19 20 19 /** \class TrackCountingBTagging 21 20 * … … 32 31 #include "classes/DelphesFormula.h" 33 32 33 #include "TFormula.h" 34 #include "TLorentzVector.h" 34 35 #include "TMath.h" 36 #include "TObjArray.h" 37 #include "TRandom3.h" 35 38 #include "TString.h" 36 #include "TFormula.h"37 #include "TRandom3.h"38 #include "TObjArray.h"39 #include "TLorentzVector.h"40 39 41 40 #include <algorithm> 42 #include <stdexcept>43 41 #include <iostream> 44 42 #include <sstream> 43 #include <stdexcept> 45 44 46 45 using namespace std; … … 107 106 // loop over all input jets 108 107 fItJetInputArray->Reset(); 109 while((jet = static_cast<Candidate *>(fItJetInputArray->Next())))108 while((jet = static_cast<Candidate *>(fItJetInputArray->Next()))) 110 109 { 111 110 const TLorentzVector &jetMomentum = jet->Momentum; … … 118 117 count = 0; 119 118 // stop once we have enough tracks 120 while((track = static_cast<Candidate *>(fItTrackInputArray->Next())) and count < fNtracks)119 while((track = static_cast<Candidate *>(fItTrackInputArray->Next())) and count < fNtracks) 121 120 { 122 121 const TLorentzVector &trkMomentum = track->Momentum; 123 122 tpt = trkMomentum.Pt(); 124 123 if(tpt < fPtMin) continue; 125 124 126 125 d0 = TMath::Abs(track->D0); 127 126 if(d0 > fIPmax) continue; … … 137 136 ddz = TMath::Abs(track->ErrorDZ); 138 137 139 if(fUse3D){ 140 sign = (jpx*xd + jpy*yd + jpz*zd > 0.0) ? 1 : -1; 138 if(fUse3D) 139 { 140 sign = (jpx * xd + jpy * yd + jpz * zd > 0.0) ? 1 : -1; 141 141 //add transverse and longitudinal significances in quadrature 142 sip = sign * TMath::Sqrt( TMath::Power(d0 / dd0, 2) + TMath::Power(dz / ddz, 2));142 sip = sign * TMath::Sqrt(TMath::Power(d0 / dd0, 2) + TMath::Power(dz / ddz, 2)); 143 143 } 144 else { 145 sign = (jpx*xd + jpy*yd > 0.0) ? 1 : -1; 144 else 145 { 146 sign = (jpx * xd + jpy * yd > 0.0) ? 1 : -1; 146 147 sip = sign * d0 / TMath::Abs(dd0); 147 148 }
Note:
See TracChangeset
for help on using the changeset viewer.