Changeset 268 in svn
- Timestamp:
- Feb 13, 2009, 10:18:55 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Delphes.cpp
r267 r268 180 180 181 181 //read the datacard input file 182 string DetDatacard(" ");//for detector smearing parameters182 string DetDatacard("data/DataCardDet.dat"); //for detector smearing parameters 183 183 string TrigDatacard("data/trigger.dat"); //for trigger selection 184 184 … … 297 297 ExRootTreeBranch *branchPhoton = treeWriter->NewBranch("Photon", TRootPhoton::Class()); 298 298 //ExRootTreeBranch *branchTracks = treeWriter->NewBranch("Tracks", TRootTracks::Class()); 299 ExRootTreeBranch *branchTrack = treeWriter->NewBranch("Tracks", D_Track::Class());299 ExRootTreeBranch *branchTrack = treeWriter->NewBranch("Tracks", TRootTracks::Class()); 300 300 ExRootTreeBranch *branchETmis = treeWriter->NewBranch("ETmis", TRootETmis::Class()); 301 301 ExRootTreeBranch *branchCalo = treeWriter->NewBranch("CaloTower", TRootCalo::Class()); … … 308 308 TRootMuon *elementMu; 309 309 TRootPhoton *elementPhoton; 310 D_Track* elementTrack;310 TRootTracks * elementTrack; 311 311 TRootCalo *elementCalo; 312 312 … … 487 487 // 2.1a.2.3.5 Tracks 488 488 if( (rand()%100) < DET->TRACK_eff && sET!=0) { 489 elementTrack = ( D_Track*) branchTrack->NewEntry();489 elementTrack = (TRootTracks*) branchTrack->NewEntry(); 490 490 elementTrack->Set(particle->Eta, particle->Phi, particle->EtaCalo, particle->PhiCalo, sET); 491 491 TrackCentral.push_back(elementTrack->GetFourVector()); // tracks at vertex! -
trunk/Utilities/ExRootAnalysis/CREDITS
r164 r268 1 ExRootAnalysis utility 2 Pavel Demin 1 Based on the ExRootAnalysis utility of Pavel Demin 2 Modified by S. Ovyn and X. Rouby 3 3 4 4 Center for Particle Physics and Phenomenology (CP3) -
trunk/Utilities/ExRootAnalysis/interface/BlockClasses.h
r267 r268 2 2 #define BLOCKCLASSES_H 3 3 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 ***********************************************************************/ 22 34 23 35 #include "TLorentzVector.h" … … 162 174 static TCompare *fgCompare; //! 163 175 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 ET165 176 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, phi172 177 173 178 ClassDef(TRootParticle, 1) … … 249 254 //--------------------------------------------------------------------------- 250 255 251 class D_Track : public TSortableObject { 252 //class D_Track : public TRootParticle { 256 class TRootTracks : public TSortableObject { 253 257 public: 254 D_Track(); // needed for storage in ExRootAnalysis255 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); 258 262 void Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt); 259 263 const TLorentzVector GetFourVector() const; … … 262 266 const float getEtaOuter() const {return EtaOuter;} 263 267 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 273 272 float Eta, Phi; // (eta,phi) at the beginning of the track 274 273 float EtaOuter, PhiOuter; // (eta,phi) at the end of the track 275 274 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 //--------------------------------------------------------------------------- 313 279 314 280 class TRootCalo: public TSortableObject … … 328 294 329 295 protected: 330 //float Eta, Phi; // segmented eta, phi331 296 float E_em, E_had; // electromagnetic and hadronic components of the tower energy 332 //float E;333 297 float ET; // total energy and transverse energy 334 298 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 ***********************************************************************/ 20 31 21 32 #include "BlockClasses.h" … … 30 41 TCompare *TRootTauJet::fgCompare = TComparePT<TRootTauJet>::Instance(); 31 42 TCompare *TRootJet::fgCompare = TComparePT<TRootJet>::Instance(); 32 TCompare *TRootTracks::fgCompare = TComparePT<TRootTracks>::Instance();43 TCompare *TRootTracks::fgCompare = 0; 33 44 TCompare *TRootETmis::fgCompare = 0; 34 45 TCompare *TRootCalo::fgCompare = 0; … … 39 50 TCompare *TRootRomanPotHits::fgCompare =0; 40 51 TCompare *TRootTrigger::fgCompare =0; 41 //TCompare *D_CaloTower::fgCompare=0;42 TCompare *D_Track::fgCompare=0;43 52 44 53 void TRootParticle::Set(const TLorentzVector& momentum) { … … 107 116 float PT, E, Px, Py, Pz; 108 117 109 D_Track::D_Track() :118 TRootTracks::TRootTracks() : 110 119 Eta(UNDEFINED), Phi(UNDEFINED), EtaOuter(UNDEFINED), PhiOuter(UNDEFINED), 111 120 PT(UNDEFINED), E(UNDEFINED), Px(UNDEFINED), Py(UNDEFINED), Pz(UNDEFINED) {} 112 121 113 D_Track::D_Track(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt) :122 TRootTracks::TRootTracks(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt) : 114 123 Eta(inEta), Phi(inPhi), EtaOuter(outEta), PhiOuter(outPhi), 115 124 PT(pt) { … … 117 126 Px = p.Px(); Py = p.Py(); Pz = p.Pz(); E=p.E(); 118 127 } 119 120 D_Track::D_Track(const D_Track& track) : 128 TRootTracks::TRootTracks(const TRootTracks& track) : 121 129 Eta(track.Eta), Phi(track.Phi), 122 130 EtaOuter(track.EtaOuter), PhiOuter(track.PhiOuter), 123 131 PT(track.PT), E(track.E), Px(track.Px), Py(track.Py), Pz(track.Pz) {} 124 132 125 D_Track& D_Track::operator=(const D_Track& track) {133 TRootTracks& TRootTracks::operator=(const TRootTracks& track) { 126 134 if(this == &track) return *this; 127 135 Eta = track.Eta; Phi = track.Phi; … … 131 139 } 132 140 133 void D_Track::Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt) {141 void TRootTracks::Set(const float inEta, const float inPhi, const float outEta, const float outPhi, const float pt) { 134 142 Eta= inEta; Phi=inPhi; EtaOuter=outEta; PhiOuter=outPhi; PT=pt; 135 143 TLorentzVector p; p.SetPtEtaPhiE(PT,Eta,Phi,PT*cosh(Eta)); … … 137 145 } 138 146 139 const TLorentzVector D_Track::GetFourVector() const {147 const TLorentzVector TRootTracks::GetFourVector() const { 140 148 TLorentzVector v; 141 149 v.SetPtEtaPhiE(PT,Eta,Phi,PT*cosh(Eta)); … … 162 170 E_em=cal.getEem(); E_had=cal.getEhad(); 163 171 E =cal.getE(); ET =cal.getET(); 164 //EtaCalo = cal.getEta();165 //PhiCalo = cal.getPhi();166 172 } 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 ***********************************************************************/ 13 31 14 32 #include "Utilities/ExRootAnalysis/interface/BlockClasses.h" … … 40 58 #pragma link C++ class TRootLHEFEvent+; 41 59 #pragma link C++ class TRootLHEFParticle+; 42 #pragma link C++ class D_Track+;43 //#pragma link C++ class D_CaloTower+;44 45 60 46 61 #endif
Note:
See TracChangeset
for help on using the changeset viewer.