Changeset 469 in svn
- Timestamp:
- Jul 13, 2009, 9:40:57 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/CHANGELOG
r467 r469 8 8 - bug fix: number of events to process is correct event if multiple files in the inputlist 9 9 - updates in Resolution.cpp & Resolution_ATLAS.cpp 10 - new method "invisible()" in PdgParticle, needed for invisible particles BSM 10 11 11 12 /-----------------------------------------\ -
trunk/Delphes.cpp
r463 r469 396 396 397 397 // 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() ) ) 399 399 { 400 400 // 2.1a.2.1 Central solenoidal magnetic field -
trunk/Resolutions.cpp
r468 r469 49 49 #include "JetsUtil.h" 50 50 #include "BFieldProp.h" 51 #include "PdgParticle.h" 51 52 52 53 #include<vector> … … 325 326 { 326 327 genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E); 327 328 PdgParticle pdg_part = DET->PDGtable[particle->PID]; 328 329 int pid = abs(particle->PID); 329 330 float eta = fabs(particle->Eta); … … 336 337 337 338 //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; 339 341 340 342 //Electrons and muons 341 343 if( (particle->Status == 1) && 342 ((pid != pNU1) && (pid != pNU2) && (pid != pNU3)) && 344 //((pid != pNU1) && (pid != pNU2) && (pid != pNU3)) && 345 (! pdg_part.invisible() ) && 343 346 (fabs(particle->Eta) < DET->CEN_max_calo_fwd) 344 347 ) -
trunk/Resolutions_ATLAS.cpp
r467 r469 49 49 #include "JetsUtil.h" 50 50 #include "BFieldProp.h" 51 #include "PdgParticle.h" 51 52 52 53 #include<vector> … … 327 328 { 328 329 genMomentum.SetPxPyPzE(particle->Px, particle->Py, particle->Pz, particle->E); 330 PdgParticle pdg_part = DET->PDGtable[particle->PID]; 329 331 330 332 int pid = abs(particle->PID); … … 338 340 339 341 //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; 341 344 342 345 //Electrons and muons 343 346 if( (particle->Status == 1) && 344 ((pid != pNU1) && (pid != pNU2) && (pid != pNU3)) && 347 //((pid != pNU1) && (pid != pNU2) && (pid != pNU3)) && 348 (! pdg_part.invisible() ) && 345 349 (fabs(particle->Eta) < DET->CEN_max_calo_fwd) 346 350 ) -
trunk/interface/PdgParticle.h
r443 r469 40 40 class PdgParticle { 41 41 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); 44 44 PdgParticle(const PdgParticle& p); 45 45 PdgParticle& operator=(const PdgParticle& p); 46 46 ~PdgParticle() {}; 47 int pid() const {return _pid;};47 long int pid() const {return _pid;}; 48 48 float mass() const {return _mass;}; 49 49 float charge() const {return _charge;}; 50 50 float gamma_tot() const {return _gamma_tot;}; 51 51 double ctau() const {return _ctau;}; 52 bool invisible() const {return _isInvisible;}; 52 53 std::string name() const {return _name;}; 53 54 54 55 private: 55 int _pid;56 float _mass; // GeV57 float _charge; // in e+58 float _gamma_tot; // GeV56 long int _pid; 57 float _mass; // GeV 58 float _charge; // in e+ 59 float _gamma_tot; // GeV 59 60 double _ctau; // in m 60 61 std::string _name; 62 bool _isInvisible; // neutrino-like 61 63 }; 62 64 … … 67 69 PdgTable& operator=(const PdgTable& table); 68 70 ~PdgTable(){}; 69 void insert(const int pid, const PdgParticle &p);71 void insert(const long int pid, const PdgParticle &p); 70 72 void print() const; 71 73 PdgParticle operator[](const int pid) const; -
trunk/src/PdgParticle.cc
r443 r469 43 43 //PdgParticle::PdgParticle() : _pid(1), _mass(-1), _charge(-999), _gamma_tot(-1), _ctau(-1), _name("") {} 44 44 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) {} 45 PdgParticle::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 } 47 52 48 53 49 54 PdgParticle::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) {} 51 56 52 57 PdgParticle& PdgParticle::operator=(const PdgParticle& p) { … … 54 59 _pid = p._pid; _name= p._name; _mass=p._mass; 55 60 _charge=p._charge; _gamma_tot=p._gamma_tot; _ctau = p._ctau; 61 _isInvisible = p._isInvisible; 56 62 return *this; 57 63 } … … 71 77 } 72 78 73 void PdgTable::insert(const int pid, const PdgParticle &p) {79 void PdgTable::insert(const long int pid, const PdgParticle &p) { 74 80 _table.insert(std::map<int,PdgParticle>::value_type(pid,p)); 75 81 } … … 77 83 void PdgTable::print() const { 78 84 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++) { 80 86 std::cout << "name = " << std::setw(20) << std::left << i->second.name() 81 87 << "pid = " << std::setw(10) << i->first 82 88 << "\t M=" << std::setw(10) << i->second.mass() << "GeV/c^2" 83 89 << "\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 } 85 94 } 86 95 -
trunk/src/SmearUtil.cc
r465 r469 1467 1467 curstring.clear(); // needed when using several times istringstream::str(string) 1468 1468 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; 1470 1470 // ID name chg mass total width lifetime 1471 1471 // 1 d -1 0.33000 0.00000 0.00000E+00
Note:
See TracChangeset
for help on using the changeset viewer.