ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/L1RpcTriggerAnalysis/plugins/L1RpcTreeMaker.cc
(Generate patch)

Comparing UserCode/L1RpcTriggerAnalysis/plugins/L1RpcTreeMaker.cc (file contents):
Revision 1.14 by konec, Tue Apr 23 14:27:36 2013 UTC vs.
Revision 1.16 by konec, Thu Apr 25 20:15:23 2013 UTC

# Line 93 | Line 93 | void L1RpcTreeMaker::analyze(const edm::
93    // check reference muon
94    //
95    const reco::Muon * theMuon = theBestMuonFinder.result(ev,es);
96 <  if (theConfig.getParameter<bool>("onlyBestMuEvents") && (!theMuon || !theBestMuonFinder.isUnique(ev,es)) ) return;
96 >  if (theConfig.getParameter<bool>("onlyBestMuEvents") && (!theMuon) ) return;
97    theCounter++;
98  
99    //
# Line 127 | Line 127 | void L1RpcTreeMaker::analyze(const edm::
127    //
128    // fill muon info
129    //
130 +  muon->isUnique = theBestMuonFinder.isUnique(ev,es);
131 +  muon->nAllMuons = theBestMuonFinder.numberOfAllMuons(ev,es);
132    if (theMuon) {
133 <    muon->setKine(theMuon->track()->pt(), theMuon->track()->eta(), theMuon->track()->phi(), theMuon->track()->charge());
133 >    muon->setKine(theMuon->bestTrack()->pt(), theMuon->bestTrack()->eta(), theMuon->bestTrack()->phi(), theMuon->bestTrack()->charge());
134      muon->setBits(theMuon->isGlobalMuon(), theMuon->isTrackerMuon(), theMuon->isStandAloneMuon(), theMuon->isCaloMuon(), theMuon->isMatchesValid());
135      muon->nMatchedStations = theMuon->numberOfMatchedStations();
136      if (theMuon->isGlobalMuon()) {
# Line 156 | Line 158 | void L1RpcTreeMaker::analyze(const edm::
158    //
159    // hits and detectors compatible with muon track
160    //
161 <  if (theMuon &&  muon->pt() > 10.) {
161 >  if (theMuon &&  muon->pt() > 10. && theMuon->isGlobalMuon()) {
162      detsHitsCompatibleWithMuon = theDetHitCollector.compatibleHits( theMuon, ev, es);
163      detsCrossedByMuon = theDetHitCollector.compatibleDets( theMuon, ev, es, false);
164      detsCrossedByMuonDeepInside = theDetHitCollector.compatibleDets( theMuon, ev, es, true);
# Line 167 | Line 169 | void L1RpcTreeMaker::analyze(const edm::
169    //
170    // fill LinkSynchroAnalysis data
171    //
172 <  if (theMuon) {
172 >  if (theMuon && theMuon->isGlobalMuon()) {
173      theSynchroGrabber.setMuon(theMuon);
174      RPCRawSynchro::ProdItem rawCounts  = theSynchroGrabber.counts(ev,es);
175      counts = ConverterRPCRawSynchroSynchroCountsObj::toSynchroObj(rawCounts);
# Line 180 | Line 182 | void L1RpcTreeMaker::analyze(const edm::
182    std::vector<L1Obj> l1Obj = theL1ObjMaker(ev);
183    l1ObjColl->set( l1Obj);
184    std::vector<bool> matching(l1Obj.size(), false);
185 <  std::vector<double> deltaR(l1Obj.size(), 0.);
185 >  std::vector<double> deltaR(l1Obj.size(), 999.);
186    TrackToL1ObjMatcher matcher(theConfig.getParameter<edm::ParameterSet>("matcherPSet"));
187 <  if (theMuon){
187 >  if (theMuon && theMuon->isGlobalMuon()){
188      for(unsigned int i=0; i< l1Obj.size(); ++i) {
189        if (matcher(l1Obj[i].eta, l1Obj[i].phi, theMuon, ev,es)) matching[i]=true;
190        TrackToL1ObjMatcher::LastResult result = matcher.lastResult();
# Line 191 | Line 193 | void L1RpcTreeMaker::analyze(const edm::
193    }
194    l1ObjColl->set( matching );
195    l1ObjColl->set( deltaR );
196 <  std::cout <<"----------"<<std::endl;
197 <  std::cout <<*l1ObjColl << std::endl;
196 > //  std::cout <<"----------"<<std::endl;
197 > //  std::cout <<*l1ObjColl << std::endl;
198  
199    //
200    // fill ntuple + cleanup

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines