Fork me on GitHub

Changeset 100 in svn for trunk/Delphes.cpp


Ignore:
Timestamp:
Dec 18, 2008, 2:39:26 PM (16 years ago)
Author:
severine ovyn
Message:

Remove datacard bug + CaloTowers OK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Delphes.cpp

    r98 r100  
    105105 
    106106  //Propagation of tracks in the B field
    107   TrackPropagation *TRACP = new TrackPropagation();
     107  TrackPropagation *TRACP = new TrackPropagation(DetDatacard);
    108108 
    109109  //Jet information
    110   JetsUtil *JETRUN = new JetsUtil();
     110  JetsUtil *JETRUN = new JetsUtil(DetDatacard);
    111111 
    112112  //VFD information
    113   VeryForward * VFD = new VeryForward();
     113  VeryForward * VFD = new VeryForward(DetDatacard);
    114114 
    115115  //todo(LogName.c_str());
     
    189189 
    190190 
    191  
     191  float iPhi=0,iEta=0;
     192
    192193  // Loop over all events
    193194  Long64_t entry, allEntries = treeReader->GetEntries();
     
    266267             
    267268              // all final particles but muons and neutrinos   
    268               // for calorimetric towers and mission PT
     269              // for calorimetric towers and missing PT
    269270              int charge=Charge(pid);
    270271              if(genMomentum.E() !=0 && pid != pMU) {
    271272                if(charge == 0 || (charge !=0 && genMomentum.Pt() >= DET->TRACK_ptmin)){
    272                   PhysicsTower CaloTower = PhysicsTower(LorentzVector(genMomentum.Px(),genMomentum.Py(),genMomentum.Pz(), genMomentum.E()));
    273                   towers.push_back(CaloTower);
    274                   // create a fastjet::PseudoJet with these components and put it onto
    275                   // back of the input_particles vector
    276                   input_particles.push_back(fastjet::PseudoJet(genMomentum.Px(),genMomentum.Py(),genMomentum.Pz(), genMomentum.E()));
    277                  
    278                   genMomentumCalo.SetPxPyPzE(CaloTower.fourVector.px,CaloTower.fourVector.py,CaloTower.fourVector.pz,CaloTower.fourVector.E);
    279                  
    280                   elementCalo = (TRootCalo*) branchCalo->NewEntry();
    281                   elementCalo->Set(genMomentumCalo);
    282                   DET->BinEtaPhi(genMomentumCalo.Phi(), genMomentumCalo.Eta(), elementCalo->Phi, elementCalo->Eta);
     273                  DET->BinEtaPhi(genMomentum.Phi(), genMomentum.Eta(), iPhi, iEta);
     274                  if(iEta != -100 && iPhi != -100)
     275                    {
     276                      genMomentumCalo.SetPtEtaPhiE(genMomentum.Pt(),iEta,iPhi,genMomentum.E());
     277                      elementCalo = (TRootCalo*) branchCalo->NewEntry();
     278                      elementCalo->Set(genMomentumCalo);
     279
     280//                    CalTower     myCaloTower(genMomentumCalo.Et,genMomentumCalo.Eta,genMomentumCalo.Phi,iEta,iPhi);
     281//                    PhysicsTower Tower(LorentzVector(genMomentumCalo.Px(),genMomentumCalo.Py(),genMomentumCalo.Pz(), genMomentumCalo.E()),myCaloTower);
     282                      PhysicsTower Tower(LorentzVector(genMomentumCalo.Px(),genMomentumCalo.Py(),genMomentumCalo.Pz(), genMomentumCalo.E()));
     283                      towers.push_back(Tower);
     284                    }
    283285                }
    284286              }
     
    302304          if(DET->FLAG_vfd==1)
    303305            { 
    304               VFD->ZDC(treeWriter,branchZDC,particle);
    305               VFD->RomanPots(treeWriter,branchRP220,branchFP420,particle);
     306             VFD->ZDC(treeWriter,branchZDC,particle);
     307             VFD->RomanPots(treeWriter,branchRP220,branchFP420,particle);
    306308            }
    307309         
     
    332334      for(unsigned int i=0; i < towers.size(); i++)
    333335        {
    334           Att.SetPxPyPzE(towers[i].fourVector.px,towers[i].fourVector.py,towers[i].fourVector.pz,towers[i].fourVector.E);
     336Att.SetPxPyPzE(towers[i].fourVector.px, towers[i].fourVector.py, towers[i].fourVector.pz, towers[i].fourVector.E);
     337if(fabs(Att.Eta())<DET->CEN_max_calo_fwd)
     338{
    335339          PTmis = PTmis + Att;
     340          // create a fastjet::PseudoJet with these components and put it onto
     341          // back of the input_particles vector
     342          input_particles.push_back(fastjet::PseudoJet(towers[i].fourVector.px,towers[i].fourVector.py,towers[i].fourVector.pz,towers[i].fourVector.E));
     343}
    336344        }
    337345      elementEtmis = (TRootETmis*) branchETmis->NewEntry();
Note: See TracChangeset for help on using the changeset viewer.