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.3 by ceballos, Wed Nov 5 14:06:09 2008 UTC vs.
Revision 1.5 by ceballos, Wed Nov 26 10:55:51 2008 UTC

# Line 16 | Line 16 | ClassImp(mithep::MuonIDMod)
16    fPrintDebug(false),
17    fMuonName(Names::gkMuonBrn),
18    fCleanMuonsName(Names::gkCleanMuonsName),  
19  fMuonIDType("Tight"),
20  fMuonIsoType("TrackCalo"),  
19    fMuons(0),
20    fTrackIsolationCut(3.0),
21    fCaloIsolationCut(3.0),
22 +  fCombIsolationCut(-1.0),
23 +  fTMOneStationLooseCut(true),
24 +  fTMOneStationTightCut (false),  
25 +  fTM2DCompatibilityLooseCut(true),
26 +  fTM2DCompatibilityTightCut(false),
27 +  fMuonSlidingIso(true),  
28    fMuonPtMin(10),
29    fNEventsProcessed(0)
30   {
# Line 41 | Line 45 | void MuonIDMod::Process()
45  
46    fNEventsProcessed++;
47  
48 <  if (fNEventsProcessed % 1000 == 0 || fPrintDebug) {
48 >  if (fNEventsProcessed % 1000000 == 0 || fPrintDebug) {
49      time_t systime;
50      systime = time(NULL);
51  
# Line 64 | Line 68 | void MuonIDMod::Process()
68  
69      bool allCuts = false;
70  
71 +    // We always want global muons
72      if(MuonClass == 0) allCuts = true;
73  
74 <    if(mu->IsoR03SumPt() >= fTrackIsolationCut) allCuts = false;
75 <
76 <    if(mu->IsoR03EmEt() +
77 <       mu->IsoR03HadEt() >= fCaloIsolationCut) allCuts = false;
74 >    // Isolation requirements
75 >    if(fMuonSlidingIso == true){ // Fix version
76 >      double totalIso = 1.0 * mu->IsoR03SumPt() +
77 >                        1.0 * mu->IsoR03EmEt() +
78 >                        1.0 * mu->IsoR03HadEt();
79 >      bool theIso = false;
80 >      if((totalIso < (mu->Pt()-10.0)*5.0/15.0) ||
81 >         (totalIso < 5.0 && mu->Pt() > 25)) theIso = true;
82 >      if(theIso == false) allCuts = false;
83 >    }
84 >    else if(fCombIsolationCut < 0.0){ // Different tracker and Cal iso
85 >      if(mu->IsoR03SumPt() >= fTrackIsolationCut) allCuts = false;
86 >      if(mu->IsoR03EmEt() +
87 >         mu->IsoR03HadEt() >= fCaloIsolationCut) allCuts = false;
88 >    }
89 >    else { // Combined iso
90 >      if(1.0 * mu->IsoR03SumPt() +
91 >         1.0 * mu->IsoR03EmEt() +
92 >         1.0 * mu->IsoR03HadEt() >= fCombIsolationCut) allCuts = false;    
93 >    }
94 >
95 >    // Muon chambers and calo compatibility requirements
96 >    if(fTMOneStationLooseCut == true &&
97 >       myMuonTools.isGood(mu, MuonTools::TMOneStationLoose) == false)
98 >      allCuts = false;
99 >
100 >    if(fTMOneStationTightCut == true &&
101 >       myMuonTools.isGood(mu, MuonTools::TMOneStationTight) == false)
102 >      allCuts = false;
103 >
104 >    if(fTM2DCompatibilityLooseCut == true &&
105 >       myMuonTools.isGood(mu, MuonTools::TM2DCompatibilityLoose) == false)
106 >      allCuts = false;
107 >
108 >    if(fTM2DCompatibilityTightCut == true &&
109 >       myMuonTools.isGood(mu, MuonTools::TM2DCompatibilityTight) == false)
110 >      allCuts = false;
111  
112 +    // Min Pt requirement
113      if(mu->Pt() <= fMuonPtMin) allCuts = false;
114          
115      if(allCuts) {    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines