Fork me on GitHub

Changeset 264 in svn for trunk/interface/SmearUtil.h


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

first test 2.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/interface/SmearUtil.h

    r260 r264  
    4040#include "TLorentzVector.h"
    4141
     42#include "D_Constants.h"
     43#include "CaloUtil.h"
    4244#include "BlockClasses.h"
    4345#include "TSimpleArray.h"
     
    4648using namespace std;
    4749
    48 class ParticleUtil {
     50class D_Particle {
    4951
    5052 public:
    51   ParticleUtil(const TLorentzVector &genMomentum, int pid);
    52 
    53   float E() {return _e;}    // particle energy [GeV]
    54   float Px() {return _px;}  // horizontal coordinate of momentum [GeV]
    55   float Py() {return _py;}  // vertical coordinate of momentum [GeV]
    56   float Pz() {return _pz;}  // longitudinal coordinate of momentum [GeV]
    57   float Pt() {return _pt;}  // transverse momentum [GeV]
    58   float EtaCalo() {return _etaCalo;}  // pseudorapidity
    59   float Eta() {return _eta;}  // pseudorapidity
    60   float PhiCalo() {return _phiCalo;}  // azimuthal angle
    61   float Phi() {return _phi;}  // azimuthal angle
    62   int PID() {return _pid;}  // particle energy in [GeV]
     53  D_Particle(const TLorentzVector & p, const int pid, const float etacalo, const float phicalo) :
     54        _fourmomentum(p), _pid(pid), _etaCalo(etacalo), _phiCalo(phicalo) {}
     55  //D_Particle(const float e, const float eta, const float phi, const float pt, const int pid) :
     56  //    _pid(pid), _etaCalo(UNDEFINED), _phiCalo(UNDEFINED) { TLorentzVector p; p.SetPtEtaPhiE(pt,eta,phi,e); _fourmomentum = p; }
     57  D_Particle(const float px, const float py, const float pz, const float e, const int pid) :
     58        _fourmomentum(px,py,pz,e), _pid(pid), _etaCalo(UNDEFINED), _phiCalo(UNDEFINED) {}
     59
     60  const float E() const {return _fourmomentum.E();}    // particle energy [GeV]
     61  const float Px() const {return _fourmomentum.Px();}  // horizontal coordinate of momentum [GeV]
     62  const float Py() const {return _fourmomentum.Py();}  // vertical coordinate of momentum [GeV]
     63  const float Pz() const {return _fourmomentum.Pz();}  // longitudinal coordinate of momentum [GeV]
     64  const float Pt() const {return _fourmomentum.Pt();}  // transverse momentum [GeV]
     65  const float EtaCalo() const {return _etaCalo;}  // pseudorapidity
     66  const float Eta() const {return _fourmomentum.Eta();}  // pseudorapidity
     67  const float PhiCalo() const {return _phiCalo;}  // azimuthal angle
     68  const float Phi() const  {return _fourmomentum.Phi();}  // azimuthal angle
     69  const int PID() const {return _pid;}  // particle energy in [GeV]
     70  const TLorentzVector& getFourMomentum() const {return _fourmomentum;}
    6371
    6472 private:
    65   float _e, _px, _py, _pz, _pt;
    66   float _eta, _etaCalo, _phi, _phiCalo;
     73  TLorentzVector _fourmomentum;
    6774  int _pid;
     75  float _etaCalo, _phiCalo;
    6876};
    69 
    70 #ifndef __PI__
    71 #define __PI__
    72 extern const float pi = 3.14159265358979312;
    73 #endif
    7477
    7578class RESOLution
     
    9396  float VFD_s_zdc;   // distance of the Zero Degree Calorimeter, from the Interaction poin, in [m]
    9497
    95   float  RP_220_s; // distance of the RP to the IP, in meters
    96   float  RP_220_x; // distance of the RP to the beam, in meters
    97   float  RP_420_s; // distance of the RP to the IP, in meters
    98   float  RP_420_x; // distance of the RP to the beam, in meters
     98  float RP_220_s; // distance of the RP to the IP, in meters
     99  float RP_220_x; // distance of the RP to the beam, in meters
     100  float RP_420_s; // distance of the RP to the IP, in meters
     101  float RP_420_x; // distance of the RP to the beam, in meters
    99102  string RP_beam1Card; //
    100103  string RP_beam2Card; //
     
    186189 int FLAG_bfield;               //flag for bfield propagation
    187190 int FLAG_vfd;                  //flag for very forward detector
     191 int FLAG_zdc;                  //flag for very forward detector
    188192 
    189193 int NEvents_Frog;
     
    191195
    192196  // to sort a vector
    193   void SortedVector(vector<ParticleUtil> &vect);
     197  //void SortedVector(vector<ParticleUtil> &vect);
     198  void SortedVector(vector<D_Particle> &vect);
    194199
    195200  /// Reads the data card for the initialisation of the parameters
     
    227232
    228233};
    229 
    230 
    231 // particles PID (PDG ID)
    232 const int pU   = 1;    // c quark
    233 const int pD   = 2;    // b quark
    234 const int pS   = 3;    // s quark
    235 const int pC   = 4;    // c quark
    236 const int pB   = 5;    // b quark
    237 const int pE   = 11;   // e
    238 const int pNU1 = 12;   // nu_e
    239 const int pMU  = 13;   // mu
    240 const int pNU2 = 14;   // nu_mu
    241 const int pTAU = 15;   // tau
    242 const int pNU3 = 16;   // nu_tau
    243 const int pGLUON = 21; // gluon
    244 const int pGAMMA = 22; // gamma
    245 const int pW   = 24;   // W
    246 const int pP   = 2212; // proton
    247 const int pN   = 2112; // neutron
    248 const int pPI0 = 111;  // pi_0
    249 const int pK0L = 130;  // K^0_L
    250 const int pK0S = 310;  // K^0_S
    251 const int pLAMBDA = 3122; // Lambda
    252 const int pSIGMA0 = 3212;  // Sigma^0
    253 const int pDELTA0 = 2114;  // Delta^0
    254 
    255 const double speed_of_light = 299792458; // m/s
    256 const float UNDEFINED=-9999.;
    257 
    258234
    259235// ** returns the sign (+1 or -1) or an integer
Note: See TracChangeset for help on using the changeset viewer.