- Timestamp:
- May 18, 2016, 5:17:11 PM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- b291b0b
- Parents:
- bc4bff0
- Location:
- modules
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/PileUpMerger.cc
rbc4bff0 r2118a6a 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; 121 121 Int_t numberOfEvents, event, numberOfParticles; 122 122 Long64_t allEntries, entry; … … 137 137 vy = 0.0; 138 138 numberOfParticles = fInputArray->GetEntriesFast(); 139 nch = 0; 140 sumpt2 = 0.0; 141 139 142 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 140 143 { … … 143 146 z = candidate->Position.Z(); 144 147 t = candidate->Position.T(); 148 pt = candidate->Momentum.Pt(); 145 149 candidate->Position.SetZ(z + dz); 146 150 candidate->Position.SetT(t + dt); 147 151 fParticleOutputArray->Add(candidate); 152 153 if(TMath::Abs(candidate->Charge) > 1.0E-9) 154 { 155 nch++; 156 sumpt2 += pt*pt; 157 } 148 158 } 149 159 … … 154 164 } 155 165 166 nvtx++; 156 167 factory = GetFactory(); 157 168 158 169 vertex = factory->NewCandidate(); 159 170 vertex->Position.SetXYZT(vx, vy, dz, dt); 171 vertex->ClusterIndex = nvtx; 172 vertex->ClusterNDF = nch; 173 vertex->SumPT2 = sumpt2; 174 vertex->GenSumPT2 = sumpt2; 175 160 176 fVertexOutputArray->Add(vertex); 161 177 … … 201 217 vx = 0.0; 202 218 vy = 0.0; 219 203 220 numberOfParticles = 0; 221 sumpt2 = 0.0; 222 204 223 while(fReader->ReadParticle(pid, x, y, z, t, px, py, pz, e)) 205 224 { … … 227 246 vx += candidate->Position.X(); 228 247 vy += candidate->Position.Y(); 248 229 249 ++numberOfParticles; 230 250 if(TMath::Abs(candidate->Charge) > 1.0E-9) 251 { 252 nch++; 253 sumpt2 += pt*pt; 254 } 255 231 256 fParticleOutputArray->Add(candidate); 232 257 } … … 237 262 vy /= numberOfParticles; 238 263 } 264 265 nvtx++; 239 266 240 267 vertex = factory->NewCandidate(); 241 268 vertex->Position.SetXYZT(vx, vy, dz, dt); 269 270 vertex->ClusterIndex = nvtx; 271 vertex->ClusterNDF = nch; 272 vertex->SumPT2 = sumpt2; 273 vertex->GenSumPT2 = sumpt2; 274 242 275 vertex->IsPU = 1; 243 276 244 277 fVertexOutputArray->Add(vertex); 245 } 246 } 247 248 //------------------------------------------------------------------------------ 278 279 } 280 } 281 282 //------------------------------------------------------------------------------ -
modules/VertexFinder.cc
rbc4bff0 r2118a6a 278 278 continue; 279 279 280 Double_t sz_tr = track->second.at ("ez") * track->second.at ("z");281 Double_t sz_vt = clusterIDToDouble.at (clusterIndex).at ("ez") * clusterIDToDouble.at (clusterIndex).at ("z");282 283 280 Double_t distance = fabs (clusterIDToDouble.at (clusterIndex).at ("z") - track->second.at ("z")) / hypot (clusterIDToDouble.at (clusterIndex).at ("ez"), track->second.at ("ez")); 284 281 if (nearestDistance < 0.0 || distance < nearestDistance) -
modules/VertexSorter.cc
rbc4bff0 r2118a6a 53 53 void VertexSorter::Init() 54 54 { 55 fInputArray = ImportArray(GetString("InputArray", "VertexFinder/ clusters"));55 fInputArray = ImportArray(GetString("InputArray", "VertexFinder/vertices")); 56 56 57 57 fTrackInputArray = ImportArray(GetString("TrackInputArray", "VertexFinder/tracks"));
Note:
See TracChangeset
for help on using the changeset viewer.