Fork me on GitHub

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


Ignore:
Timestamp:
Feb 11, 2009, 10:22:30 AM (15 years ago)
Author:
Xavier Rouby
Message:

first test 2.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/SmearUtil.cc

    r261 r264  
    3030***********************************************************************/
    3131
     32
    3233/// \file SmearUtil.cc
    3334/// \brief RESOLution class, and some generic definitions
     
    4243#include <iomanip>
    4344using namespace std;
    44 
    45 
    46 ParticleUtil::ParticleUtil(const TLorentzVector &genMomentum, int pid) {
    47   _pid=pid;
    48   _e = genMomentum.E();
    49   _px = genMomentum.Px();
    50   _py = genMomentum.Py();
    51   _pz = genMomentum.Pz();
    52   _pt = genMomentum.Pt();
    53 
    54   //_e, _px, _py, _pz, _pt;
    55   //float _eta, _etaCalo, _phi, _phiCalo;
    56   //int _pid;
    57 }
    5845
    5946//------------------------------------------------------------------------------
     
    7865  // Energy resolution for hadrons in ecal/hcal/hf
    7966  // \sigma/E = C + N/E + S/\sqrt{E}
    80   HAD_Shcal         = 1.5;               // S term for central HCAL 
     67  HAD_Shcal         = 1.5;               // S term for central HCAL
    8168  HAD_Nhcal         = 0.;                // N term for central HCAL
    8269  HAD_Chcal         = 0.05;              // C term for central HCAL
    83   HAD_Shf           = 2.7;               // S term for FCAL
     70  HAD_Shf           = 2.7;               // S term for FCAL 
    8471  HAD_Nhf           = 0.;                // N term for FCAL
    8572  HAD_Chf           = 0.13;              // C term for FCAL
     
    128115  FLAG_bfield      = 1;                       //1 to run the bfield propagation else 0
    129116  FLAG_vfd         = 1;                       //1 to run the very forward detectors else 0
     117  FLAG_zdc         = 1;                       //1 to run the zero degree calorimeter else 0
    130118  FLAG_trigger     = 1;                       //1 to run the trigger selection else 0
    131119  FLAG_frog        = 1;                       //1 to run the FROG event display
     
    186174  RP_cross_y        = 0.0;
    187175  RP_cross_ang      = 142.5;
    188 
    189 
    190176 
    191177}
     
    250236  FLAG_bfield      = DET.FLAG_bfield;
    251237  FLAG_vfd         = DET.FLAG_vfd;
     238  FLAG_zdc         = DET.FLAG_zdc;
    252239  FLAG_trigger     = DET.FLAG_trigger;
    253240  FLAG_frog        = DET.FLAG_frog;
     
    279266  RP_IP_name        = DET.RP_IP_name;
    280267
    281 
    282268  // In case FROG event display allowed
    283269  NEvents_Frog      = DET.NEvents_Frog;
     
    364350  FLAG_bfield      = DET.FLAG_bfield;
    365351  FLAG_vfd         = DET.FLAG_vfd;
     352  FLAG_zdc         = DET.FLAG_zdc;
    366353  FLAG_trigger     = DET.FLAG_trigger;
    367354  FLAG_frog        = DET.FLAG_frog;
     
    504491
    505492    else if(strstr(temp_string.c_str(),"FLAG_vfd"))         {curstring >> varname >> ivalue; FLAG_vfd         = ivalue;}
     493    else if(strstr(temp_string.c_str(),"FLAG_zdc"))         {curstring >> varname >> ivalue; FLAG_zdc         = ivalue;}
    506494    else if(strstr(temp_string.c_str(),"FLAG_trigger"))     {curstring >> varname >> ivalue; FLAG_trigger     = ivalue;}
    507495    else if(strstr(temp_string.c_str(),"FLAG_frog"))        {curstring >> varname >> ivalue; FLAG_frog        = ivalue;}
     
    604592  if(FLAG_vfd==1){
    605593    f_out<<"#**********************************                                  *"<<"\n";
    606     f_out<<"# Very forward detector switches on                                  *"<<"\n";
     594    f_out<<"# Very forward detector switched on                                  *"<<"\n";
    607595    f_out<<"#**********************************                                  *"<<"\n";
    608596    f_out<<"*                                                                    *"<<"\n";
     
    639627    f_out << left << setw(44) <<"* Angle of  beam crossing:"<<""
    640628          << left << setw(6) <<RP_cross_ang           <<""<< right << setw(20)<<"! not in datacard  *"<<"\n";
    641 
    642629    f_out<<"*                                                                    *"<<"\n";
    643630  }
    644631  else {
    645632    f_out<<"#***********************************                                 *"<<"\n";
    646     f_out<<"# Very forward detector switches off                                 *"<<"\n";
     633    f_out<<"# Very forward detector switched off                                 *"<<"\n";
    647634    f_out<<"#***********************************                                 *"<<"\n";
    648635    f_out<<"*                                                                    *"<<"\n";
     
    692679  if(FLAG_bfield==1){
    693680    f_out<<"#***************************                                         *"<<"\n";
    694     f_out<<"# Magnetic field switches on                                         *"<<"\n";
     681    f_out<<"# Magnetic field switched on                                         *"<<"\n";
    695682    f_out<<"#***************************                                         *"<<"\n";
    696683    f_out<<"*                                                                    *"<<"\n";
     
    713700  else {
    714701    f_out<<"#****************************                                        *"<<"\n";
    715     f_out<<"# Magnetic field switches off                                        *"<<"\n";
     702    f_out<<"# Magnetic field switched off                                        *"<<"\n";
    716703    f_out<<"#****************************                                        *"<<"\n";
    717704    f_out << left << setw(55) <<"* Minimal pT needed to reach the calorimeter [GeV]: "<<""
     
    953940//******************************************************************************************
    954941
    955 void RESOLution::SortedVector(vector<ParticleUtil> &vect)
     942//void RESOLution::SortedVector(vector<ParticleUtil> &vect)
     943void RESOLution::SortedVector(vector<D_Particle> &vect)
    956944{
    957945  int i,j = 0;
     
    966954          if ( vect[j].Pt() > vect[j-1].Pt() )
    967955             {
    968                ParticleUtil tmp = vect[j-1];
     956               //ParticleUtil tmp = vect[j-1];
     957               D_Particle tmp = vect[j-1];
    969958               vect[j-1] = vect[j];
    970959               vect[j] = tmp;
     
    10621051  //********** returns a segmented value for eta and phi, for calo towers *****
    10631052void RESOLution::BinEtaPhi(const float phi, const float eta, float& iPhi, float& iEta){
    1064    iEta = -100;
    1065    int index=-100;
     1053   iEta = UNDEFINED;
     1054   int index= iUNDEFINED;
    10661055   for (unsigned int i=1; i< TOWER_number+1; i++) {
    10671056        if(fabs(eta)>TOWER_eta_edges[i-1] && fabs(eta)<TOWER_eta_edges[i]) {
     
    10721061        }
    10731062   }
    1074    if(index==-100) return;
    1075    iPhi = -100;
     1063   if(index==UNDEFINED) return;
     1064   iPhi = UNDEFINED;
    10761065   float dphi = TOWER_dphi[index]*pi/180.;
    10771066   for (unsigned int i=1; i < 360/TOWER_dphi[index]; i++ ) {
     
    10851074   if (phi > pi-dphi) iPhi = pi-dphi;
    10861075}
     1076
     1077
    10871078
    10881079//**************************** Returns the delta Phi ****************************
Note: See TracChangeset for help on using the changeset viewer.