Fork me on GitHub

Changeset 264 in svn for trunk/src


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

first test 2.0

Location:
trunk/src
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/BFieldProp.cc

    r260 r264  
    3636
    3737//------------------------------------------------------------------------------
     38extern const float UNDEFINED;
    3839
    3940TrackPropagation::TrackPropagation(){
     
    315316
    316317
    317 void TrackPropagation::bfield(const TRootGenParticle *Part, float& etacalo, float& phicalo) {
     318void TrackPropagation::bfield(TRootGenParticle *Part) {
    318319
    319320  // initialisation, valid for z_max==0, R_max==0 and q==0
    320   etacalo = Part->Eta;
    321   phicalo = -atan2(Part->Px,Part->Py);
     321  Part->EtaCalo = Part->Eta;
     322  Part->PhiCalo = Part->Phi;//-atan2(Part->Px,Part->Py);
     323
     324  if (!DET->FLAG_bfield ) return;
    322325
    323326  q  = Charge(Part->PID);
     
    386389              Eta_t = - log(tan(Theta_t/2.));
    387390      } else{
    388                 Theta_t=0; Eta_t = 9999;
     391                Theta_t=0; Eta_t = UNDEFINED;
    389392      }
    390393/*      Not needed here. but these formulae are correct -------
     
    399402        momentum.SetPxPyPzE(Px_t,Py_t,Pz_t,E_t);
    400403*/
    401         etacalo = Eta_t;
    402         phicalo = Phi_t;
     404        Part->EtaCalo = Eta_t;
     405        Part->PhiCalo = Phi_t;
    403406        return;
    404407// test zone ---
     
    436439
    437440  } else { // if B_x or B_y are non zero: longer computation
    438 
     441//cout << "bfield de loic\n";
    439442  float Xvertex1 = Part->X;
    440443  float Yvertex1 = Part->Y;
     
    511514  if(x!=0 && y!=0 && z!=0) {
    512515          Theta = atan2(sqrt(r2),z);
    513           etacalo  = -log(tan(Theta/2.));
    514           phicalo = atan2(y,x);
     516          Part->EtaCalo  = -log(tan(Theta/2.));
     517          Part->PhiCalo = atan2(y,x);
    515518          //momentum.SetPtEtaPhiE(Part->PT,eta,phi,Part->E);
    516519  }
  • trunk/src/HEPEVTConverter.cc

    r245 r264  
     1/***********************************************************************
     2**                                                                    **
     3**          /----------------------------------------------\          **
     4**         |  Delphes, a framework for the fast simulation  |         **
     5**         |       of a  generic collider experiment        |         **
     6**          \----------------------------------------------/          **
     7**                                                                    **
     8**                                                                    **
     9**   This package uses:                                               **
     10**   ------------------                                               **
     11**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      **
     12**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       **
     13**   FROG: [hep-ex/0901.2718v1]                                       **
     14**                                                                    **
     15** ------------------------------------------------------------------ **
     16**                                                                    **
     17**   Main authors:                                                    **
     18**   -------------                                                    **
     19**                                                                    **
     20**                Severine Ovyn                Xavier Rouby           **
     21**          severine.ovyn@uclouvain.be      xavier.rouby@cern         **
     22**                                                                    **
     23**         Center for Particle Physics and Phenomenology (CP3)        **
     24**                Universite catholique de Louvain (UCL)              **       
     25**                     Louvain-la-Neuve, Belgium                      **           
     26**                                                                    **
     27**                      Copyright (C) 2008-2009,                      **
     28**                        All rights reserved.                        ** 
     29**                                                                    **
     30***********************************************************************/
     31
     32
    133#include <iostream>
    234#include <utility>
  • trunk/src/LHEFConverter.cc

    r246 r264  
     1/***********************************************************************
     2**                                                                    **
     3**          /----------------------------------------------\          **
     4**         |  Delphes, a framework for the fast simulation  |         **
     5**         |       of a  generic collider experiment        |         **
     6**          \----------------------------------------------/          **
     7**                                                                    **
     8**                                                                    **
     9**   This package uses:                                               **
     10**   ------------------                                               **
     11**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      **
     12**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       **
     13**   FROG: [hep-ex/0901.2718v1]                                       **
     14**                                                                    **
     15** ------------------------------------------------------------------ **
     16**                                                                    **
     17**   Main authors:                                                    **
     18**   -------------                                                    **
     19**                                                                    **
     20**                Severine Ovyn                Xavier Rouby           **
     21**          severine.ovyn@uclouvain.be      xavier.rouby@cern         **
     22**                                                                    **
     23**         Center for Particle Physics and Phenomenology (CP3)        **
     24**                Universite catholique de Louvain (UCL)              **       
     25**                     Louvain-la-Neuve, Belgium                      **           
     26**                                                                    **
     27**                      Copyright (C) 2008-2009,                      **
     28**                        All rights reserved.                        ** 
     29**                                                                    **
     30***********************************************************************/
     31
     32
    133#include <iostream>
    234#include <fstream>
  • trunk/src/STDHEPConverter.cc

    r245 r264  
    1 /*
    2   ---- Delphes ----
    3   A Fast Simulator for general purpose LHC detector
    4   S. Ovyn ~~~~ severine.ovyn@uclouvain.be
    5 
    6   Center for Particle Physics and Phenomenology (CP3)
    7   Universite Catholique de Louvain (UCL)
    8   Louvain-la-Neuve, Belgium
    9 */
     1/***********************************************************************
     2**                                                                    **
     3**          /----------------------------------------------\          **
     4**         |  Delphes, a framework for the fast simulation  |         **
     5**         |       of a  generic collider experiment        |         **
     6**          \----------------------------------------------/          **
     7**                                                                    **
     8**                                                                    **
     9**   This package uses:                                               **
     10**   ------------------                                               **
     11**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      **
     12**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       **
     13**   FROG: [hep-ex/0901.2718v1]                                       **
     14**                                                                    **
     15** ------------------------------------------------------------------ **
     16**                                                                    **
     17**   Main authors:                                                    **
     18**   -------------                                                    **
     19**                                                                    **
     20**                Severine Ovyn                Xavier Rouby           **
     21**          severine.ovyn@uclouvain.be      xavier.rouby@cern         **
     22**                                                                    **
     23**         Center for Particle Physics and Phenomenology (CP3)        **
     24**                Universite catholique de Louvain (UCL)              **       
     25**                     Louvain-la-Neuve, Belgium                      **           
     26**                                                                    **
     27**                      Copyright (C) 2008-2009,                      **
     28**                        All rights reserved.                        ** 
     29**                                                                    **
     30***********************************************************************/
     31
    1032
    1133#include <iostream>
  • 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 ****************************
  • trunk/src/TreeClasses.cc

    r219 r264  
     1/***********************************************************************
     2**                                                                    **
     3**          /----------------------------------------------\          **
     4**         |  Delphes, a framework for the fast simulation  |         **
     5**         |       of a  generic collider experiment        |         **
     6**          \----------------------------------------------/          **
     7**                                                                    **
     8**                                                                    **
     9**   This package uses:                                               **
     10**   ------------------                                               **
     11**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      **
     12**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       **
     13**   FROG: [hep-ex/0901.2718v1]                                       **
     14**                                                                    **
     15** ------------------------------------------------------------------ **
     16**                                                                    **
     17**   Main authors:                                                    **
     18**   -------------                                                    **
     19**                                                                    **
     20**                Severine Ovyn                Xavier Rouby           **
     21**          severine.ovyn@uclouvain.be      xavier.rouby@cern         **
     22**                                                                    **
     23**         Center for Particle Physics and Phenomenology (CP3)        **
     24**                Universite catholique de Louvain (UCL)              **       
     25**                     Louvain-la-Neuve, Belgium                      **           
     26**                                                                    **
     27**                      Copyright (C) 2008-2009,                      **
     28**                        All rights reserved.                        ** 
     29**                                                                    **
     30***********************************************************************/
     31
     32
    133#include "TreeClasses.h"
    234
  • trunk/src/TreeClassesLinkDef.h

    r219 r264  
     1/***********************************************************************
     2**                                                                    **
     3**          /----------------------------------------------\          **
     4**         |  Delphes, a framework for the fast simulation  |         **
     5**         |       of a  generic collider experiment        |         **
     6**          \----------------------------------------------/          **
     7**                                                                    **
     8**                                                                    **
     9**   This package uses:                                               **
     10**   ------------------                                               **
     11**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      **
     12**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       **
     13**   FROG: [hep-ex/0901.2718v1]                                       **
     14**                                                                    **
     15** ------------------------------------------------------------------ **
     16**                                                                    **
     17**   Main authors:                                                    **
     18**   -------------                                                    **
     19**                                                                    **
     20**                Severine Ovyn                Xavier Rouby           **
     21**          severine.ovyn@uclouvain.be      xavier.rouby@cern         **
     22**                                                                    **
     23**         Center for Particle Physics and Phenomenology (CP3)        **
     24**                Universite catholique de Louvain (UCL)              **       
     25**                     Louvain-la-Neuve, Belgium                      **           
     26**                                                                    **
     27**                      Copyright (C) 2008-2009,                      **
     28**                        All rights reserved.                        ** 
     29**                                                                    **
     30***********************************************************************/
     31
     32
    133#include "interface/TreeClasses.h"
    234
  • trunk/src/TriggerUtil.cc

    r260 r264  
    132132
    133133//*************************************************************************
     134TriggerBit::TriggerBit() {
     135}
    134136
    135137TriggerBit::~TriggerBit() {
     
    143145        EtmisValues.clear();
    144146        GammaValues.clear();
    145 
    146147}
    147148
     
    153154        IElecValues.push_back(tb.IElecValues[i]);
    154155
    155 
    156156  for(unsigned int i=0; i<tb.MuonValues.size(); i++)
    157157        MuonValues.push_back(tb.MuonValues[i]);
     
    165165  for(unsigned int i=0; i<tb.BjetValues.size(); i++)
    166166        BjetValues.push_back(tb.BjetValues[i]);
    167 
    168167
    169168  for(unsigned int i=0; i<tb.TauJetValues.size(); i++)
     
    218217      TClonesArray *branchPhotonTrig,  TClonesArray *branchETmisTrig)
    219218{
    220 
    221219  TSimpleArray<TRootJet> bjets=SubArrayBjets(branchJetTrig);
    222220  TSimpleArray<TRootElectron> Ielectron=SubArrayIElec(branchElecTrig);
    223221  TSimpleArray<TRootMuon> Imuon=SubArrayIMuon(branchMuonTrig);
    224  
     222
    225223  int elec_size = ElecValues.size();
    226224  int Ielec_size = IElecValues.size();
     
    263261        }
    264262
    265 
    266263      if(muon_size!=0){
    267264        TRootMuon *muon;
     
    287284           if(jet->PT < JetValues[i])Result=false;}}
    288285
    289       if(jet_size!=0){
    290         TRootJet *jet;
    291         for(int i=0;i<jet_size;i++){
    292            jet = (TRootJet*)branchJetTrig->At(i);
    293            if(jet->PT < JetValues[i])Result=false;}}
    294 
    295286      if(bjet_size!=0)
    296287        {
     
    304295        }
    305296
    306 
    307297      if(taujet_size!=0){
    308298        TRootTauJet *taujet;
     
    338328  vector<string> BjetSequences;
    339329
    340 ///  char *result =NULL;
    341330  char * result = new char[256];
    342331  result = strtok( (char*) trigger_algorithm.c_str(),"&");
     
    354343       result = strtok( NULL,"&");
    355344     }
    356   delete result;
     345  delete [] result;
    357346
    358347  ElecValues = GetCuts(ElecSequences);
     
    368357}
    369358
     359
    370360void TriggerBit::PrintTrigCondition(const string& LogName,const int i)
    371361{
     
    379369  int etmis_size = TriggerBit::EtmisValues.size();
    380370  int bjets_size = TriggerBit::BjetValues.size();
    381  
     371
    382372  ofstream f_out(LogName.c_str(),ios::app);
    383373
     
    439429   }
    440430  return OrderedValue;
     431
    441432}
    442433
     
    480471}
    481472
    482 
Note: See TracChangeset for help on using the changeset viewer.