Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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

0005  *  

0006  *   \author Haiyun.Teng - Peking University

0007  *

0008  *  

0009  */
0010 
0011 #include <RecoMuon/TransientTrackingRecHit/interface/MuonTransientTrackingRecHit.h>
0012 #include "RecoMuon/MuonSeedGenerator/src/RPCSeedrecHitFinder.h"
0013 #include "RecoMuon/MuonSeedGenerator/src/RPCCosmicSeedrecHitFinder.h"
0014 #include <FWCore/ParameterSet/interface/ParameterSet.h>
0015 
0016 #ifndef RPCLayerNumber
0017 #define RPCLayerNumber 12
0018 #endif
0019 
0020 #ifndef BarrelLayerNumber
0021 #define BarrelLayerNumber 6
0022 #endif
0023 
0024 #ifndef EachEndcapLayerNumber
0025 #define EachEndcapLayerNumber 3
0026 #endif
0027 
0028 class RPCSeedLayerFinder {
0029   typedef MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer;
0030   typedef MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer;
0031   typedef MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer;
0032   typedef MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer;
0033 
0034 public:
0035   RPCSeedLayerFinder();
0036   ~RPCSeedLayerFinder();
0037   void configure(const edm::ParameterSet& iConfig);
0038   void setInput(MuonRecHitContainer (&recHitsRPC)[RPCLayerNumber]);
0039   void unsetInput();
0040   void setOutput(RPCSeedrecHitFinder* Ref, RPCCosmicSeedrecHitFinder* CosmicRef);
0041   void fill();
0042 
0043 private:
0044   void fillLayers();
0045   void fillCosmicLayers();
0046   // create special N layers to fill to seeds

0047   void SpecialLayers(int last, unsigned int NumberofLayers, int type);
0048   bool checkConstrain();
0049 
0050   // ----------member data ---------------------------

0051 
0052   // The ref of RPCSeedrecHitFinder which will be call after gathering a set of layers

0053   RPCSeedrecHitFinder* RPCrecHitFinderRef;
0054   RPCCosmicSeedrecHitFinder* RPCCosmicrecHitFinderRef;
0055   // The parameters for configuration

0056   bool isCosmic;
0057   bool isMixBarrelwithEndcap;
0058   std::vector<unsigned int> RangeofLayersinBarrel;
0059   std::vector<unsigned int> RangeofLayersinEndcap;
0060   bool isSpecialLayers;
0061   std::vector<unsigned int> LayersinEndcap;
0062   std::vector<unsigned int> LayersinBarrel;
0063   std::vector<unsigned int> constrainedLayersinBarrel;
0064   // Signal for call fillLayers()

0065   bool isConfigured;
0066   bool isInputset;
0067   bool isOutputset;
0068   // Enable layers in Barrel and Endcap

0069   std::vector<unsigned int> LayersinRPC;
0070   // Information of recHits in each layer

0071   unsigned int recHitsinLayers[RPCLayerNumber];
0072 };
0073 
0074 #endif