Fork me on GitHub

Changeset 268 in svn for trunk/Utilities


Ignore:
Timestamp:
Feb 13, 2009, 10:18:55 PM (15 years ago)
Author:
severine ovyn
Message:

nettoyage

Location:
trunk/Utilities/ExRootAnalysis
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/ExRootAnalysis/CREDITS

    r164 r268  
    1 ExRootAnalysis utility
    2 Pavel Demin
     1Based on the ExRootAnalysis utility of Pavel Demin
     2Modified by S. Ovyn and X. Rouby
    33
    44Center for Particle Physics and Phenomenology (CP3)
  • trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h

    r267 r268  
    22#define BLOCKCLASSES_H
    33
    4 /** \class BlockClasses
    5  *
    6  *  Definition of classes to be stored in root tree. 
    7  *  You can decide to have the objects in each event to be sorted according
    8  *  to one of the data member of the class. If you decide so then a class
    9  *  inheriting from class TCompare should be implemented.
    10  *  There are already several functions TCompare*** implemented
    11  *  (see BlockCompare.h).
    12  *  Function TCompareXX sorts objects by the variable "XX" that MUST be
    13  *  present in the data members of the Block TRoot class.
    14  *
    15  *  $Date: 2009-02-13 19:38:03 $
    16  *  $Revision: 1.13 $
    17  *
    18  * 
    19  *  \author P. Demin - UCL, Louvain-la-Neuve
    20  *
    21  */
     4/***********************************************************************
     5**                                                                    **
     6**          /----------------------------------------------\          **
     7**         |  Delphes, a framework for the fast simulation  |         **
     8**         |       of a  generic collider experiment        |         **
     9**          \----------------------------------------------/          **
     10**                                                                    **
     11**                                                                    **
     12**   This package uses:                                               **
     13**   ------------------                                               **
     14**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      **
     15**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       **
     16**   FROG: [hep-ex/0901.2718v1]                                       **
     17**                                                                    **
     18** ------------------------------------------------------------------ **
     19**                                                                    **
     20**   Main authors:                                                    **
     21**   -------------                                                    **
     22**                                                                    **
     23**                Severine Ovyn                Xavier Rouby           **
     24**          severine.ovyn@uclouvain.be      xavier.rouby@cern         **
     25**                                                                    **
     26**         Center for Particle Physics and Phenomenology (CP3)        **
     27**                Universite catholique de Louvain (UCL)              **       
     28**                     Louvain-la-Neuve, Belgium                      **           
     29**                                                                    **
     30**                      Copyright (C) 2008-2009,                      **
     31**                        All rights reserved.                        ** 
     32**                                                                    **
     33***********************************************************************/
    2234
    2335#include "TLorentzVector.h"
     
    162174  static TCompare *fgCompare; //!
    163175  const TCompare *GetCompare() const { return fgCompare; }
    164   //void SetEem_Ehad(const float sE_em, const float sE_had) {} ; // sets E_em and E_had, computes E and ET
    165176  float PT; // particle transverse momentum in GeV
    166   //const float getEtaGen() const {return _EtaGen;}
    167   //const float getPhiGen() const {return _PhiGen;}
    168 
    169 
    170 //protected:
    171   //float EGen, _EtaGen, _PhiGen; // from the generator: energy, eta, phi
    172177
    173178  ClassDef(TRootParticle, 1)
     
    249254//---------------------------------------------------------------------------
    250255
    251 class D_Track : public TSortableObject {
    252 //class D_Track : public TRootParticle {
     256class TRootTracks : public TSortableObject {
    253257 public:
    254     D_Track(); // needed for storage in ExRootAnalysis
    255     D_Track(const D_Track& track);
    256     D_Track(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt);
    257     D_Track& operator=(const D_Track& track);
     258    TRootTracks(); // needed for storage in ExRootAnalysis
     259    TRootTracks(const TRootTracks& track);
     260    TRootTracks(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt);
     261    TRootTracks& operator=(const TRootTracks& track);
    258262    void Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt);
    259263    const TLorentzVector GetFourVector() const;
     
    262266    const float getEtaOuter() const {return EtaOuter;}
    263267    const float getPhiOuter() const {return PhiOuter;}
    264     const float getE() const {return E;}
    265     const float getPx() const {return Px;}
    266     const float getPy() const {return Py;}
    267     const float getPz() const {return Pz;}
    268     const float getPT() const {return PT;}
    269 
    270   static TCompare *fgCompare; //!
    271   const TCompare *GetCompare() const { return fgCompare; }
    272  protected:
     268
     269    static TCompare *fgCompare; //!
     270    const TCompare *GetCompare() const { return fgCompare; }
     271
    273272    float Eta, Phi; // (eta,phi) at the beginning of the track
    274273    float EtaOuter, PhiOuter; // (eta,phi) at the end of the track
    275274    float PT, E, Px, Py, Pz;  // transverse momentum
    276  ClassDef(D_Track, 1)
    277 };
    278 
    279 
    280 class TRootTracks: public TRootParticle  {
    281 public:
    282   TRootTracks() {} // : Etaout(0), Phiout(0) {};
    283   static TCompare *fgCompare; //!
    284   TRootTracks(const D_Track& track);
    285   float E;  // particle energy in GeV
    286   float Px; // particle momentum vector (x component) in GeV
    287   float Py; // particle momentum vector (y component) in GeV
    288   float Pz; // particle momentum vector (z component) in GeV
    289 
    290   float Eta; // particle pseudorapidity
    291   float Phi; // particle azimuthal angle in rad
    292 
    293   float EtaCalo; // particle pseudorapidity when entering the calo,
    294   float PhiCalo; // particle azimuthal angle in rad when entering the calo
    295 //  float X, Y, Z; // coordinates of the beginning of the track
    296 //  float Xout, Yout, Zout; // coordinates of the end of the track
    297   //float Etaout, Phiout; // coordinates of the end of the track
    298 //  void SetPosition(const float x, const float y, const float z) {X=x; Y=y; Z=z;}
    299 //  void SetPositionOut(const float x, const float y, const float z) {Xout=x; Yout=y; Zout=z;}
    300   ClassDef(TRootTracks, 1)
    301 };
    302 
    303 //---------------------------------------------------------------------------
    304 
    305 /*class TRootCalo: public TRootParticle
    306 public:
    307   TRootCalo() {};
    308   static TCompare *fgCompare; //!
    309 
    310   ClassDef(TRootCalo, 1)
    311 };
    312 */
     275 ClassDef(TRootTracks, 1)
     276};
     277
     278//---------------------------------------------------------------------------
    313279
    314280class TRootCalo: public TSortableObject
     
    328294 
    329295 protected:
    330     //float Eta, Phi;    // segmented eta, phi
    331296    float E_em, E_had; // electromagnetic and hadronic components of the tower energy
    332     //float E;
    333297    float ET;       // total energy and transverse energy   
    334298   ClassDef(TRootCalo, 1)
  • trunk/Utilities/ExRootAnalysis/src/BlockClasses.cc

    r267 r268  
    1 /** \class BlockClasses
    2  *
    3  *  Initialization of static fgCompare functions. At the moment a number of
    4  *  functions TCompare*** are implemented (see BlockCompare.h).
    5  *  Function TCompareXX sorts objects
    6  *  by the variable "XX" that MUST be present in the data members of the
    7  *  Block TRoot class.
    8  *  By default most objects are sorted by PT or ET.
    9  *  Only calorimeter cells and basic cluster are sorted by E
    10  *  TRootGenParticle particle is not sorted by default
    11  *  to preserve mother-dautherlinks between particles.
    12  *
    13  *  $Date: 2009-02-13 19:38:03 $
    14  *  $Revision: 1.9 $
    15  *
    16  * 
    17  *  \author S. Ovyn - UCL, Louvain-la-Neuve
    18  *
    19  */
     1/***********************************************************************
     2**                                                                    **
     3**          /----------------------------------------------\          **
     4**         |  Delphes, a framework for the fast simulation  |         **
     5**         |       of a  generic collider experiment        |         **
     6**          \----------------------------------------------/          **
     7**                                                                    **
     8**                                                                    **
     9**   This package uses:                                               **
     10**   ------------------                                               **
     11**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      **
     12**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       **
     13**   FROG: [hep-ex/0901.2718v1]                                       **
     14**                                                                    **
     15** ------------------------------------------------------------------ **
     16**                                                                    **
     17**   Main authors:                                                    **
     18**   -------------                                                    **
     19**                                                                    **
     20**                Severine Ovyn                Xavier Rouby           **
     21**          severine.ovyn@uclouvain.be      xavier.rouby@cern         **
     22**                                                                    **
     23**         Center for Particle Physics and Phenomenology (CP3)        **
     24**                Universite catholique de Louvain (UCL)              **       
     25**                     Louvain-la-Neuve, Belgium                      **           
     26**                                                                    **
     27**                      Copyright (C) 2008-2009,                      **
     28**                        All rights reserved.                        ** 
     29**                                                                    **
     30***********************************************************************/
    2031
    2132#include "BlockClasses.h"
     
    3041TCompare *TRootTauJet::fgCompare = TComparePT<TRootTauJet>::Instance();
    3142TCompare *TRootJet::fgCompare = TComparePT<TRootJet>::Instance();
    32 TCompare *TRootTracks::fgCompare = TComparePT<TRootTracks>::Instance();
     43TCompare *TRootTracks::fgCompare = 0;
    3344TCompare *TRootETmis::fgCompare = 0;
    3445TCompare *TRootCalo::fgCompare = 0;
     
    3950TCompare *TRootRomanPotHits::fgCompare =0;
    4051TCompare *TRootTrigger::fgCompare =0;
    41 //TCompare *D_CaloTower::fgCompare=0;
    42 TCompare *D_Track::fgCompare=0;
    4352
    4453void TRootParticle::Set(const TLorentzVector& momentum) {
     
    107116    float PT, E, Px, Py, Pz;
    108117
    109 D_Track::D_Track() :
     118TRootTracks::TRootTracks() :
    110119        Eta(UNDEFINED), Phi(UNDEFINED), EtaOuter(UNDEFINED), PhiOuter(UNDEFINED),
    111120        PT(UNDEFINED), E(UNDEFINED), Px(UNDEFINED), Py(UNDEFINED), Pz(UNDEFINED) {}
    112121
    113 D_Track::D_Track(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt) :
     122TRootTracks::TRootTracks(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt) :
    114123        Eta(inEta), Phi(inPhi), EtaOuter(outEta), PhiOuter(outPhi),
    115124        PT(pt) {
     
    117126        Px = p.Px(); Py = p.Py(); Pz = p.Pz();  E=p.E();
    118127}
    119 
    120 D_Track::D_Track(const D_Track& track) :
     128TRootTracks::TRootTracks(const TRootTracks& track) :
    121129        Eta(track.Eta), Phi(track.Phi),
    122130        EtaOuter(track.EtaOuter), PhiOuter(track.PhiOuter),
    123131        PT(track.PT), E(track.E), Px(track.Px), Py(track.Py), Pz(track.Pz) {}
    124132
    125 D_Track& D_Track::operator=(const D_Track& track) {
     133TRootTracks& TRootTracks::operator=(const TRootTracks& track) {
    126134  if(this == &track) return *this;
    127135        Eta = track.Eta;             Phi = track.Phi;
     
    131139}
    132140
    133 void D_Track::Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt) {
     141void TRootTracks::Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt) {
    134142        Eta= inEta; Phi=inPhi;  EtaOuter=outEta; PhiOuter=outPhi; PT=pt;
    135143        TLorentzVector p; p.SetPtEtaPhiE(PT,Eta,Phi,PT*cosh(Eta));
     
    137145}
    138146
    139 const TLorentzVector D_Track::GetFourVector() const {
     147const TLorentzVector TRootTracks::GetFourVector() const {
    140148        TLorentzVector v;
    141149        v.SetPtEtaPhiE(PT,Eta,Phi,PT*cosh(Eta));
     
    162170        E_em=cal.getEem(); E_had=cal.getEhad();
    163171        E   =cal.getE();   ET   =cal.getET();
    164         //EtaCalo = cal.getEta();
    165         //PhiCalo = cal.getPhi();
    166172}
    167 
    168 
    169 TRootTracks::TRootTracks(const D_Track& track) :
    170    E(track.getE()), Px(track.getPx()), Py(track.getPy()), Pz(track.getPz()),
    171    Eta(track.getEta()), Phi(track.getPhi()),
    172    /*Etaout(track.getEtaOuter()),*/ EtaCalo(track.getEtaOuter()), /*Phiout(track.getPhiOuter()),*/ PhiCalo(track.getPhiOuter()) {}
    173 
  • trunk/Utilities/ExRootAnalysis/src/BlockClassesLinkDef.h

    r267 r268  
    1 
    2 /** \class BlockClassesLinkDef
    3  *
    4  *  Lists classes to be included in cint dicitonary
    5  *
    6  *  $Date: 2009-02-13 19:38:03 $
    7  *  $Revision: 1.4 $
    8  *
    9  * 
    10  *  \author S. Ovyn - UCL, Louvain-la-Neuve
    11  *
    12  */
     1/***********************************************************************
     2**                                                                    **
     3**          /----------------------------------------------\          **
     4**         |  Delphes, a framework for the fast simulation  |         **
     5**         |       of a  generic collider experiment        |         **
     6**          \----------------------------------------------/          **
     7**                                                                    **
     8**                                                                    **
     9**   This package uses:                                               **
     10**   ------------------                                               **
     11**   FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210]      **
     12**   Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2]       **
     13**   FROG: [hep-ex/0901.2718v1]                                       **
     14**                                                                    **
     15** ------------------------------------------------------------------ **
     16**                                                                    **
     17**   Main authors:                                                    **
     18**   -------------                                                    **
     19**                                                                    **
     20**                Severine Ovyn                Xavier Rouby           **
     21**          severine.ovyn@uclouvain.be      xavier.rouby@cern         **
     22**                                                                    **
     23**         Center for Particle Physics and Phenomenology (CP3)        **
     24**                Universite catholique de Louvain (UCL)              **       
     25**                     Louvain-la-Neuve, Belgium                      **           
     26**                                                                    **
     27**                      Copyright (C) 2008-2009,                      **
     28**                        All rights reserved.                        ** 
     29**                                                                    **
     30***********************************************************************/
    1331
    1432#include "Utilities/ExRootAnalysis/interface/BlockClasses.h"
     
    4058#pragma link C++ class TRootLHEFEvent+;
    4159#pragma link C++ class TRootLHEFParticle+;
    42 #pragma link C++ class D_Track+;
    43 //#pragma link C++ class D_CaloTower+;
    44 
    4560
    4661#endif
Note: See TracChangeset for help on using the changeset viewer.