CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/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   bool ganged() { return ganged_;}
00051   void setGanged( bool ig ) { ganged_ = ig;}
00052 
00053  private:
00054         
00056   void fillPulseHeights( const CSCStripDigiCollection::Range& rstripd );  
00057 
00059   void findMaxima(const CSCDetId& id);  
00060   // What we call a peak
00061   bool isPeakOK(int iStrip, float heightCluster);  
00062 
00064   float makeCluster( int centerStrip );
00065 
00067   CSCStripHitData makeStripData( int centerStrip, int offset );
00068 
00070   bool isNearDeadStrip(const CSCDetId& id, int centralStrip); 
00071 
00073   bool isDeadStrip(const CSCDetId& id, int centralStrip); 
00074 
00076   float findHitOnStripPosition( const std::vector<CSCStripHitData>& data, const int& centerStrip );
00077   
00078 
00079 // MEMBER DATA
00080 
00081   // Hold pointers to current layer, conditions data
00082   CSCDetId id_;    
00083   const CSCLayer * layer_;
00084   const CSCRecoConditions* recoConditions_;
00085   // Number of strips in layer
00086   unsigned nstrips_;
00087   // gain correction weights and crosstalks read in from conditions database.
00088   float gainWeight[80];
00089 
00090   // The specific pedestal calculator
00091         CSCPedestalChoice* calcped_;
00092 
00093   // The cuts for forming the strip hits are described in the config file
00094   bool useCalib;
00095   static const int theClusterSize = 3;
00096   float theThresholdForAPeak;
00097   float theThresholdForCluster;
00098 
00099 
00100   // working buffer for sca pulseheights
00101   PulseHeightMap thePulseHeightMap;
00102 
00103   std::vector<int> theMaxima;
00104   std::vector<int> theConsecutiveStrips;//... with charge for a given maximum
00105   std::vector<int> theClosestMaximum; // this is number of strips to the closest other maximum
00106 
00107   // Variables entering the CSCStripHit construction:
00108   int tmax_cluster; // Peaking time for strip hit, in time bin units
00109   int clusterSize;
00110   std::vector<float> strips_adc;
00111   std::vector<float> strips_adcRaw;
00112   std::vector<int> theStrips;
00113 
00114   bool ganged_; // only True if ME1/1A AND it is ganged
00115   
00116 };
00117 
00118 #endif
00119