00001 #ifndef RecoMuon_MuonSeedGenerator_RPCSeedLayerFinder_H 00002 #define RecoMuon_MuonSeedGenerator_RPCSeedLayerFinder_H 00003 00012 #include <RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h> 00013 #include "RecoMuon/MuonSeedGenerator/src/RPCSeedrecHitFinder.h" 00014 #include "RecoMuon/MuonSeedGenerator/src/RPCCosmicSeedrecHitFinder.h" 00015 #include <FWCore/ParameterSet/interface/ParameterSet.h> 00016 00017 00018 #ifndef RPCLayerNumber 00019 #define RPCLayerNumber 12 00020 #endif 00021 00022 #ifndef BarrelLayerNumber 00023 #define BarrelLayerNumber 6 00024 #endif 00025 00026 #ifndef EachEndcapLayerNumber 00027 #define EachEndcapLayerNumber 3 00028 #endif 00029 00030 00031 class RPCSeedLayerFinder { 00032 00033 typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer; 00034 typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer; 00035 typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer; 00036 typedef MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer; 00037 00038 public: 00039 RPCSeedLayerFinder(); 00040 ~RPCSeedLayerFinder(); 00041 void configure(const edm::ParameterSet& iConfig); 00042 void setInput(MuonRecHitContainer (&recHitsRPC)[RPCLayerNumber]); 00043 void unsetInput(); 00044 void setOutput(RPCSeedrecHitFinder* Ref, RPCCosmicSeedrecHitFinder* CosmicRef); 00045 void fill(); 00046 00047 private: 00048 void fillLayers(); 00049 void fillCosmicLayers(); 00050 // create special N layers to fill to seeds 00051 void SpecialLayers(int last, unsigned int NumberofLayers, int type); 00052 bool checkConstrain(); 00053 00054 // ----------member data --------------------------- 00055 00056 // The ref of RPCSeedrecHitFinder which will be call after gathering a set of layers 00057 RPCSeedrecHitFinder* RPCrecHitFinderRef; 00058 RPCCosmicSeedrecHitFinder* RPCCosmicrecHitFinderRef; 00059 // The parameters for configuration 00060 bool isCosmic; 00061 bool isMixBarrelwithEndcap; 00062 std::vector<unsigned int> RangeofLayersinBarrel; 00063 std::vector<unsigned int> RangeofLayersinEndcap; 00064 bool isSpecialLayers; 00065 std::vector<unsigned int> LayersinEndcap; 00066 std::vector<unsigned int> LayersinBarrel; 00067 std::vector<unsigned int> constrainedLayersinBarrel; 00068 // Signal for call fillLayers() 00069 bool isConfigured; 00070 bool isInputset; 00071 bool isOutputset; 00072 // Enable layers in Barrel and Endcap 00073 std::vector<unsigned int> LayersinRPC; 00074 // Information of recHits in each layer 00075 unsigned int recHitsinLayers[RPCLayerNumber]; 00076 }; 00077 00078 #endif