Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:26:05

0001 #ifndef RecoMuon_MuonSeedGenerator_RPCCosmicSeedrecHitFinder_H
0002 #define RecoMuon_MuonSeedGenerator_RPCCosmicSeedrecHitFinder_H
0003 
0004 /** \class RPCSeedLayerFinder

0005  *  

0006  *   \author Haiyun.Teng - Peking University

0007  *

0008  *  

0009  */
0010 
0011 #include "RecoMuon/MuonSeedGenerator/src/RPCSeedFinder.h"
0012 #include "RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h"
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
0015 #include <Geometry/RPCGeometry/interface/RPCGeometry.h>
0016 
0017 #ifndef RPCLayerNumber
0018 #define RPCLayerNumber 12
0019 #endif
0020 
0021 #ifndef BarrelLayerNumber
0022 #define BarrelLayerNumber 6
0023 #endif
0024 
0025 #ifndef EachEndcapLayerNumber
0026 #define EachEndcapLayerNumber 3
0027 #endif
0028 
0029 class RPCCosmicSeedrecHitFinder {
0030   typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer;
0031   typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer;
0032   typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer;
0033   typedef MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer;
0034 
0035 public:
0036   RPCCosmicSeedrecHitFinder();
0037   ~RPCCosmicSeedrecHitFinder();
0038   void configure(const edm::ParameterSet& iConfig);
0039   void setEdge(const RPCGeometry&);
0040   void unsetEdge();
0041   void setInput(MuonRecHitContainer (&recHits)[RPCLayerNumber]);
0042   void unsetInput();
0043   void setOutput(RPCSeedFinder* Seed);  // Use the same RPCSeedFinder class

0044   void setLayers(const std::vector<unsigned int>& Layers);
0045   void fillrecHits();
0046 
0047 private:
0048   int LayerComponent();
0049   bool complete(const GlobalVector& lastSegment, const MuonRecHitPointer& lastrecHitRef);
0050   void checkandfill();
0051   bool isinsideAngleRange(const GlobalVector& lastSegment,
0052                           const GlobalPoint& lastPosition,
0053                           const GlobalPoint& currentPosition);
0054   bool iscorssEdge(const MuonRecHitPointer& lastrecHitRef, const MuonRecHitPointer& currentrecHitRef);
0055   bool isouterLayer(const MuonRecHitPointer& recHitRef);
0056 
0057   // ----------member data ---------------------------

0058 
0059   // parameters for configuration

0060   unsigned int BxRange;
0061   std::vector<int> ClusterSet;
0062   double MaxDeltaPhi;
0063   // Signal for call fillrecHits()

0064   bool isLayerset;
0065   bool isConfigured;
0066   bool isInputset;
0067   bool isOutputset;
0068   bool isEdgeset;
0069   // Signal for filling recHits

0070   bool isOuterLayerfilled;
0071   // Enable layers in Barrel and Endcap

0072   std::vector<unsigned int> LayersinRPC;
0073   // Data members

0074   std::vector<BoundPlane> innerBounds;
0075   bool isLayersmixed;
0076   MuonRecHitContainer AllrecHits[RPCLayerNumber];
0077   ConstMuonRecHitContainer therecHits;
0078   RPCSeedFinder* theSeed;
0079 };
0080 
0081 #endif