ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/src/Muon.cc
Revision: 1.4
Committed: Mon May 18 06:28:24 2009 UTC (15 years, 11 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_013pre1, Mit_012i, Mit_012h, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010, Mit_009c, Mit_009b, Mit_009a
Changes since 1.3: +17 -1 lines
Log Message:
Implemented Print function

File Contents

# Content
1 // $Id: Muon.cc,v 1.3 2009/03/03 18:02:17 bendavid Exp $
2
3 #include "MitAna/DataTree/interface/Muon.h"
4
5 ClassImp(mithep::Muon)
6
7 using namespace mithep;
8
9 //--------------------------------------------------------------------------------------------------
10 Muon::Muon() :
11 fIsoR03SumPt(0), fIsoR03EmEt(0), fIsoR03HadEt(0), fIsoR03HoEt(0),
12 fIsoR03NTracks(0), fIsoR03NJets(0), fIsoR05SumPt(0), fIsoR05EmEt(0),
13 fIsoR05HadEt(0), fIsoR05HoEt(0), fIsoR05NTracks(0), fIsoR05NJets(0),
14 fEmEnergy(0), fHadEnergy(0), fHoEnergy(0), fEmS9Energy(0),
15 fHadS9Energy(0), fHoS9Energy(0), fNTraversedChambers(0), fIsGlobalMuon(kFALSE),
16 fIsTrackerMuon(kFALSE), fIsStandaloneMuon(kFALSE), fIsCaloMuon(kFALSE)
17 {
18 // Constructor.
19
20 memset(fDX,0,sizeof(Double32_t)*8);
21 memset(fDY,0,sizeof(Double32_t)*8);
22 memset(fPullX,0,sizeof(Double32_t)*8);
23 memset(fPullY,0,sizeof(Double32_t)*8);
24 memset(fTrackDist,0,sizeof(Double32_t)*8);
25 memset(fTrackDistErr,0,sizeof(Double32_t)*8);
26 memset(fNSegments,0,sizeof(Int_t)*8);
27 }
28
29 //--------------------------------------------------------------------------------------------------
30 void Muon::Print(Option_t */*opt*/) const
31 {
32 // Print particle kinematics.
33
34 TString type("GlM");
35 if (IsTrackerMuon())
36 type = "TrM";
37 else if (IsStandaloneMuon())
38 type = "SaM";
39 else if (IsCaloMuon())
40 type = "CaM";
41
42 printf("%s: pt=%.3f eta=%.3f phi=%.3f\n", type.Data(), Pt(), Eta(), Phi());
43 }