CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/RecoLocalTracker/SiPixelRecHits/plugins/SiPixelTemplateReco.h

Go to the documentation of this file.
00001 //
00002 //  SiPixelTemplateReco.cc (Version 8.10)
00003 //
00004 //  Add goodness-of-fit to algorithm, include single pixel clusters in chi2 calculation
00005 //  Try "decapitation" of large single pixels
00006 //  Add correction for (Q_F-Q_L)/(Q_F+Q_L) bias
00007 //  Add cot(beta) reflection to reduce y-entries and more sophisticated x-interpolation
00008 //  Fix small double pixel bug with decapitation (2.41 5-Mar-2007).
00009 //  Fix pseudopixel bug causing possible memory overwrite (2.42 12-Mar-2007)
00010 //  Adjust template binning to span 3 (or 4) central pixels and implement improved (faster) chi2min search
00011 //  Replace internal containers with static arrays
00012 //  Add external threshold to calls to ysigma2 and xsigma2, use sorted signal heights to guarrantee min clust size = 2
00013 //  Use denser search over larger bin range for clusters with big pixels.
00014 //  Use single calls to template object to load template arrays (had been many)
00015 //  Add speed switch to trade-off speed and robustness
00016 //  Add qmin and re-define qbin to flag low-q clusters
00017 //  Add qscale to match charge scales
00018 //  Return error if no pixels in cluster
00019 //  Replace 4 cout's with LogError's
00020 //  Add LogDebug I/O to report various common errors
00021 //  Incorporate "cluster repair" to handle dead pixels
00022 //  Take truncation size from new pixmax information
00023 //  Change to allow template sizes to be changed at compile time
00024 //  Move interpolation range error to LogDebug
00025 //  Add qbin = 5 and change 1-pixel probability to use new template info
00026 //  Add floor for probabilities (no exact zeros)
00027 //  Replace asserts with exceptions in CMSSW
00028 //  Change calling sequence to handle cot(beta)<0 for FPix cosmics
00029 //
00030 //  V7.00 - Decouple BPix and FPix information into separate templates
00031 //  Pass all containers by alias to prevent excessive cpu-usage (v7.01)
00032 //  Slightly modify search bin range to avoid problem with single pixel clusters + large Lorentz drift (V7.02)
00033 //
00034 //  V8.00 - Add 2D probabilities, take pixel sizes from the template
00035 //  V8.05 - Shift 2-D cluster to center on the buffer
00036 //  V8.06 - Add locBz to the 2-D template (causes failover to the simple template when the cotbeta-locBz correlation is incorrect ... ie for non-IP tracks).
00037 //        - include minimum value for prob2D (1.e-30)
00038 //  V8.07 - Tune 2-d probability: consider only pixels above threshold and use threshold value for zero signal pixels (non-zero template)
00039 //  V8.10 - Remove 2-d probability for ineffectiveness and replace with simple cluster charge probability
00040 //  V8.11 - Change probQ to upper tail probability always (rather than two-sided tail probability)
00041 //
00042 //
00043 //
00044 //  Created by Morris Swartz on 10/27/06.
00045 //  Copyright 2006 __TheJohnsHopkinsUniversity__. All rights reserved.
00046 //
00047 //
00048 
00049 #ifndef SiPixelTemplateReco_h
00050 #define SiPixelTemplateReco_h 1
00051 
00052 
00053 #ifndef SI_PIXEL_TEMPLATE_STANDALONE
00054 #include "SiPixelTemplate.h"
00055 #else
00056 #include "SiPixelTemplate.h"
00057 #endif
00058 
00059 #define N2D 500
00060 
00061 #include <vector>
00062 #include "boost/multi_array.hpp"
00063 
00064 
00065 namespace SiPixelTemplateReco 
00066  {
00067  
00068     typedef boost::multi_array<float, 2> array_2d;
00069 
00070         int PixelTempReco2D(int id, float cotalpha, float cotbeta, float locBz, array_2d& cluster, 
00071                                 std::vector<bool>& ydouble, std::vector<bool>& xdouble, 
00072                                 SiPixelTemplate& templ, 
00073                                 float& yrec, float& sigmay, float& proby, float& xrec, float& sigmax, float& probx, int& qbin, int speed, bool deadpix, std::vector<std::pair<int, int> >& zeropix,
00074                                 float& probQ);
00075 
00076         int PixelTempReco2D(int id, float cotalpha, float cotbeta, float locBz, array_2d& cluster, 
00077                                 std::vector<bool>& ydouble, std::vector<bool>& xdouble, 
00078                                 SiPixelTemplate& templ, 
00079                                 float& yrec, float& sigmay, float& proby, float& xrec, float& sigmax, float& probx, int& qbin, int speed,
00080                                 float& probQ);
00081          
00082          int PixelTempReco2D(int id, float cotalpha, float cotbeta, array_2d& cluster, 
00083                                                  std::vector<bool>& ydouble, std::vector<bool>& xdouble, 
00084                                                  SiPixelTemplate& templ, 
00085                                                  float& yrec, float& sigmay, float& proby, float& xrec, float& sigmax, float& probx, int& qbin, int speed,
00086                                                  float& probQ);
00087          
00088          int PixelTempReco2D(int id, float cotalpha, float cotbeta, array_2d& cluster, 
00089                                                                 std::vector<bool>& ydouble, std::vector<bool>& xdouble, 
00090                                                                 SiPixelTemplate& templ, 
00091                                                                 float& yrec, float& sigmay, float& proby, float& xrec, float& sigmax, float& probx, int& qbin, int speed);
00092  }
00093                                 
00094 #endif