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

Comparing UserCode/Morgan/interface/TRootMuon.h (file contents):
Revision 1.6 by lethuill, Fri Dec 19 12:26:01 2008 UTC vs.
Revision 1.11 by lethuill, Tue Apr 21 10:42:22 2009 UTC

# Line 3 | Line 3
3  
4   #include "../interface/TRootParticle.h"
5  
6
6   using namespace std;
7  
8   class TRootMuon : public TRootParticle
# Line 38 | Line 37 | public:
37                  ,direction_(-9999)
38                  ,algo_(-9999)
39                  ,id_(-9999)
40 +                ,numberOfValidPixelHits_(-1)
41 +                ,numberOfValidTrackerHits_(-1)
42 +                ,pixelLayersWithMeasurement_(-1)
43 +                ,stripLayersWithMeasurement_(-1)
44 +                ,d0_(-9999.)
45 +                ,d0Error_(-9999.)
46 +                ,dsz_(-9999.)
47 +                ,dszError_(-9999.)
48 +                ,normalizedChi2_(-9999.)
49 +                ,ptError_(-9999.)
50 +                ,etaError_(-9999.)
51 +                ,phiError_(-9999.)
52 +                ,ip3DSignificance_(-9999.)
53                  {;}
54  
55          TRootMuon(const TRootMuon& muon) :
# Line 67 | Line 79 | public:
79                  ,direction_(muon.direction_)
80                  ,algo_(muon.algo_)
81                  ,id_(muon.id_)
82 +                ,numberOfValidPixelHits_(muon.numberOfValidPixelHits_)
83 +                ,numberOfValidTrackerHits_(muon.numberOfValidTrackerHits_)
84 +                ,pixelLayersWithMeasurement_(muon.pixelLayersWithMeasurement_)
85 +                ,stripLayersWithMeasurement_(muon.stripLayersWithMeasurement_)
86 +                ,d0_(muon.d0_)
87 +                ,d0Error_(muon.d0Error_)
88 +                ,dsz_(muon.dsz_)
89 +                ,dszError_(muon.dszError_)
90 +                ,normalizedChi2_(muon.normalizedChi2_)
91 +                ,ptError_(muon.ptError_)
92 +                ,etaError_(muon.etaError_)
93 +                ,phiError_(muon.phiError_)
94 +                ,ip3DSignificance_(muon.ip3DSignificance_)
95                  {;}
96  
97          TRootMuon(Double_t px, Double_t py, Double_t pz, Double_t e) :
# Line 96 | Line 121 | public:
121                  ,direction_(-9999)
122                  ,algo_(-9999)
123                  ,id_(-9999)
124 +                ,numberOfValidPixelHits_(-1)
125 +                ,numberOfValidTrackerHits_(-1)
126 +                ,pixelLayersWithMeasurement_(-1)
127 +                ,stripLayersWithMeasurement_(-1)
128 +                ,d0_(-9999.)
129 +                ,d0Error_(-9999.)
130 +                ,dsz_(-9999.)
131 +                ,dszError_(-9999.)
132 +                ,normalizedChi2_(-9999.)
133 +                ,ptError_(-9999.)
134 +                ,etaError_(-9999.)
135 +                ,phiError_(-9999.)
136 +                ,ip3DSignificance_(-9999.)
137                  {;}
138  
139          TRootMuon(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vtx_x, Double_t vtx_y, Double_t vtx_z) :
# Line 125 | Line 163 | public:
163                  ,direction_(-9999)
164                  ,algo_(-9999)
165                  ,id_(-9999)
166 +                ,numberOfValidPixelHits_(-1)
167 +                ,numberOfValidTrackerHits_(-1)
168 +                ,pixelLayersWithMeasurement_(-1)
169 +                ,stripLayersWithMeasurement_(-1)
170 +                ,d0_(-9999.)
171 +                ,d0Error_(-9999.)
172 +                ,dsz_(-9999.)
173 +                ,dszError_(-9999.)
174 +                ,normalizedChi2_(-9999.)
175 +                ,ptError_(-9999.)
176 +                ,etaError_(-9999.)
177 +                ,phiError_(-9999.)
178 +                ,ip3DSignificance_(-9999.)
179                  {;}
180  
181          TRootMuon(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vtx_x, Double_t vtx_y, Double_t vtx_z, Int_t type, Float_t charge) :
# Line 154 | Line 205 | public:
205                  ,direction_(-9999)
206                  ,algo_(-9999)
207                  ,id_(-9999)
208 +                ,numberOfValidPixelHits_(-1)
209 +                ,numberOfValidTrackerHits_(-1)
210 +                ,pixelLayersWithMeasurement_(-1)
211 +                ,stripLayersWithMeasurement_(-1)
212 +                ,d0_(-9999.)
213 +                ,d0Error_(-9999.)
214 +                ,dsz_(-9999.)
215 +                ,dszError_(-9999.)
216 +                ,normalizedChi2_(-9999.)
217 +                ,ptError_(-9999.)
218 +                ,etaError_(-9999.)
219 +                ,phiError_(-9999.)
220 +                ,ip3DSignificance_(-9999.)
221                  {;}
222  
223          TRootMuon(const TLorentzVector &momentum) :
# Line 183 | Line 247 | public:
247                  ,direction_(-9999)
248                  ,algo_(-9999)
249                  ,id_(-9999)
250 +                ,numberOfValidPixelHits_(-1)
251 +                ,numberOfValidTrackerHits_(-1)
252 +                ,pixelLayersWithMeasurement_(-1)
253 +                ,stripLayersWithMeasurement_(-1)
254 +                ,d0_(-9999.)
255 +                ,d0Error_(-9999.)
256 +                ,dsz_(-9999.)
257 +                ,dszError_(-9999.)
258 +                ,normalizedChi2_(-9999.)
259 +                ,ptError_(-9999.)
260 +                ,etaError_(-9999.)
261 +                ,phiError_(-9999.)
262 +                ,ip3DSignificance_(-9999.)
263                  {;}
264  
265          TRootMuon(const TLorentzVector &momentum, const TVector3 &vertex, Int_t type, Float_t charge) :
# Line 212 | Line 289 | public:
289                  ,direction_(-9999)
290                  ,algo_(-9999)
291                  ,id_(-9999)
292 +                ,numberOfValidPixelHits_(-1)
293 +                ,numberOfValidTrackerHits_(-1)
294 +                ,pixelLayersWithMeasurement_(-1)
295 +                ,stripLayersWithMeasurement_(-1)
296 +                ,d0_(-9999.)
297 +                ,d0Error_(-9999.)
298 +                ,dsz_(-9999.)
299 +                ,dszError_(-9999.)
300 +                ,normalizedChi2_(-9999.)
301 +                ,ptError_(-9999.)
302 +                ,etaError_(-9999.)
303 +                ,phiError_(-9999.)
304 +                ,ip3DSignificance_(-9999.)
305                  {;}
306  
307          ~TRootMuon() {;}
# Line 260 | Line 350 | public:
350          Bool_t idTM2DCompatibilityLoose() const { return id_ & 32; }
351          Bool_t idTM2DCompatibilityTight() const { return id_ & 64; }
352  
353 +        Int_t numberOfValidPixelHits() const { return numberOfValidPixelHits_; }
354 +        Int_t numberOfValidTrackerHits() const { return numberOfValidTrackerHits_; }
355 +        Int_t pixelLayersWithMeasurement() const { return pixelLayersWithMeasurement_; }
356 +        Int_t stripLayersWithMeasurement() const { return stripLayersWithMeasurement_; }
357 +        Float_t d0() const { return d0_ ;}
358 +        Float_t d0Error() const { return d0Error_ ;}
359 +        Float_t dsz() const { return dsz_ ;}
360 +        Float_t dszError() const { return dszError_ ;}
361 +        Float_t normalizedChi2() const { return normalizedChi2_ ;}
362 +        Float_t ptError() const { return ptError_ ;}
363 +        Float_t etaError() const { return etaError_ ;}
364 +        Float_t phiError() const { return phiError_ ;}
365 +        Float_t ip3DSignificance() const { return ip3DSignificance_ ;}
366 +
367 +
368          //TObject* genMuon() const { return genMuon_.GetObject() ;}
369          virtual TString typeName() const { return "TRootMuon"; }
370  
# Line 316 | Line 421 | public:
421          )
422          { id_ = trackerMuonArbitrated*1 + allArbitrated*2 + globalMuonPromptTight*4 + tmLastStationLoose*8 + tmLastStationTight*16 + tm2DCompatibilityLoose*32 + tm2DCompatibilityTight*64; }
423  
424 +        void setNumberOfValidPixelHits(Int_t numberOfValidPixelHits) { numberOfValidPixelHits_ = numberOfValidPixelHits; }
425 +        void setNumberOfValidTrackerHits(Int_t numberOfValidTrackerHits) { numberOfValidTrackerHits_ = numberOfValidTrackerHits; }
426 +        void setPixelLayersWithMeasurement(Int_t pixelLayersWithMeasurement) { pixelLayersWithMeasurement_ = pixelLayersWithMeasurement; }
427 +        void setStripLayersWithMeasurement(Int_t stripLayersWithMeasurement) { stripLayersWithMeasurement_ = stripLayersWithMeasurement; }
428 +        void setD0(Float_t d0) { d0_ = d0; }
429 +        void setD0Error(Float_t d0Error) { d0Error_ = d0Error; }
430 +        void setDsz(Float_t dsz) { dsz_ = dsz; }
431 +        void setDszError(Float_t dszError) { dszError_ = dszError; }
432 +        void setNormalizedChi2(Float_t normalizedChi2) { normalizedChi2_ = normalizedChi2; }
433 +        void setPtError(Float_t ptError) { ptError_ = ptError; }
434 +        void setEtaError(Float_t etaError) { etaError_ = etaError; }
435 +        void setPhiError(Float_t phiError) { phiError_ = phiError; }
436 +        void setIP3DSignificance(Float_t ip3DSignificance) { ip3DSignificance_ = ip3DSignificance; }
437 +
438  
439          friend std::ostream& operator<< (std::ostream& stream, const TRootMuon& muon) {
440                  stream << "TRootMuon - Charge=" << muon.charge() << " (Et,eta,phi)=("<< muon.Et() <<","<< muon.Eta() <<","<< muon.Phi() << ")  vertex(x,y,z)=("<< muon.vx() <<","<< muon.vy() <<","<< muon.vz() << ")" << endl
# Line 325 | Line 444 | public:
444                                  << "  caloCompatibility="<<  muon.caloCompatibility_ << "  validity(energy,matches,isolation)=(" << muon.energyValid_ <<","<< muon.matchesValid_ <<","<< muon.isolationValid_ << ")" << endl
445                                  << "            Et_em=" << muon.et_em_ << " Et_emS9=" << muon.et_emS9_ << "  Et_had=" << muon.et_had_ << " Et_hadS9=" << muon.et_hadS9_ << "  Et_ho=" << muon.et_ho_ << "  Et_hoS9=" << muon.et_hoS9_ << endl
446                                  << "            isolation cone 0.3: Et_em=" << muon.isoR03_emEt_ << "  Et_had=" << muon.isoR03_hadEt_ <<"  Et_ho=" << muon.isoR03_hoEt_  << "  nTracks=" << muon.isoR03_nTracks_ <<"  nJets=" << muon.isoR03_nJets_ << endl
447 <                                << "            isolation cone 0.5: Et_em=" << muon.isoR05_emEt_ << "  Et_had=" << muon.isoR05_hadEt_ <<"  Et_ho=" << muon.isoR05_hoEt_  << "  nTracks=" << muon.isoR05_nTracks_ <<"  nJets=" << muon.isoR05_nJets_;
447 >                                << "            isolation cone 0.5: Et_em=" << muon.isoR05_emEt_ << "  Et_had=" << muon.isoR05_hadEt_ <<"  Et_ho=" << muon.isoR05_hoEt_  << "  nTracks=" << muon.isoR05_nTracks_ <<"  nJets=" << muon.isoR05_nJets_ << endl
448 >                                << "            d0=" << muon.d0_ << " +- " << muon.d0Error_ << "  dsz=" << muon.dsz_ << " +- " << muon.dszError_ << "   IP 3D Significance=" << muon.ip3DSignificance_;
449                  return stream;
450          };
451  
# Line 365 | Line 485 | public:
485          // TMLastStationLoose=0001000 , TMLastStationTight=0010000 , TM2DCompatibilityLoose=0100000 , TM2DCompatibilityTight=1000000
486          Int_t id_;
487  
488 <        ClassDef (TRootMuon,1);
488 >        
489 >        // Variables from reco::GsfTrack
490 >
491 >        /* cf: http://cmslxr.fnal.gov/lxr/source/DataFormats/TrackReco/interface/TrackBase.h
492 >        For tracks reconstructed in the CMS Tracker, the reference position is the point of closest approach to the centre
493 >        of CMS. For muons, this is not necessarily true. Parameters associated to the 5D curvilinear covariance matrix:
494 >                qoverp = q / abs(p) = signed inverse of momentum [1/GeV]
495 >                lambda = pi/2 - polar angle at the given point
496 >                phi = azimuth angle at the given point
497 >                dxy = -vx*sin(phi) + vy*cos(phi) [cm]
498 >                dsz = vz*cos(lambda) - (vx*cos(phi)+vy*sin(phi))*sin(lambda) [cm]
499 >
500 >        Geometrically, dxy is the signed distance in the XY plane between the straight line passing through (vx,vy) with
501 >        azimuthal angle phi and the point (0,0). The dsz parameter is the signed distance in the SZ plane between the straight
502 >        line passing through (vx,vy,vz) with angles (phi, lambda) and the point (s=0,z=0). The S axis is defined by the projection
503 >        of the straight line onto the XY plane. The convention is to assign the S coordinate for (vx,vy) as the value
504 >        vx*cos(phi)+vy*sin(phi). This value is zero when (vx,vy) is the point of minimum transverse distance to (0,0).
505 >
506 >        Note that dxy and dsz provide sensible estimates of the distance from the true particle trajectory to (0,0,0) ONLY
507 >        in two cases:
508 >                - When (vx,vy,vz) already correspond to the point of minimum transverse distance to (0,0,0) or is close to it
509 >                (so that the differences between considering the exact trajectory or a straight line in this range  are negligible).
510 >                This is usually true for Tracker tracks.
511 >                - When the track has infinite or extremely high momentum */
512 >
513 >        Int_t numberOfValidPixelHits_;     // Number of valid pixel hits
514 >        Int_t numberOfValidTrackerHits_;   // Number of valid tracker hits (pixel+strip) - More than 1 hit per layer (even mono) is possible due to modules overlap
515 >        Int_t pixelLayersWithMeasurement_; // Number of pixel layers with at least one valid hit
516 >        Int_t stripLayersWithMeasurement_; // Number of strip layers with at least one valid hit
517 >
518 >        Float_t d0_;             // d0=-dxy
519 >     Float_t d0Error_;        // error on d0_
520 >     Float_t dsz_;            // dsz parameter
521 >     Float_t dszError_;       // error on dsz_
522 >     Float_t normalizedChi2_; // chi-squared divided by n.d.o.f. of track fit
523 >
524 >     Float_t ptError_; // needed ?  ptError()
525 >     Float_t etaError_; // needed ?  etaError()
526 >     Float_t phiError_; // needed ?  phiError()
527 >
528 >     Float_t ip3DSignificance_;  // Significance of the impact parameter wrt to the selected primary vertex
529 >
530 >        ClassDef (TRootMuon,4);
531   };
532  
533   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines