ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/src/MuonAnalyzer.cc
(Generate patch)

Comparing UserCode/Morgan/src/MuonAnalyzer.cc (file contents):
Revision 1.4 by lethuill, Mon Dec 15 19:08:52 2008 UTC vs.
Revision 1.7 by lethuill, Thu Apr 9 16:55:09 2009 UTC

# Line 57 | Line 57 | void MuonAnalyzer::Process(const edm::Ev
57                          ,muon->vx()
58                          ,muon->vy()
59                          ,muon->vz()
60 <                        ,13
60 >                        ,muon->pdgId()
61                          ,muon->charge()
62                  );
63  
# Line 110 | Line 110 | void MuonAnalyzer::Process(const edm::Ev
110                          ,int(muon->isGood(reco::Muon::TM2DCompatibilityTight))
111                  );
112  
113 +                // Variables from reco::Track
114 +                reco::TrackRef track = muon->innerTrack();
115 +                if ( track.isNonnull() )
116 +                {
117 +                        const reco::HitPattern& hit = track->hitPattern();
118 +                        localMuon.setNumberOfValidPixelHits(hit.numberOfValidPixelHits());
119 +                        localMuon.setNumberOfValidTrackerHits(hit.numberOfValidTrackerHits());
120 +                        // FIXME - replace with double dxy(const Point& myBeamSpot) method ?
121 +                        localMuon.setD0(track->d0());
122 +                        localMuon.setD0Error(track->d0Error());
123 +                        // FIXME - replace with double dsz(const Point& myBeamSpot) method ?
124 +                        localMuon.setDsz(track->dsz());
125 +                        localMuon.setDszError(track->dszError());
126 +                        localMuon.setNormalizedChi2(track->normalizedChi2());
127 +                        localMuon.setPtError(track->ptError());
128 +                        localMuon.setEtaError(track->etaError());
129 +                        localMuon.setPhiError(track->phiError());
130 +                }
131 +
132 +
133                  if( dataType_=="RECO" || dataType_=="AOD" )
134                  {
135                          // Some specific methods requiring  RECO / AOD format
# Line 131 | Line 151 | void MuonAnalyzer::Process(const edm::Ev
151                          {
152                                  // MC truth associator index
153                                  if ((patMuon->genParticleRef()).isNonnull()) {
154 <                                        localMuon.setMuonMCIndex((patMuon->genParticleRef()).index());
154 >                                        localMuon.setGenParticleIndex((patMuon->genParticleRef()).index());
155                                  } else {
156 <                                        localMuon.setMuonMCIndex(-1);
137 <                                }
138 <
139 <                                if ( patMuon->genLepton() != NULL ) {
140 <                                        localMuon.setMomentumMCMuon(patMuon->genLepton()->px(),patMuon->genLepton()->py(),patMuon->genLepton()->pz(),patMuon->genLepton()->energy());
141 <                                        localMuon.setVertexMCMuon(TVector3(patMuon->genLepton()->vx(),patMuon->genLepton()->vy(),patMuon->genLepton()->vz()));
142 <                                        localMuon.setPdgIdMCMuon(patMuon->genLepton()->pdgId());
156 >                                        localMuon.setGenParticleIndex(-1);
157                                  }
158                          }
159                  }
160 <                
160 >
161                  new( (*rootMuons)[j] ) TRootMuon(localMuon);
162                  if(verbosity_>2) cout << "   ["<< setw(3) << j << "] " << localMuon << endl;
163          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines