Changeset ec37bc3 in git
- Timestamp:
- Jun 6, 2018, 3:30:22 PM (7 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- b24f05a
- Parents:
- 5b51d33
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
cards/CMS_PhaseII/CMS_PhaseII_200PU_v03.tcl
r5b51d33 rec37bc3 1 set RandomSeed 123 2 set MaxEvents 10 3 4 ######################################## 1 5 # 2 6 # Main authors: Michele Selvaggi (CERN) … … 15 19 PileUpMerger 16 20 ParticlePropagator 21 TrackMergerProp 22 23 DenseProp 24 DenseMergeTracks 25 DenseTrackFilter 17 26 18 27 ChargedHadronTrackingEfficiency … … 24 33 MuonMomentumSmearing 25 34 26 DenseProp27 DenseMergeTracks28 TrackMergerProp29 35 TrackMerger 30 36 31 37 ECal 32 38 HCal 39 40 MuonFilter 33 41 34 42 PhotonEnergySmearing … … 182 190 183 191 192 ############## 193 # Track merger 194 ############## 195 196 module Merger TrackMergerProp { 197 # add InputArray InputArray 198 add InputArray ParticlePropagator/chargedHadrons 199 add InputArray ParticlePropagator/electrons 200 add InputArray ParticlePropagator/muons 201 set OutputArray tracks 202 } 203 204 205 ################################# 206 # Dense Track propagation 207 ################################# 208 209 module ParticlePropagator DenseProp { 210 211 set InputArray TrackMergerProp/tracks 212 213 set OutputArray stableParticles 214 set NeutralOutputArray neutralParticles 215 set ChargedHadronOutputArray chargedHadrons 216 set ElectronOutputArray electrons 217 set MuonOutputArray muons 218 219 # radius of the first pixel layer 220 set Radius 0.3 221 set RadiusMax 1.29 222 # half-length of the magnetic field coverage, in m 223 set HalfLength 0.7 224 set HalfLengthMax 3.0 225 226 # magnetic field 227 set Bz 3.8 228 } 229 230 231 #################### 232 # Dense Track merger 233 ################### 234 235 module Merger DenseMergeTracks { 236 # add InputArray InputArray 237 add InputArray DenseProp/chargedHadrons 238 add InputArray DenseProp/electrons 239 add InputArray DenseProp/muons 240 set OutputArray tracks 241 } 242 243 ###################### 244 # Dense Track Filter 245 ###################### 246 247 module DenseTrackFilter DenseTrackFilter { 248 set TrackInputArray DenseMergeTracks/tracks 249 set TrackOutputArray tracks 250 251 set ChargedHadronOutputArray chargedHadrons 252 set ElectronOutputArray electrons 253 set MuonOutputArray muons 254 255 set EtaPhiRes 0.003 256 set EtaMax 4.0 257 258 set pi [expr {acos(-1)}] 259 260 set nbins_phi [expr {$pi/$EtaPhiRes} ] 261 set nbins_phi [expr {int($nbins_phi)} ] 262 263 set PhiBins {} 264 for {set i -$nbins_phi} {$i <= $nbins_phi} {incr i} { 265 add PhiBins [expr {$i * $pi/$nbins_phi}] 266 } 267 268 set nbins_eta [expr {$EtaMax/$EtaPhiRes} ] 269 set nbins_eta [expr {int($nbins_eta)} ] 270 271 for {set i -$nbins_eta} {$i <= $nbins_eta} {incr i} { 272 set eta [expr {$i * $EtaPhiRes}] 273 add EtaPhiBins $eta $PhiBins 274 } 275 276 } 277 184 278 185 279 … … 190 284 module Efficiency ChargedHadronTrackingEfficiency { 191 285 ## particles after propagation 192 set InputArray ParticlePropagator/chargedHadrons286 set InputArray DenseTrackFilter/chargedHadrons 193 287 set OutputArray chargedHadrons 194 288 # tracking efficiency formula for charged hadrons … … 211 305 212 306 module Efficiency ElectronTrackingEfficiency { 213 set InputArray ParticlePropagator/electrons307 set InputArray DenseTrackFilter/electrons 214 308 set OutputArray electrons 215 309 # tracking efficiency formula for electrons … … 234 328 235 329 module Efficiency MuonTrackingEfficiency { 236 set InputArray ParticlePropagator/muons330 set InputArray DenseTrackFilter/muons 237 331 set OutputArray muons 238 332 # tracking efficiency formula for muons … … 351 445 } 352 446 447 448 ############## 449 # Track merger 450 ############## 451 452 module Merger TrackMerger { 453 # add InputArray InputArray 454 add InputArray ChargedHadronMomentumSmearing/chargedHadrons 455 add InputArray ElectronEnergySmearing/electrons 456 add InputArray MuonMomentumSmearing/muons 457 set OutputArray tracks 458 } 459 353 460 ################################# 354 461 # Energy resolution for electrons … … 390 497 } 391 498 392 ############## 393 # Track merger 394 ############## 395 396 module Merger TrackMergerProp { 397 # add InputArray InputArray 398 add InputArray ChargedHadronMomentumSmearing/chargedHadrons 399 add InputArray ElectronEnergySmearing/electrons 400 add InputArray MuonMomentumSmearing/muons 401 set OutputArray tracks 402 } 403 404 405 ################################# 406 # Dense Track propagation 407 ################################# 408 409 module ParticlePropagator DenseProp { 410 set InputArray PileUpMerger/stableParticles 411 412 set OutputArray stableParticles 413 set NeutralOutputArray neutralParticles 414 set ChargedHadronOutputArray chargedHadrons 415 set ElectronOutputArray electrons 416 set MuonOutputArray muons 417 418 # radius of the first pixel layer 419 set Radius 0.3 420 set RadiusMax 1.29 421 # half-length of the magnetic field coverage, in m 422 set HalfLength 0.7 423 set HalfLengthMax 3.0 424 425 # magnetic field 426 set Bz 3.8 427 } 428 429 #################### 430 # Dense Track merger 431 ################### 432 433 module Merger DenseMergeTracks { 434 # add InputArray InputArray 435 add InputArray DenseProp/chargedHadrons 436 add InputArray DenseProp/electrons 437 add InputArray DenseProp/muons 438 set OutputArray tracks 439 } 440 441 ###################### 442 # Dense Track Filter 443 ###################### 444 445 module DenseTrackFilter TrackMerger { 446 set TrackInputArray TrackMergerProp/tracks 447 set DenseChargedInputArray DenseMergeTracks/tracks 448 449 set TrackOutputArray tracks 450 451 set EtaPhiRes 0.003 452 set EtaMax 4.0 453 454 set pi [expr {acos(-1)}] 455 456 set nbins_phi [expr {$pi/$EtaPhiRes} ] 457 set nbins_phi [expr {int($nbins_phi)} ] 458 459 set PhiBins {} 460 for {set i -$nbins_phi} {$i <= $nbins_phi} {incr i} { 461 add PhiBins [expr {$i * $pi/$nbins_phi}] 462 } 463 464 set nbins_eta [expr {$EtaMax/$EtaPhiRes} ] 465 set nbins_eta [expr {int($nbins_eta)} ] 466 467 for {set i -$nbins_eta} {$i <= $nbins_eta} {incr i} { 468 set eta [expr {$i * $EtaPhiRes}] 469 add EtaPhiBins $eta $PhiBins 470 } 471 472 } 499 473 500 474 501 … … 694 721 } 695 722 723 ################# 724 # Muon filter 725 ################# 726 727 module PdgCodeFilter MuonFilter { 728 set InputArray HCal/eflowTracks 729 set OutputArray muons 730 set Invert true 731 add PdgCode {13} 732 add PdgCode {-13} 733 } 734 696 735 697 736 ########################## … … 703 742 add InputArray HCal/eflowTracks eflowTracks 704 743 add InputArray ElectronFilter/electrons electrons 705 add InputArray Muon MomentumSmearing/muons muons744 add InputArray MuonFilter/muons muons 706 745 707 746 set VertexInputArray PileUpMerger/vertices … … 1161 1200 1162 1201 module Cloner MuonCloner { 1163 set InputArray Muon MomentumSmearing/muons1202 set InputArray MuonFilter/muons 1164 1203 set OutputArray muons 1165 1204 } … … 2168 2207 2169 2208 module Isolation MuonIsolation { 2170 set CandidateInputArray Muon MomentumSmearing/muons2209 set CandidateInputArray MuonFilter/muons 2171 2210 2172 2211 # isolation collection … … 4083 4122 add Branch GenMissingET/momentum GenMissingET MissingET 4084 4123 4124 add Branch TrackMerger/tracks TrackMerger Track 4125 add Branch HCal/eflowTracks EFlowTrack Track 4085 4126 # add Branch HCal/eflowTracks EFlowTrack Track 4086 4127 # add Branch ECal/eflowPhotons EFlowPhoton Tower -
modules/DenseTrackFilter.cc
r5b51d33 rec37bc3 54 54 55 55 DenseTrackFilter::DenseTrackFilter() : 56 fItTrackInputArray(0) , fItDenseChargedInputArray(0)56 fItTrackInputArray(0) 57 57 { 58 58 } … … 116 116 fItTrackInputArray = fTrackInputArray->MakeIterator(); 117 117 118 fDenseChargedInputArray = ImportArray(GetString("DenseChargedInputArray", "DenseMergeTracks/tracks"));119 fItDenseChargedInputArray = fDenseChargedInputArray->MakeIterator();120 121 118 fTrackOutputArray = ExportArray(GetString("TrackOutputArray", "tracks")); 119 fChargedHadronOutputArray = ExportArray(GetString("ChargedHadronOutputArray", "chargedHadrons")); 120 fElectronOutputArray = ExportArray(GetString("ElectronOutputArray", "electrons")); 121 fMuonOutputArray = ExportArray(GetString("MuonOutputArray", "muons")); 122 122 } 123 123 … … 128 128 vector< vector< Double_t >* >::iterator itPhiBin; 129 129 if(fItTrackInputArray) delete fItTrackInputArray; 130 if(fItDenseChargedInputArray) delete fItDenseChargedInputArray;131 130 for(itPhiBin = fPhiBins.begin(); itPhiBin != fPhiBins.end(); ++itPhiBin) 132 131 { … … 155 154 156 155 // loop over all tracks 157 fIt DenseChargedInputArray->Reset();156 fItTrackInputArray->Reset(); 158 157 number = -1; 159 while((track = static_cast<Candidate*>(fIt DenseChargedInputArray->Next())))158 while((track = static_cast<Candidate*>(fItTrackInputArray->Next()))) 160 159 { 161 160 const TLorentzVector &trackPosition = track->Position; … … 217 216 { 218 217 ++fTowerTrackHits; 219 track = static_cast<Candidate*>(f DenseChargedInputArray->At(number));218 track = static_cast<Candidate*>(fTrackInputArray->At(number)); 220 219 momentum = track->Momentum; 221 220 … … 244 243 Int_t numberOfCandidates; 245 244 246 numberOfCandidates = fBestTrack->GetCandidates()->GetEntriesFast(); 247 245 246 cout<<fBestTrack<<endl; 247 248 248 // saving track with highest pT that hit the tower 249 if(fTowerTrackHits > 0 && numberOfCandidates > 1) 250 { 251 track = static_cast<Candidate*>(fBestTrack->GetCandidates()->At(numberOfCandidates - 2)); 252 candidate = static_cast<Candidate*>(track->Clone()); 253 pt = candidate->Momentum.Pt(); 254 eta = candidate->Momentum.Eta(); 255 phi = candidate->Momentum.Phi(); 256 eta = gRandom->Gaus(eta, fEtaPhiRes); 257 phi = gRandom->Gaus(phi, fEtaPhiRes); 258 candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt*TMath::CosH(eta)); 259 candidate->AddCandidate(track); 260 fTrackOutputArray->Add(candidate); 261 } 262 } 249 if(fTowerTrackHits > 0) 250 { 251 252 numberOfCandidates = fBestTrack->GetCandidates()->GetEntriesFast(); 253 if (numberOfCandidates < 2) 254 cout<<fBestTrack<<endl; 255 256 if (numberOfCandidates > 1) 257 { 258 259 track = static_cast<Candidate*>(fBestTrack->GetCandidates()->At(numberOfCandidates - 1)); 260 candidate = static_cast<Candidate*>(track->Clone()); 261 pt = candidate->Momentum.Pt(); 262 eta = candidate->Momentum.Eta(); 263 phi = candidate->Momentum.Phi(); 264 eta = gRandom->Gaus(eta, fEtaPhiRes); 265 phi = gRandom->Gaus(phi, fEtaPhiRes); 266 candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt*TMath::CosH(eta)); 267 candidate->AddCandidate(track); 268 fTrackOutputArray->Add(candidate); 269 switch(TMath::Abs(candidate->PID)) 270 { 271 case 11: 272 fElectronOutputArray->Add(candidate); 273 break; 274 case 13: 275 fMuonOutputArray->Add(candidate); 276 break; 277 default: 278 fChargedHadronOutputArray->Add(candidate); 279 } 280 281 } 282 } 283 284 } -
modules/DenseTrackFilter.h
r5b51d33 rec37bc3 69 69 70 70 const TObjArray *fTrackInputArray; //! 71 72 71 TObjArray *fTrackOutputArray; //! 73 72 73 TObjArray *fChargedHadronOutputArray; //! 74 TObjArray *fElectronOutputArray; //! 75 TObjArray *fMuonOutputArray; //! 74 76 75 const TObjArray *fDenseChargedInputArray;76 TIterator *fItDenseChargedInputArray;77 78 77 void FillTrack(); 79 78 ClassDef(DenseTrackFilter, 1)
Note:
See TracChangeset
for help on using the changeset viewer.