ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/src/Muon.cc
Revision: 1.11
Committed: Thu Jun 2 13:47:44 2011 UTC (13 years, 11 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_025c_branch2, Mit_025c_branch1, Mit_025c_branch0, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022
Branch point for: Mit_025c_branch
Changes since 1.10: +3 -3 lines
Log Message:
better fix for compiler warning, and fix uninitialized variable

File Contents

# Content
1 // $Id: Muon.cc,v 1.10 2011/05/20 16:51:40 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 fCharge(-99), 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), fD0PV(0), fD0PVErr(0), fIp3dPV(0), fIp3dPVErr(0),
16 fD0PVBS(0), fD0PVBSErr(0), fIp3dPVBS(0), fIp3dPVBSErr(0),
17 fPVCompatibility(0), fPVBSCompatibility(0),
18 fD0PVUB(0), fD0PVUBErr(0), fIp3dPVUB(0), fIp3dPVUBErr(0),
19 fD0PVUBBS(0), fD0PVUBBSErr(0), fIp3dPVUBBS(0), fIp3dPVUBBSErr(0),
20 fTrkKink(0), fGlbKink(0),
21 fNValidHits(0), fNTraversedChambers(0), fNMatches(0), fIsGlobalMuon(kFALSE),
22 fIsTrackerMuon(kFALSE), fIsStandaloneMuon(kFALSE), fIsCaloMuon(kFALSE)
23 {
24 // Constructor.
25
26 memset(fDX,0,sizeof(Double32_t)*8);
27 memset(fDY,0,sizeof(Double32_t)*8);
28 memset(fPullX,0,sizeof(Double32_t)*8);
29 memset(fPullY,0,sizeof(Double32_t)*8);
30 memset(fTrackDist,0,sizeof(Double32_t)*8);
31 memset(fTrackDistErr,0,sizeof(Double32_t)*8);
32 memset(fNSegments,0,sizeof(Int_t)*8);
33 }
34
35 //--------------------------------------------------------------------------------------------------
36 void Muon::Print(Option_t */*opt*/) const
37 {
38 // Print particle kinematics.
39
40 TString type("GlM");
41 if (IsTrackerMuon())
42 type = "TrM";
43 else if (IsStandaloneMuon())
44 type = "SaM";
45 else if (IsCaloMuon())
46 type = "CaM";
47
48 printf("%s: pt=%.3f eta=%.3f phi=%.3f\n", type.Data(), Pt(), Eta(), Phi());
49 }