CMS 3D CMS Logo

CSCSegAlgoST.h

Go to the documentation of this file.
00001 #ifndef CSCSegment_CSCSegAlgoST_h
00002 #define CSCSegment_CSCSegAlgoST_h
00003 
00024 #include <RecoLocalMuon/CSCSegment/src/CSCSegmentAlgorithm.h>
00025 
00026 #include <DataFormats/CSCRecHit/interface/CSCRecHit2D.h>
00027 
00028 #include <deque>
00029 #include <vector>
00030 
00031 class CSCSegAlgoShowering;
00032 class CSCSegAlgoST : public CSCSegmentAlgorithm {
00033 
00034 
00035 public:
00036 
00038 
00039   typedef std::vector<const CSCRecHit2D*> ChamberHitContainer;
00040   typedef std::vector < std::vector<const CSCRecHit2D* > > Segments;
00041   typedef std::deque<bool> BoolContainer;
00042 
00044   explicit CSCSegAlgoST(const edm::ParameterSet& ps);
00046   virtual ~CSCSegAlgoST();
00047 
00052   std::vector<CSCSegment> buildSegments(ChamberHitContainer rechits);
00053 
00058   std::vector<CSCSegment> buildSegments2(ChamberHitContainer rechits);
00059 
00063   std::vector<CSCSegment> run(const CSCChamber* aChamber, ChamberHitContainer rechits); 
00064 
00068   std::vector< std::vector<const CSCRecHit2D*> > clusterHits(const CSCChamber* aChamber, ChamberHitContainer rechits);
00069 
00074   std::vector< CSCSegment > prune_bad_hits(const CSCChamber* aChamber, std::vector< CSCSegment > segments);
00075 
00076 private:
00077 
00079   double theWeight(double coordinate_1, double coordinate_2, double coordinate_3, float layer_1, float layer_2, float layer_3);
00080 
00081   void ChooseSegments(void);
00082 
00083   // siplistic routine - just return the segment with the smallest weight
00084   void ChooseSegments2a(std::vector< ChamberHitContainer > best_segments, int best_seg);
00085   // copy of Stoyans ChooseSegments adjusted to the case without fake hits
00086   void ChooseSegments2(int best_seg);
00087 
00088   // Choose routine with reduce nr of loops
00089   void ChooseSegments3(int best_seg);
00090   void ChooseSegments3(std::vector< ChamberHitContainer > best_segments, std::vector< float > best_weight, int best_seg);
00091   //
00092   void fitSlopes(void);
00093   void fillChiSquared(void);
00094   void fillLocalDirection(void);
00095   HepMatrix derivativeMatrix(void) const;
00096   AlgebraicSymMatrix weightMatrix(void) const;
00097   AlgebraicSymMatrix calculateError(void) const;
00098   void flipErrors(AlgebraicSymMatrix&) const;
00099   // Member variables
00100   const std::string myName; 
00101   const CSCChamber* theChamber;
00102   Segments GoodSegments;
00103 
00104   ChamberHitContainer PAhits_onLayer[6];
00105   ChamberHitContainer Psegments_hits;
00106 
00107   std::vector< ChamberHitContainer > Psegments;
00108   std::vector< ChamberHitContainer > Psegments_noLx;
00109   std::vector< ChamberHitContainer > Psegments_noL1;
00110   std::vector< ChamberHitContainer > Psegments_noL2;
00111   std::vector< ChamberHitContainer > Psegments_noL3;
00112   std::vector< ChamberHitContainer > Psegments_noL4;
00113   std::vector< ChamberHitContainer > Psegments_noL5;
00114   std::vector< ChamberHitContainer > Psegments_noL6;
00115   std::vector< ChamberHitContainer > chosen_Psegments;
00116   std::vector< float > weight_A;
00117   std::vector< float > weight_noLx_A;
00118   std::vector< float > weight_noL1_A;
00119   std::vector< float > weight_noL2_A;
00120   std::vector< float > weight_noL3_A;
00121   std::vector< float > weight_noL4_A;
00122   std::vector< float > weight_noL5_A;
00123   std::vector< float > weight_noL6_A;
00124   std::vector< float > chosen_weight_A;
00125   std::vector< float > curv_A;
00126   std::vector< float > curv_noL1_A;
00127   std::vector< float > curv_noL2_A;
00128   std::vector< float > curv_noL3_A;
00129   std::vector< float > curv_noL4_A;
00130   std::vector< float > curv_noL5_A;
00131   std::vector< float > curv_noL6_A;
00132   std::vector< float > weight_B;
00133   std::vector< float > weight_noL1_B;
00134   std::vector< float > weight_noL2_B;
00135   std::vector< float > weight_noL3_B;
00136   std::vector< float > weight_noL4_B;
00137   std::vector< float > weight_noL5_B;
00138   std::vector< float > weight_noL6_B;
00139 
00140   //ibl
00141 
00142   ChamberHitContainer protoSegment;
00143   float       protoSlope_u;
00144   float       protoSlope_v;
00145   LocalPoint  protoIntercept;           
00146   double      protoChi2;
00147   LocalVector protoDirection;
00148 
00149   // input from .cfi file
00150   bool    debug;
00151   //  int     minLayersApart;
00152   //  double  nSigmaFromSegment;
00153   int     minHitsPerSegment;
00154   //  int     muonsPerChamberMax;
00155   //  double  chi2Max;
00156   double  dXclusBoxMax;
00157   double  dYclusBoxMax;
00158   int     maxRecHitsInCluster;
00159   bool    preClustering;
00160   bool    Pruning;
00161   bool    BrutePruning;
00162   bool    onlyBestSegment;
00163   bool    useShowering;
00164 
00165   double  hitDropLimit4Hits;
00166   double  hitDropLimit5Hits;
00167   double  hitDropLimit6Hits;
00168 
00169   float a_yweightPenaltyThreshold[5][5];
00170 
00171   double  yweightPenaltyThreshold;
00172   double  yweightPenalty;
00173 
00174   double  curvePenaltyThreshold;
00175   double  curvePenalty;
00176   CSCSegAlgoShowering* showering_;
00177 };
00178 
00179 #endif

Generated on Tue Jun 9 17:43:51 2009 for CMSSW by  doxygen 1.5.4