13 |
|
BaseMod(name,title), |
14 |
|
fMuonBranchName(Names::gkMuonBrn), |
15 |
|
fCleanMuonsName(ModNames::gkCleanMuonsName), |
16 |
+ |
fVertexName("PrimaryVertexesBeamSpot"), |
17 |
|
fMuonIDType("Loose"), |
18 |
|
fMuonIsoType("TrackCaloSliding"), |
19 |
|
fMuonClassType("Global"), |
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 |
|
} |
39 |
|
// Process entries of the tree. |
40 |
|
|
41 |
|
LoadBranch(fMuonBranchName); |
42 |
+ |
LoadBranch(fVertexName); |
43 |
|
|
44 |
|
MuonOArr *CleanMuons = new MuonOArr; |
45 |
|
CleanMuons->SetName(fCleanMuonsName); |
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 |
|
} |
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 |
159 |
|
// we just request the muon collection branch. |
160 |
|
|
161 |
|
ReqBranch(fMuonBranchName, fMuons); |
162 |
+ |
ReqBranch(fVertexName, fVertices); |
163 |
|
|
164 |
|
fMuonTools = new MuonTools; |
165 |
|
|