CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Attributes
cms::DigitizerFP420 Class Reference

#include <DigitizerFP420.h>

Inheritance diagram for cms::DigitizerFP420:
edm::one::EDProducer<> edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 DigitizerFP420 (const edm::ParameterSet &conf)
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
 ~DigitizerFP420 () override
 
- Public Member Functions inherited from edm::one::EDProducer<>
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- 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 ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
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, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

typedef std::map< unsigned int, std::vector< PSimHit >, std::less< unsigned int > > simhit_map
 
typedef simhit_map::iterator simhit_map_iterator
 
typedef std::vector< std::string > vstring
 

Private Attributes

std::vector< HDigiFP420collector
 
edm::ParameterSet conf_
 
int dn0
 
int numStrips
 
int pn0
 
int rn0
 
simhit_map SimHitMap
 
int sn0
 
FP420DigiMainstripDigitizer_
 
vstring trackerContainers
 
int verbosity
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 31 of file DigitizerFP420.h.

Member Typedef Documentation

◆ simhit_map

typedef std::map<unsigned int, std::vector<PSimHit>, std::less<unsigned int> > cms::DigitizerFP420::simhit_map
private

Definition at line 41 of file DigitizerFP420.h.

◆ simhit_map_iterator

typedef simhit_map::iterator cms::DigitizerFP420::simhit_map_iterator
private

Definition at line 42 of file DigitizerFP420.h.

◆ vstring

typedef std::vector<std::string> cms::DigitizerFP420::vstring
private

Definition at line 40 of file DigitizerFP420.h.

Constructor & Destructor Documentation

◆ DigitizerFP420()

cms::DigitizerFP420::DigitizerFP420 ( const edm::ParameterSet conf)
explicit

Definition at line 62 of file DigitizerFP420.cc.

63  : conf_(conf), stripDigitizer_(new FP420DigiMain(conf)) {
64  std::string alias(conf.getParameter<std::string>("@module_label"));
65 
66  // produces<edm::DetSetVector<HDigiFP420> >().setBranchAlias( alias );
67  // produces<edm::DetSetVector<HDigiFP420SimLink> >().setBranchAlias ( alias +
68  // "hDigiFP420SimLink");
69  produces<DigiCollectionFP420>().setBranchAlias(alias);
70 
71  trackerContainers.clear();
72  trackerContainers = conf.getParameter<std::vector<std::string>>("ROUList");
73 
74  verbosity = conf_.getUntrackedParameter<int>("VerbosityLevel");
75  dn0 = conf_.getParameter<int>("NumberFP420Detectors");
76  sn0 = conf_.getParameter<int>("NumberFP420Stations");
77  pn0 = conf_.getParameter<int>("NumberFP420SPlanes");
78  rn0 = 7;
79  // rn0 = 3;
80 
81  // produces<DigiCollectionFP420>();
82 
83  // produces<StripDigiCollection>();
84  // produces<HDigiFP420>();
85  // produces<edm::DetSetVector<HDigiFP420> >().setBranchAlias( alias );
86 
87  // produces<DigiCollectionFP420>();
88  // produces<DigiCollectionFP420>("HDigiFP420");
89 
90  // produces<edm::DigiCollectionFP420>();
91 
92  // produces<edm::DetSetVector<DigiCollectionFP420> >();
93 
94  if (verbosity > 0) {
95  std::cout << "Creating a DigitizerFP420" << std::endl;
96  std::cout << "DigitizerFP420: dn0=" << dn0 << " sn0=" << sn0 << " pn0=" << pn0 << " rn0=" << rn0 << std::endl;
97  std::cout << "DigitizerFP420:trackerContainers.size()=" << trackerContainers.size() << std::endl;
98  }
99  }

References SiStripOfflineCRack_cfg::alias, conf_, gather_cfg::cout, dn0, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), pn0, rn0, sn0, AlCaHLTBitMon_QueryRunRegistry::string, trackerContainers, and verbosity.

◆ ~DigitizerFP420()

cms::DigitizerFP420::~DigitizerFP420 ( )
override

Definition at line 102 of file DigitizerFP420.cc.

102  {
103  if (verbosity > 0) {
104  std::cout << "Destroying a DigitizerFP420" << std::endl;
105  }
106  delete stripDigitizer_;
107  }

References gather_cfg::cout, stripDigitizer_, and verbosity.

Member Function Documentation

◆ produce()

void cms::DigitizerFP420::produce ( edm::Event e,
const edm::EventSetup c 
)
overridevirtual

Implements edm::one::EDProducerBase.

Definition at line 110 of file DigitizerFP420.cc.

110  {
111  // be lazy and include the appropriate namespaces
112  using namespace edm;
113  using namespace std;
114 
115  if (verbosity > 0) {
116  std::cout << " ===" << std::endl;
117  std::cout << " ============== DigitizerFP420: start produce= " << std::endl;
118  std::cout << " ===" << std::endl;
119  }
120  // Get input
121  // std::cout << "DigitizerFP420 start produce" << std::endl;
122  // edm::ESHandle < ParticleDataTable > pdt;
123  // iSetup.getData( pdt );
124 
125  // Step A: Get Inputs for allTrackerHits
126 
128  std::vector<const CrossingFrame<PSimHit> *> cf_simhitvec;
129  for (uint32_t i = 0; i < trackerContainers.size(); i++) {
130  iEvent.getByLabel("mix", trackerContainers[i], cf_simhit);
131  cf_simhitvec.push_back(cf_simhit.product());
132  }
133  std::unique_ptr<MixCollection<PSimHit>> allTrackerHits(new MixCollection<PSimHit>(cf_simhitvec));
134 
135  // use instead of the previous
136  /*
137  std::cout <<" ============== DigitizerFP420: start loop 1 "
138  << std::endl; edm::Handle<CrossingFrame<PSimHit> > xFrame; std::cout <<"
139  ============== DigitizerFP420: start loop 2 " << std::endl;
140  iEvent.getByLabel("mix","FP420SI",xFrame);
141  std::cout <<" ============== DigitizerFP420: start loop 3 "
142  << std::endl; std::unique_ptr<MixCollection<PSimHit> > allTrackerHits( new
143  MixCollection<PSimHit>(xFrame.product()) ); std::cout <<" ==============
144  DigitizerFP420: start loop 4 " << std::endl;
145  */
146 
147  // Loop on PSimHit
148 
150  // Step C: create empty output collection
151  std::unique_ptr<DigiCollectionFP420> output(new DigiCollectionFP420);
152  // std::unique_ptr<edm::DetSetVector<HDigiFP420> > outputfinal(new
153  // edm::DetSetVector<HDigiFP420>(output) );
154  // std::unique_ptr<edm::DetSetVector<HDigiFP420> > outputfinal(new
155  // edm::DetSetVector<HDigiFP420>(output) );
156  // std::unique_ptr<edm::DetSetVector<HDigiFP420SimLink> > outputlink(new
157  // edm::DetSetVector<HDigiFP420SimLink>(output) );
158 
159  SimHitMap.clear();
160 
161  // ==================================
162  if (verbosity > 0) {
163  std::cout << " ===" << std::endl;
164  std::cout << " ============== DigitizerFP420: MixCollection treatment= " << std::endl;
165  std::cout << " ===" << std::endl;
166  }
167 
169  for (isim = allTrackerHits->begin(); isim != allTrackerHits->end(); isim++) {
170  unsigned int unitID = (*isim).detUnitId();
171  int det, zside, sector, zmodule;
172  FP420NumberingScheme::unpackFP420Index(unitID, det, zside, sector, zmodule);
173  // below, the continues plane index should be (for even different sensor
174  // index zside)
175  // unsigned int intindex = packMYIndex(rn0, pn0, sn0, det, zside, sector,
176  // zmodule);
177  unsigned int intindex = FP420NumberingScheme::packMYIndex(rn0, pn0, sn0, det, zside, sector, zmodule);
178  // int zScale=(rn0-1), sScale = (rn0-1)*(pn0-1), dScale =
179  //(rn0-1)*(pn0-1)*(sn0-1); unsigned int intindex = dScale*(det -
180  // 1)+sScale*(sector - 1)+zScale*(zmodule - 1)+zside;
181 
182  if (verbosity > 0) {
183  double losenergy = (*isim).energyLoss();
184  std::cout << " ===" << std::endl;
185  std::cout << " ============== DigitizerFP420: losenergy= " << losenergy << std::endl;
186  std::cout << " === for intindex = " << intindex << std::endl;
187  }
188  // does not matter which index is used: intindex or unitID - mainly to
189  // collect hits under every index
190  SimHitMap[intindex].push_back((*isim));
191  // for development later one( cal be used another index):
192  // SimHitMap[unitID].push_back((*isim));
193  }
194  //============================================================================================================================
195 
196  if (verbosity > 0) {
197  std::cout << " ===" << std::endl;
198  std::cout << " ============== DigitizerFP420: put zero to container " << std::endl;
199  std::cout << " ===" << std::endl;
200  }
201  // put zero to container info from the beginning (important! because not
202  // any detID is updated with coming of new event !!!!!!
203  // clean info of container from previous event
204  for (int det = 1; det < dn0; det++) {
205  for (int sector = 1; sector < sn0; sector++) {
206  for (int zmodule = 1; zmodule < pn0; zmodule++) {
207  for (int zside = 1; zside < rn0; zside++) {
208  // intindex is a continues numbering of FP420
209  unsigned int detID = FP420NumberingScheme::packMYIndex(rn0, pn0, sn0, det, zside, sector, zmodule);
210  // int zScale=(rn0-1), sScale = (rn0-1)*(pn0-1), dScale =
211  // (rn0-1)*(pn0-1)*(sn0-1); unsigned int detID = dScale*(det -
212  // 1)+sScale*(sector - 1)+zScale*(zmodule - 1)+zside;
213  std::vector<HDigiFP420> collector;
214  collector.clear();
216  inputRange.first = collector.begin();
217  inputRange.second = collector.end();
218  output->putclear(inputRange, detID);
219  } // for
220  } // for
221  } // for
222  } // for
223  // !!!!!!
224  // if we want to keep Digi container/Collection for one event uncomment the
225  // line below and vice versa
226  output->clear(); // container_.clear() --> start from the beginning of the
227  // container
228 
229  //============================================================================================================================================
230 
231  if (verbosity > 0) {
232  std::cout << " ===" << std::endl;
233  std::cout << " ============== DigitizerFP420: start loop over det iu " << std::endl;
234  std::cout << " ============== DigitizerFP420: SimHitMap.size()= " << SimHitMap.size() << std::endl;
235  std::cout << " ===" << std::endl;
236  }
237  bool first = true;
238 
240  /*
241  if(verbosity>0) std::cout <<"======= DigitizerFP420: SimHitMap size = " <<
242  SimHitMap.size() << std::endl; for(unsigned int i = 0; i < SimHitMap.size();
243  i++ ) {
244  // std::cout <<" ====== DigitizerFP420: i= " << i << std::endl;
245  vector<PSimHit>::const_iterator simHitIter = SimHitMap[i].begin();
246  vector<PSimHit>::const_iterator simHitIterEnd = SimHitMap[i].end();
247  for (;simHitIter != simHitIterEnd; ++simHitIter) {
248  const PSimHit ihit = *simHitIter;
249  unsigned int unitID = ihit.detUnitId();
250  if(verbosity>0) std::cout <<" ====== DigitizerFP420: unitID= " << unitID
251  << " i= " << i << std::endl; int det, zside, sector, zmodule;
252  FP420NumberingScheme::unpackFP420Index(unitID, det, zside, sector,
253  zmodule); int zScale=(rn0-1), sScale = (rn0-1)*(pn0-1), dScale =
254  (rn0-1)*(pn0-1)*(sn0-1); unsigned int iu = dScale*(det - 1)+sScale*(sector -
255  1)+zScale*(zmodule - 1)+zside;
256  }
257  }
258 */
260  //============================================================================================================================================
261  // new: <------
262  for (unsigned int i = 0; i < SimHitMap.size(); i++) {
263  vector<PSimHit>::const_iterator simHitIter = SimHitMap[i].begin();
264  vector<PSimHit>::const_iterator simHitIterEnd = SimHitMap[i].end();
265  for (; simHitIter != simHitIterEnd; ++simHitIter) {
266  const PSimHit ihit = *simHitIter;
267  unsigned int unitID = ihit.detUnitId();
268  if (verbosity > 0 || verbosity == -50)
269  std::cout << " ====== DigitizerFP420: unitID= " << unitID << "Hit number i= " << i << std::endl;
270  int det, zside, sector, zmodule;
271  FP420NumberingScheme::unpackFP420Index(unitID, det, zside, sector, zmodule);
272 
273  unsigned int iu = FP420NumberingScheme::packMYIndex(rn0, pn0, sn0, det, zside, sector, zmodule);
274  if (verbosity > 0 || verbosity == -50)
275  std::cout << "for Hits iu = " << iu << " sector = " << sector << " zmodule = " << zmodule
276  << " zside = " << zside << " det=" << det << std::endl;
277  // int zScale=(rn0-1), sScale = (rn0-1)*(pn0-1), dScale =
278  // (rn0-1)*(pn0-1)*(sn0-1);
279  // unsigned int iu = dScale*(det - 1)+sScale*(sector - 1)+zScale*(zmodule
280  // - 1)+zside;
281 
282  if (verbosity > 0) {
283  unsigned int index = FP420NumberingScheme::packFP420Index(det, zside, sector, zmodule);
284  std::cout << " DigitizerFP420: index = " << index << " iu = " << iu << std::endl;
285  }
286 
287  // GlobalVector bfield=pSetup->inTesla((*iu)->surface().position());
288  // CLHEP::Hep3Vector Bfieldloc=bfield();
289  G4ThreeVector bfield(0., 0., 0.0);
290  // G4ThreeVector bfield( 0.5, 0.5, 1.0 );
291 
292  if (verbosity > 0) {
293  std::cout << " ===" << std::endl;
294  std::cout << " ============== DigitizerFP420: call run for iu= " << iu << std::endl;
295  std::cout << " ===" << std::endl;
296  }
297  collector.clear();
298 
299  collector = stripDigitizer_->run(SimHitMap[iu], bfield,
300  iu); // stripDigitizer_.run... return
301  // ,sScale
302 
303  if (verbosity > 0) {
304  std::cout << " ===" << std::endl;
305  std::cout << " ===" << std::endl;
306  std::cout << "======= DigitizerFP420: collector size = " << collector.size() << std::endl;
307  std::cout << " ===" << std::endl;
308  std::cout << " ===" << std::endl;
309  }
310  /*
311 
312  std::vector<HDigiFP420> collector;
313  collector.clear();
314  DigiCollectionFP420::Range inputRange;
315  inputRange.first = collector.begin();
316  inputRange.second = collector.end();
317  output->putclear(inputRange,detID);
318  */
319  if (!collector.empty()) {
320  if (verbosity > 0) {
321  std::cout << " ============= DigitizerFP420:collector "
322  "start!!!!!!!!!!!!!!"
323  << std::endl;
324  }
325  DigiCollectionFP420::Range outputRange;
326  outputRange.first = collector.begin();
327  outputRange.second = collector.end();
328 
329  if (first) {
330  // use it only if ClusterCollectionFP420 is the ClusterCollection of
331  // one event, otherwise, do not use (loose 1st cl. of 1st event only)
332  first = false;
333  unsigned int detID0 = 0;
334  output->put(outputRange, detID0); // !!! put into adress 0 for detID
335  // which will not be used never
336  } // if ( first )
337 
338  // put !!!
339  output->put(outputRange, iu);
340 
341  } // if(collector.size()>0
342 
343  // } // for
344  // } // for
345  // } // for
346  // } // for
347 
348  } // for
349  } // for
350 
351  // END
352 
353  /*
354  if(verbosity>0) {
355  std::vector<HDigiFP420> theAllDigis;
356  theAllDigis.clear();
357  DigiCollectionFP420::Range outputRange;
358  DigiCollectionFP420::ContainerIterator sort_begin = outputRange.first;
359  DigiCollectionFP420::ContainerIterator sort_end = outputRange.second;
360  theAllDigis.insert(theAllDigis.end(), sort_begin, sort_end);
361  std::cout <<"====== theAllDigis size = " << theAllDigis.size() <<
362  std::endl; for (std::vector<HDigiFP420>::iterator isim = theAllDigis.begin();
363  isim != theAllDigis.end(); ++isim){
364  const HDigiFP420 istrip = *isim;
365  std::cout <<
366  "*******************************************DigitizerFP420:check1" <<
367  std::endl; std::cout << " strip number=" << istrip.strip() << " adc=" <<
368  istrip.adc() << std::endl; std::cout <<" channel =" << istrip.channel() <<" V
369  " << istrip.stripV() <<" VW " << istrip.stripVW() << std::endl; std::cout <<"
370  ===" << std::endl; std::cout <<" ===" << std::endl; std::cout <<"
371  =======================" << std::endl;
372  }// for
373  }
374 */
375  if (verbosity == -50) {
376  // check of access to the collector:
377  for (int det = 1; det < dn0; det++) {
378  for (int sector = 1; sector < sn0; sector++) {
379  for (int zmodule = 1; zmodule < pn0; zmodule++) {
380  for (int zside = 1; zside < rn0; zside++) {
381  unsigned int iu = FP420NumberingScheme::packMYIndex(rn0, pn0, sn0, det, zside, sector, zmodule);
384  std::cout << "****DigitizerFP420:check2" << std::endl;
385  // std::cout <<" iu = " << iu <<" sector = " << sector <<" zmodule
386  //= " << zmodule <<" zside = " << zside << " det=" << det <<
387  // std::endl; std::cout <<" layer = " << layer <<" orient = "
388  // << orient << std::endl;
389  int newdet, newzside, newsector, newzmodule;
390  FP420NumberingScheme::unpackMYIndex(iu, rn0, pn0, sn0, newdet, newzside, newsector, newzmodule);
391  std::cout << " newdet = " << newdet << " newsector = " << newsector << " newzmodule = " << newzmodule
392  << " newzside = " << newzside << std::endl;
393 
394  collector.clear();
395  DigiCollectionFP420::Range outputRange;
396  // outputRange = output->get(iu);
397  outputRange = output->get(iu);
398 
399  // fill output in collector vector (for may be sorting? or other
400  // checks)
401  std::vector<HDigiFP420> collector;
402  // collector.clear();
403  DigiCollectionFP420::ContainerIterator sort_begin = outputRange.first;
404  DigiCollectionFP420::ContainerIterator sort_end = outputRange.second;
405  for (; sort_begin != sort_end; ++sort_begin) {
406  collector.push_back(*sort_begin);
407  } // for
408  // std::sort(collector.begin(),collector.end());
409  std::cout << " ===" << std::endl;
410  std::cout << "====== collector size = " << collector.size() << std::endl;
411  if (!collector.empty()) {
412  std::cout << " iu = " << iu << " sector = " << sector << " zmodule = " << zmodule
413  << " zside = " << zside << " det=" << det << " layer = " << layer << " orient = " << orient
414  << std::endl;
415  std::cout << " ===" << std::endl;
416  }
417  vector<HDigiFP420>::const_iterator simHitIter = collector.begin();
418  vector<HDigiFP420>::const_iterator simHitIterEnd = collector.end();
419  for (; simHitIter != simHitIterEnd; ++simHitIter) {
420  const HDigiFP420 istrip = *simHitIter;
421  std::cout << " strip number=" << istrip.strip() << " adc=" << istrip.adc() << std::endl;
422  std::cout << " channel =" << istrip.channel() << " V " << istrip.stripV() << " VW " << istrip.stripVW()
423  << std::endl;
424  std::cout << " ===" << std::endl;
425  std::cout << " ===" << std::endl;
426  std::cout << " ===================================================" << std::endl;
427  }
428 
429  //==================================
430 
431  } // for
432  } // for
433  } // for
434  } // for
435 
436  // end of check of access to the strip collection
437 
438  } // if(verbosity
439 
440  // Step D: write output to file
441  if (verbosity > 0) {
442  std::cout << "DigitizerFP420 recoutput" << std::endl;
443  }
444  // Step D: write output to file
445  iEvent.put(std::move(output));
446  } // produce

References HDigiFP420::adc(), HDigiFP420::channel(), collector, gather_cfg::cout, PSimHit::detUnitId(), dn0, dqmdumpme::first, mps_fire::i, iEvent, pileupCalc::inputRange, eostools::move(), hgcalPerformanceValidation::orient, convertSQLitetoXML_cfg::output, FP420NumberingScheme::packFP420Index(), FP420NumberingScheme::packMYIndex(), pn0, edm::Handle< T >::product(), rn0, FP420DigiMain::run(), SimHitMap, sn0, HDigiFP420::strip(), stripDigitizer_, HDigiFP420::stripV(), HDigiFP420::stripVW(), trackerContainers, FP420NumberingScheme::unpackFP420Index(), FP420NumberingScheme::unpackLayerIndex(), FP420NumberingScheme::unpackMYIndex(), FP420NumberingScheme::unpackOrientation(), verbosity, and ecaldqm::zside().

Member Data Documentation

◆ collector

std::vector<HDigiFP420> cms::DigitizerFP420::collector
private

Definition at line 53 of file DigitizerFP420.h.

Referenced by produce().

◆ conf_

edm::ParameterSet cms::DigitizerFP420::conf_
private

Definition at line 45 of file DigitizerFP420.h.

Referenced by DigitizerFP420().

◆ dn0

int cms::DigitizerFP420::dn0
private

Definition at line 51 of file DigitizerFP420.h.

Referenced by DigitizerFP420(), and produce().

◆ numStrips

int cms::DigitizerFP420::numStrips
private

Definition at line 49 of file DigitizerFP420.h.

◆ pn0

int cms::DigitizerFP420::pn0
private

Definition at line 51 of file DigitizerFP420.h.

Referenced by DigitizerFP420(), and produce().

◆ rn0

int cms::DigitizerFP420::rn0
private

Definition at line 51 of file DigitizerFP420.h.

Referenced by DigitizerFP420(), and produce().

◆ SimHitMap

simhit_map cms::DigitizerFP420::SimHitMap
private

Definition at line 43 of file DigitizerFP420.h.

Referenced by produce().

◆ sn0

int cms::DigitizerFP420::sn0
private

Definition at line 51 of file DigitizerFP420.h.

Referenced by DigitizerFP420(), and produce().

◆ stripDigitizer_

FP420DigiMain* cms::DigitizerFP420::stripDigitizer_
private

Definition at line 48 of file DigitizerFP420.h.

Referenced by produce(), and ~DigitizerFP420().

◆ trackerContainers

vstring cms::DigitizerFP420::trackerContainers
private

Definition at line 46 of file DigitizerFP420.h.

