CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/RecoMuon/MuonSeedGenerator/src/RPCCosmicSeedrecHitFinder.h

Go to the documentation of this file.
00001 #ifndef RecoMuon_MuonSeedGenerator_RPCCosmicSeedrecHitFinder_H
00002 #define RecoMuon_MuonSeedGenerator_RPCCosmicSeedrecHitFinder_H
00003 
00012 #include "RecoMuon/MuonSeedGenerator/src/RPCSeedFinder.h"
00013 #include <RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h>
00014 #include <FWCore/ParameterSet/interface/ParameterSet.h>
00015 #include <DataFormats/MuonDetId/interface/RPCDetId.h>
00016 #include <FWCore/Framework/interface/EventSetup.h>
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 class RPCCosmicSeedrecHitFinder {
00031 
00032     typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer;
00033     typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer;
00034     typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer;
00035     typedef MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer;
00036 
00037     public:
00038         RPCCosmicSeedrecHitFinder();
00039         ~RPCCosmicSeedrecHitFinder();
00040         void configure(const edm::ParameterSet& iConfig);
00041         void setEdge(const edm::EventSetup& iSetup);
00042         void unsetEdge();
00043         void setInput(MuonRecHitContainer (&recHits)[RPCLayerNumber]);
00044         void unsetInput();
00045         void setOutput(RPCSeedFinder *Seed); // Use the same RPCSeedFinder class
00046         void setLayers(const std::vector<unsigned int>& Layers);
00047         void fillrecHits();
00048     private:
00049         int LayerComponent();
00050         bool complete(const GlobalVector& lastSegment, const MuonRecHitPointer& lastrecHitRef);
00051         void checkandfill();
00052         bool isinsideAngleRange(const GlobalVector& lastSegment, const GlobalPoint& lastPosition, const GlobalPoint& currentPosition);
00053         bool iscorssEdge(const MuonRecHitPointer& lastrecHitRef, const MuonRecHitPointer& currentrecHitRef);
00054         bool isouterLayer(const MuonRecHitPointer& recHitRef);
00055 
00056         // ----------member data ---------------------------
00057 
00058         // parameters for configuration
00059         unsigned int BxRange;
00060         std::vector<int> ClusterSet;
00061         double MaxDeltaPhi;
00062         // Signal for call fillrecHits()
00063         bool isLayerset;
00064         bool isConfigured;
00065         bool isInputset;
00066         bool isOutputset;
00067         bool isEdgeset;
00068         // Signal for filling recHits
00069         bool isOuterLayerfilled;
00070         // Enable layers in Barrel and Endcap
00071         std::vector<unsigned int> LayersinRPC;
00072         // Data members
00073         std::vector<BoundPlane> innerBounds;
00074         bool isLayersmixed;
00075         MuonRecHitContainer AllrecHits[RPCLayerNumber];
00076         ConstMuonRecHitContainer therecHits;
00077         RPCSeedFinder *theSeed;
00078 };
00079 
00080 #endif