CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Attributes
SelectedElectronFEDListProducer< TEle, TCand > Class Template Reference

#include <SelectedElectronFEDListProducer.h>

Inheritance diagram for SelectedElectronFEDListProducer< TEle, TCand >:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void pixelFedDump (std::vector< PixelModule >::const_iterator &itDn, std::vector< PixelModule >::const_iterator &itUp, const PixelRegion &region)
 
 SelectedElectronFEDListProducer (const edm::ParameterSet &)
 Producer constructor. More...
 
virtual ~SelectedElectronFEDListProducer ()
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Protected Member Functions

virtual void beginJob ()
 
virtual void endJob ()
 
virtual void produce (edm::Event &, const edm::EventSetup &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Types

typedef std::vector< TCand > TCandColl
 
typedef std::vector< TEle > TEleColl
 

Private Attributes

std::vector< int > addThisSelectedFEDs_
 
math::XYZVector beamSpotPosition_
 
edm::InputTag beamSpotTag_
 
edm::EDGetTokenT< reco::BeamSpotbeamSpotToken_
 
double dEtaPixelRegion_
 
double dPhiPixelRegion_
 
double dRHcalRegion_
 
double dRStripRegion_
 
bool dumpAllEcalFed_
 
bool dumpAllHCALFed_
 
bool dumpAllTrackerFed_
 
bool dumpSelectedEcalFed_
 
bool dumpSelectedHCALFed_
 
bool dumpSelectedSiPixelFed_
 
bool dumpSelectedSiStripFed_
 
const EcalElectronicsMappingEcalMapping_
 
std::vector< edm::InputTagelectronTags_
 
std::vector< edm::EDGetTokenT< TEleColl > > electronToken_
 
int ES_fedId_ [2][2][40][40]
 
edm::FileInPath ESLookupTable_
 
std::vector< uint32_t > fedList_
 
const CaloGeometryGeometryCalo_
 
const CaloSubdetectorGeometryGeometryES_
 
edm::InputTag HBHERecHitTag_
 
edm::EDGetTokenT< HBHERecHitCollectionhbheRecHitToken_
 
const HcalElectronicsMapHcalReadoutMap_
 
std::vector< int > isGsfElectronCollection_
 
double maxZPixelRegion_
 
std::string outputLabelModule_
 
std::unique_ptr< SiPixelFedCablingTreePixelCabling_
 
std::vector< PixelModulepixelModuleVector_
 
edm::InputTag rawDataTag_
 
edm::EDGetTokenT< FEDRawDataCollectionrawDataToken_
 
std::vector< edm::InputTagrecoEcalCandidateTags_
 
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_
 
std::pair< double, double > regionDimension_
 
const SiStripRegionCablingStripRegionCabling_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Detailed Description

template<typename TEle, typename TCand>
class SelectedElectronFEDListProducer< TEle, TCand >

Definition at line 78 of file SelectedElectronFEDListProducer.h.

Member Typedef Documentation

template<typename TEle , typename TCand >
typedef std::vector<TCand> SelectedElectronFEDListProducer< TEle, TCand >::TCandColl
private

Definition at line 98 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
typedef std::vector<TEle> SelectedElectronFEDListProducer< TEle, TCand >::TEleColl
private

Definition at line 97 of file SelectedElectronFEDListProducer.h.

Constructor & Destructor Documentation

template<typename TEle , typename TCand >
SelectedElectronFEDListProducer< TEle, TCand >::SelectedElectronFEDListProducer ( const edm::ParameterSet iConfig)
explicit

Producer constructor.

Definition at line 70 of file SelectedElectronFEDListProducer.cc.

References Exception, edm::ParameterSet::existsAs(), funct::false, edm::ParameterSet::getParameter(), mps_fire::i, gen::k, LogDebug, funct::m, or, AlCaHLTBitMon_QueryRunRegistry::string, and funct::true.

70  {
71 
72  // input electron collection Tag
73  if(iConfig.existsAs<std::vector<edm::InputTag> >("electronTags")){
74  electronTags_ = iConfig.getParameter<std::vector<edm::InputTag>>("electronTags");
75  if(electronTags_.empty())
76  throw cms::Exception("Configuration")<<"[SelectedElectronFEDListProducer] empty electron collection is given --> at least one \n";
77  }
78  else throw cms::Exception("Configuration")<<"[SelectedElectronFEDListProducer] no electron collection are given --> need at least one \n";
79 
80  // Consumes for the electron collection
81  LogDebug("SelectedElectronFEDListProducer")<<" Electron Collections"<<std::endl;
82  for( std::vector<edm::InputTag>::const_iterator itEleTag = electronTags_.begin(); itEleTag != electronTags_.end(); ++itEleTag){
83  electronToken_.push_back(consumes<TEleColl>(*itEleTag));
84  LogDebug("SelectedElectronFEDListProducer")<<" Ele collection: "<<*(itEleTag)<<std::endl;
85  }
86 
87  // input RecoEcalCandidate collection Tag
88  if(iConfig.existsAs<std::vector<edm::InputTag> >("recoEcalCandidateTags")){
89  recoEcalCandidateTags_ = iConfig.getParameter<std::vector<edm::InputTag>>("recoEcalCandidateTags");
90  if(recoEcalCandidateTags_.empty())
91  throw cms::Exception("Configuration")<<"[SelectedElectronFEDListProducer] empty ecal candidate collections collection is given --> at least one \n";
92  }
93  else throw cms::Exception("Configuration")<<"[SelectedElectronFEDListProducer] no electron reco ecal candidate collection are given --> need at least one \n";
94 
95  // Consumes for the recoEcal candidate collection
96  for( std::vector<edm::InputTag>::const_iterator itEcalCandTag = recoEcalCandidateTags_.begin(); itEcalCandTag != recoEcalCandidateTags_.end(); ++itEcalCandTag){
97  recoEcalCandidateToken_.push_back(consumes<trigger::TriggerFilterObjectWithRefs>(*itEcalCandTag));
98  LogDebug("SelectedElectronFEDListProducer")<<" Reco ecal candidate collection: "<<*(itEcalCandTag)<<std::endl;
99  }
100 
101  // list of gsf collections
102  if(iConfig.existsAs<std::vector<int>>("isGsfElectronCollection")){
103  isGsfElectronCollection_ = iConfig.getParameter<std::vector<int>>("isGsfElectronCollection");
104  if(isGsfElectronCollection_.empty())
105  throw cms::Exception("Configuration")<<"[SelectedElectronFEDListProducer] empty electron flag collection --> at least one \n";
106  }
107  else throw cms::Exception("Configuration")<<"[SelectedElectronFEDListProducer] no electron flag are given --> need at least one \n";
108 
110  throw cms::Exception("Configuration")<<"[SelectedElectronFEDListProducer] electron flag , electron collection and reco ecal cand collection must have the same size ! \n";
111 
112  // take the beam spot Tag
113  if(iConfig.existsAs<edm::InputTag>("beamSpot"))
114  beamSpotTag_ = iConfig.getParameter<edm::InputTag>("beamSpot");
115  else beamSpotTag_ = edm::InputTag("hltOnlineBeamSpot");
116 
117  if(!(beamSpotTag_ == edm::InputTag(""))) beamSpotToken_ = consumes<reco::BeamSpot>(beamSpotTag_);
118 
119  LogDebug("SelectedElectronFEDListProducer")<<" Beam Spot Tag "<<beamSpotTag_<<std::endl;
120 
121  // take the HBHE recHit Tag
122  if(iConfig.existsAs<edm::InputTag>("HBHERecHitTag"))
123  HBHERecHitTag_ = iConfig.getParameter<edm::InputTag>("HBHERecHitTag");
124  else HBHERecHitTag_ = edm::InputTag("hltHbhereco");
125 
126  if(!(HBHERecHitTag_ == edm::InputTag(""))) hbheRecHitToken_ = consumes<HBHERecHitCollection>(HBHERecHitTag_);
127 
128  // raw data collector label
129  if(iConfig.existsAs<edm::InputTag>("rawDataTag"))
130  rawDataTag_ = iConfig.getParameter<edm::InputTag>("rawDataTag");
131  else rawDataTag_ = edm::InputTag("rawDataCollector") ;
132 
133  if(!(rawDataTag_ == edm::InputTag(""))) rawDataToken_ = consumes<FEDRawDataCollection>(rawDataTag_);
134 
135  LogDebug("SelectedElectronFEDListProducer")<<" RawDataInput "<<rawDataTag_<<std::endl;
136 
137 
138  // add a set of selected feds
139  if(iConfig.existsAs<std::vector<int>>("addThisSelectedFEDs")){
140  addThisSelectedFEDs_ = iConfig.getParameter<std::vector<int>>("addThisSelectedFEDs");
141  if(addThisSelectedFEDs_.empty())
142  addThisSelectedFEDs_.push_back(-1);
143  }
144  else addThisSelectedFEDs_.push_back(-1);
145 
146  std::vector<int>::const_iterator AddFed = addThisSelectedFEDs_.begin();
147  for( ; AddFed !=addThisSelectedFEDs_.end() ; ++AddFed)
148  LogDebug("SelectedElectronFEDListProducer")<<" Additional FED: "<<*(AddFed)<<std::endl;
149 
150 
151  // ES look up table path
152  if(iConfig.existsAs<std::string>("ESLookupTable"))
153  ESLookupTable_ = iConfig.getParameter<edm::FileInPath>("ESLookupTable");
154  else ESLookupTable_ = edm::FileInPath("EventFilter/ESDigiToRaw/data/ES_lookup_table.dat");
155 
156  // output model label
157  if(iConfig.existsAs<std::string>("outputLabelModule"))
158  outputLabelModule_ = iConfig.getParameter<std::string>("outputLabelModule");
159  else outputLabelModule_ = "streamElectronRawData" ;
160 
161  LogDebug("SelectedElectronFEDListProducer")<<" Output Label "<<outputLabelModule_<<std::endl;
162 
163  // dR for the strip region
164  if(iConfig.existsAs<double>("dRStripRegion"))
165  dRStripRegion_ = iConfig.getParameter<double>("dRStripRegion");
166  else dRStripRegion_ = 0.5 ;
167 
168  LogDebug("SelectedElectronFEDListProducer")<<" dRStripRegion "<<dRStripRegion_<<std::endl;
169 
170  // dR for the hcal region
171  if(iConfig.existsAs<double>("dRHcalRegion"))
172  dRHcalRegion_ = iConfig.getParameter<double>("dRHcalRegion");
173  else dRHcalRegion_ = 0.5 ;
174 
175  // dPhi, dEta and maxZ for pixel dump
176  if(iConfig.existsAs<double>("dPhiPixelRegion"))
177  dPhiPixelRegion_ = iConfig.getParameter<double>("dPhiPixelRegion");
178  else dPhiPixelRegion_ = 0.5 ;
179 
180  if(iConfig.existsAs<double>("dEtaPixelRegion"))
181  dEtaPixelRegion_ = iConfig.getParameter<double>("dEtaPixelRegion");
182  else dEtaPixelRegion_ = 0.5 ;
183 
184  if(iConfig.existsAs<double>("maxZPixelRegion"))
185  maxZPixelRegion_ = iConfig.getParameter<double>("maxZPixelRegion");
186  else maxZPixelRegion_ = 24. ;
187 
188  LogDebug("SelectedElectronFEDListProducer")<<" dPhiPixelRegion "<<dPhiPixelRegion_<<" dEtaPixelRegion "<<dEtaPixelRegion_<<" MaxZPixelRegion "<<maxZPixelRegion_<<std::endl;
189 
190  // bool
191  if( iConfig.existsAs<bool>("dumpSelectedEcalFed"))
192  dumpSelectedEcalFed_ = iConfig.getParameter< bool >("dumpSelectedEcalFed");
193  else dumpSelectedEcalFed_ = true ;
194 
195  if(iConfig.existsAs<bool>("dumpSelectedSiStripFed"))
196  dumpSelectedSiStripFed_ = iConfig.getParameter<bool>("dumpSelectedSiStripFed");
198 
199  if(iConfig.existsAs<bool>("dumpSelectedSiPixelFed"))
200  dumpSelectedSiPixelFed_ = iConfig.getParameter<bool>("dumpSelectedSiPixelFed");
202 
203  if(iConfig.existsAs<bool>("dumpSelectedHCALFed"))
204  dumpSelectedHCALFed_ = iConfig.getParameter<bool>("dumpSelectedHCALFed");
205  else dumpSelectedHCALFed_ = true ;
206 
207  LogDebug("SelectedElectronFEDListProducer")<<" DumpEcalFedList set to "<<dumpSelectedEcalFed_<<" DumpSelectedSiStripFed "<<dumpSelectedSiStripFed_<<" DumpSelectedSiPixelFed "<<dumpSelectedSiPixelFed_<<std::endl;
208 
209  if(iConfig.existsAs<bool>("dumpAllEcalFed"))
210  dumpAllEcalFed_ = iConfig.getParameter<bool>("dumpAllEcalFed");
211  else dumpAllEcalFed_ = false ;
212 
213  if(iConfig.existsAs<bool>("dumpAllTrackerFed"))
214  dumpAllTrackerFed_ = iConfig.getParameter<bool>("dumpAllTrackerFed");
215  else dumpAllTrackerFed_ = false ;
216 
217  if(iConfig.existsAs<bool>("dumpAllHCALFed"))
218  dumpAllHCALFed_ = iConfig.getParameter<bool>("dumpAllHCALFed");
219  else dumpAllHCALFed_ = false ;
220 
221  LogDebug("SelectedElectronFEDListProducer")<<" DumpAllEcalFed "<<dumpAllEcalFed_<<" DumpAllTrackerFed "<<dumpAllTrackerFed_<<" Dump all HCAL fed "<<dumpAllHCALFed_<<std::endl;
222 
223  // initialize pre-shower fed id --> look up table
224  for (int i=0; i<2; ++i) for (int j=0; j<2; ++j) for (int k=0 ;k<40; ++k) for (int m=0; m<40; m++) ES_fedId_[i][j][k][m] = -1;
225 
226  // read in look-up table
227  int nLines, iz, ip, ix, iy, fed, kchip, pace, bundle, fiber, optorx;
228  std::ifstream ES_file;
229  ES_file.open(ESLookupTable_.fullPath().c_str());
230  LogDebug("SelectedElectronFEDListProducer")<<" Look Up table for ES "<<ESLookupTable_.fullPath().c_str()<<std::endl;
231  if( ES_file.is_open() ) {
232  ES_file >> nLines;
233  for (int i=0; i<nLines; ++i) {
234  ES_file >> iz >> ip >> ix >> iy >> fed >> kchip >> pace >> bundle >> fiber >> optorx ;
235  ES_fedId_[(3-iz)/2-1][ip-1][ix-1][iy-1] = fed;
236  }
237  }
238  else LogDebug("SelectedElectronFEDListProducer")<<" Look up table file can not be found in "<<ESLookupTable_.fullPath().c_str() <<std::endl;
239  ES_file.close();
240 
241  // produce the final collection
242  produces<FEDRawDataCollection>(outputLabelModule_); // produce exit collection
243 
244 }
#define LogDebug(id)
T getParameter(std::string const &) const
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHitToken_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
int k[5][pyjets_maxn]
std::vector< edm::InputTag > recoEcalCandidateTags_
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
std::string fullPath() const
Definition: FileInPath.cc:184
std::vector< edm::EDGetTokenT< TEleColl > > electronToken_
template<typename TEle , typename TCand >
SelectedElectronFEDListProducer< TEle, TCand >::~SelectedElectronFEDListProducer ( )
virtual

Definition at line 247 of file SelectedElectronFEDListProducer.cc.

247  {
248 
249  if(!electronTags_.empty()) electronTags_.clear() ;
250  if(!recoEcalCandidateTags_.empty()) recoEcalCandidateTags_.clear() ;
252  if(!electronToken_.empty()) electronToken_.clear();
253  if(!fedList_.empty()) fedList_.clear() ;
254  if(!pixelModuleVector_.empty()) pixelModuleVector_.clear();
255 }
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_
std::vector< edm::InputTag > recoEcalCandidateTags_
std::vector< edm::EDGetTokenT< TEleColl > > electronToken_

Member Function Documentation

template<typename TEle , typename TCand >
void SelectedElectronFEDListProducer< TEle, TCand >::beginJob ( void  )
protectedvirtual

Definition at line 258 of file SelectedElectronFEDListProducer.cc.

References LogDebug.

258  {
259  LogDebug("SelectedElectronFEDListProducer")<<" Begin of the Job "<<std::endl;
260 
261 }
#define LogDebug(id)
template<typename TEle , typename TCand >
void SelectedElectronFEDListProducer< TEle, TCand >::endJob ( void  )
protectedvirtual

Definition at line 601 of file SelectedElectronFEDListProducer.cc.

References LogDebug.

Referenced by o2olib.O2ORunMgr::executeJob().

601  {
602  LogDebug("SelectedElectronFEDListProducer")<<" End of the Job "<<std::endl;
603 }
#define LogDebug(id)
template<typename TEle , typename TCand >
void SelectedElectronFEDListProducer< TEle, TCand >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 626 of file SelectedElectronFEDListProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), defaultModuleLabel(), and AlCaHLTBitMon_QueryRunRegistry::string.

