00001 #ifndef CSCRecHitD_CSCHitFromStripOnly_h 00002 #define CSCRecHitD_CSCHitFromStripOnly_h 00003 00018 //---- Possible changes from Stoyan Stoynev - NU 00019 #include <RecoLocalMuon/CSCRecHitD/src/CSCStripData.h> 00020 #include <RecoLocalMuon/CSCRecHitD/src/CSCStripHitData.h> 00021 #include <RecoLocalMuon/CSCRecHitD/src/CSCStripHit.h> 00022 #include <RecoLocalMuon/CSCRecHitD/src/CSCRecoConditions.h> 00023 00024 #include <DataFormats/CSCDigi/interface/CSCStripDigiCollection.h> 00025 00026 #include <FWCore/Framework/interface/Frameworkfwd.h> 00027 #include <FWCore/ParameterSet/interface/ParameterSet.h> 00028 00029 #include <vector> 00030 00031 class CSCLayer; 00032 class CSCChamberSpecs; 00033 class CSCLayerGeometry; 00034 class CSCStripDigi; 00035 class CSCPeakBinOfStripPulse; 00036 00037 00038 class CSCHitFromStripOnly 00039 { 00040 00041 public: 00042 00043 typedef std::vector<CSCStripData> PulseHeightMap; 00044 00045 explicit CSCHitFromStripOnly( const edm::ParameterSet& ps ); 00046 00047 ~CSCHitFromStripOnly(); 00048 00049 std::vector<CSCStripHit> runStrip( const CSCDetId& id, const CSCLayer* layer, const CSCStripDigiCollection::Range& rstripd ); 00050 00051 void setConditions( const CSCRecoConditions* reco ) { 00052 recoConditions_ = reco; 00053 } 00054 00055 protected: 00056 00058 void fillPulseHeights( const CSCStripDigiCollection::Range& rstripd ); 00059 00061 void findMaxima(); 00062 00064 float makeCluster( int centerStrip ); 00065 00066 std::vector<int> theMaxima; 00067 std::vector<int> theConsecutiveStrips;//... with charge for a given maximum 00068 std::vector<int> theClosestMaximum; // this is number of strips to the closest other maximum 00069 00070 PulseHeightMap thePulseHeightMap; 00071 00073 float findHitOnStripPosition( const std::vector<CSCStripHitData>& data, const int& centerStrip ); 00074 00075 CSCDetId id_; 00076 const CSCLayer * layer_; 00077 const CSCLayerGeometry * layergeom_; 00078 const CSCChamberSpecs * specs_; 00079 00080 private: 00081 00082 CSCStripHitData makeStripData( int centerStrip, int offset ); 00083 bool isNearDeadStrip(const CSCDetId& id, int centralStrip); 00084 00085 // Variables entering the CSCStripHit construction: 00086 int tmax_cluster; 00087 int clusterSize; 00088 std::vector<float> strips_adc; 00089 std::vector<float> strips_adcRaw; 00090 std::vector<int> theStrips; 00091 00092 // The cuts for forming the strip hits are described in the data/.cfi file 00093 bool useCalib; 00094 static const int theClusterSize = 3; 00095 float theThresholdForAPeak; 00096 float theThresholdForCluster; 00097 //bool isData; 00098 00100 float gainWeight[80]; 00101 00102 // Peaking time for strip hit 00103 int TmaxOfCluster; // in time bins; 00104 // Number of strips in layer 00105 unsigned Nstrips; 00106 00108 const CSCRecoConditions* recoConditions_; 00109 00110 CSCPeakBinOfStripPulse* pulseheightOnStripFinder_; 00111 }; 00112 00113 #endif 00114