Fork me on GitHub

Changeset 23 in svn for trunk/Resolutions.cpp


Ignore:
Timestamp:
Nov 7, 2008, 6:37:38 PM (16 years ago)
Author:
severine ovyn
Message:

Working on the resolution

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Resolutions.cpp

    r19 r23  
    172172  vector<fastjet::PseudoJet> inclusive_jetsS;
    173173  vector<fastjet::PseudoJet> sorted_jetsS;
     174  vector<PhysicsTower> towers;
    174175
    175176  fastjet::JetDefinition jet_def;
     
    180181  // set up a CDF midpoint jet definition
    181182  #ifdef ENABLE_PLUGIN_CDFCONES
    182   plugins = new fastjet::CDFJetCluPlugin(DET->C_SEEDTHRESHOLD,DET->CONERADIUS,DET->C_ADJACENCYCUT,DET->C_MAXITERATIONS,DET->C_IRATCH,DET->C_OVERLAPTHRESHOLD);
     183  plugins = new fastjet::CDFJetCluPlugin(0,DET->CONERADIUS,DET->C_ADJACENCYCUT,DET->C_MAXITERATIONS,DET->C_IRATCH,DET->C_OVERLAPTHRESHOLD);
    183184  jet_def = fastjet::JetDefinition(plugins);
    184185  #else
     
    200201  for(entry = 0; entry < allEntries; ++entry)
    201202    {
     203      TLorentzVector PTmisS(0,0,0,0);
    202204      TLorentzVector PTmis(0,0,0,0);
    203205      treeReader->ReadEntry(entry);
     
    216218      inclusive_jetsS.clear();
    217219      sorted_jetsS.clear();
     220      towers.clear();
    218221
    219222      // Loop over all particles in event
     
    238241              )
    239242            ) {
     243                if(pid != pMU)PTmis = PTmis + genMomentum;//ptmis
    240244                switch(pid) {
    241245                   
     
    264268                // all final particles but muons and neutrinos 
    265269                // for calorimetric towers and mission PT
    266                 if(genMomentum.E()!=0) PTmis = PTmis + genMomentum;//ptmis
    267 
    268                 if(pid != pMU && genMomentum.Pt() > DET->PT_TRACKS_MIN)
     270                //if(genMomentum.E()!=0) PTmis = PTmis + genMomentum;//ptmis
     271
     272                if(pid != pMU)
    269273                  {
     274                     PTmisS = PTmisS + genMomentum;
     275                     towers.push_back(PhysicsTower(LorentzVector(genMomentum.Px(),genMomentum.Py(),genMomentum.Pz(), genMomentum.E())));
    270276                     input_particlesS.push_back(fastjet::PseudoJet(genMomentum.Px(),genMomentum.Py(),genMomentum.Pz(), genMomentum.E()));
    271277                  }
     
    289295        } // while
    290296
     297  TLorentzVector toWerS(0,0,0,0);
     298  //calcul de ETmis au depart des tours calorimetriques..
     299/*  for(unsigned int i=0; i < towers.size(); i++) {
     300      if(towers[i].fourVector.pt() < 0.5) continue;
     301          toWerS.SetPxPyPzE(towers[i].fourVector.px,towers[i].fourVector.py,towers[i].fourVector.pz,towers[i].fourVector.E);
     302          PTmisS = PTmisS + toWerS;
     303          }
     304*/
     305//PTmis = (0,0,0,0)-PTmis;
     306//PTmisS = (0,0,0,0)-PTmisS;
     307
     308//float ET=PTmis.Et()<<endl;
     309//float ETS=PTmisS.Et()<<endl;
     310
     311cout<<"Ptmis "<<PTmis.Et()<<" PTmis smeare "<<PTmisS.Et()<<endl;
     312cout<<"Ptmis "<<(-PTmis).Pt()<<" PTmis smeare "<<(-PTmisS).Pt()<<endl;
     313
     314  elementEtmis= (ETMIS*) branchetmis->NewEntry();
     315  elementEtmis->Et = (PTmis).Et();
     316  elementEtmis->EtSmeare = (PTmisS).Et();
     317
     318
    291319
    292320      //*****************************
     
    314342        if(JETSm.Pt()>1)
    315343          {
     344            float NonSmeareEt=(JET.E()*sin(JET.Theta()));
     345            float SmeareEt=(JETSm.E()*sin(JETSm.Theta()));
     346
    316347            elementJet= (RESOLJET*) branchjet->NewEntry();
    317             elementJet->NonSmearePT = JET.Pt();
    318             elementJet->SmearePT = (JETSm.Pt()/JET.Pt());
    319             /*cout<<"valeur obtenue "<<JETSm.Pt()/JET.Pt()<<endl;
    320             cout<<" pt non smeare "<<JET.Pt()<<" phi "<<JET.Phi()<<" eta "<<JET.Eta()<<endl;
    321             cout<<"pt smeare "<<JETSm.Pt()<<" phi "<<JETSm.Phi()<<" eta "<<JETSm.Eta()<<endl;
    322             cout<<"************"<<endl;
    323 */
     348            elementJet->NonSmearePT = JET.Et();
     349            elementJet->SmearePT = JETSm.Et()/JET.Et();
     350         
    324351          }
    325352
Note: See TracChangeset for help on using the changeset viewer.