Changeset 270 in svn for trunk/Delphes.cpp
- Timestamp:
- Feb 14, 2009, 2:06:20 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Delphes.cpp
r268 r270 385 385 // 2.1a Loop over all particles in event, to fill the towers 386 386 itGen.Reset(); 387 TRootGenParticle *particle; 388 while( (particle = (TRootGenParticle*) itGen.Next()) ) { 389 int pid = abs(particle->PID); 390 particle->Charge=Charge(pid); 391 particle->setFractions(); // init 387 GenParticle *particleG; 388 while( (particleG = (GenParticle*) itGen.Next()) ) { 389 390 TRootGenParticle *particle = new TRootGenParticle(particleG); 391 int pid = abs(particle->PID); 392 particle->Charge=ChargeVal(particle->PID); 393 particle->setFractions(); // init 392 394 393 395 … … 407 409 // 2.1a.2.1 Central solenoidal magnetic field 408 410 TRACP->bfield(particle); // fills in particle->EtaCalo et particle->PhiCalo 409 410 411 // 2.1a.2.2 Filling the calorimetric towers -- includes also forward detectors ? 411 412 // first checks if the charged particles reach the calo! 412 413 if( DET->FLAG_bfield || 413 particle-> getCharge()==0 ||414 (!DET->FLAG_bfield && particle-> getCharge()!=0 && particle->PT > DET->TRACK_ptmin))414 particle->Charge==0 || 415 (!DET->FLAG_bfield && particle->Charge!=0 && particle->PT > DET->TRACK_ptmin)) 415 416 if( 416 417 (particle->EtaCalo > list_of_calorimeters.getEtamin() ) && … … 434 435 // if bfield not simulated, pt should be high enough to be taken into account 435 436 // it is supposed here that DET->MAX_calo > DET->CEN_max_tracker > DET->CEN_max_mu > 0 436 if( particle-> getCharge()!=0 &&437 if( particle->Charge !=0 && 437 438 fabs(particle->EtaCalo)< DET->CEN_max_tracker && // stays in the tracker -> track available 438 439 ( DET->FLAG_bfield || … … 447 448 448 449 // 2.1a.2.3.2 Muons 449 if (pid == pMU && fabs(particle->EtaCalo)< DET->CEN_max_mu && particle->PT > DET->PTCUT_muon) {450 if (pid == pMU && fabs(particle->EtaCalo)< DET->CEN_max_mu) { 450 451 TLorentzVector p; 451 452 float sPT = gRandom->Gaus(particle->PT, DET->MU_SmearPt*particle->PT ); … … 518 519 519 520 } // 2.1a.2 : if visible particle 521 delete particle; 520 522 } // loop on all particles 2.1a 521 523 … … 589 591 elementPhoton = (TRootPhoton*) branchPhoton->NewEntry(); 590 592 elementPhoton->Set(gamma[i].Px(),gamma[i].Py(),gamma[i].Pz(),gamma[i].E()); 591 elementPhoton->EtaCalo = gamma[i].EtaCalo();592 elementPhoton->PhiCalo = gamma[i].PhiCalo();593 593 } 594 594
Note:
See TracChangeset
for help on using the changeset viewer.