Fork me on GitHub

Changeset 469 in svn


Ignore:
Timestamp:
Jul 13, 2009, 9:40:57 AM (15 years ago)
Author:
Xavier Rouby
Message:

property 'invisible()' added to PdgParticle

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/CHANGELOG

    r467 r469  
    88   - bug fix: number of events to process is correct event if multiple files in the inputlist
    99   - updates in Resolution.cpp & Resolution_ATLAS.cpp
     10   - new method "invisible()" in PdgParticle, needed for invisible particles BSM
    1011
    1112 /-----------------------------------------\
  • trunk/Delphes.cpp

    r463 r469  
    396396         
    397397          // 2.1a.2********************* visible particles only
    398           if( (particle->Status == 1) && (pid != pNU1) && (pid != pNU2) && (pid != pNU3) )
     398          if( (particle->Status == 1) && (! pdg_part.invisible() ) )
    399399            {
    400400              // 2.1a.2.1 Central solenoidal magnetic field
  • trunk/Resolutions.cpp

    r468 r469  
    4949#include "JetsUtil.h"
    5050#include "BFieldProp.h"
     51#include "PdgParticle.h"
    5152
    5253#include<vector>
     
    325326        {
    326327          genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E);
    327          
     328          PdgParticle pdg_part = DET->PDGtable[particle->PID];
    328329          int pid = abs(particle->PID);
    329330          float eta = fabs(particle->Eta);
     
    336337         
    337338          //Calculate ETMIS from generated particles
    338           if((pid == pNU1) || (pid == pNU2) || (pid == pNU3))PTmisGEN = PTmisGEN + genMomentum;
     339          //if((pid == pNU1) || (pid == pNU2) || (pid == pNU3))PTmisGEN = PTmisGEN + genMomentum;
     340          if( (particle->Status == 1) && pdg_part.invisible() )PTmisGEN = PTmisGEN + genMomentum;
    339341
    340342          //Electrons and muons 
    341343          if( (particle->Status == 1)    &&
    342             ((pid != pNU1) && (pid != pNU2) && (pid != pNU3)) &&
     344            //((pid != pNU1) && (pid != pNU2) && (pid != pNU3)) &&
     345             (! pdg_part.invisible() ) &&
    343346             (fabs(particle->Eta) < DET->CEN_max_calo_fwd)
    344347            )
  • trunk/Resolutions_ATLAS.cpp

    r467 r469  
    4949#include "JetsUtil.h"
    5050#include "BFieldProp.h"
     51#include "PdgParticle.h"
    5152
    5253#include<vector>
     
    327328        {
    328329          genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E);
     330          PdgParticle pdg_part = DET->PDGtable[particle->PID];
    329331         
    330332          int pid = abs(particle->PID);
     
    338340         
    339341          //Calculate ETMIS from generated particles
    340           if((pid == pNU1) || (pid == pNU2) || (pid == pNU3))PTmisGEN = PTmisGEN + genMomentum;
     342          //if((pid == pNU1) || (pid == pNU2) || (pid == pNU3))PTmisGEN = PTmisGEN + genMomentum;
     343          if( (particle->Status == 1) && pdg_part.invisible() )PTmisGEN = PTmisGEN + genMomentum;
    341344
    342345          //Electrons and muons 
    343346          if( (particle->Status == 1)    &&
    344             ((pid != pNU1) && (pid != pNU2) && (pid != pNU3)) &&
     347            //((pid != pNU1) && (pid != pNU2) && (pid != pNU3)) &&
     348             (! pdg_part.invisible() ) &&
    345349             (fabs(particle->Eta) < DET->CEN_max_calo_fwd)
    346350            )
  • trunk/interface/PdgParticle.h

    r443 r469  
    4040class PdgParticle {
    4141  public:
    42         PdgParticle(): _pid(-999), _mass(0), _charge(0), _gamma_tot(0), _ctau(0), _name("Unknown") {};
    43         PdgParticle(const int pid, const std::string& name, const float m, const float q, const float gamma, const float ctau);
     42        PdgParticle(): _pid(-999), _mass(0), _charge(0), _gamma_tot(0), _ctau(0), _name("Unknown"), _isInvisible(false) {};
     43        PdgParticle(const long int pid, const std::string& name, const float m, const float q, const float gamma, const float ctau);
    4444        PdgParticle(const PdgParticle& p);
    4545        PdgParticle& operator=(const PdgParticle& p);
    4646        ~PdgParticle() {};
    47         int pid() const {return _pid;};
     47        long int pid() const {return _pid;};
    4848        float mass() const {return _mass;};
    4949        float charge() const {return _charge;};
    5050        float gamma_tot() const {return _gamma_tot;};
    5151        double ctau() const {return _ctau;};
     52        bool invisible() const {return _isInvisible;};
    5253        std::string name() const {return _name;};
    5354
    5455  private:
    55         int _pid;
    56         float _mass;       // GeV
    57         float _charge;     // in e+
    58         float _gamma_tot;  // GeV
     56        long int _pid;
     57        float _mass;        // GeV
     58        float _charge;      // in e+
     59        float _gamma_tot;   // GeV
    5960        double _ctau;       // in m
    6061        std::string _name;
     62        bool _isInvisible;  // neutrino-like
    6163};
    6264
     
    6769        PdgTable& operator=(const PdgTable& table);
    6870        ~PdgTable(){};
    69         void insert(const int pid, const PdgParticle &p);
     71        void insert(const long int pid, const PdgParticle &p);
    7072        void print() const;
    7173        PdgParticle operator[](const int pid) const;
  • trunk/src/PdgParticle.cc

    r443 r469  
    4343//PdgParticle::PdgParticle() : _pid(1), _mass(-1), _charge(-999), _gamma_tot(-1), _ctau(-1), _name("") {}
    4444
    45 PdgParticle::PdgParticle(const int pid, const std::string& name, const float m, const float q, const float gamma, const float ctau) :
    46   _pid(pid), _mass(m), _charge(q), _gamma_tot(gamma), _ctau(ctau), _name(name) {}
     45PdgParticle::PdgParticle(const long int pid, const std::string& name, const float m, const float q, const float gamma, const float ctau) :
     46  _pid(pid), _mass(m), _charge(q), _gamma_tot(gamma), _ctau(ctau), _name(name) {
     47  if( (abs(pid) == 12)       || (abs(pid) == 14)       || (abs(pid) == 16)      ||
     48      (abs(pid) == 1000022 ) || (abs(pid) == 1000023 ) || (abs(pid) == 1000025) ||
     49      (abs(pid) == 1000035 ) || (abs(pid) == 1000045 ) ) { /*std::cout << "invisible : " << pid << std::endl;*/ _isInvisible = true; }
     50  else _isInvisible = false;
     51}
    4752
    4853
    4954PdgParticle::PdgParticle(const PdgParticle& p) :
    50   _pid(p._pid), _mass(p._mass), _charge(p._charge), _gamma_tot(p._gamma_tot), _ctau(p._ctau), _name(p._name) {}
     55  _pid(p._pid), _mass(p._mass), _charge(p._charge), _gamma_tot(p._gamma_tot), _ctau(p._ctau), _name(p._name), _isInvisible(p._isInvisible) {}
    5156
    5257PdgParticle& PdgParticle::operator=(const PdgParticle& p) {
     
    5459    _pid = p._pid;      _name= p._name;                 _mass=p._mass;
    5560    _charge=p._charge;  _gamma_tot=p._gamma_tot;        _ctau = p._ctau;
     61    _isInvisible = p._isInvisible;
    5662   return *this;
    5763}
     
    7177}
    7278
    73 void PdgTable::insert(const int pid, const PdgParticle &p) {
     79void PdgTable::insert(const long int pid, const PdgParticle &p) {
    7480   _table.insert(std::map<int,PdgParticle>::value_type(pid,p));
    7581}
     
    7783void PdgTable::print() const {
    7884   std::map<int, PdgParticle>::const_iterator i;
    79    for(i = _table.begin(); i != _table.end(); i++)
     85   for(i = _table.begin(); i != _table.end(); i++) {
    8086         std::cout << "name = " << std::setw(20) << std::left << i->second.name()
    8187                   << "pid = "  << std::setw(10) << i->first
    8288                   << "\t M="   << std::setw(10) << i->second.mass() << "GeV/c^2"
    8389                   << "\t Q="   << std::setw(6)  << i->second.charge() << "e+"
    84                    << "\t ctau=" << i->second.ctau() << " m" << std::endl;
     90                   << "\t ctau=" << i->second.ctau() << " m";
     91         if(i->second.invisible()) std::cout << "\t invisible";
     92         std::cout << std::endl;
     93   }
    8594}
    8695
  • trunk/src/SmearUtil.cc

    r465 r469  
    14671467    curstring.clear(); // needed when using several times istringstream::str(string)
    14681468    curstring.str(temp_string);
    1469     int ID; string name; int charge; float mass; float width; float lifetime;
     1469    long int ID; std::string name; int charge; float mass; float width; float lifetime;
    14701470    // ID name   chg       mass    total width   lifetime
    14711471    //  1 d      -1      0.33000     0.00000   0.00000E+00
Note: See TracChangeset for help on using the changeset viewer.