CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/EventFilter/DTTFRawToDigi/interface/DTTFFEDReader.h

Go to the documentation of this file.
00001 //-------------------------------------------------
00002 //
00014 //
00015 //--------------------------------------------------
00016 #ifndef DTTFRawToDigi_DTTFFEDReader_h
00017 #define DTTFRawToDigi_DTTFFEDReader_h
00018 
00019 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h"
00020 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h"
00021 #include "DataFormats/L1DTTrackFinder/interface/L1MuDTTrackContainer.h"
00022 
00023 #include <FWCore/Framework/interface/EDProducer.h>
00024 #include <FWCore/ParameterSet/interface/ParameterSet.h>
00025 #include <FWCore/Utilities/interface/InputTag.h>
00026 
00027 #include <string>
00028 
00029 class DTTFFEDReader : public edm::EDProducer {
00030 
00031  public:
00032 
00034   DTTFFEDReader(const edm::ParameterSet& pset);
00035 
00037   virtual ~DTTFFEDReader();
00038 
00040   void produce(edm::Event & e, const edm::EventSetup& c);
00041 
00043   bool fillRawData(edm::Event& e,
00044                    L1MuDTChambPhContainer::Phi_Container& phi_data,
00045                    L1MuDTChambThContainer::The_Container& the_data,
00046                    L1MuDTTrackContainer::TrackContainer&  tra_data);
00047 
00048  private:
00049   
00050   edm::InputTag DTTFInputTag;
00051 
00052   bool verbose_;
00053 
00054   // Operations
00055 
00056   // access data
00057   const L1MuDTChambPhContainer::Phi_Container& p_data();
00058 
00059   const L1MuDTChambThContainer::The_Container& t_data();
00060 
00061   const L1MuDTTrackContainer::TrackContainer&  k_data();
00062 
00063   // Process one event
00064   void analyse(edm::Event& e);
00065 
00066   // clear data container
00067   void clear();
00068 
00069   // process data
00070   void process(edm::Event& e);
00071 
00072   // Match PHTF - ETTF tracks
00073   void match();
00074 
00075   // data containers
00076   L1MuDTChambPhContainer::Phi_Container phiSegments;
00077 
00078   L1MuDTChambThContainer::The_Container theSegments;
00079 
00080   L1MuDTTrackContainer::TrackContainer  dtTracks;
00081 
00082   unsigned int etTrack[3][12][6][2];
00083 
00084   unsigned int efTrack[3][12][6][2];
00085 
00086   // utilities
00087   int channel(int wheel, int sector, int bx);
00088 
00089   int bxNr(int channel);
00090 
00091   int sector(int channel);
00092 
00093   int wheel(int channel);
00094 
00095   void calcCRC(int myD1, int myD2, int &myC);
00096 
00097   edm::InputTag getDTTFInputTag() { return DTTFInputTag; }
00098 
00099 };
00100 #endif