626  {
628  desc.add<vector<edm::InputTag>>("electronTags",{edm::InputTag("hltEgammaGsfElectrons")});
629  desc.add<vector<edm::InputTag>>("recoEcalCandidateTags",{edm::InputTag("hltL1EG25Ele27WP85GsfTrackIsoFilter")});
630  desc.add<edm::FileInPath>("ESLookupTable",edm::FileInPath("EventFilter/ESDigiToRaw/data/ES_lookup_table.dat"));
631  desc.add<edm::InputTag>("HBHERecHitTag",edm::InputTag("hltHbhereco"));
632  desc.add<edm::InputTag>("beamSpotTag",edm::InputTag("hltOnlineBeamSpot"));
633  desc.add<edm::InputTag>("rawDataTag",edm::InputTag("rawDataCollector"));
634  desc.add<vector<int>>("addThisSelectedFEDs",{812,813});
635  desc.add<vector<int>>("isGsfElectronCollection",{true});
636  desc.add<std::string>("outputLabelModule","StreamElectronRawFed");
637  desc.add<bool>("dumpSelectedSiPixelFed",true);
638  desc.add<bool>("dumpSelectedSiStripFed",true);
639  desc.add<bool>("dumpSelectedEcalFed",true);
640  desc.add<bool>("dumpSelectedHCALFed",true);
641  desc.add<double>("dPhiPixelRegion",0.3);
642  desc.add<double>("dEtaPixelRegion",0.3);
643  desc.add<double>("dRStripRegion",0.3);
644  desc.add<double>("dRHcalRegion",0.3);
645  desc.add<double>("maxZPixelRegion",24);
646  desc.add<bool>("dumpAllTrackerFed",false);
647  desc.add<bool>("dumpAllEcalFed",false);
648  desc.add<bool>("dumpAllHcalFed",false);
649 
651 }
std::string defaultModuleLabel()
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
template<typename TEle , typename TCand >
void SelectedElectronFEDListProducer< TEle, TCand >::pixelFedDump ( std::vector< PixelModule >::const_iterator &  itDn,
std::vector< PixelModule >::const_iterator &  itUp,
const PixelRegion region 
)

Definition at line 606 of file SelectedElectronFEDListProducer.cc.

References funct::abs(), PixelRegion::atantheta, PixelRegion::cosphi, spr::find(), LogDebug, FEDNumbering::MAXSiPixelFEDID, PixelRegion::maxZ, reco::return(), and PixelRegion::sinphi.

608  {
609 
610  for( ; itDn != itUp ; ++itDn){
611  float zmodule = itDn->z-((itDn->x-beamSpotPosition_.x())*region.cosphi+(itDn->y-beamSpotPosition_.y())*region.sinphi)*region.atantheta;
612  if ( std::abs(zmodule) > region.maxZ ) continue;
613  int hitFED = itDn->Fed;
614  if(hitFED < FEDNumbering::MINSiPixelFEDID || hitFED > FEDNumbering::MAXSiPixelFEDID) continue;
615  LogDebug("SelectedElectronFEDListProducer")<<" electron pixel hit "<<itDn->DetId<<" hitFED "<<hitFED<<std::endl;
616  if(!fedList_.empty()){
617  if(std::find(fedList_.begin(),fedList_.end(),hitFED)==fedList_.end()) fedList_.push_back(hitFED);
618  }
619  else fedList_.push_back(hitFED);
620  }
621 
622  return ;
623 }
#define LogDebug(id)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
return(e1-e2)*(e1-e2)+dp *dp
template<typename TEle , typename TCand >
void SelectedElectronFEDListProducer< TEle, TCand >::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
protectedvirtual

Definition at line 264 of file SelectedElectronFEDListProducer.cc.

References SiStripRegionCabling::ALLLAYERS, SiStripRegionCabling::ALLSUBDETS, ecalDrivenElectronSeedsParameters_cff::beamSpot, edm::SortedCollection< T, SORT >::begin(), SiPixelFedCablingMap::cablingTree(), FEDRawData::data(), data, HcalElectronicsId::dccid(), reco::deltaR(), PixelRegion::dEta, PixelModule::DetId, TrackerGeometry::dets(), PixelRegion::dPhi, PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, DetId::Ecal, EcalBarrel, EcalEndcap, EcalPreshower, metsig::electron, genericTrackCleaner_cfi::electrons, edm::SortedCollection< T, SORT >::end(), stringResolutionProvider_cfi::eta, PixelModule::Eta, PV3DBase< T, PVType, FrameType >::eta(), edm::HandleBase::failedToGet(), PixelModule::Fed, FEDRawDataCollection::FEDData(), HcalElectronicsId::fiberChanId(), HcalElectronicsId::fiberIndex(), spr::find(), edm::EventSetup::get(), edm::Event::getByToken(), HcalDbService::getHcalMapping(), trigger::TriggerRefsCollections::getObjects(), CaloGeometry::getSubdetectorGeometry(), hfClusterShapes_cfi::hits, LogDebug, M_PI, FEDNumbering::MAXECALFEDID, FEDNumbering::MAXHCALFEDID, FEDNumbering::MAXPreShowerFEDID, FEDNumbering::MAXSiPixelFEDID, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MINECALFEDID, FEDNumbering::MINHCALFEDID, FEDNumbering::MINPreShowerFEDID, FEDNumbering::MINSiPixelFEDID, FEDNumbering::MINSiStripFEDID, python.rootplot.argparse::module, eostools::move(), NULL, PixelModule::Phi, PV3DBase< T, PVType, FrameType >::phi(), Geom::pi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, ESDetId::plane(), point, reco::BeamSpot::position(), funct::pow(), edm::Handle< T >::product(), edm::ESHandle< T >::product(), edm::Event::put(), dttmaxenums::R, matplotRender::rawdata, DetId::rawId(), FEDRawData::resize(), ESDetId::six(), ESDetId::siy(), FEDRawData::size(), findQualityFiles::size, HcalElectronicsId::spigot(), mathSSE::sqrt(), trigger::TriggerCluster, trigger::TriggerElectron, trigger::TriggerPhoton, PixelRegion::vector, PixelModule::x, PixelModule::y, PixelModule::z, and ESDetId::zside().

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

264  {
265 
266  // get the hcal electronics map
268  iSetup.get<HcalDbRecord>().get(pSetup);
269  HcalReadoutMap_ = pSetup->getHcalMapping();
270 
271  // get the ecal electronics map
273  iSetup.get<EcalMappingRcd >().get(ecalmapping);
274  EcalMapping_ = ecalmapping.product();
275 
276  // get the calo geometry
277  edm::ESHandle<CaloGeometry> caloGeometry;
278  iSetup.get<CaloGeometryRecord>().get(caloGeometry);
279  GeometryCalo_ = caloGeometry.product();
280 
281  //ES geometry
283 
284  // pixel tracker cabling map
286  iSetup.get<SiPixelFedCablingMapRcd>().get(pixelCablingMap);
287  PixelCabling_.reset();
288  PixelCabling_ = pixelCablingMap->cablingTree();
289 
290  edm::ESHandle<TrackerGeometry> trackerGeometry;
291  iSetup.get<TrackerDigiGeometryRecord>().get( trackerGeometry );
292 
293  if(pixelModuleVector_.empty()){
294 
295  // build the tracker pixel module map
296  std::vector<const GeomDet*>::const_iterator itTracker = trackerGeometry->dets().begin();
297  for( ; itTracker !=trackerGeometry->dets().end() ; ++itTracker){
298  int subdet = (*itTracker)->geographicalId().subdetId();
299  if(! (subdet == PixelSubdetector::PixelBarrel || subdet == PixelSubdetector::PixelEndcap) ) continue;
301  module.x = (*itTracker)->position().x();
302  module.y = (*itTracker)->position().y();
303  module.z = (*itTracker)->position().z();
304  module.Phi = (*itTracker)->position().phi();
305  module.Eta = (*itTracker)->position().eta();
306  module.DetId = (*itTracker)->geographicalId().rawId();
307  const std::vector<sipixelobjects::CablingPathToDetUnit> path2det = PixelCabling_->pathToDetUnit(module.DetId);
308  module.Fed = path2det[0].fed;
309 
310  pixelModuleVector_.push_back(module);
311  }
312  std::sort(pixelModuleVector_.begin(),pixelModuleVector_.end());
313  }
314 
315  edm::ESHandle<SiStripRegionCabling> SiStripCablingHandle ;
316  iSetup.get<SiStripRegionCablingRcd>().get(SiStripCablingHandle);
317  StripRegionCabling_ = SiStripCablingHandle.product();
318 
319  SiStripRegionCabling::Cabling SiStripCabling;
320  SiStripCabling = StripRegionCabling_->getRegionCabling();
322 
323  // event by event analysis
324  // Get event raw data
326  if(!(rawDataTag_ == edm::InputTag(""))) iEvent.getByToken(rawDataToken_,rawdata);
327 
328  // take the beam spot position
330  if(!(beamSpotTag_ == edm::InputTag(""))) iEvent.getByToken(beamSpotToken_, beamSpot);
331  if(!beamSpot.failedToGet()) beamSpotPosition_ = beamSpot->position();
332  else beamSpotPosition_.SetXYZ(0,0,0);
333 
334  // take the calo tower collection
335  edm::Handle<HBHERecHitCollection> hbheRecHitHandle;
336  if(!(HBHERecHitTag_ == edm::InputTag(""))) iEvent.getByToken(hbheRecHitToken_,hbheRecHitHandle);
337  const HBHERecHitCollection* hcalRecHitCollection = NULL;
338  if(!hbheRecHitHandle.failedToGet()) hcalRecHitCollection = hbheRecHitHandle.product();
339 
340  double radTodeg = 180. / Geom::pi();
341 
342  if(dumpAllEcalFed_){
343  for(uint32_t iEcalFed = FEDNumbering::MINECALFEDID ; iEcalFed <= FEDNumbering::MAXECALFEDID ; iEcalFed++)
344  fedList_.push_back(iEcalFed);
345  for(uint32_t iESFed = FEDNumbering::MINPreShowerFEDID ; iESFed <= FEDNumbering::MAXPreShowerFEDID ; iESFed++)
346  fedList_.push_back(iESFed);
347  }
348 
349  if(dumpAllTrackerFed_){
350  for(uint32_t iPixelFed = FEDNumbering::MINSiPixelFEDID; iPixelFed <= FEDNumbering::MAXSiPixelFEDID ; iPixelFed++)
351  fedList_.push_back(iPixelFed);
352  for(uint32_t iStripFed = FEDNumbering::MINSiStripFEDID; iStripFed <= FEDNumbering::MAXSiStripFEDID ; iStripFed++)
353  fedList_.push_back(iStripFed);
354  }
355 
356  if(dumpAllHCALFed_){
357  for(uint32_t iHcalFed = FEDNumbering::MINHCALFEDID ; iHcalFed <= FEDNumbering::MAXHCALFEDID; iHcalFed++)
358  fedList_.push_back(iHcalFed);
359  }
360 
361  // loop on the input electron collection vector
362  TEle electron ;
363  edm::Ref<TCandColl> recoEcalCand ;
365  edm::Handle<trigger::TriggerFilterObjectWithRefs> triggerRecoEcalCandidateCollection;
366  std::vector<edm::Ref<TCandColl>> recoEcalCandColl;
367 
368  // iterator to electron and ecal candidate collections
369  typename std::vector<edm::EDGetTokenT<TEleColl> >::const_iterator itElectronColl = electronToken_.begin();
370  std::vector<int>::const_iterator itElectronCollFlag = isGsfElectronCollection_.begin();
371  std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> >::const_iterator itRecoEcalCandColl = recoEcalCandidateToken_.begin();
372 
373  // if you want to dump just FED related to the triggering electron/s
375 
376  // loop on the same time on ecal candidate and elctron collection and boolean for Gsf ones
377  for( ; itRecoEcalCandColl != recoEcalCandidateToken_.end() and itElectronColl != electronToken_.end() and itElectronCollFlag != isGsfElectronCollection_.end();
378  ++itElectronColl , ++itElectronCollFlag, ++itRecoEcalCandColl){
379 
380  // get ecal candidate collection
381  iEvent.getByToken(*itRecoEcalCandColl,triggerRecoEcalCandidateCollection);
382  if(triggerRecoEcalCandidateCollection.failedToGet()) continue ;
383 
384  // get gsf electron collection
385  iEvent.getByToken(*itElectronColl,electrons);
386  if(electrons.failedToGet()) continue ;
387 
388  triggerRecoEcalCandidateCollection->getObjects(trigger::TriggerCluster, recoEcalCandColl);
389  if(recoEcalCandColl.empty()) triggerRecoEcalCandidateCollection->getObjects(trigger::TriggerPhoton, recoEcalCandColl);
390  if(recoEcalCandColl.empty()) triggerRecoEcalCandidateCollection->getObjects(trigger::TriggerElectron, recoEcalCandColl);
391 
392  typename std::vector<edm::Ref<TCandColl>>::const_iterator itRecoEcalCand = recoEcalCandColl.begin(); // loop on recoEcalCandidate objects
393 
394  // loop on the recoEcalCandidates
395  for( ; itRecoEcalCand != recoEcalCandColl.end() ; ++itRecoEcalCand){
396  recoEcalCand = (*itRecoEcalCand);
397  reco::SuperClusterRef scRefRecoEcalCand = recoEcalCand->superCluster(); // take the supercluster in order to match with electron objects
398 
399  typename TEleColl::const_iterator itEle = electrons->begin();
400  for( ; itEle!=electrons->end() ; ++itEle){ // loop on all the electrons inside a collection
401  // get electron supercluster and the associated hit -> detID
402  electron = (*itEle);
403  reco::SuperClusterRef scRef = electron.superCluster();
404  if ( scRefRecoEcalCand != scRef ) continue ; // mathching
405 
406  const std::vector<std::pair<DetId,float> >& hits = scRef->hitsAndFractions();
407  // start in dump the ecal FED associated to the electron
408  std::vector<std::pair<DetId,float> >::const_iterator itSChits = hits.begin();
409  if(!dumpAllEcalFed_){
410  for( ; itSChits!=hits.end() ; ++itSChits){
411  if((*itSChits).first.subdetId()== EcalBarrel){ // barrel part
412  EBDetId idEBRaw ((*itSChits).first);
414  int hitFED = FEDNumbering::MINECALFEDID + EcalMapping_->GetFED(double(point.eta()),double(point.phi())*radTodeg);
415  if( hitFED < FEDNumbering::MINECALFEDID || hitFED > FEDNumbering::MAXECALFEDID ) continue;
416 
417  LogDebug("SelectedElectronFEDListProducer")<<" electron hit detID Barrel "<<(*itSChits).first.rawId()<<" eta "<<double(point.eta())<<" phi "<< double(point.phi())*radTodeg <<" FED "<<hitFED<<std::endl;
418 
420  if(!fedList_.empty()){
421  if(std::find(fedList_.begin(),fedList_.end(),hitFED) == fedList_.end())
422  fedList_.push_back(hitFED); // in order not to duplicate info
423  }
424  else fedList_.push_back(hitFED);
425  }
426  }
427  else if((*itSChits).first.subdetId()== EcalEndcap){ // endcap one
428  EEDetId idEERaw ((*itSChits).first);
429  GlobalPoint point = GeometryCalo_->getPosition(idEERaw);
430  int hitFED = FEDNumbering::MINECALFEDID + EcalMapping_->GetFED(double(point.eta()),double(point.phi())*radTodeg);
431  if( hitFED < FEDNumbering::MINECALFEDID || hitFED > FEDNumbering::MAXECALFEDID ) continue;
432 
433  LogDebug("SelectedElectronFEDListProducer")<<" electron hit detID Endcap "<<(*itSChits).first.rawId()<<" eta "<<double(point.eta())<<" phi "<<double(point.phi())*radTodeg <<" FED "<<hitFED<<std::endl;
435  if(!fedList_.empty()){
436  if(std::find(fedList_.begin(),fedList_.end(),hitFED) == fedList_.end())
437  fedList_.push_back(hitFED);
438  }
439  else fedList_.push_back(hitFED);
440 
441  // preshower hit for each ecal endcap hit
442  DetId tmpX = (dynamic_cast<const EcalPreshowerGeometry*>(GeometryES_))->getClosestCellInPlane(point,1);
443  ESDetId stripX = (tmpX == DetId(0)) ? ESDetId(0) : ESDetId(tmpX);
444  int hitFED = ES_fedId_[(3-stripX.zside())/2-1][stripX.plane()-1][stripX.six()-1][stripX.siy()-1];
445  LogDebug("SelectedElectronFEDListProducer")<<" ES hit plane X (deiID) "<<stripX.rawId()<<" six "<<stripX.six()<<" siy "<<stripX.siy()<<" plane "<<stripX.plane()<<" FED ID "<<hitFED<<std::endl;
446  if(hitFED < FEDNumbering::MINPreShowerFEDID || hitFED > FEDNumbering::MAXPreShowerFEDID) continue;
447  if(hitFED < 0) continue;
448  if(!fedList_.empty()){
449  if(std::find(fedList_.begin(),fedList_.end(),hitFED) == fedList_.end())
450  fedList_.push_back(hitFED);
451  }
452  else fedList_.push_back(hitFED);
453 
454  DetId tmpY = (dynamic_cast<const EcalPreshowerGeometry*>(GeometryES_))->getClosestCellInPlane(point,2);
455  ESDetId stripY = (tmpY == DetId(0)) ? ESDetId(0) : ESDetId(tmpY);
456  hitFED = ES_fedId_[(3-stripY.zside())/2-1][stripY.plane()-1][stripY.six()-1][stripY.siy()-1];
457  if(hitFED < FEDNumbering::MINPreShowerFEDID || hitFED > FEDNumbering::MAXPreShowerFEDID) continue;
458  LogDebug("SelectedElectronFEDListProducer")<<" ES hit plane Y (deiID) "<<stripY.rawId()<<" six "<<stripY.six()<<" siy "<<stripY.siy()<<" plane "<<stripY.plane()<<" FED ID "<<hitFED<<std::endl;
459  if(hitFED < 0) continue;
460  if(!fedList_.empty()){
461  if(std::find(fedList_.begin(),fedList_.end(),hitFED) == fedList_.end())
462  fedList_.push_back(hitFED);
463  }
464  else fedList_.push_back(hitFED);
465  }
466  } // end endcap
467  } // end loop on SC hit
468 
469  // check HCAL behind each hit
471  HBHERecHitCollection::const_iterator itHcalRecHit = hcalRecHitCollection->begin();
472  for( ; itHcalRecHit != hcalRecHitCollection->end() ; ++itHcalRecHit) {
473  HcalDetId recHitId(itHcalRecHit->id());
474  const CaloCellGeometry* cellGeometry = GeometryCalo_->getSubdetectorGeometry(recHitId)->getGeometry(recHitId);
475  float dR = reco::deltaR(scRef->eta(),scRef->phi(),cellGeometry->getPosition().eta(),cellGeometry->getPosition().phi());
476  if(dR <= dRHcalRegion_) {
477  const HcalElectronicsId electronicId = HcalReadoutMap_->lookup(recHitId);
478  int hitFED = electronicId.dccid() + FEDNumbering::MINHCALFEDID;
479  LogDebug("SelectedElectronFEDListProducer")<< " matched hcal recHit : HcalDetId "<<recHitId<<" HcalElectronicsId "<<electronicId<<" dcc id "<<electronicId.dccid()<<" spigot "<<electronicId.spigot()<<" fiber channel "<<electronicId.fiberChanId()<<" fiber index "<<electronicId.fiberIndex()<<std::endl;
480  if(hitFED < FEDNumbering::MINHCALFEDID || hitFED > FEDNumbering::MAXHCALFEDID)
481  continue; //first eighteen feds are for HBHE
482  if(hitFED < 0)
483  continue;
484  if(!fedList_.empty()) {
485  if(std::find(fedList_.begin(), fedList_.end(), hitFED) == fedList_.end())
486  fedList_.push_back(hitFED);
487  }
488  else
489  fedList_.push_back(hitFED);
490  }
491  }
492  } // End Hcal
493  }// End Ecal
494 
495  // get the electron track
496  if( !dumpAllTrackerFed_ ){
497  //loop on the region
499  double eta ;
500  double phi ;
501  if(*itElectronCollFlag){
502  eta = electron.gsfTrack()->eta();
503  phi = electron.gsfTrack()->phi();
504  }
505  else{
506  eta = electron.track()->eta();
507  phi = electron.track()->phi();
508  }
509  for(uint32_t iCabling = 0; iCabling < SiStripCabling.size(); iCabling++){
511  double dphi=fabs(pos.second-phi);
512  if (dphi>acos(-1)) dphi=2*acos(-1)-dphi;
513  double R = sqrt(pow(pos.first-eta,2)+dphi*dphi);
514  if (R-sqrt(pow(regionDimension_.first/2,2)+pow(regionDimension_.second/2,2))>dRStripRegion_) continue;
515  //get vector of subdets within region
516  const SiStripRegionCabling::RegionCabling regSubdets = SiStripCabling[iCabling];
517  //cycle on subdets
518  for (uint32_t idet=0; idet<SiStripRegionCabling::ALLSUBDETS; idet++){ //cicle between 1 and 4
519  //get vector of layers whin subdet of region
520  const SiStripRegionCabling::WedgeCabling regSubdetLayers = regSubdets[idet]; // at most 10 layers
521  for (uint32_t ilayer=0; ilayer<SiStripRegionCabling::ALLLAYERS; ilayer++){
522  //get map of vectors of feds withing the layer of subdet of region
523  const SiStripRegionCabling::ElementCabling fedVectorMap = regSubdetLayers[ilayer]; // vector of the fed
524  SiStripRegionCabling::ElementCabling::const_iterator itFedMap = fedVectorMap.begin();
525  for( ; itFedMap!=fedVectorMap.end(); itFedMap++){
526  for (uint32_t op=0; op<(itFedMap->second).size(); op++){
527  int hitFED = (itFedMap->second)[op].fedId();
528  if(hitFED < FEDNumbering::MINSiStripFEDID || hitFED > FEDNumbering::MAXSiStripFEDID) continue;
529  LogDebug("SelectedElectronFEDListProducer")<<" SiStrip (FedID) "<<hitFED<<std::endl;
530  if(!fedList_.empty()){
531  if(std::find(fedList_.begin(),fedList_.end(),hitFED)==fedList_.end()) fedList_.push_back(hitFED);
532  }
533  else fedList_.push_back(hitFED);
534  }
535  }
536  }
537  }
538  }
539  } // end si strip
541  math::XYZVector momentum;
542  if(*itElectronCollFlag) momentum = electron.gsfTrack()->momentum();
543  else momentum = electron.track()->momentum();
545  PixelModule lowerBound (region.vector.phi()-region.dPhi, region.vector.eta()-region.dEta);
546  PixelModule upperBound (region.vector.phi()+region.dPhi, region.vector.eta()+region.dEta);
547 
548  std::vector<PixelModule>::const_iterator itUp, itDn ;
549  if(lowerBound.Phi >= -M_PI && upperBound.Phi <= M_PI ){
550  itDn = std::lower_bound(pixelModuleVector_.begin(),pixelModuleVector_.end(),lowerBound);
551  itUp = std::upper_bound(pixelModuleVector_.begin(),pixelModuleVector_.end(),upperBound);
552  pixelFedDump(itDn,itUp,region);
553  }
554  else{
555  if(lowerBound.Phi < -M_PI) lowerBound.Phi = lowerBound.Phi+2*M_PI;
556  PixelModule phi_p(M_PI,region.vector.eta()-region.dEta);
557  itDn = std::lower_bound(pixelModuleVector_.begin(),pixelModuleVector_.end(),lowerBound);
558  itUp = std::upper_bound(pixelModuleVector_.begin(),pixelModuleVector_.end(),phi_p);
559  pixelFedDump(itDn,itUp,region);
560 
561  if(upperBound.Phi < -M_PI) upperBound.Phi = upperBound.Phi-2*M_PI;
562  PixelModule phi_m(-M_PI,region.vector.eta()-region.dEta);
563  itDn = std::lower_bound(pixelModuleVector_.begin(),pixelModuleVector_.end(),phi_m);
564  itUp = std::upper_bound(pixelModuleVector_.begin(),pixelModuleVector_.end(),upperBound);
565  pixelFedDump(itDn,itUp,region);
566  }
567  }
568  }// end tracker analysis
569  }// end loop on the electron candidate
570  } // end loop on the electron collection collection
571  } // end loop on the recoEcal candidate
572  } // end loop on the recoEcal candidate collection
573  // add a set of chosen FED
574  for( unsigned int iFed = 0 ; iFed < addThisSelectedFEDs_.size() ; iFed++){
575  if(addThisSelectedFEDs_.at(iFed) == -1 ) continue ;
576  fedList_.push_back(addThisSelectedFEDs_.at(iFed));
577  }
578 
579  // make the final raw data collection
580  auto streamFEDRawProduct = std::make_unique<FEDRawDataCollection>();
581  std::sort(fedList_.begin(),fedList_.end());
582  std::vector<uint32_t>::const_iterator itfedList = fedList_.begin();
583  for( ; itfedList!=fedList_.end() ; ++itfedList){
584  LogDebug("SelectedElectronFEDListProducer")<<" fed point "<<*itfedList<<" ";
585  const FEDRawData& data = rawdata->FEDData(*itfedList);
586  if(data.size()>0){
587  FEDRawData& fedData = streamFEDRawProduct->FEDData(*itfedList);
588  fedData.resize(data.size());
589  memcpy(fedData.data(),data.data(),data.size());
590  }
591  }
592 
593  iEvent.put(std::move(streamFEDRawProduct),outputLabelModule_);
594 
595  if(!fedList_.empty()) fedList_.clear();
596 
597 }
#define LogDebug(id)
size
Write out results.
const CaloSubdetectorGeometry * getSubdetectorGeometry(const DetId &id) const
access the subdetector geometry for the given subdetector directly
Definition: CaloGeometry.cc:45
const std::pair< double, double > regionDimensions() const
int GetFED(double eta, double phi) const
std::vector< edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > > recoEcalCandidateToken_
int fiberIndex() const
get the fiber index. For VME 1-8 (which of eight fibers carried by a spigot), for uTCA fibers are zer...
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
const DetContainer & dets() const
Returm a vector of all GeomDet (including all GeomDetUnits)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
std::vector< HBHERecHit >::const_iterator const_iterator
const CaloSubdetectorGeometry * GeometryES_
#define NULL
Definition: scimark2.h:8
std::vector< Element > ElementCabling
int six() const
Definition: ESDetId.h:49
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
virtual const CaloCellGeometry * getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
edm::EDGetTokenT< HBHERecHitCollection > hbheRecHitToken_
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
std::unique_ptr< SiPixelFedCablingTree > PixelCabling_
edm::EDGetTokenT< FEDRawDataCollection > rawDataToken_
int siy() const
Definition: ESDetId.h:51
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void resize(size_t newsize)
Definition: FEDRawData.cc:32
std::vector< ElementCabling > WedgeCabling
T sqrt(T t)
Definition: SSEVec.h:18
int dccid() const
get the (Hcal local) DCC id for VME, crate number for uTCA
std::pair< double, double > Position
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:28
const GlobalPoint & getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:70
int fiberChanId() const
get the fiber channel id (which of channels on a fiber)
const Cabling & getRegionCabling() const
int zside() const
Definition: ESDetId.h:45
int spigot() const
get the spigot (input number on DCC, AMC card number for uTCA)
#define M_PI
const_iterator end() const
bool failedToGet() const
Definition: HandleBase.h:78
Definition: DetId.h:18
std::unique_ptr< SiPixelFedCablingTree > cablingTree() const
const Position position(const uint32_t) const
T const * product() const
Definition: Handle.h:81
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:30
const EcalElectronicsMapping * EcalMapping_
const T & get() const
Definition: EventSetup.h:56
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
T eta() const
Definition: PV3DBase.h:76
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:28
int plane() const
Definition: ESDetId.h:47
const HcalElectronicsMap * getHcalMapping() const
const SiStripRegionCabling * StripRegionCabling_
const Point & position() const
position
Definition: BeamSpot.h:62
constexpr double pi()
Definition: Pi.h:31
T const * product() const
Definition: ESHandle.h:86
std::vector< WedgeCabling > RegionCabling
Readout chain identification for Hcal.
void pixelFedDump(std::vector< PixelModule >::const_iterator &itDn, std::vector< PixelModule >::const_iterator &itUp, const PixelRegion &region)
std::vector< edm::EDGetTokenT< TEleColl > > electronToken_
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
def move(src, dest)
Definition: eostools.py:510
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
const_iterator begin() const
std::vector< RegionCabling > Cabling

Member Data Documentation

template<typename TEle , typename TCand >
std::vector<int> SelectedElectronFEDListProducer< TEle, TCand >::addThisSelectedFEDs_
private

Definition at line 118 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
math::XYZVector SelectedElectronFEDListProducer< TEle, TCand >::beamSpotPosition_
private

Definition at line 146 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
edm::InputTag SelectedElectronFEDListProducer< TEle, TCand >::beamSpotTag_
private

Definition at line 111 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
edm::EDGetTokenT<reco::BeamSpot> SelectedElectronFEDListProducer< TEle, TCand >::beamSpotToken_
private

Definition at line 140 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
double SelectedElectronFEDListProducer< TEle, TCand >::dEtaPixelRegion_
private

Definition at line 132 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
double SelectedElectronFEDListProducer< TEle, TCand >::dPhiPixelRegion_
private

Definition at line 131 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
double SelectedElectronFEDListProducer< TEle, TCand >::dRHcalRegion_
private

Definition at line 134 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
double SelectedElectronFEDListProducer< TEle, TCand >::dRStripRegion_
private

Definition at line 130 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpAllEcalFed_
private

Definition at line 126 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpAllHCALFed_
private

Definition at line 128 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpAllTrackerFed_
private

Definition at line 127 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpSelectedEcalFed_
private

Definition at line 122 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpSelectedHCALFed_
private

Definition at line 125 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpSelectedSiPixelFed_
private

Definition at line 124 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
bool SelectedElectronFEDListProducer< TEle, TCand >::dumpSelectedSiStripFed_
private

Definition at line 123 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
const EcalElectronicsMapping* SelectedElectronFEDListProducer< TEle, TCand >::EcalMapping_
private

Definition at line 155 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
std::vector<edm::InputTag> SelectedElectronFEDListProducer< TEle, TCand >::electronTags_
private

Definition at line 110 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
std::vector<edm::EDGetTokenT<TEleColl> > SelectedElectronFEDListProducer< TEle, TCand >::electronToken_
private

Definition at line 143 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
int SelectedElectronFEDListProducer< TEle, TCand >::ES_fedId_[2][2][40][40]
private

Definition at line 149 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
edm::FileInPath SelectedElectronFEDListProducer< TEle, TCand >::ESLookupTable_
private

Definition at line 120 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
std::vector<uint32_t> SelectedElectronFEDListProducer< TEle, TCand >::fedList_
private

Definition at line 152 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
const CaloGeometry* SelectedElectronFEDListProducer< TEle, TCand >::GeometryCalo_
private

Definition at line 156 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
const CaloSubdetectorGeometry* SelectedElectronFEDListProducer< TEle, TCand >::GeometryES_
private

Definition at line 157 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
edm::InputTag SelectedElectronFEDListProducer< TEle, TCand >::HBHERecHitTag_
private

Definition at line 114 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
edm::EDGetTokenT<HBHERecHitCollection> SelectedElectronFEDListProducer< TEle, TCand >::hbheRecHitToken_
private

Definition at line 141 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
const HcalElectronicsMap* SelectedElectronFEDListProducer< TEle, TCand >::HcalReadoutMap_
private

Definition at line 159 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
std::vector<int> SelectedElectronFEDListProducer< TEle, TCand >::isGsfElectronCollection_
private

Definition at line 117 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
double SelectedElectronFEDListProducer< TEle, TCand >::maxZPixelRegion_
private

Definition at line 133 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
std::string SelectedElectronFEDListProducer< TEle, TCand >::outputLabelModule_
private

Definition at line 136 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
std::unique_ptr<SiPixelFedCablingTree> SelectedElectronFEDListProducer< TEle, TCand >::PixelCabling_
private

Definition at line 162 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
std::vector<PixelModule> SelectedElectronFEDListProducer< TEle, TCand >::pixelModuleVector_
private

Definition at line 163 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
edm::InputTag SelectedElectronFEDListProducer< TEle, TCand >::rawDataTag_
private

Definition at line 112 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
edm::EDGetTokenT<FEDRawDataCollection> SelectedElectronFEDListProducer< TEle, TCand >::rawDataToken_
private

Definition at line 139 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
std::vector<edm::InputTag> SelectedElectronFEDListProducer< TEle, TCand >::recoEcalCandidateTags_
private

Definition at line 109 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
std::vector<edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> > SelectedElectronFEDListProducer< TEle, TCand >::recoEcalCandidateToken_
private

Definition at line 142 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
std::pair<double,double> SelectedElectronFEDListProducer< TEle, TCand >::regionDimension_
private

Definition at line 166 of file SelectedElectronFEDListProducer.h.

template<typename TEle , typename TCand >
const SiStripRegionCabling* SelectedElectronFEDListProducer< TEle, TCand >::StripRegionCabling_
private

Definition at line 158 of file SelectedElectronFEDListProducer.h.