Changes in modules/TrackTimingPileUpSubtractor.cc [9117aaa4:7939c6c] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/TrackTimingPileUpSubtractor.cc
r9117aaa4 r7939c6c 75 75 76 76 // read resolution formula in m 77 fFormula->Compile(GetString("ZVertexResolution", "0.001")); 77 fChargedMinSignificance = GetDouble("ChargedMinSignificance", 3); 78 fNeutralMinSignificance = GetDouble("NeutralMinSignificance", 3); 78 79 79 80 fPTMin = GetDouble("PTMin", 0.); … … 128 129 Double_t tempPTSquare = 0; 129 130 Double_t pt, eta, phi, e; 130 Double_t distance = 0;131 Double_t distanceCharged, distanceNeutral = 0; 131 132 132 133 // find z position of primary vertex … … 166 167 z = particle->Position.Z(); 167 168 z_err = particle->PositionError.Z(); 168 t = particle-> Position.T();169 t = particle->InitialPosition.T(); 169 170 t_err = particle->PositionError.T(); 170 171 171 // apply pile-up subtraction 172 distance = pow((zvtx - z),2)/pow((zvtx_err - z_err),2) + pow((tvtx - t),2)/pow((tvtx_err - t_err),2); 173 // here I calculated distance using Z and T of selected vertex (highest sum Pt square) and particles 174 // however z_err of vertices is gives 0 because of using CMS trackResolutionCMS.tcl (in that formula, there is limitation on |eta| < 2.5) 175 // thats why I used TMath::Abs(z - zvtx) < 0.005 && TMath::Abs(t - tvtx) < 5.0 172 distanceCharged = pow((zvtx - z),2)/pow((zvtx_err - z_err),2) + pow((tvtx - t),2)/pow((tvtx_err - t_err),2); 173 distanceNeutral = pow((tvtx - t),2)/pow((tvtx_err - t_err),2); 176 174 177 if(candidate->Charge != 0 && TMath::Abs(z - zvtx) < 0.005 && TMath::Abs(t - tvtx) < 5.0)175 if(candidate->Charge != 0 && distanceCharged < fChargedMinSignificance) 178 176 { 179 177 candidate->IsRecoPU = 1; 180 178 } 179 else if(candidate->Charge == 0 && distanceNeutral < fNeutralMinSignificance) 180 { 181 candidate->IsRecoPU = 1; 182 } 181 183 else 182 184 {
Note:
See TracChangeset
for help on using the changeset viewer.