Fork me on GitHub

Changeset 59 in svn for trunk/Delphes.cpp


Ignore:
Timestamp:
Nov 27, 2008, 8:49:44 PM (16 years ago)
Author:
severine ovyn
Message:

remove bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Delphes.cpp

    r55 r59  
    207207      while( (particle = (TRootGenParticle*) itGen.Next()) )
    208208        {
    209           genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E);
    210          
    211209          int pid = abs(particle->PID);
    212           float eta = fabs(genMomentum.Eta());
    213 
    214           //subarray of the quarks (i.e. not final particles, i.e status not equal to 1)
    215           // in the tracker (i.e. for those we know the tracks)
    216           // with enough p_T
    217           //// This subarray is needed for the B-jet algorithm
     210         //// This subarray is needed for the B-jet algorithm
    218211          // optimization for speed : put first PID condition, then ETA condition, then either pt or status
    219212          if( (pid <= pB || pid == pGLUON) &&// is it a light quark or a gluon, i.e. is it one of these : u,d,c,s,b,g ?
    220               eta < DET->MAX_TRACKER &&
     213              fabs(particle->Eta) < DET->MAX_TRACKER &&
    221214              particle->Status != 1 &&
    222215              particle->PT > DET->PT_QUARKS_MIN ) {
    223216            NFCentralQ.Add(particle);
    224217          }
    225          
    226          
     218                 
    227219          // keeps only final particles, visible by the central detector, including the fiducial volume
    228220          // the ordering of conditions have been optimised for speed : put first the STATUS condition
     
    230222          //
    231223          if( (particle->Status == 1)    &&
    232               ( 
    233                (pid == pMU  && eta < DET->MAX_MU) ||
    234                (pid != pMU  && (pid != pNU1) && (pid != pNU2) && (pid != pNU3) && eta < DET->MAX_CALO_FWD)
    235                 )
    236               ) {
    237           //  TRACP->Propagation(particle,genMomentum);
    238             eta = fabs(genMomentum.Eta());
     224              ((pid != pNU1) && (pid != pNU2) && (pid != pNU3)) &&
     225              (fabs(particle->Eta) < DET->MAX_CALO_FWD)
     226            )
     227            {
     228            genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E);
     229            TRACP->Propagation(particle,genMomentum);
     230            float eta=fabs(genMomentum.Eta());
    239231            switch(pid) {
    240232             
     
    264256              break;
    265257            } // switch (pid)
    266            
     258
    267259            // all final particles but muons and neutrinos     
    268260            // for calorimetric towers and mission PT
     
    275267                // back of the input_particles vector
    276268                input_particles.push_back(fastjet::PseudoJet(genMomentum.Px(),genMomentum.Py(),genMomentum.Pz(), genMomentum.E()));
    277                 //genMomentumCalo.SetPtEtaPhiE(CaloTower.Et(),CaloTower.iEta(),CaloTower.iPhi(),CaloTower.fourVector.E);
     269               
    278270                genMomentumCalo.SetPxPyPzE(CaloTower.fourVector.px,CaloTower.fourVector.py,CaloTower.fourVector.pz,CaloTower.fourVector.E);
    279271                elementCalo = (TRootCalo*) branchCalo->NewEntry();
     
    301293                TrackCentral.push_back(genMomentum);
    302294              }
    303            
     295
    304296          } // switch
    305297         
     
    340332      elementEtmis->Px = (-PTmis).Px();
    341333      elementEtmis->Py = (-PTmis).Py();
     334
    342335      //*****************************
     336      treeWriter->Fill();
    343337     
    344338      sorted_jets=JETRUN->RunJets(input_particles);
     
    346340      JETRUN->RunTauJets(treeWriter,branchTauJet,sorted_jets,towers, TrackCentral);
    347341
    348 
    349       treeWriter->Fill();
    350 
    351342      // Add here the trigger
    352343      // Should test all the trigger table on the event, based on reconstructed objects
    353      
    354  //     Trigger *TRIG = new Trigger();
    355  //     TRIG->TriggerReader("data/trigger.dat");
    356344     
    357345    } // Loop over all events
Note: See TracChangeset for help on using the changeset viewer.