Fork me on GitHub

Ignore:
Timestamp:
Jun 17, 2009, 11:08:32 PM (15 years ago)
Author:
Xavier Rouby
Message:

TRootGenFwdParticle better written

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/ExRootAnalysis/src/BlockClasses.cc

    r409 r439  
    124124
    125125
    126 TRootGenFwdParticle::TRootGenFwdParticle(const TRootGenFwdParticle& p):
     126TRootGenFwdParticle::TRootGenFwdParticle(const TRootGenFwdParticle& p): TSortableObject(),
    127127        genE(p.genE), genPx(p.genPx), genPy(p.genPy), genPz(p.genPz), genPT(p.genPT), genEta(p.genEta), genPhi(p.genPhi) {}
    128128
    129129TRootGenFwdParticle& TRootGenFwdParticle::operator=(const TRootGenFwdParticle& p){
     130   if(this == &p) return *this;
    130131        genE=p.genE;    genPx=p.genPx;   genPy=p.genPy;   genPz=p.genPz;   
    131132        genPT=p.genPT;  genEta=p.genEta; genPhi=p.genPhi;
     133   return *this;
    132134}
    133135
     
    188190        Charge = UNDEFINED;
    189191}
    190 TRootTracks::TRootTracks(const TRootTracks& track) :
     192TRootTracks::TRootTracks(const TRootTracks& track) : TSortableObject(),
    191193        Eta(track.Eta), Phi(track.Phi),
    192194        EtaOuter(track.EtaOuter), PhiOuter(track.PhiOuter),
     
    219221        //Eta(UNDEFINED), Phi(UNDEFINED), E_em(UNDEFINED), E_had(UNDEFINED), E(UNDEFINED), ET(UNDEFINED) {}
    220222
    221 TRootCalo::TRootCalo(const TRootCalo& cal) {
     223TRootCalo::TRootCalo(const TRootCalo& cal) : TSortableObject() {
    222224        E_em=cal.E_em; E_had=cal.E_had;  ET=cal.ET;
    223225        //Eta =cal.Eta;  Phi=cal.Phi; E_em=cal.E_em; E_had=cal.E_had;  E=cal.E;   ET=cal.ET;
     
    237239
    238240TRootZdcHits::TRootZdcHits(const float e, const float t, const int side, const bool had) : E(e), T(t), side(side), hadronic_hit(had) {}
    239 TRootZdcHits::TRootZdcHits(const TRootZdcHits& zdc) : E(zdc.E), T(zdc.T), side(zdc.side),  hadronic_hit(zdc.hadronic_hit) {}
     241
     242TRootZdcHits::TRootZdcHits(const TRootZdcHits& zdc) : TRootGenFwdParticle(zdc), E(zdc.E), T(zdc.T), side(zdc.side),  hadronic_hit(zdc.hadronic_hit) {}
     243
    240244TRootZdcHits& TRootZdcHits::operator=(const TRootZdcHits& zdc) {
    241         if(this==&zdc) return *this;
     245  if(this==&zdc) return *this;
    242246        E = zdc.E; T = zdc.T;  side = zdc.side; hadronic_hit = zdc.hadronic_hit;
    243247  return *this;
Note: See TracChangeset for help on using the changeset viewer.