CMS 3D CMS Logo

SelectedElectronFEDListProducer.h
Go to the documentation of this file.
1 #ifndef SelectedElectronFEDListProducer_h
2 #define SelectedElectronFEDListProducer_h
3 
5 // egamma objects
7 
8 
9 // Math
11 
13 // #include "FWCore/Framework/interface/EDProducer.h"
16 // Message logger
18 
19 class InputTag;
20 
22 
25 class SiStripFedCabling;
27 
28 class CaloGeometry;
31 class HcalElectronicsMap;
32 
33 // Hcal rec hit: this is a Fwd file defining typedefs
35 
36 
37 // Pixel region class
38 class PixelRegion {
39  public:
40  PixelRegion(math::XYZVector & momentum, float dphi = 0.5, float deta = 0.5, float maxz = 24.0){
41  vector = momentum;
42  dPhi = dphi ;
43  dEta = deta ;
44  maxZ = maxz ;
45  cosphi = vector.x()/vector.rho();
46  sinphi = vector.y()/vector.rho();
47  atantheta = vector.z()/vector.rho();
48  }
49 
51  float dPhi,dEta,maxZ;
53 };
54 
55 // Pixel module class
57  public:
58 
60  PixelModule(float phi, float eta) : Phi(phi), Eta(eta), x(0.), y(0.), z(0.), DetId(0), Fed(0) {}
61  bool operator < (const PixelModule& m) const {
62  if(Phi < m.Phi) return true;
63  if(Phi == m.Phi && Eta < m.Eta) return true;
64  if(Phi == m.Phi && Eta == m.Eta && DetId < m.DetId) return true;
65  return false;
66  }
67 
68  float Phi,Eta;
69  float x, y, z;
70  unsigned int DetId;
71  unsigned int Fed;
72 
73 };
74 
75 
76 // main class
77 template<typename TEle, typename TCand>
79 
80  public:
81 
84 
85  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
86 
87 
88  protected:
89 
90  virtual void beginJob() ;
91  virtual void endJob() ;
92  void produce(edm::Event&, const edm::EventSetup&) override;
93 
94 
95  private:
96 
97  typedef std::vector<TEle> TEleColl ;
98  typedef std::vector<TCand> TCandColl ;
99 
100  public:
101 
102  void pixelFedDump( std::vector<PixelModule>::const_iterator & itDn,
103  std::vector<PixelModule>::const_iterator & itUp,
104  const PixelRegion & region);
105 
106  private:
107 
108  // input parameter of the producer
109  std::vector<edm::InputTag> recoEcalCandidateTags_ ;
110  std::vector<edm::InputTag> electronTags_ ;
113 
115 
116 
117  std::vector<int> isGsfElectronCollection_ ;
118  std::vector<int> addThisSelectedFEDs_ ;
119 
121 
129 
130  double dRStripRegion_ ;
135 
137 
138  // Token for the input collection
142  std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> > recoEcalCandidateToken_ ;
143  std::vector<edm::EDGetTokenT<TEleColl> > electronToken_;
144 
145  // used inside the producer
147 
148  // internal info for ES geometry
149  int ES_fedId_[2][2][40][40];
150 
151  // fed list and output raw data
152  std::vector<uint32_t> fedList_ ;
153 
154  // get calo geomentry and electronic map
160 
161  // get pixel geometry and electronic map
162  std::unique_ptr<SiPixelFedCablingTree> PixelCabling_;
163  std::vector<PixelModule> pixelModuleVector_ ;
164 
165  // get strip geometry and electronic map
166  std::pair<double,double> regionDimension_ ;
167 
168 };
169 
170 #endif // SelectedElectronFEDListProducer_h
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_
const CaloSubdetectorGeometry * GeometryES_
PixelModule(float phi, float eta)
void beginJob()
Definition: Breakpoints.cc:15
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHitToken_
std::unique_ptr< SiPixelFedCablingTree > PixelCabling_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
bool operator<(const FedChannelConnection &, const FedChannelConnection &)
Definition: DetId.h:18
std::vector< edm::InputTag > recoEcalCandidateTags_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
const EcalElectronicsMapping * EcalMapping_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
const SiStripRegionCabling * StripRegionCabling_
std::vector< edm::EDGetTokenT< TEleColl > > electronToken_
PixelRegion(math::XYZVector &momentum, float dphi=0.5, float deta=0.5, float maxz=24.0)