ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Muon.h
(Generate patch)

Comparing UserCode/MitAna/DataTree/interface/Muon.h (file contents):
Revision 1.23 by loizides, Tue Dec 9 17:47:00 2008 UTC vs.
Revision 1.45 by paus, Sun Oct 23 01:53:16 2011 UTC

# Line 43 | Line 43
43   //    to propagated track
44   //   NSegments : Number of segments in muon using Segment+Track Arbitration
45   //   NChambers : Number of muon chambers traversed in propagated track
46 + //   NMatches  : Number of muon chambers with matches
47   //   LastHit   : Returns farest (from center) station with a recorded segment
48   //   LastStation  : Returns farest station using Segment+Track Arbitration
49   //
# Line 59 | Line 60
60   #ifndef MITANA_DATATREE_MUON_H
61   #define MITANA_DATATREE_MUON_H
62  
62 #include <TRef.h>
63   #include "MitAna/DataTree/interface/Track.h"
64   #include "MitAna/DataTree/interface/ChargedParticle.h"
65 + #include "MitAna/DataTree/interface/MuonQuality.h"
66  
67   namespace mithep {
68    class Muon : public ChargedParticle {
69      public:
70        Muon();
70      ~Muon() {}
71  
72        enum EClassType {
73          kNone,              //no track assigned
74          kGlobal,            //"Global"
75 <        kTrackerOnly,       //"TrackerOnly"
75 >        kTracker,           //"Tracker"
76          kSta,               //"Standalone"
77          kAny                //any "best" of the above
78        };
79        
80        const Track   *BestTrk()                       const;
81 <      const Track   *GlobalTrk()                     const;
82 <      const Track   *StandaloneTrk()                 const;
83 <      const Track   *TrackerTrk()                    const;
81 >      const Track   *GlobalTrk()                     const { return fGlobalTrkRef.Obj();       }
82 >      const Track   *StandaloneTrk()                 const { return fStaTrkRef.Obj();          }
83 >      const Track   *TrackerTrk()                    const { return fTrkTrkRef.Obj();          }
84        const Track   *Trk()                           const { return BestTrk();                 }
85 +      Double_t       D0PV()                          const { return fD0PV;                     }
86 +      Double_t       D0PVErr()                       const { return fD0PVErr;                  }
87 +      Double_t       D0PVSignificance()              const { return fD0PV/fD0PVErr;            }
88 +      Double_t       Ip3dPV()                        const { return fIp3dPV;                   }
89 +      Double_t       Ip3dPVErr()                     const { return fIp3dPVErr;                }
90 +      Double_t       Ip3dPVSignificance()            const { return fIp3dPV/fIp3dPVErr;        }
91 +      Double_t       D0PVBS()                        const { return fD0PVBS;                   }
92 +      Double_t       D0PVBSErr()                     const { return fD0PVBSErr;                }
93 +      Double_t       D0PVBSSignificance()            const { return fD0PVBS/fD0PVBSErr;        }
94 +      Double_t       Ip3dPVBS()                      const { return fIp3dPVBS;                 }
95 +      Double_t       Ip3dPVBSErr()                   const { return fIp3dPVBSErr;              }
96 +      Double_t       Ip3dPVBSSignificance()          const { return fIp3dPVBS/fIp3dPVBSErr;    }
97 +      Double_t       D0PVUB()                        const { return fD0PVUB;                   }
98 +      Double_t       D0PVUBErr()                     const { return fD0PVUBErr;                }
99 +      Double_t       D0PVUBSignificance()            const { return fD0PVUB/fD0PVUBErr;        }
100 +      Double_t       Ip3dPVUB()                      const { return fIp3dPVUB;                 }
101 +      Double_t       Ip3dPVUBErr()                   const { return fIp3dPVUBErr;              }
102 +      Double_t       Ip3dPVUBSignificance()          const { return fIp3dPVUB/fIp3dPVUBErr;    }
103 +      Double_t       D0PVUBBS()                      const { return fD0PVUBBS;                 }
104 +      Double_t       D0PVUBBSErr()                   const { return fD0PVUBBSErr;              }
105 +      Double_t       D0PVUBBSSignificance()          const { return fD0PVUBBS/fD0PVUBBSErr;    }
106 +      Double_t       Ip3dPVUBBS()                    const { return fIp3dPVUBBS;               }
107 +      Double_t       Ip3dPVUBBSErr()                 const { return fIp3dPVUBBSErr;            }
108 +      Double_t       Ip3dPVUBBSSignificance()        const { return fIp3dPVUBBS/fIp3dPVUBBSErr;}
109 +      Double_t       PVCompatibility()               const { return fPVCompatibility;          }
110 +      Double_t       PVBSCompatibility()             const { return fPVBSCompatibility;        }
111 +      Double_t       TrkKink()                       const { return fTrkKink;                  }
112 +      Double_t       GlbKink()                       const { return fGlbKink;                  }
113        Double_t       EmEnergy()                      const { return fEmEnergy;                 }
114        Double_t       EmS9Energy()                    const { return fEmS9Energy;               }
115        Double_t       GetDX(Int_t iStation)           const;
# Line 93 | Line 121 | namespace mithep {
121        Int_t          GetNSegments(Int_t iStation)    const;
122        Bool_t         Has(EClassType type)            const;
123        Bool_t         HasTrk()                        const;
124 <      Bool_t         HasGlobalTrk()                  const { return fGlobalTrackRef.IsValid();   }
125 <      Bool_t         HasStandaloneTrk()              const
126 <                       { return fStandaloneTrackRef.IsValid(); }
99 <      Bool_t         HasTrackerTrk()                 const { return fTrackerTrackRef.IsValid();  }
124 >      Bool_t         HasGlobalTrk()                  const { return fGlobalTrkRef.IsValid();   }
125 >      Bool_t         HasStandaloneTrk()              const { return fStaTrkRef.IsValid();      }
126 >      Bool_t         HasTrackerTrk()                 const { return fTrkTrkRef.IsValid();      }
127        Double_t       HadEnergy()                     const { return fHadEnergy;                }
128        Double_t       HadS9Energy()                   const { return fHadS9Energy;              }
129        Double_t       HoEnergy()                      const { return fHoEnergy;                 }
130        Double_t       HoS9Energy()                    const { return fHoS9Energy;               }
131        EClassType     Is()                            const;
132 +      Bool_t         IsGlobalMuon()                  const { return fIsGlobalMuon;             }
133 +      Bool_t         IsTrackerMuon()                 const { return fIsTrackerMuon;            }
134 +      Bool_t         IsStandaloneMuon()              const { return fIsStandaloneMuon;         }
135 +      Bool_t         IsCaloMuon()                    const { return fIsCaloMuon;               }
136        Double_t       IsoR03SumPt()                   const { return fIsoR03SumPt;              }
137        Double_t       IsoR03EmEt()                    const { return fIsoR03EmEt;               }
138        Double_t       IsoR03HadEt()                   const { return fIsoR03HadEt;              }
139        Double_t       IsoR03HoEt()                    const { return fIsoR03HoEt;               }
140 <      Int_t          IsoR03NTracks()                 const { return fIsoR03NTracks;            }
141 <      Int_t          IsoR03NJets()                   const { return fIsoR03NJets;              }
140 >      UShort_t       IsoR03NTracks()                 const { return fIsoR03NTracks;            }
141 >      UShort_t       IsoR03NJets()                   const { return fIsoR03NJets;              }
142        Double_t       IsoR05SumPt()                   const { return fIsoR05SumPt;              }
143        Double_t       IsoR05EmEt()                    const { return fIsoR05EmEt;               }
144        Double_t       IsoR05HadEt()                   const { return fIsoR05HadEt;              }
145        Double_t       IsoR05HoEt()                    const { return fIsoR05HoEt;               }
146 <      Int_t          IsoR05NTracks()                 const { return fIsoR05NTracks;            }
147 <      Int_t          IsoR05NJets()                   const { return fIsoR05NJets;              }
148 <      Double_t       Mass()                          const { return 105.658369e-3;             }  
149 <      Int_t          NChambers()                     const { return fNTraversedChambers;       }
150 <      Int_t          NSegments()                     const { return fStationMask.NBitsSet();   }
146 >      UShort_t       IsoR05NTracks()                 const { return fIsoR05NTracks;            }
147 >      UShort_t       IsoR05NJets()                   const { return fIsoR05NJets;              }
148 >      UInt_t         NValidHits()                    const { return fNValidHits;               }
149 >      UInt_t         NChambers()                     const { return fNTraversedChambers;       }
150 >      UInt_t         NSegments()                     const { return fStationMask.NBitsSet();   }
151 >      UInt_t         NMatches()                      const { return fNMatches;                 }
152        Int_t          LastHit()                       const;
153        Int_t          LastStation(Double_t iMaxD, Double_t iMaxP)               const;
154 <      Int_t          LastStation(Int_t iMax=8)                                 const;
155 <      EObjType       ObjType()                       const { return kMuon; }      
156 <      Bool_t         PromptTight(EClassType type)                              const;
154 >      Int_t          LastStation(Int_t iMax=8)       const;
155 >      Int_t          ObjId()                         const { return ObjType()*1000+Is();       }
156 >      EObjType       ObjType()                       const { return kMuon;                     }
157 >      void           Print(Option_t *opt="")         const;
158 >      Bool_t         PromptTight(EClassType type)    const;
159 >      const MuonQuality  &Quality()                  const { return fQuality;                  }
160 >      MuonQuality        &Quality()                        { return fQuality;                  }
161        Bool_t         StationBit(Int_t bit)           const { return fStationMask.TestBit(bit); }
162 <      Bool_t         TMLastStation(Double_t iDYMin = 3., Double_t iPYMin = 3.,
163 <                                   Double_t iDXMin = 3., Double_t iPXMin = 3.,Int_t iN = 2) const;
164 <      Bool_t         TMOneStation(Double_t iDYMin = 3., Double_t iPYMin = 3.,
165 <                                  Double_t iDXMin = 3., Double_t iPXMin = 3.,Int_t iN = 1)  const;
166 <      void           SetGlobalTrk(const Track *t)    
167 <                       { fGlobalTrackRef = const_cast<Track*>(t);   }
168 <      void           SetStandaloneTrk(const Track *t)
169 <                       { fStandaloneTrackRef = const_cast<Track*>(t); }
170 <      void           SetTrackerTrk(const Track *t)    
171 <                       { fTrackerTrackRef = const_cast<Track*>(t);  }
162 >      Bool_t         TMLastStation(Double_t iDYMin = 3, Double_t iPYMin = 3,
163 >                                   Double_t iDXMin = 3, Double_t iPXMin = 3,UInt_t iN = 2) const;
164 >      Bool_t         TMOneStation(Double_t iDYMin = 3, Double_t iPYMin = 3,
165 >                                  Double_t iDXMin = 3, Double_t iPXMin = 3,UInt_t iN = 1)  const;
166 >      void           SetCharge(Char_t x)                   { fCharge = x; ClearCharge();       }
167 >      void           SetGlobalTrk(const Track *t)          
168 >                       { fGlobalTrkRef = t; ClearMom(); ClearCharge(); }
169 >      void           SetStandaloneTrk(const Track *t)      
170 >                       { fStaTrkRef = t;    ClearMom(); ClearCharge(); }
171 >      void           SetTrackerTrk(const Track *t)        
172 >                       { fTrkTrkRef = t;    ClearMom(); ClearCharge(); }
173        void           SetDX(Int_t iStation, Double_t iDX);
174        void           SetDY(Int_t iStation, Double_t iDY);
175 <      void           SetEmEnergy(Double_t EmEnergy)        { fEmEnergy = EmEnergy;           }
176 <      void           SetEmS9Energy(Double_t EmS9Energy)    { fEmS9Energy = EmS9Energy;       }
177 <      void           SetHadEnergy(Double_t HadEnergy)      { fHadEnergy = HadEnergy;         }
178 <      void           SetHadS9Energy(Double_t HadS9Energy)  { fHadS9Energy = HadS9Energy;     }
179 <      void           SetHoEnergy(Double_t HoEnergy)        { fHoEnergy = HoEnergy;           }
180 <      void           SetHoS9Energy(Double_t HoS9Energy)    { fHoS9Energy = HoS9Energy;       }
181 <      void           SetIsoR03SumPt(Double_t isoR03SumPt)  { fIsoR03SumPt = isoR03SumPt;     }
182 <      void           SetIsoR03EmEt(Double_t isoR03EmEt)    { fIsoR03EmEt = isoR03EmEt;       }
183 <      void           SetIsoR03HadEt(Double_t isoR03HadEt)  { fIsoR03HadEt = isoR03HadEt;     }
184 <      void           SetIsoR03HoEt(Double_t isoR03HoEt)    { fIsoR03HoEt = isoR03HoEt;       }
185 <      void           SetIsoR03NTracks(Int_t isoR03NTracks) { fIsoR03NTracks = isoR03NTracks; }
186 <      void           SetIsoR03NJets(Int_t isoR03NJets)     { fIsoR03NJets = isoR03NJets;     }
187 <      void           SetIsoR05SumPt(Double_t isoR05SumPt)  { fIsoR05SumPt = isoR05SumPt;     }
188 <      void           SetIsoR05EmEt(Double_t isoR05EmEt)    { fIsoR05EmEt = isoR05EmEt;       }
189 <      void           SetIsoR05HadEt(Double_t isoR05HadEt)  { fIsoR05HadEt = isoR05HadEt;     }
190 <      void           SetIsoR05HoEt(Double_t isoR05HoEt)    { fIsoR05HoEt = isoR05HoEt;       }
191 <      void           SetIsoR05NTracks(Int_t isoR05NTracks) { fIsoR05NTracks = isoR05NTracks; }
192 <      void           SetIsoR05NJets(Int_t isoR05NJets)     { fIsoR05NJets = isoR05NJets;     }      
193 <      void           SetNChambers(Int_t iNTraCh)           { fNTraversedChambers = iNTraCh;  }
194 <      void           SetNSegments(Int_t iStation, Int_t NSegments);
175 >      void           SetD0PV(Double_t x)                   { fD0PV = x;                        }
176 >      void           SetD0PVErr(Double_t x)                { fD0PVErr = x;                     }
177 >      void           SetIp3dPV(Double_t x)                 { fIp3dPV = x;                      }
178 >      void           SetIp3dPVErr(Double_t x)              { fIp3dPVErr = x;                   }
179 >      void           SetD0PVBS(Double_t x)                 { fD0PVBS = x;                      }
180 >      void           SetD0PVBSErr(Double_t x)              { fD0PVBSErr = x;                   }
181 >      void           SetIp3dPVBS(Double_t x)               { fIp3dPVBS = x;                    }
182 >      void           SetIp3dPVBSErr(Double_t x)            { fIp3dPVBSErr = x;                 }
183 >      void           SetD0PVUB(Double_t x)                 { fD0PVUB = x;                      }
184 >      void           SetD0PVUBErr(Double_t x)              { fD0PVUBErr = x;                   }
185 >      void           SetIp3dPVUB(Double_t x)               { fIp3dPVUB = x;                    }
186 >      void           SetIp3dPVUBErr(Double_t x)            { fIp3dPVUBErr = x;                 }
187 >      void           SetD0PVUBBS(Double_t x)               { fD0PVUBBS = x;                    }
188 >      void           SetD0PVUBBSErr(Double_t x)            { fD0PVUBBSErr = x;                 }
189 >      void           SetIp3dPVUBBS(Double_t x)             { fIp3dPVUBBS = x;                  }
190 >      void           SetIp3dPVUBBSErr(Double_t x)          { fIp3dPVUBBSErr = x;               }
191 >      void           SetPVCompatibility(Double_t x)        { fPVCompatibility = x;             }
192 >      void           SetPVBSCompatibility(Double_t x)      { fPVBSCompatibility = x;           }
193 >      void           SetTrkKink(Double_t x)                { fTrkKink = x;                     }
194 >      void           SetGlbKink(Double_t x)                { fGlbKink = x;                     }
195 >      void           SetEmEnergy(Double_t emEnergy)        { fEmEnergy = emEnergy;             }
196 >      void           SetEmS9Energy(Double_t emS9Energy)    { fEmS9Energy = emS9Energy;         }
197 >      void           SetHadEnergy(Double_t hadEnergy)      { fHadEnergy = hadEnergy;           }
198 >      void           SetHadS9Energy(Double_t hadS9Energy)  { fHadS9Energy = hadS9Energy;       }
199 >      void           SetHoEnergy(Double_t hoEnergy)        { fHoEnergy = hoEnergy;             }
200 >      void           SetHoS9Energy(Double_t hoS9Energy)    { fHoS9Energy = hoS9Energy;         }
201 >      void           SetIsGlobalMuon(Bool_t b)             { fIsGlobalMuon = b;                }
202 >      void           SetIsTrackerMuon(Bool_t b)            { fIsTrackerMuon = b;               }
203 >      void           SetIsStandaloneMuon(Bool_t b)         { fIsStandaloneMuon = b;            }
204 >      void           SetIsCaloMuon(Bool_t b)               { fIsCaloMuon = b;                  }
205 >      void           SetIsoR03SumPt(Double_t isoR03SumPt)  { fIsoR03SumPt = isoR03SumPt;       }
206 >      void           SetIsoR03EmEt(Double_t isoR03EmEt)    { fIsoR03EmEt = isoR03EmEt;         }
207 >      void           SetIsoR03HadEt(Double_t isoR03HadEt)  { fIsoR03HadEt = isoR03HadEt;       }
208 >      void           SetIsoR03HoEt(Double_t isoR03HoEt)    { fIsoR03HoEt = isoR03HoEt;         }
209 >      void           SetIsoR03NTracks(UShort_t isoR03NTrk) { fIsoR03NTracks = isoR03NTrk;      }
210 >      void           SetIsoR03NJets(UShort_t isoR03NJets)  { fIsoR03NJets = isoR03NJets;       }
211 >      void           SetIsoR05SumPt(Double_t isoR05SumPt)  { fIsoR05SumPt = isoR05SumPt;       }
212 >      void           SetIsoR05EmEt(Double_t isoR05EmEt)    { fIsoR05EmEt = isoR05EmEt;         }
213 >      void           SetIsoR05HadEt(Double_t isoR05HadEt)  { fIsoR05HadEt = isoR05HadEt;       }
214 >      void           SetIsoR05HoEt(Double_t isoR05HoEt)    { fIsoR05HoEt = isoR05HoEt;         }
215 >      void           SetIsoR05NTracks(UShort_t isoR05NTrk) { fIsoR05NTracks = isoR05NTrk;      }
216 >      void           SetIsoR05NJets(UShort_t isoR05NJets)  { fIsoR05NJets = isoR05NJets;       }
217 >      void           SetNValidHits(UShort_t iNValidHits)   { fNValidHits  = iNValidHits;       }
218 >      void           SetNChambers(UShort_t iNTraCh)        { fNTraversedChambers = iNTraCh;    }
219 >      void           SetNSegments(Int_t iStation, Int_t nSegments);
220 >      void           SetNMatches(UShort_t iNMatCh)         { fNMatches = iNMatCh;              }
221 >      void           SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi);
222        void           SetPullX(Int_t iStation, Double_t iPullX);
223        void           SetPullY(Int_t iStation, Double_t iPullY);
224 <      void           SetStationMask(UInt_t iStMask)        { fStationMask.SetBits(iStMask);  }
224 >      void           SetStationMask(UInt_t iStMask)        { fStationMask.SetBits(iStMask);    }
225        void           SetTrackDist(Int_t iStation, Double_t iDist);
226        void           SetTrackDistErr(Int_t iStation, Double_t iDistErr);
227  
228      protected:
229 <      TRef           fGlobalTrackRef;      //global combined track reference
230 <      TRef           fStandaloneTrackRef;  //standalone muon track reference
231 <      TRef           fTrackerTrackRef;     //tracker track reference
232 <      Double32_t     fIsoR03SumPt;         //isolation size R=0.3 sum pt
233 <      Double32_t     fIsoR03EmEt;          //isolation size R=0.3 em  trans energy
234 <      Double32_t     fIsoR03HadEt;         //isolation size R=0.3 had trans energy
235 <      Double32_t     fIsoR03HoEt;          //isolation size R=0.3 ho  trans energy
236 <      Int_t          fIsoR03NTracks;       //isolation size R=0.3 number of tracks
237 <      Int_t          fIsoR03NJets;         //isolation size R=0.3 number of jets
238 <      Double32_t     fIsoR05SumPt;         //isolation size R=0.5 sum pt
239 <      Double32_t     fIsoR05EmEt;          //isolation size R=0.5 em  trans energy
240 <      Double32_t     fIsoR05HadEt;         //isolation size R=0.5 had trans energy
241 <      Double32_t     fIsoR05HoEt;          //isolation size R=0.5 ho  trans energy
242 <      Int_t          fIsoR05NTracks;       //isolation size R=0.5 number of tracks
243 <      Int_t          fIsoR05NJets;         //isolation size R=0.5 number of jets      
244 <      Double32_t     fEmEnergy;            //energy deposit in ecal
245 <      Double32_t     fHadEnergy;           //energy deposit in hcal
246 <      Double32_t     fHoEnergy;            //energy deposit in outer hcal
247 <      Double32_t     fEmS9Energy;          //energy deposit in 3x3 ecal
248 <      Double32_t     fHadS9Energy;         //energy deposit in 3x3 hcal
249 <      Double32_t     fHoS9Energy;          //energy deposit in 3x3 outer hcal
250 <      Int_t          fNTraversedChambers;  //number of tranversed chambers
229 >      Double_t       GetCharge()                     const;
230 >      Double_t       GetMass()                       const { return 105.658369e-3;             }  
231 >      void           GetMom()                        const;
232 >
233 >      Vect3C         fMom;                 //stored three-momentum
234 >      Char_t         fCharge;              //stored charge - filled with -99 when reading old files
235 >      Ref<Track>     fGlobalTrkRef;        //global combined track reference
236 >      Ref<Track>     fStaTrkRef;           //standalone muon track reference
237 >      Ref<Track>     fTrkTrkRef;           //tracker track reference
238 >      Double32_t     fIsoR03SumPt;         //[0,0,14]isolation size R=0.3 sum pt
239 >      Double32_t     fIsoR03EmEt;          //[0,0,14]isolation size R=0.3 em  trans energy
240 >      Double32_t     fIsoR03HadEt;         //[0,0,14]isolation size R=0.3 had trans energy
241 >      Double32_t     fIsoR03HoEt;          //[0,0,14]isolation size R=0.3 ho  trans energy
242 >      UShort_t       fIsoR03NTracks;       //isolation size R=0.3 number of tracks
243 >      UShort_t       fIsoR03NJets;         //isolation size R=0.3 number of jets
244 >      Double32_t     fIsoR05SumPt;         //[0,0,14]isolation size R=0.5 sum pt
245 >      Double32_t     fIsoR05EmEt;          //[0,0,14]isolation size R=0.5 em  trans energy
246 >      Double32_t     fIsoR05HadEt;         //[0,0,14]isolation size R=0.5 had trans energy
247 >      Double32_t     fIsoR05HoEt;          //[0,0,14]isolation size R=0.5 ho  trans energy
248 >      UShort_t       fIsoR05NTracks;       //isolation size R=0.5 number of tracks
249 >      UShort_t       fIsoR05NJets;         //isolation size R=0.5 number of jets      
250 >      Double32_t     fEmEnergy;            //[0,0,14]energy deposit in ecal
251 >      Double32_t     fHadEnergy;           //[0,0,14]energy deposit in hcal
252 >      Double32_t     fHoEnergy;            //[0,0,14]energy deposit in outer hcal
253 >      Double32_t     fEmS9Energy;          //[0,0,14]energy deposit in 3x3 ecal
254 >      Double32_t     fHadS9Energy;         //[0,0,14]energy deposit in 3x3 hcal
255 >      Double32_t     fHoS9Energy;          //[0,0,14]energy deposit in 3x3 outer hcal
256 >      Double32_t     fD0PV;                //[0,0,14]transverse impact parameter to signal PV
257 >      Double32_t     fD0PVErr;             //[0,0,14]transverse impact parameter uncertainty to signal PV
258 >      Double32_t     fIp3dPV;              //[0,0,14]3d impact parameter to signal PV
259 >      Double32_t     fIp3dPVErr;           //[0,0,14]3d impact parameter uncertainty to signal PV
260 >      Double32_t     fD0PVBS;              //[0,0,14]transverse impact parameter to signal PV w/ bs constraint
261 >      Double32_t     fD0PVBSErr;           //[0,0,14]transverse impact parameter uncertainty to signal PV w/ bs constraint
262 >      Double32_t     fIp3dPVBS;            //[0,0,14]3d impact parameter to signal PV w/ bs constraint
263 >      Double32_t     fIp3dPVBSErr;         //[0,0,14]3d impact parameter uncertainty to signal PV w/ bs constraint
264 >      Double32_t     fPVCompatibility;     //[0,0,14]chi^2 compatibility with signal PV (ndof=2)
265 >      Double32_t     fPVBSCompatibility;   //[0,0,14]chi^2 compatibility with signal PV w/ bs constraint (ndof=2)      
266 >      Double32_t     fD0PVUB;              //[0,0,14]transverse impact parameter to signal PVUB (unbiased primary vertex - refit removing lepton track)
267 >      Double32_t     fD0PVUBErr;           //[0,0,14]transverse impact parameter uncertainty to signal PVUB
268 >      Double32_t     fIp3dPVUB;            //[0,0,14]3d impact parameter to signal PVUB
269 >      Double32_t     fIp3dPVUBErr;         //[0,0,14]3d impact parameter uncertainty to signal PVUB
270 >      Double32_t     fD0PVUBBS;            //[0,0,14]transverse impact parameter to signal PVUB w/ bs constraint
271 >      Double32_t     fD0PVUBBSErr;         //[0,0,14]transverse impact parameter uncertainty to signal PVUB w/ bs constraint
272 >      Double32_t     fIp3dPVUBBS;          //[0,0,14]3d impact parameter to signal PVUB w/ bs constraint
273 >      Double32_t     fIp3dPVUBBSErr;       //[0,0,14]3d impact parameter uncertainty to signal PVUB w/ bs constraint
274 >      Double32_t     fTrkKink;             //[0,0,14]kink algorithm output (tracker track)
275 >      Double32_t     fGlbKink;             //[0,0,14]kink algorithm output (global track)
276 >      UShort_t       fNValidHits;          //number of Valid hits in global fit
277 >      UShort_t       fNTraversedChambers;  //number of traversed chambers
278 >      UShort_t       fNMatches;            //number of muon chambers with matches
279 >      MuonQuality    fQuality;             //muon quality
280        BitMask8       fStationMask;         //bitmap of station with tracks, 0-3 DT, 4-7 CSCs
281 <      Double32_t     fDX[8];               //uncertainty in x in given muon chamber
282 <      Double32_t     fDY[8];               //uncertainty in y in given muon chamber
283 <      Double32_t     fPullX[8];            //pull in x in given muon chamber
284 <      Double32_t     fPullY[8];            //pull in y in given muon chamber
285 <      Double32_t     fTrackDist[8];        //dist. to track in trans. plane in given muon chamber
286 <      Double32_t     fTrackDistErr[8];     //error of dist. to track in trans. plane in chamber
281 >      Double32_t     fDX[8];               //[0,0,14]uncertainty in x in given muon chamber
282 >      Double32_t     fDY[8];               //[0,0,14]uncertainty in y in given muon chamber
283 >      Double32_t     fPullX[8];            //[0,0,14]pull in x in given muon chamber
284 >      Double32_t     fPullY[8];            //[0,0,14]pull in y in given muon chamber
285 >      Double32_t     fTrackDist[8];        //[0,0,14]dist. to track in trans. plane in muon chamber
286 >      Double32_t     fTrackDistErr[8];     //[0,0,14]error of dist. to track in trans. plane
287        Int_t          fNSegments[8];        //number of segments in given muon chamber
288 +      Bool_t         fIsGlobalMuon;        //GlobalMuon algo flag
289 +      Bool_t         fIsTrackerMuon;       //TrackerMuon algo flag
290 +      Bool_t         fIsStandaloneMuon;    //StandaloneMuon algo flag
291 +      Bool_t         fIsCaloMuon;          //CaloMuon algo flag
292  
293 <    ClassDef(Muon, 1) // Muon class
293 >    ClassDef(Muon, 8) // Muon class
294    };
295   }
296  
# Line 202 | Line 299 | inline const mithep::Track *mithep::Muon
299   {
300    // Return "best" track.
301  
302 <  if (HasGlobalTrk())
206 <    return GlobalTrk();
207 <  else if (HasTrackerTrk())
302 >  if (HasTrackerTrk())
303      return TrackerTrk();
304 +  else if (HasGlobalTrk())
305 +    return GlobalTrk();
306    else if (HasStandaloneTrk())
307      return StandaloneTrk();
308  
# Line 214 | Line 311 | inline const mithep::Track *mithep::Muon
311   }
312  
313   //--------------------------------------------------------------------------------------------------
314 < inline const mithep::Track *mithep::Muon::GlobalTrk() const
315 < {
316 <  // Return global combined track.
317 <
221 <  return static_cast<const Track*>(fGlobalTrackRef.GetObject());
222 < }
314 > inline Double_t mithep::Muon::GetCharge() const
315 > {
316 >  // Return stored charge, unless it is set to invalid (-99),
317 >  // in that case get charge from track as before
318  
319 < //--------------------------------------------------------------------------------------------------
320 < inline const mithep::Track *mithep::Muon::StandaloneTrk() const
321 < {
322 <  // Return standalone track.
319 >  if (fCharge==-99)
320 >    return mithep::ChargedParticle::GetCharge();
321 >  else
322 >    return fCharge;
323  
229  return static_cast<const Track*>(fStandaloneTrackRef.GetObject());
324   }
325  
326   //--------------------------------------------------------------------------------------------------
327 < inline const mithep::Track *mithep::Muon::TrackerTrk() const
328 < {
329 <  // Return tracker track.
330 <
331 <  return static_cast<const Track*>(fTrackerTrackRef.GetObject());
327 > inline void mithep::Muon::GetMom() const
328 > {
329 >  // Get momentum of the muon. We use an explicitly stored three vector, with the pdg mass,
330 >  // since the momentum vector may be computed non-trivially in cmssw (since the tracker
331 >  // information has better resolution apparently in some cases than the global fit.)
332 >  // If momentum is unfilled, fall back to old method of getting momentum from best track
333 >  // (for backwards compatibility.)
334 >  
335 >  if (fMom.Rho()>0.0) {
336 >    fCachedMom.SetCoordinates(fMom.Rho(),fMom.Eta(),fMom.Phi(),GetMass());
337 >  }
338 >  else {
339 >    mithep::ChargedParticle::GetMom();
340 >  }
341 >  
342   }
343  
344   //--------------------------------------------------------------------------------------------------
# Line 314 | Line 418 | inline Bool_t mithep::Muon::Has(EClassTy
418        if (HasGlobalTrk())
419          return kTRUE;
420        break;
421 <    case kTrackerOnly:
421 >    case kTracker:
422        if (HasTrackerTrk())
423          return kTRUE;
424        break;
# Line 349 | Line 453 | inline mithep::Muon::EClassType mithep::
453    if (HasGlobalTrk())
454      return kGlobal;
455    else if (HasTrackerTrk())
456 <    return kTrackerOnly;
456 >    return kTracker;
457    else if (HasStandaloneTrk())
458      return kSta;
459  
# Line 413 | Line 517 | inline Bool_t mithep::Muon::PromptTight(
517      case kGlobal:
518        lTrack = GlobalTrk();
519        break;
520 <    case kTrackerOnly:
520 >    case kTracker:
521        lTrack = TrackerTrk();
522        break;
523      case kSta:
# Line 438 | Line 542 | inline Bool_t mithep::Muon::PromptTight(
542  
543   //--------------------------------------------------------------------------------------------------
544   inline Bool_t mithep::Muon::TMOneStation(Double_t iDYMin, Double_t iPYMin,
545 <                                         Double_t iDXMin, Double_t iPXMin, Int_t iN) const
545 >                                         Double_t iDXMin, Double_t iPXMin, UInt_t iN) const
546   {
547    // Check if the muon is matched to at least one station (chamber).
548  
# Line 465 | Line 569 | inline Bool_t mithep::Muon::TMOneStation
569  
570   //--------------------------------------------------------------------------------------------------
571   inline Bool_t mithep::Muon::TMLastStation(Double_t iDYMin, Double_t iPYMin,
572 <                                          Double_t iDXMin, Double_t iPXMin, Int_t iN) const
572 >                                          Double_t iDXMin, Double_t iPXMin, UInt_t iN) const
573   {
574    // Check if the muon is matched to its last station (chamber).
575    
# Line 549 | Line 653 | inline void mithep::Muon::SetTrackDistEr
653   }
654  
655   //--------------------------------------------------------------------------------------------------
656 < inline void mithep::Muon::SetNSegments(Int_t iStation, Int_t NSegments)
656 > inline void mithep::Muon::SetNSegments(Int_t iStation, Int_t nSegments)
657   {
658    // Set number of segments in chamber.
659  
660    assert(iStation >= 0 && iStation < 8);
661 <  fNSegments[iStation] = NSegments;
661 >  fNSegments[iStation] = nSegments;
662 > }
663 >
664 > //-------------------------------------------------------------------------------------------------
665 > inline void mithep::Muon::SetPtEtaPhi(Double_t pt, Double_t eta, Double_t phi)
666 > {
667 >  // Set three-vector
668 >  
669 >  fMom.Set(pt,eta,phi);
670 >  ClearMom();
671   }
672   #endif
673  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines