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

Comparing UserCode/MitPhysics/Mods/src/MuonIDMod.cc (file contents):
Revision 1.13 by loizides, Thu Dec 11 15:53:03 2008 UTC vs.
Revision 1.18 by loizides, Thu May 7 20:27:07 2009 UTC

# Line 13 | Line 13 | ClassImp(mithep::MuonIDMod)
13    BaseMod(name,title),
14    fMuonBranchName(Names::gkMuonBrn),
15    fCleanMuonsName(ModNames::gkCleanMuonsName),  
16 +  fVertexName("PrimaryVertexesBeamSpot"),
17    fMuonIDType("Loose"),
18    fMuonIsoType("TrackCaloSliding"),  
19    fMuonClassType("Global"),  
# Line 20 | Line 21 | ClassImp(mithep::MuonIDMod)
21    fCaloIsolationCut(3.0),
22    fCombIsolationCut(5.0),
23    fMuonPtMin(10),
24 <  fMuons(0)
24 >  fD0Cut(0.025),
25 >  fMuIDType(kIdUndef),
26 >  fMuIsoType(kIsoUndef),
27 >  fMuClassType(kClassUndef),
28 >  fMuons(0),
29 >  fVertices(0),
30 >  fMuonTools(0),
31 >  fReverseIsoCut(kFALSE)
32   {
33    // Constructor.
34   }
# Line 31 | Line 39 | void MuonIDMod::Process()
39    // Process entries of the tree.
40  
41    LoadBranch(fMuonBranchName);
42 +  LoadBranch(fVertexName);
43  
44    MuonOArr *CleanMuons = new MuonOArr;
45    CleanMuons->SetName(fCleanMuonsName);
# Line 80 | Line 89 | void MuonIDMod::Process()
89          idpass = fMuonTools->IsGood(mu, MuonTools::kTMOneStationTight) &&
90                   fMuonTools->IsGood(mu, MuonTools::kTM2DCompatibilityTight);
91          break;
92 +      case kNoId:
93 +        idpass = kTRUE;
94 +        break;
95        default:
96          break;
97      }
# Line 116 | Line 128 | void MuonIDMod::Process()
128          break;
129      }
130  
131 <    if (!isopass)
131 >    if ((isopass == kFALSE && fReverseIsoCut == kFALSE) ||
132 >        (isopass == kTRUE  && fReverseIsoCut == kTRUE))
133 >      continue;
134 >
135 >    // d0 cut
136 >    Double_t d0_real = 99999;
137 >    for(UInt_t i0 = 0; i0 < fVertices->GetEntries(); i0++) {
138 >      Double_t pD0 = mu->GlobalTrk()->D0Corrected(*fVertices->At(i0));
139 >      if(TMath::Abs(pD0) < TMath::Abs(d0_real)) d0_real = TMath::Abs(pD0);
140 >    }
141 >    if(d0_real >= fD0Cut)
142        continue;
143  
144      // add good muon
# Line 137 | Line 159 | void MuonIDMod::SlaveBegin()
159    // we just request the muon collection branch.
160  
161    ReqBranch(fMuonBranchName, fMuons);
162 +  ReqBranch(fVertexName, fVertices);
163  
164    fMuonTools = new MuonTools;
165  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines