Fork me on GitHub

Changeset 270 in svn for trunk/Delphes.cpp


Ignore:
Timestamp:
Feb 14, 2009, 2:06:20 AM (16 years ago)
Author:
severine ovyn
Message:

remove double GEN pfff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Delphes.cpp

    r268 r270  
    385385      // 2.1a Loop over all particles in event, to fill the towers
    386386      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
    392394
    393395
     
    407409            // 2.1a.2.1 Central solenoidal magnetic field
    408410            TRACP->bfield(particle); // fills in particle->EtaCalo et particle->PhiCalo
    409 
    410411            // 2.1a.2.2 Filling the calorimetric towers -- includes also forward detectors ?
    411412            // first checks if the charged particles reach the calo!
    412413            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))
    415416            if(
    416417                (particle->EtaCalo > list_of_calorimeters.getEtamin() ) &&
     
    434435            // if bfield not simulated, pt should be high enough to be taken into account
    435436            // 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 &&
    437438                fabs(particle->EtaCalo)< DET->CEN_max_tracker && // stays in the tracker -> track available
    438439               ( DET->FLAG_bfield ||
     
    447448
    448449                   // 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) {
    450451                        TLorentzVector p;
    451452                        float sPT = gRandom->Gaus(particle->PT, DET->MU_SmearPt*particle->PT );
     
    518519
    519520          } // 2.1a.2 : if visible particle
     521        delete particle;
    520522      } // loop on all particles 2.1a
    521523       
     
    589591        elementPhoton = (TRootPhoton*) branchPhoton->NewEntry();
    590592        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();
    593593      }
    594594     
Note: See TracChangeset for help on using the changeset viewer.