Fork me on GitHub

Changeset 409 in svn for trunk


Ignore:
Timestamp:
May 20, 2009, 10:48:41 AM (15 years ago)
Author:
Xavier Rouby
Message:

new class TRootGenFwdParticle; modifs in ZDC and RomanPot classes. New leaves in the branches

Location:
trunk/Utilities/ExRootAnalysis/src
Files:
2 edited

Legend:

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

    r387 r409  
    3636
    3737TCompare *TRootGenParticle::fgCompare = 0;
     38TCompare *TRootGenFwdParticle::fgCompare = 0;
    3839TCompare *TRootC::GenParticle::fgCompare = 0;
    3940TCompare *TRootElectron::fgCompare = TComparePT<TRootElectron>::Instance();
     
    6364}
    6465
     66void TRootGenFwdParticle::Set(const TLorentzVector& momentum) {
     67        genE   = momentum.E();
     68        genPx  = momentum.Px();
     69        genPy  = momentum.Py();
     70        genPz  = momentum.Pz();
     71        genPT  = momentum.Pt();
     72        genEta = momentum.Eta();
     73        genPhi = momentum.Phi();
     74}
     75
     76
    6577void TRootTauJet::Set(const TLorentzVector& momentum) {
    6678
     
    8799}
    88100
     101void TRootGenFwdParticle::Set(const float px, const float py, const float pz, const float e) {
     102        TLorentzVector toFill;
     103        toFill.SetPxPyPzE(px,py,pz,e);
     104        genE   = e;
     105        genPx  = px;
     106        genPy  = py;
     107        genPz  = pz;
     108        genPT  = toFill.Pt();
     109        genEta = toFill.Eta();
     110        genPhi = toFill.Phi();
     111}
     112
     113
    89114void TRootParticle::SetEtaPhiEET(const float eta, const float phi, const float e, const float et) {
    90115   Eta = eta; Phi = phi; E = e; PT = et;
    91116   //float theta = 2* atan(exp(-Eta);
    92    Px = PT*cos(Phi);
    93    Py = PT*sin(Phi);
     117   Px = PT*cos(Phi);     Py = PT*sin(Phi);
     118}
     119
     120void TRootGenFwdParticle::SetEtaPhiEET(const float eta, const float phi, const float e, const float et) {
     121   genEta = eta; genPhi = phi; genE = e; genPT = et;
     122   genPx = genPT*cos(genPhi);  genPy = genPT*sin(genPhi);
     123}
     124
     125
     126TRootGenFwdParticle::TRootGenFwdParticle(const TRootGenFwdParticle& p):
     127        genE(p.genE), genPx(p.genPx), genPy(p.genPy), genPz(p.genPz), genPT(p.genPT), genEta(p.genEta), genPhi(p.genPhi) {}
     128
     129TRootGenFwdParticle& TRootGenFwdParticle::operator=(const TRootGenFwdParticle& p){
     130        genE=p.genE;    genPx=p.genPx;   genPy=p.genPy;   genPz=p.genPz;   
     131        genPT=p.genPT;  genEta=p.genEta; genPhi=p.genPhi;
    94132}
    95133
     
    198236}
    199237
    200 /*TRootZdcHits::TRootZdcHits(const float e, const float t, const int side, const bool had) : E(e), T(t), side(side), hadronic_hit(had) {}
     238TRootZdcHits::TRootZdcHits(const float e, const float t, const int side, const bool had) : E(e), T(t), side(side), hadronic_hit(had) {}
    201239TRootZdcHits::TRootZdcHits(const TRootZdcHits& zdc) : E(zdc.E), T(zdc.T), side(zdc.side),  hadronic_hit(zdc.hadronic_hit) {}
    202 TRootZdcHits::TRootZdcHits(const TRootZdcHits& zdc) : T(zdc.T), side(zdc.side) {}
    203240TRootZdcHits& TRootZdcHits::operator=(const TRootZdcHits& zdc) {
    204241        if(this==&zdc) return *this;
    205         //E = zdc.E; T = zdc.T;  side = zdc.side; hadronic_hit = zdc.hadronic_hit;
    206         T = zdc.T;  side = zdc.side;
     242        E = zdc.E; T = zdc.T;  side = zdc.side; hadronic_hit = zdc.hadronic_hit;
    207243  return *this;
    208244}
    209 */
     245
    210246
    211247void TRootGenParticle:: print(){
  • trunk/Utilities/ExRootAnalysis/src/BlockClassesLinkDef.h

    r370 r409  
    4242#pragma link C++ class TRootSelectorInfo;
    4343#pragma link C++ class TRootGenParticle;
     44#pragma link C++ class TRootGenFwdParticle;
    4445#pragma link C++ class TRootC::GenParticle;
    4546#pragma link C++ class TRootElectron;
Note: See TracChangeset for help on using the changeset viewer.