Referenced by DigitizerFP420(), and produce().

◆ verbosity

int cms::DigitizerFP420::verbosity
private

Definition at line 51 of file DigitizerFP420.h.

Referenced by DigitizerFP420(), produce(), and ~DigitizerFP420().

cms::DigitizerFP420::verbosity
int verbosity
Definition: DigitizerFP420.h:51
cms::DigitizerFP420::collector
std::vector< HDigiFP420 > collector
Definition: DigitizerFP420.h:53
mps_fire.i
i
Definition: mps_fire.py:428
edm::Handle::product
T const * product() const
Definition: Handle.h:70
cms::DigitizerFP420::trackerContainers
vstring trackerContainers
Definition: DigitizerFP420.h:46
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
cms::DigitizerFP420::rn0
int rn0
Definition: DigitizerFP420.h:51
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
edm
HLT enums.
Definition: AlignableModifier.h:19
FP420NumberingScheme::unpackOrientation
static int unpackOrientation(int rn0, int zside)
Definition: FP420NumberingScheme.h:88
gather_cfg.cout
cout
Definition: gather_cfg.py:144
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Handle
Definition: AssociativeIterator.h:50
MixCollection::MixItr
Definition: MixCollection.h:62
dqmdumpme.first
first
Definition: dqmdumpme.py:55
cms::DigitizerFP420::dn0
int dn0
Definition: DigitizerFP420.h:51
FP420NumberingScheme::unpackMYIndex
static void unpackMYIndex(const int &idx, int rn0, int pn0, int sn0, int &det, int &zside, int &sector, int &zmodule)
Definition: FP420NumberingScheme.h:47
FP420NumberingScheme::unpackFP420Index
static void unpackFP420Index(const unsigned int &idx, int &det, int &zside, int &station, int &superplane)
Definition: FP420NumberingScheme.cc:163
PSimHit::detUnitId
unsigned int detUnitId() const
Definition: PSimHit.h:97
HDigiFP420::stripVW
int stripVW() const
Definition: HDigiFP420.h:21
FP420NumberingScheme::packFP420Index
static unsigned int packFP420Index(int det, int zside, int station, int superplane)
Definition: FP420NumberingScheme.cc:143
pileupCalc.inputRange
inputRange
Definition: pileupCalc.py:218
DigiCollectionFP420::ContainerIterator
std::vector< HDigiFP420 >::const_iterator ContainerIterator
Definition: DigiCollectionFP420.h:16
MixCollection
Definition: MixCollection.h:11
HDigiFP420
Definition: HDigiFP420.h:4
FP420DigiMain::run
std::vector< HDigiFP420 > run(const std::vector< PSimHit > &input, const G4ThreeVector &, unsigned int)
Definition: FP420DigiMain.cc:137
FP420NumberingScheme::packMYIndex
static unsigned packMYIndex(int rn0, int pn0, int sn0, int det, int zside, int sector, int zmodule)
Definition: FP420NumberingScheme.h:37
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DigiCollectionFP420
Definition: DigiCollectionFP420.h:14
FP420NumberingScheme::unpackLayerIndex
static int unpackLayerIndex(int rn0, int zside)
Definition: FP420NumberingScheme.h:56
iEvent
int iEvent
Definition: GenABIO.cc:224
cms::DigitizerFP420::sn0
int sn0
Definition: DigitizerFP420.h:51
FP420DigiMain
Definition: FP420DigiMain.h:30
HDigiFP420::adc
int adc() const
Definition: HDigiFP420.h:18
HDigiFP420::strip
int strip() const
Definition: HDigiFP420.h:17
cms::DigitizerFP420::SimHitMap
simhit_map SimHitMap
Definition: DigitizerFP420.h:43
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
cms::DigitizerFP420::stripDigitizer_
FP420DigiMain * stripDigitizer_
Definition: DigitizerFP420.h:48
DigiCollectionFP420::Range
std::pair< ContainerIterator, ContainerIterator > Range
Definition: DigiCollectionFP420.h:17
hgcalPerformanceValidation.orient
orient
Definition: hgcalPerformanceValidation.py:640
SiStripOfflineCRack_cfg.alias
alias
Definition: SiStripOfflineCRack_cfg.py:128
cms::DigitizerFP420::conf_
edm::ParameterSet conf_
Definition: DigitizerFP420.h:45
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
cms::DigitizerFP420::pn0
int pn0
Definition: DigitizerFP420.h:51
PSimHit
Definition: PSimHit.h:15
HDigiFP420::channel
int channel() const
Definition: HDigiFP420.h:19
HDigiFP420::stripV
int stripV() const
Definition: HDigiFP420.h:23