ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/src/PixelHit.cc
(Generate patch)

Comparing UserCode/MitAna/DataTree/src/PixelHit.cc (file contents):
Revision 1.1 by loizides, Fri Sep 25 08:39:11 2009 UTC vs.
Revision 1.2 by loizides, Mon Sep 28 14:15:34 2009 UTC

# Line 3 | Line 3
3   #include "MitAna/DataTree/interface/PixelHit.h"
4  
5   ClassImp(mithep::PixelHit)
6 +
7 + using namespace mithep;
8 +
9 + //  Initialize the packing format singleton
10 + PixelHit::Packing PixelHit::fPacking;
11 +
12 + //--------------------------------------------------------------------------------------------------
13 + PixelHit::Packing::Packing()
14 + {
15 +  // Constructor: pre-computes masks and shifts from field widths
16 +  fProbX_width         = 11;
17 +  fProbY_width         = 11;
18 +  fQBin_width          = 3;
19 +  fEdge_width          = 1;
20 +  fBad_width           = 1;
21 +  fTwoROC_width        = 1;
22 +  fHasFilledProb_width = 1;
23 +  fSpare_width         = 3;
24 +  
25 +  fProbX_units    = 1.008;
26 +  fProbY_units    = 1.008;
27 +  fProbX_1_over_log_units = 1.0 / TMath::Log(fProbX_units);
28 +  fProbY_1_over_log_units = 1.0 / TMath::Log(fProbY_units);
29 +
30 +  // Fields are counted from right to left!
31 +  fProbX_shift          = 0;
32 +  fProbY_shift          = fProbX_shift  + fProbX_width;
33 +  fQBin_shift           = fProbY_shift  + fProbY_width;
34 +  fEdge_shift           = fQBin_shift   + fQBin_width;
35 +  fBad_shift            = fEdge_shift   + fEdge_width;
36 +  fTwoROC_shift         = fBad_shift    + fBad_width;
37 +  fHasFilledProb_shift  = fTwoROC_shift + fTwoROC_width;
38 +  
39 +  // Ensure the complement of the correct number of bits:
40 +  QualWordType zero32 = 0;  // 32-bit wide set of 0's
41 +  fProbX_mask          = ~(~zero32 << fProbX_width);
42 +  fProbY_mask          = ~(~zero32 << fProbY_width);
43 +  fQBin_mask           = ~(~zero32 << fQBin_width);
44 +  fEdge_mask           = ~(~zero32 << fEdge_width);
45 +  fBad_mask            = ~(~zero32 << fBad_width);
46 +  fTwoROC_mask         = ~(~zero32 << fTwoROC_width);
47 +  fHasFilledProb_mask  = ~(~zero32 << fHasFilledProb_width);
48 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines