CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/RecoLocalMuon/CSCRecHitD/src/CSCHitFromStripOnly.h

Go to the documentation of this file.
00001 #ifndef CSCRecHitD_CSCHitFromStripOnly_h
00002 #define CSCRecHitD_CSCHitFromStripOnly_h
00003 
00015 #include "DataFormats/MuonDetId/interface/CSCDetId.h"
00016 
00017 #include "RecoLocalMuon/CSCRecHitD/src/CSCStripData.h"
00018 #include "RecoLocalMuon/CSCRecHitD/src/CSCStripHitData.h"
00019 #include "RecoLocalMuon/CSCRecHitD/src/CSCStripHit.h"
00020 #include "RecoLocalMuon/CSCRecHitD/src/CSCRecoConditions.h"
00021 
00022 #include "DataFormats/CSCDigi/interface/CSCStripDigiCollection.h"
00023 
00024 #include "FWCore/Framework/interface/Frameworkfwd.h"
00025 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00026 
00027 #include <vector>
00028 
00029 class CSCLayer;
00030 class CSCStripDigi;
00031 class CSCPedestalChoice;
00032 
00033 class CSCHitFromStripOnly 
00034 {
00035   
00036  public:
00037 
00038   typedef std::vector<CSCStripData> PulseHeightMap;
00039   
00040   explicit CSCHitFromStripOnly( const edm::ParameterSet& ps );
00041   
00042   ~CSCHitFromStripOnly();
00043   
00044   std::vector<CSCStripHit> runStrip( const CSCDetId& id, const CSCLayer* layer, const CSCStripDigiCollection::Range& rstripd );
00045 
00046   void setConditions( const CSCRecoConditions* reco ) {
00047     recoConditions_ = reco;
00048   } 
00049  
00050   
00051  private:
00052         
00054   void fillPulseHeights( const CSCStripDigiCollection::Range& rstripd );  
00055 
00057   void findMaxima(const CSCDetId& id);  
00058   // What we call a peak
00059   bool isPeakOK(int iStrip, float heightCluster);  
00060 
00062   float makeCluster( int centerStrip );
00063 
00065   CSCStripHitData makeStripData( int centerStrip, int offset );
00066 
00068   bool isNearDeadStrip(const CSCDetId& id, int centralStrip); 
00069 
00071   bool isDeadStrip(const CSCDetId& id, int centralStrip); 
00072 
00074   float findHitOnStripPosition( const std::vector<CSCStripHitData>& data, const int& centerStrip );
00075   
00076 
00077 // MEMBER DATA
00078 
00079   // Hold pointers to current layer, conditions data
00080   CSCDetId id_;    
00081   const CSCLayer * layer_;
00082   const CSCRecoConditions* recoConditions_;
00083   // Number of strips in layer
00084   unsigned nstrips_;
00085   // gain correction weights and crosstalks read in from conditions database.
00086   float gainWeight[80];
00087 
00088   // The specific pedestal calculator
00089         CSCPedestalChoice* calcped_;
00090 
00091   // The cuts for forming the strip hits are described in the config file
00092   bool useCalib;
00093   static const int theClusterSize = 3;
00094   float theThresholdForAPeak;
00095   float theThresholdForCluster;
00096 
00097 
00098   // working buffer for sca pulseheights
00099   PulseHeightMap thePulseHeightMap;
00100 
00101   std::vector<int> theMaxima;
00102   std::vector<int> theConsecutiveStrips;//... with charge for a given maximum
00103   std::vector<int> theClosestMaximum; // this is number of strips to the closest other maximum
00104 
00105   // Variables entering the CSCStripHit construction:
00106   int tmax_cluster; // Peaking time for strip hit, in time bin units
00107   int clusterSize;
00108   std::vector<float> strips_adc;
00109   std::vector<float> strips_adcRaw;
00110   std::vector<int> theStrips;
00111   
00112 };
00113 
00114 #endif
00115