Fork me on GitHub

Changeset 557 in svn for trunk/src/SmearUtil.cc


Ignore:
Timestamp:
Feb 24, 2010, 5:24:16 PM (15 years ago)
Author:
severine ovyn
Message:

SumEt and SumPt + change ISOL names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SmearUtil.cc

    r556 r557  
    129129
    130130  // Isolation
    131   ISOL_PT         = 2.0;      //minimal pt of tracks for isolation criteria
    132   ISOL_Cone       = 0.5;      //Cone  for isolation criteria
    133   ISOL_Calo_ET    = 1E99;     //minimal tower energy for isolation criteria. Default off = 1E99
    134   ISOL_Calo_Grid  = 3;        //Grid size (N x N) for calorimetric isolation -- should be odd
     131  ISOL_trk_PT         = 2.0;      //minimal pt of tracks for isolation criteria
     132  ISOL_trk_Cone   = 0.5;      //Cone  for isolation criteria
     133  ISOL_calo_Cone  = 0.5;      //Cone  for isolation criteria
     134  ISOL_calo_ET    = 1E99;     //minimal tower energy for isolation criteria. Default off = 1E99
     135  ISOL_calo_Grid  = 3;        //Grid size (N x N) for calorimetric isolation -- should be odd
    135136
    136137  // General jet variable
     
    291292
    292293  // Isolation
    293   ISOL_PT         = DET.ISOL_PT;     // tracking isolation
    294   ISOL_Cone       = DET.ISOL_Cone; 
    295   ISOL_Calo_ET    = DET.ISOL_Calo_ET;  // calorimeter isolation, defaut off
    296   ISOL_Calo_Grid  = DET.ISOL_Calo_Grid;
     294  ISOL_trk_PT     = DET.ISOL_trk_PT;     // tracking isolation
     295  ISOL_trk_Cone   = DET.ISOL_trk_Cone; 
     296  ISOL_calo_Cone  = DET.ISOL_calo_Cone; 
     297  ISOL_calo_ET    = DET.ISOL_calo_ET;  // calorimeter isolation, defaut off
     298  ISOL_calo_Grid  = DET.ISOL_calo_Grid;
    297299
    298300
     
    447449
    448450  // Isolation
    449   ISOL_PT         = DET.ISOL_PT;       // tracking isolation
    450   ISOL_Cone       = DET.ISOL_Cone;   
    451   ISOL_Calo_ET    = DET.ISOL_Calo_ET;  // calorimeter isolation, defaut off
    452   ISOL_Calo_Grid  = DET.ISOL_Calo_Grid;
     451  ISOL_trk_PT     = DET.ISOL_trk_PT;       // tracking isolation
     452  ISOL_trk_Cone   = DET.ISOL_trk_Cone;   
     453  ISOL_calo_Cone  = DET.ISOL_calo_Cone;   
     454  ISOL_calo_ET    = DET.ISOL_calo_ET;  // calorimeter isolation, defaut off
     455  ISOL_calo_Grid  = DET.ISOL_calo_Grid;
    453456
    454457  // General jet variable
     
    655658    else if(strstr(temp_string.c_str(),"ZDC_n_E"))          {curstring >> varname >> value; ZDC_n_E      = value;}
    656659
    657     else if(strstr(temp_string.c_str(),"ISOL_PT"))          {curstring >> varname >> value; ISOL_PT           = value;}
    658     else if(strstr(temp_string.c_str(),"ISOL_Cone"))        {curstring >> varname >> value; ISOL_Cone         = value;}
    659     else if(strstr(temp_string.c_str(),"ISOL_Calo_ET"))     {curstring >> varname >> value; ISOL_Calo_ET      = value;}
    660     else if(strstr(temp_string.c_str(),"ISOL_Calo_Grid"))   {curstring >> varname >> ivalue; ISOL_Calo_Grid    = ivalue;}
     660    else if(strstr(temp_string.c_str(),"ISOL_trk_PT"))      {curstring >> varname >> value; ISOL_trk_PT      = value;}
     661    else if(strstr(temp_string.c_str(),"ISOL_trk_Cone"))    {curstring >> varname >> value; ISOL_trk_Cone     = value;}
     662    else if(strstr(temp_string.c_str(),"ISOL_calo_Cone"))    {curstring >> varname >> value; ISOL_calo_Cone     = value;}
     663    else if(strstr(temp_string.c_str(),"ISOL_calo_ET"))     {curstring >> varname >> value; ISOL_calo_ET      = value;}
     664    else if(strstr(temp_string.c_str(),"ISOL_calo_Grid"))   {curstring >> varname >> ivalue; ISOL_calo_Grid    = ivalue;}
    661665
    662666    else if(strstr(temp_string.c_str(),"JET_coneradius"))   {curstring >> varname >> value; JET_coneradius    = value;}
     
    699703  }
    700704 
    701   if(ISOL_Calo_Grid%2 ==0) {
    702     ISOL_Calo_Grid++;
    703     cout <<"**        WARNING: ISOL_Calo_Grid is not odd. Set it to  "<< ISOL_Calo_Grid << "        **" << endl;
     705  if(ISOL_calo_Grid%2 ==0) {
     706    ISOL_calo_Grid++;
     707    cout <<"**        WARNING: ISOL_Calo_Grid is not odd. Set it to  "<< ISOL_calo_Grid << "        **" << endl;
    704708  }
    705709 
     
    10611065  f_out<<"#*******************                                                 *"<<"\n";
    10621066  f_out<<"*                                                                    *"<<"\n";
    1063   f_out << left << setw(40) <<"* Minimum pT for tracks [GeV]: "<<""
    1064         << left << setw(20) <<ISOL_PT               <<""<< right << setw(10)<<"*"<<"\n";
    1065   f_out << left << setw(40) <<"* Cone for isolation criteria: "<<""
    1066         << left << setw(20) <<ISOL_Cone             <<""<< right << setw(10)<<"*"<<"\n";
    1067 
    1068   if(ISOL_Calo_ET > 1E98) f_out<<"# No Calorimetric isolation applied                                  *"<<"\n";
     1067  f_out << left << setw(40) <<"* Minimum pT for tracking isolation [GeV]: "<<""
     1068        << left << setw(20) <<ISOL_trk_PT              <<""<< right << setw(10)<<"*"<<"\n";
     1069  f_out << left << setw(40) <<"* Cone for tracking isolation criteria: "<<""
     1070        << left << setw(20) <<ISOL_trk_Cone         <<""<< right << setw(10)<<"*"<<"\n";
     1071  f_out << left << setw(40) <<"* Cone for calorimetric isolation criteria: "<<""
     1072        << left << setw(20) <<ISOL_calo_Cone         <<""<< right << setw(10)<<"*"<<"\n";
     1073
     1074
     1075  if(ISOL_calo_ET > 1E98) f_out<<"# No Calorimetric isolation applied                                  *"<<"\n";
    10691076  else {
    10701077   f_out << left << setw(40) <<"* Minimum ET for towers [GeV]: "<<""
    1071          << left << setw(20) <<ISOL_Calo_ET               <<""<< right << setw(10)<<"*"<<"\n";
     1078         << left << setw(20) <<ISOL_calo_ET               <<""<< right << setw(10)<<"*"<<"\n";
    10721079   f_out << left << setw(40) <<"* Grid size (NxN) for calorimetric isolation: "<<""
    1073          << left << setw(20) <<ISOL_Calo_Grid             <<""<< right << setw(4)<<"*"<<"\n";
     1080         << left << setw(20) <<ISOL_calo_Grid             <<""<< right << setw(4)<<"*"<<"\n";
    10741081  }
    10751082
     
    14161423//***********************Isolation criteria***********************
    14171424//****************************************************************
    1418 bool RESOLution::Isolation(const D_Particle& part, const vector<TRootTracks> &tracks, const float& pt_second_track, const float& isolCone, float& ptiso )
     1425bool RESOLution::Isolation(const D_Particle& part, const vector<TRootTracks> &tracks, const float& pt_second_track, float& ptiso )
    14191426{
    14201427   bool isolated = false;
     
    14331440
    14341441         // as long as (genDeltaR==0) is put above, the particle itself is not taken into account
    1435          if( genDeltaR < ISOL_Cone) ptiso += tracks[i].PT; // dR cut on tracks
     1442         if( genDeltaR < ISOL_trk_Cone && tracks[i].PT>ISOL_trk_PT) ptiso += tracks[i].PT; // dR cut on tracks
    14361443      }
    1437    if(deltar > isolCone) isolated = true;
     1444   if(deltar > ISOL_trk_Cone) isolated = true;
    14381445   return isolated;
    14391446}
     
    14421449{
    14431450   float etiso = 0; // sum of all track pt in isolation cone
    1444 cout<<"*************************"<<endl;
    14451451   for (unsigned int i=0; i< towers.size(); i++) {
    14461452//       cout<<" eta part "<<iEta<<" eta tour "<<towers[i].getEta()<<endl;
    14471453//       cout<<" phi part "<<iPhi<<" phi tour "<<towers[i].getPhi()<<endl;
    14481454
    1449         if(DeltaR(iPhi,iEta,towers[i].getPhi(),towers[i].getEta())<ISOL_Cone) {
    1450           cout<<"delta R pour lequel on add "<<DeltaR(iPhi,iEta,towers[i].getPhi(),towers[i].getEta())<<endl;
     1455        if(DeltaR(iPhi,iEta,towers[i].getPhi(),towers[i].getEta()) < ISOL_calo_Cone) {
    14511456           etiso += towers[i].getET(); // dR cut on tracks
    14521457          }
     
    14641469  // iTower is the index of the tower, in [0, n_tower]. iTower points only towers in positive range
    14651470
    1466    if(ISOL_Calo_ET>1E10) return UNDEFINED; // avoid doing anything unreasonable...
     1471   if(ISOL_calo_ET>1E10) return UNDEFINED; // avoid doing anything unreasonable...
    14671472   float et_sum=0;
    14681473
    1469    unsigned int N = ISOL_Calo_Grid;
     1474   unsigned int N = ISOL_calo_Grid;
    14701475   if(N%2 ==0 || N==0) { cout << "Warning: ISOL_Calo_Grid must be odd. ISOL_Calo_Grid = 3 will be used\n"; N=3;}
    14711476   int index= iTower; // index of the central tower of the grid in TOWER_eta_edges[.];
     
    14991504            //     << "calMuon.getEta= " << calMuon.getEta() << "\tcalMuon.getPhi()= " << calMuon.getPhi() <<"\t";
    15001505
    1501             if(calMuon.getEta() != UNDEFINED && calMuon.getET() > ISOL_Calo_ET) {
     1506            if(calMuon.getEta() != UNDEFINED && calMuon.getET() > ISOL_calo_ET) {
    15021507               et_sum += calMuon.getET();
    15031508               //cout << calMuon.getET() << " GeV";
Note: See TracChangeset for help on using the changeset viewer.