Fork me on GitHub

Changeset 270 in svn for trunk/Utilities/ExRootAnalysis


Ignore:
Timestamp:
Feb 14, 2009, 2:06:20 AM (16 years ago)
Author:
severine ovyn
Message:

remove double GEN pfff

Location:
trunk/Utilities/ExRootAnalysis
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h

    r268 r270  
    164164  float Phi; // particle azimuthal angle in rad
    165165
    166   float EtaCalo; // particle pseudorapidity when entering the calo,
    167   float PhiCalo; // particle azimuthal angle in rad when entering the calo
    168 
    169166  void Set(const TLorentzVector& momentum);
    170167  void Set(const float px, const float py, const float pz, const float e);
    171168  void SetEtaPhi(const float eta, const float phi) {Eta=eta; Phi=phi;};
    172   void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
    173169  void SetEtaPhiEET(const float eta, const float phi, const float e, const float et);
    174170  static TCompare *fgCompare; //!
     
    179175};
    180176
    181 
    182 //---------------------------------------------------------------------------
    183 
    184 class TRootGenParticle: public TRootParticle {
    185 
    186 public:
    187   TRootGenParticle() {_initialised=false;}
     177//--------------------------------------------------------------------------
     178
     179class GenParticle: public TRootParticle {
     180
     181public:
     182  GenParticle() {};
    188183  int PID; // particle HEP ID number [RawHepEventParticle::pid()]
    189184  int Status; // particle status [RawHepEventParticle::status()]
     
    193188  int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1]
    194189
     190  float Charge;
     191
     192  float T; // particle vertex position (t component) [RawHepEventParticle::t()]
     193  float X; // particle vertex position (x component) [RawHepEventParticle::x()]
     194  float Y; // particle vertex position (y component) [RawHepEventParticle::y()]
     195  float Z; // particle vertex position (z component) [RawHepEventParticle::z()]
     196  float M;
     197 
     198
     199  static TCompare *fgCompare; //!
     200 
     201  ClassDef(GenParticle, 1)
     202};
     203
     204//---------------------------------------------------------------------------
     205
     206class TRootGenParticle: public TRootParticle {
     207
     208public:
     209  TRootGenParticle() {_initialised=false;}
     210  TRootGenParticle(GenParticle* part);
     211
     212  int PID; // particle HEP ID number [RawHepEventParticle::pid()]
     213  int Status; // particle status [RawHepEventParticle::status()]
     214  int M1; // particle 1st mother [RawHepEventParticle::mother1() - 1]
     215  int M2; // particle 2nd mother [RawHepEventParticle::mother2() - 1]
     216  int D1; // particle 1st daughter [RawHepEventParticle::daughter1() - 1]
     217  int D2; // particle 2nd daughter [RawHepEventParticle::daughter2() - 1]
     218
    195219  float T; // particle vertex position (t component) [RawHepEventParticle::t()]
    196220  float X; // particle vertex position (x component) [RawHepEventParticle::x()]
     
    199223  float M;
    200224  void setFractions();
    201   const float getCharge() const {return Charge;};
    202225  const float getFem()  {if(!_initialised) setFractions(); return _Fem;}
    203226  const float getFhad() {if(!_initialised) setFractions(); return _Fhad;}
    204227
     228  float EtaCalo; // particle pseudorapidity when entering the calo,
     229  float PhiCalo; // particle azimuthal angle in rad when entering the calo
     230  void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
     231
     232  static TCompare *fgCompare; //!
     233
    205234  float Charge;      // electrical charge
    206 
    207   static TCompare *fgCompare; //!
    208235 protected:
    209236  float _Fem, _Fhad; // fractions of energy deposit
     
    222249  static TCompare *fgCompare; //!
    223250
     251  float EtaCalo; // particle pseudorapidity when entering the calo,
     252  float PhiCalo; // particle azimuthal angle in rad when entering the calo
     253  void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
     254
    224255  bool IsolFlag;
    225256
     
    247278  int Charge; // particle Charge [RawHepEventParticle::pid()]
    248279  bool IsolFlag;
     280  float EtaCalo; // particle pseudorapidity when entering the calo,
     281  float PhiCalo; // particle azimuthal angle in rad when entering the calo
     282  void SetEtaPhiCalo(const float eta, const float phi) {EtaCalo=eta; PhiCalo=phi;};
     283
    249284  static TCompare *fgCompare; //!
    250285
  • trunk/Utilities/ExRootAnalysis/src/BlockClasses.cc

    r268 r270  
    3636
    3737TCompare *TRootGenParticle::fgCompare = 0;
     38TCompare *GenParticle::fgCompare = 0;
    3839TCompare *TRootElectron::fgCompare = TComparePT<TRootElectron>::Instance();
    3940TCompare *TRootMuon::fgCompare = TComparePT<TRootMuon>::Instance();
     
    9091   Px = PT*cos(Phi);
    9192   Py = PT*sin(Phi);
     93}
     94
     95TRootGenParticle::TRootGenParticle(GenParticle* part) :
     96PID(part->PID),Status(part->Status),M1(part->M1),M2(part->M2),D1(part->D1),D2(part->D2),
     97T(part->T),X(part->X),Y(part->Y),Z(part->Z),M(part->M){
     98    E=part->E;
     99    Px=part->Px;
     100    Py=part->Py;
     101    Pz=part->Pz;
     102    Eta=part->Eta;
     103    Phi=part->Phi;
     104    PT=part->PT;
     105    _initialised=false;
    92106}
    93107
  • trunk/Utilities/ExRootAnalysis/src/BlockClassesLinkDef.h

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