CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
CSCDigiValidator Class Reference
Inheritance diagram for CSCDigiValidator:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 CSCDigiValidator (const edm::ParameterSet &)
 
 ~CSCDigiValidator () override
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilter () 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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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 Member Functions

void beginJob () override
 
void endJob () override
 
bool filter (edm::Event &, const edm::EventSetup &) override
 
std::vector< CSCComparatorDigirelabelCompDigis (const CSCChamberMap *m, CSCDetId _id, std::vector< CSCComparatorDigi >::const_iterator b, std::vector< CSCComparatorDigi >::const_iterator e)
 
std::vector< CSCStripDigirelabelStripDigis (const CSCChamberMap *, CSCDetId, std::vector< CSCStripDigi >::const_iterator, std::vector< CSCStripDigi >::const_iterator)
 
std::vector< CSCStripDigisanitizeStripDigis (std::vector< CSCStripDigi >::const_iterator, std::vector< CSCStripDigi >::const_iterator)
 
std::vector< CSCWireDigisanitizeWireDigis (std::vector< CSCWireDigi >::const_iterator, std::vector< CSCWireDigi >::const_iterator)
 
std::vector< CSCComparatorDigizeroSupCompDigis (std::vector< CSCComparatorDigi >::const_iterator, std::vector< CSCComparatorDigi >::const_iterator)
 
std::vector< CSCStripDigizeroSupStripDigis (std::vector< CSCStripDigi >::const_iterator, std::vector< CSCStripDigi >::const_iterator)
 

Private Attributes

edm::EDGetTokenT< CSCALCTDigiCollectional1_token
 
edm::EDGetTokenT< CSCALCTDigiCollectional2_token
 
edm::InputTag alct1
 
edm::InputTag alct2
 
edm::EDGetTokenT< CSCComparatorDigiCollectioncd1_token
 
edm::EDGetTokenT< CSCComparatorDigiCollectioncd2_token
 
edm::ESGetToken< CSCChamberMap, CSCChamberMapRcdcham_token
 
edm::EDGetTokenT< CSCCLCTDigiCollectioncl1_token
 
edm::EDGetTokenT< CSCCLCTDigiCollectioncl2_token
 
edm::InputTag clct1
 
edm::InputTag clct2
 
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollectionco1_token
 
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollectionco2_token
 
edm::InputTag comp1
 
edm::InputTag comp2
 
edm::InputTag csctf1
 
edm::InputTag csctf2
 
edm::InputTag csctfstubs1
 
edm::InputTag csctfstubs2
 
edm::InputTag lct1
 
edm::InputTag lct2
 
edm::EDGetTokenT< CSCStripDigiCollectionsd1_token
 
edm::EDGetTokenT< CSCStripDigiCollectionsd2_token
 
edm::InputTag strip1
 
edm::InputTag strip2
 
edm::EDGetTokenT< L1CSCTrackCollectiontr1_token
 
edm::EDGetTokenT< L1CSCTrackCollectiontr2_token
 
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > ts1_token
 
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > ts2_token
 
edm::EDGetTokenT< CSCWireDigiCollectionwd1_token
 
edm::EDGetTokenT< CSCWireDigiCollectionwd2_token
 
edm::InputTag wire1
 
edm::InputTag wire2
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter 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::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 48 of file CSCDigiValidator.cc.

Constructor & Destructor Documentation

◆ CSCDigiValidator()

CSCDigiValidator::CSCDigiValidator ( const edm::ParameterSet iConfig)
explicit

Definition at line 99 of file CSCDigiValidator.cc.

99  {
100  wd1_token = consumes<CSCWireDigiCollection>(iConfig.getParameter<edm::InputTag>("inputWire"));
101  wd2_token = consumes<CSCWireDigiCollection>(iConfig.getParameter<edm::InputTag>("repackWire"));
102  sd1_token = consumes<CSCStripDigiCollection>(iConfig.getParameter<edm::InputTag>("inputStrip"));
103  sd2_token = consumes<CSCStripDigiCollection>(iConfig.getParameter<edm::InputTag>("inputStrip"));
104  cd1_token = consumes<CSCComparatorDigiCollection>(iConfig.getParameter<edm::InputTag>("inputComp"));
105  cd2_token = consumes<CSCComparatorDigiCollection>(iConfig.getParameter<edm::InputTag>("RepackComp"));
106  al1_token = consumes<CSCALCTDigiCollection>(iConfig.getParameter<edm::InputTag>("inputALCT"));
107  al2_token = consumes<CSCALCTDigiCollection>(iConfig.getParameter<edm::InputTag>("repackALCT"));
108  cl1_token = consumes<CSCCLCTDigiCollection>(iConfig.getParameter<edm::InputTag>("inputCLCT"));
109  cl2_token = consumes<CSCCLCTDigiCollection>(iConfig.getParameter<edm::InputTag>("repackCLCT"));
110  co1_token = consumes<CSCCorrelatedLCTDigiCollection>(iConfig.getParameter<edm::InputTag>("inputCorrLCT"));
111  co2_token = consumes<CSCCorrelatedLCTDigiCollection>(iConfig.getParameter<edm::InputTag>("repackCorrLCT"));
112  tr1_token = consumes<L1CSCTrackCollection>(iConfig.getParameter<edm::InputTag>("inputCSCTF"));
113  tr2_token = consumes<L1CSCTrackCollection>(iConfig.getParameter<edm::InputTag>("repackCSCTF"));
114  ts1_token = consumes<CSCTriggerContainer<csctf::TrackStub> >(iConfig.getParameter<edm::InputTag>("inputCSCTFStubs"));
115  ts2_token = consumes<CSCTriggerContainer<csctf::TrackStub> >(iConfig.getParameter<edm::InputTag>("repackCSCTFStubs"));
116  cham_token = esConsumes<CSCChamberMap, CSCChamberMapRcd>();
117 }

References al1_token, al2_token, cd1_token, cd2_token, cham_token, cl1_token, cl2_token, co1_token, co2_token, edm::ParameterSet::getParameter(), sd1_token, sd2_token, tr1_token, tr2_token, ts1_token, ts2_token, wd1_token, and wd2_token.

◆ ~CSCDigiValidator()

CSCDigiValidator::~CSCDigiValidator ( )
override

Definition at line 119 of file CSCDigiValidator.cc.

119 {}

Member Function Documentation

◆ beginJob()

void CSCDigiValidator::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 869 of file CSCDigiValidator.cc.

869 {}

◆ endJob()

void CSCDigiValidator::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 871 of file CSCDigiValidator.cc.

871 {}

◆ filter()

bool CSCDigiValidator::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDFilter.

Definition at line 121 of file CSCDigiValidator.cc.

121  {
122  bool _err = false;
123  using namespace edm;
124 
125  typedef std::map<CSCDetId, std::pair<std::vector<CSCWireDigi>, std::vector<CSCWireDigi> > > matchingDetWireCollection;
126  typedef std::map<CSCDetId, std::pair<std::vector<CSCStripDigi>, std::vector<CSCStripDigi> > >
127  matchingDetStripCollection;
128  typedef std::map<CSCDetId, std::pair<std::vector<CSCComparatorDigi>, std::vector<CSCComparatorDigi> > >
129  matchingDetComparatorCollection;
130  typedef std::map<CSCDetId, std::pair<std::vector<CSCCLCTDigi>, std::vector<CSCCLCTDigi> > > matchingDetCLCTCollection;
131  typedef std::map<CSCDetId, std::pair<std::vector<CSCALCTDigi>, std::vector<CSCALCTDigi> > > matchingDetALCTCollection;
132  typedef std::map<CSCDetId, std::pair<std::vector<CSCCorrelatedLCTDigi>, std::vector<CSCCorrelatedLCTDigi> > >
133  matchingDetLCTCollection;
134 
136  const CSCChamberMap* theMapping = hcham.product();
137 
141  Handle<CSCCLCTDigiCollection> _clct, _sclct;
142  Handle<CSCALCTDigiCollection> _alct, _salct;
144  Handle<L1CSCTrackCollection> _trk, _strk;
146 
147  // get wire digis before and after unpacking
148  iEvent.getByToken(wd1_token, _swi);
149  iEvent.getByToken(wd2_token, _wi);
150 
151  //get strip digis before and after unpacking
152  iEvent.getByToken(sd1_token, _sst);
153  iEvent.getByToken(sd2_token, _st);
154 
155  //get comparator digis before and after unpacking
156  iEvent.getByToken(co1_token, _scmp);
157  iEvent.getByToken(co2_token, _cmp);
158 
159  //get clcts
160  iEvent.getByToken(cl1_token, _sclct);
161  iEvent.getByToken(cl2_token, _clct);
162 
163  //get alcts
164  iEvent.getByToken(al1_token, _salct);
165  iEvent.getByToken(al2_token, _alct);
166 
167  //get corr lcts
168  iEvent.getByToken(co1_token, _slct);
169  iEvent.getByToken(co2_token, _lct);
170 
171  //get l1 tracks
172  iEvent.getByToken(tr1_token, _strk);
173  iEvent.getByToken(tr2_token, _trk);
174 
175  //get DT stubs for L1 Tracks
176  iEvent.getByToken(ts1_token, _sdt);
177  iEvent.getByToken(ts2_token, _dt);
178 
179  CSCWireDigiCollection::DigiRangeIterator wi = _wi->begin(), swi = _swi->begin();
180  CSCStripDigiCollection::DigiRangeIterator st = _st->begin(), sst = _sst->begin();
181  CSCComparatorDigiCollection::DigiRangeIterator cmp = _cmp->begin(), scmp = _scmp->begin();
182  CSCCLCTDigiCollection::DigiRangeIterator clct = _clct->begin(), sclct = _sclct->begin();
183  CSCALCTDigiCollection::DigiRangeIterator alct = _alct->begin(), salct = _salct->begin();
184  CSCCorrelatedLCTDigiCollection::DigiRangeIterator lct = _lct->begin(), slct = _slct->begin();
185  L1CSCTrackCollection::const_iterator trk = _trk->begin(), strk = _strk->begin();
186 
187  //per detID, create lists of various digi types
188  matchingDetWireCollection wires;
189  matchingDetStripCollection strips;
190  matchingDetComparatorCollection comps;
191  matchingDetCLCTCollection clcts;
192  matchingDetALCTCollection alcts;
193  matchingDetLCTCollection lcts, trackstubs;
195 
196  //wires
197  for (; wi != _wi->end(); ++wi) {
198  CSCWireDigiCollection::const_iterator b = (*wi).second.first, e = (*wi).second.second;
199  std::vector<CSCWireDigi>::iterator beg = wires[(*wi).first].first.end();
200  wires[(*wi).first].first.insert(beg, b, e);
201  }
202  for (; swi != _swi->end(); ++swi) {
203  CSCWireDigiCollection::const_iterator b = (*swi).second.first, e = (*swi).second.second;
204  //convert sim ring 4(ME1/a) to ring 1
205  CSCDetId _id = (*swi).first;
206  if ((*swi).first.ring() == 4)
207  _id = CSCDetId((*swi).first.endcap(), (*swi).first.station(), 1, (*swi).first.chamber(), (*swi).first.layer());
208 
209  std::vector<CSCWireDigi>::iterator beg = wires[_id].second.end();
210 
211  wires[_id].second.insert(beg, b, e);
212  // automatically combine wire digis after each insertion
213  wires[_id].second = sanitizeWireDigis(wires[_id].second.begin(), wires[_id].second.end());
214  }
215 
216  //strips
217  for (; st != _st->end(); ++st) {
218  CSCStripDigiCollection::const_iterator b = (*st).second.first, e = (*st).second.second;
219  std::vector<CSCStripDigi>::iterator beg = strips[(*st).first].first.end();
220 
221  //need to remove strips with no active ADCs
222  std::vector<CSCStripDigi> zs = zeroSupStripDigis(b, e);
223 
224  strips[(*st).first].first.insert(beg, zs.begin(), zs.end());
225  }
226  for (; sst != _sst->end(); ++sst) {
227  CSCStripDigiCollection::const_iterator b = (*sst).second.first, e = (*sst).second.second;
228  // conversion of ring 4->1 not necessary here
229  CSCDetId _id = (*sst).first;
230  //if((*sst).first.ring() == 4)
231  // _id = CSCDetId((*sst).first.endcap(),(*sst).first.station(),
232  // 1, (*sst).first.chamber(),(*sst).first.layer());
233 
234  std::vector<CSCStripDigi>::iterator beg = strips[_id].second.end();
235 
236  std::vector<CSCStripDigi> relab = relabelStripDigis(theMapping, (*sst).first, b, e);
237 
238  strips[_id].second.insert(beg, relab.begin(), relab.end());
239  //strips[_id].second.insert(beg,b,e);
240  }
241 
242  //comparators
243  for (; cmp != _cmp->end(); ++cmp) {
244  CSCComparatorDigiCollection::const_iterator b = (*cmp).second.first, e = (*cmp).second.second;
245  std::vector<CSCComparatorDigi>::iterator beg = comps[(*cmp).first].first.end();
246 
247  comps[(*cmp).first].first.insert(beg, b, e);
248  }
249  for (; scmp != _scmp->end(); ++scmp) {
250  CSCComparatorDigiCollection::const_iterator b = (*scmp).second.first, e = (*scmp).second.second;
251  // convert sim ring 4 (ME1/a) to ring 1
252  CSCDetId _id = (*scmp).first;
253  if ((*scmp).first.ring() == 4)
254  _id =
255  CSCDetId((*scmp).first.endcap(), (*scmp).first.station(), 1, (*scmp).first.chamber(), (*scmp).first.layer());
256 
257  std::vector<CSCComparatorDigi>::iterator beg = comps[_id].second.begin();
258 
259  if ((*scmp).first.ring() == 4)
260  beg = comps[_id].second.end();
261 
262  std::vector<CSCComparatorDigi> zs = zeroSupCompDigis(b, e);
263 
264  std::vector<CSCComparatorDigi> relab = relabelCompDigis(theMapping, (*scmp).first, zs.begin(), zs.end());
265 
266  comps[_id].second.insert(beg, relab.begin(), relab.end());
267  }
268 
269  //CLCTs
270  for (; clct != _clct->end(); ++clct) {
271  CSCCLCTDigiCollection::const_iterator b = (*clct).second.first, e = (*clct).second.second;
272  std::vector<CSCCLCTDigi>::iterator beg = clcts[(*clct).first].first.end();
273 
274  clcts[(*clct).first].first.insert(beg, b, e);
275  }
276  for (; sclct != _sclct->end(); ++sclct) {
277  CSCCLCTDigiCollection::const_iterator b = (*sclct).second.first, e = (*sclct).second.second;
278  // convert sim ring 4 (ME1/a) to ring 1
279  CSCDetId _id = (*sclct).first;
280  if ((*sclct).first.ring() == 4)
281  _id = CSCDetId(
282  (*sclct).first.endcap(), (*sclct).first.station(), 1, (*sclct).first.chamber(), (*sclct).first.layer());
283 
284  std::vector<CSCCLCTDigi>::iterator beg = clcts[_id].second.begin();
285 
286  if ((*sclct).first.ring() == 4)
287  beg = clcts[_id].second.end();
288 
289  clcts[_id].second.insert(beg, b, e);
290  }
291 
292  //ALCTs
293  for (; alct != _alct->end(); ++alct) {
294  CSCALCTDigiCollection::const_iterator b = (*alct).second.first, e = (*alct).second.second;
295  std::vector<CSCALCTDigi>::iterator beg = alcts[(*alct).first].first.end();
296 
297  alcts[(*alct).first].first.insert(beg, b, e);
298  }
299  for (; salct != _salct->end(); ++salct) {
300  CSCALCTDigiCollection::const_iterator b = (*salct).second.first, e = (*salct).second.second;
301  // convert sim ring 4 (ME1/a) to ring 1
302  CSCDetId _id = (*salct).first;
303  if ((*salct).first.ring() == 4)
304  _id = CSCDetId(
305  (*salct).first.endcap(), (*salct).first.station(), 1, (*salct).first.chamber(), (*salct).first.layer());
306 
307  std::vector<CSCALCTDigi>::iterator beg = alcts[_id].second.begin();
308 
309  if ((*salct).first.ring() == 4)
310  beg = alcts[_id].second.end();
311 
312  alcts[_id].second.insert(beg, b, e);
313  }
314 
315  // Correlated LCTs
316  for (; lct != _lct->end(); ++lct) {
317  CSCCorrelatedLCTDigiCollection::const_iterator b = (*lct).second.first, e = (*lct).second.second;
318  std::vector<CSCCorrelatedLCTDigi>::iterator beg = lcts[(*lct).first].first.end();
319 
320  lcts[(*lct).first].first.insert(beg, b, e);
321  }
322  for (; slct != _slct->end(); ++slct) {
323  CSCCorrelatedLCTDigiCollection::const_iterator b = (*slct).second.first, e = (*slct).second.second;
324  // convert sim ring 4 (ME1/a) to ring 1
325  CSCDetId _id = (*slct).first;
326  if ((*slct).first.ring() == 4)
327  _id =
328  CSCDetId((*slct).first.endcap(), (*slct).first.station(), 1, (*slct).first.chamber(), (*slct).first.layer());
329 
330  std::vector<CSCCorrelatedLCTDigi>::iterator beg = lcts[_id].second.begin();
331 
332  if ((*slct).first.ring() == 4)
333  beg = lcts[_id].second.end();
334 
335  lcts[_id].second.insert(beg, b, e);
336  }
337  // remove attached LCT digis from tracks, should be put into their own collection and checked separately
338  for (; trk != _trk->end(); ++trk) {
339  tracks.push_back(trk->first);
340  }
341  for (; strk != _strk->end(); ++strk) {
342  simtracks.push_back(strk->first);
343  }
344 
345  //now loop through each set and process if there are differences!
346  matchingDetWireCollection::const_iterator w;
347  matchingDetStripCollection::const_iterator s;
348  matchingDetComparatorCollection::const_iterator c;
349  matchingDetCLCTCollection::const_iterator cl;
350  matchingDetALCTCollection::const_iterator al;
351  matchingDetLCTCollection::const_iterator lc;
352 
353  for (w = wires.begin(); w != wires.end(); ++w) {
354  if (w->second.first.size() != w->second.second.size()) {
355  std::cout << "Major error! # of wire digis in detID: " << w->first << " is not equal between sim and unpacked!"
356  << std::endl;
357  //eventually do more in this case!
358 
359  std::vector<CSCWireDigi> a = w->second.second;
360  std::vector<CSCWireDigi> b = w->second.first;
361  std::cout << "SIM OUTPUT:" << std::endl;
362  for (std::vector<CSCWireDigi>::const_iterator i = a.begin(); i != a.end(); ++i)
363  i->print();
364  std::cout << "UNPACKER OUTPUT:" << std::endl;
365  for (std::vector<CSCWireDigi>::const_iterator i = b.begin(); i != b.end(); ++i)
366  i->print();
367  }
368  int max = std::min(w->second.first.size(), w->second.second.size());
369  std::vector<CSCWireDigi> cv = w->second.first;
370  std::vector<CSCWireDigi> sv = w->second.second;
371  for (int i = 0; i < max; ++i) {
372  if (sv[i].getWireGroup() != cv[i].getWireGroup()) {
373  std::cout << "In detId: " << w->first << std::endl;
374  std::cout << "Wire Groups do not match: " << sv[i].getWireGroup() << " != " << cv[i].getWireGroup()
375  << std::endl;
376  }
377  if (sv[i].getTimeBin() != cv[i].getTimeBin()) {
378  std::cout << "In detId: " << w->first << std::endl;
379  std::cout << "First Time Bins do not match: " << sv[i].getTimeBin() << " != " << cv[i].getTimeBin()
380  << std::endl;
381  }
382  if (sv[i].getTimeBinWord() != cv[i].getTimeBinWord()) {
383  std::cout << "In detId: " << w->first << std::endl;
384  std::cout << "Time Bin Words do not match: " << sv[i].getTimeBinWord() << " != " << cv[i].getTimeBinWord()
385  << std::endl;
386  }
387  }
388  }
389  for (s = strips.begin(); s != strips.end(); ++s) {
390  if (s->second.first.size() != s->second.second.size()) {
391  std::cout << "Major error! # of strip digis in detID: " << s->first << " is not equal between sim and unpacked!"
392  << std::endl;
393  //eventually do more in this case!
394 
395  std::vector<CSCStripDigi> a = s->second.second;
396  std::vector<CSCStripDigi> b = s->second.first;
397  std::cout << "SIM OUTPUT:" << std::endl;
398  for (std::vector<CSCStripDigi>::const_iterator i = a.begin(); i != a.end(); ++i)
399  i->print();
400  std::cout << "UNPACKER OUTPUT:" << std::endl;
401  for (std::vector<CSCStripDigi>::const_iterator i = b.begin(); i != b.end(); ++i)
402  i->print();
403  }
404  int max = std::min(s->second.first.size(), s->second.second.size());
405  std::vector<CSCStripDigi> cv = s->second.first;
406  std::vector<CSCStripDigi> sv = s->second.second;
407  for (int i = 0; i < max; ++i) {
408  bool me1a = s->first.station() == 1 && s->first.ring() == 4;
409  bool me1b = s->first.station() == 1 && s->first.ring() == 1;
410  bool zplus = s->first.endcap() == 1;
411  int k = i;
412 
413  if (me1a && zplus)
414  k = max - i - 1;
415  if (me1b && !zplus)
416  k = max - i - 1;
417 
418  if (sv[k].getStrip() != cv[i].getStrip()) {
419  std::cout << "In detId: " << s->first << std::endl;
420  std::cout << "Strips do not match: " << sv[k].getStrip() << " != " << cv[i].getStrip() << std::endl;
421  }
422  if (sv[k].getADCCounts().size() != cv[i].getADCCounts().size()) {
423  std::cout << "In detId: " << s->first << std::endl;
424  std::cout << "ADC Readouts not of equal size!" << std::endl;
425  std::cout << sv[k].getADCCounts().size() << ' ' << cv[i].getADCCounts().size() << std::endl;
426  } else {
427  std::vector<int> sADC = sv[k].getADCCounts();
428  std::vector<int> uADC = cv[i].getADCCounts();
429 
430  for (unsigned iadc = 0; iadc < sADC.size(); ++iadc)
431  if (sADC[iadc] != uADC[iadc]) {
432  std::cout << "In detId: " << s->first << std::endl;
433  std::cout << "ADC counts not equal at index: " << iadc << std::endl
434  << std::hex << sADC[iadc] << " != " << uADC[iadc] << std::dec << std::endl;
435  }
436  }
437  if (sv[k].getADCOverflow().size() != cv[i].getADCOverflow().size()) {
438  std::cout << "In detId: " << s->first << std::endl;
439  std::cout << "ADC Overflows not of equal size!" << std::endl;
440  std::cout << sv[k].getADCOverflow().size() << ' ' << cv[i].getADCOverflow().size() << std::endl;
441  } else {
442  std::vector<uint16_t> sADC = sv[k].getADCOverflow();
443  std::vector<uint16_t> uADC = cv[i].getADCOverflow();
444 
445  for (unsigned iadc = 0; iadc < sADC.size(); ++iadc)
446  if (sADC[iadc] != uADC[iadc]) {
447  std::cout << "In detId: " << s->first << std::endl;
448  std::cout << "ADC overflows not equal at index: " << iadc << std::endl
449  << std::hex << sADC[iadc] << " != " << uADC[iadc] << std::dec << std::endl;
450  }
451  }
452  if (sv[k].getOverlappedSample().size() != cv[i].getOverlappedSample().size()) {
453  std::cout << "In detId: " << s->first << std::endl;
454  std::cout << "Overlapped Samples not of equal size!" << std::endl;
455  std::cout << sv[k].getOverlappedSample().size() << ' ' << cv[i].getOverlappedSample().size() << std::endl;
456  } else {
457  std::vector<uint16_t> sADC = sv[k].getOverlappedSample();
458  std::vector<uint16_t> uADC = cv[i].getOverlappedSample();
459 
460  for (unsigned iadc = 0; iadc < sADC.size(); ++iadc)
461  if (sADC[iadc] != uADC[iadc]) {
462  std::cout << "In detId: " << s->first << std::endl;
463  std::cout << "Overlapped Samples not equal at index: " << iadc << std::endl
464  << std::hex << sADC[iadc] << " != " << uADC[iadc] << std::dec << std::endl;
465  }
466  }
467  if (sv[k].getErrorstat().size() != cv[i].getErrorstat().size()) {
468  std::cout << "In detId: " << s->first << std::endl;
469  std::cout << "Errorstat not of equal size!" << std::endl;
470  std::cout << sv[k].getErrorstat().size() << ' ' << cv[i].getErrorstat().size() << std::endl;
471  } else {
472  std::vector<uint16_t> sADC = sv[k].getErrorstat();
473  std::vector<uint16_t> uADC = cv[i].getErrorstat();
474 
475  for (unsigned iadc = 0; iadc < sADC.size(); ++iadc)
476  if (sADC[iadc] != uADC[iadc]) {
477  std::cout << "In detId: " << s->first << std::endl;
478  std::cout << "Errorstat not equal at index: " << iadc << std::endl
479  << std::hex << sADC[iadc] << " != " << uADC[iadc] << std::dec << std::endl;
480  }
481  }
482  if (sv[k].pedestal() != cv[i].pedestal()) {
483  std::cout << "In detId: " << s->first << std::endl;
484  std::cout << "Pedestals not equal: " << sv[k].pedestal() << " != " << cv[i].pedestal() << std::endl;
485  }
486  if (sv[k].amplitude() != cv[i].amplitude()) {
487  std::cout << "In detId: " << s->first << std::endl;
488  std::cout << "Amplitudes not equal: " << sv[k].amplitude() << " != " << cv[i].amplitude() << std::endl;
489  }
490  }
491  }
492  for (c = comps.begin(); c != comps.end(); ++c) {
493  if (c->second.first.size() != c->second.second.size()) {
494  std::cout << "Major error! # of comparator digis in detID: " << c->first
495  << " is not equal between sim and unpacked!" << std::endl;
496  //eventually do more in this case!
497 
498  std::vector<CSCComparatorDigi> a = c->second.second;
499  std::vector<CSCComparatorDigi> b = c->second.first;
500  std::cout << "SIM OUTPUT:" << std::endl;
501  for (std::vector<CSCComparatorDigi>::const_iterator i = a.begin(); i != a.end(); ++i)
502  i->print();
503  std::cout << "UNPACKER OUTPUT:" << std::endl;
504  for (std::vector<CSCComparatorDigi>::const_iterator i = b.begin(); i != b.end(); ++i)
505  i->print();
506  }
507  int max = std::min(c->second.first.size(), c->second.second.size());
508  std::vector<CSCComparatorDigi> cv = c->second.first;
509  std::vector<CSCComparatorDigi> sv = c->second.second;
510  for (int i = 0; i < max; ++i) {
511  if (sv[i].getStrip() != cv[i].getStrip()) {
512  std::cout << "In detId: " << s->first << std::endl;
513  std::cout << "Comparator strips do not match: " << sv[i].getStrip() << " != " << cv[i].getStrip() << std::endl;
514  }
515  if (sv[i].getComparator() != cv[i].getComparator()) {
516  std::cout << "In detId: " << c->first << std::endl;
517  std::cout << "Comparators do not match: " << sv[i].getComparator() << " != " << cv[i].getComparator()
518  << std::endl;
519  }
520  if (sv[i].getTimeBinWord() != cv[i].getTimeBinWord()) {
521  std::cout << "In detId: " << c->first << std::endl;
522  std::cout << "Comparator time bins words do not match: " << sv[i].getTimeBinWord()
523  << " != " << cv[i].getTimeBinWord() << std::endl;
524  }
525  }
526  }
527  for (cl = clcts.begin(); cl != clcts.end(); ++cl) {
528  if (cl->second.first.size() != cl->second.second.size()) {
529  std::cout << "Major error! # of CLCT digis in detID: " << cl->first << " is not equal between sim and unpacked!"
530  << std::endl;
531  //eventually do more in this case!
532 
533  std::vector<CSCCLCTDigi> a = cl->second.second;
534  std::vector<CSCCLCTDigi> b = cl->second.first;
535  std::cout << "SIM OUTPUT:" << std::endl;
536  for (std::vector<CSCCLCTDigi>::const_iterator i = a.begin(); i != a.end(); ++i)
537  i->print();
538  std::cout << "UNPACKER OUTPUT:" << std::endl;
539  for (std::vector<CSCCLCTDigi>::const_iterator i = b.begin(); i != b.end(); ++i)
540  i->print();
541  }
542  int max = std::min(cl->second.first.size(), cl->second.second.size());
543  std::vector<CSCCLCTDigi> cv = cl->second.first;
544  std::vector<CSCCLCTDigi> sv = cl->second.second;
545  for (int i = 0; i < max; ++i) {
546  if (cv[i].getKeyStrip() != sv[i].getKeyStrip()) {
547  std::cout << "In detId: " << cl->first << std::endl;
548  std::cout << "CLCT key strips do not match: " << sv[i].getKeyStrip() << " != " << cv[i].getKeyStrip()
549  << std::endl;
550  }
551  if (cv[i].getStrip() != sv[i].getStrip()) {
552  std::cout << "In detId: " << cl->first << std::endl;
553  std::cout << "CLCT strips do not match: " << sv[i].getStrip() << " != " << cv[i].getStrip() << std::endl;
554  }
555  if (cv[i].isValid() != sv[i].isValid()) {
556  std::cout << "In detId: " << cl->first << std::endl;
557  std::cout << "CLCT Valid bits do not match: " << sv[i].isValid() << " != " << cv[i].isValid() << std::endl;
558  }
559  if (cv[i].getQuality() != sv[i].getQuality()) {
560  std::cout << "In detId: " << cl->first << std::endl;
561  std::cout << "CLCT qualities do not match: " << sv[i].getQuality() << " != " << cv[i].getQuality() << std::endl;
562  }
563  if (cv[i].getPattern() != sv[i].getPattern()) {
564  std::cout << "In detId: " << cl->first << std::endl;
565  std::cout << "CLCT patterns do not match: " << sv[i].getPattern() << " != " << cv[i].getPattern() << std::endl;
566  }
567  if (cv[i].getStripType() != sv[i].getStripType()) {
568  std::cout << "In detId: " << cl->first << std::endl;
569  std::cout << "CLCT strip types do not match: " << sv[i].getStripType() << " != " << cv[i].getStripType()
570  << std::endl;
571  }
572  if (cv[i].getBend() != sv[i].getBend()) {
573  std::cout << "In detId: " << cl->first << std::endl;
574  std::cout << "CLCT bends do not match: " << sv[i].getBend() << " != " << cv[i].getBend() << std::endl;
575  }
576  if (cv[i].getCFEB() != sv[i].getCFEB()) {
577  std::cout << "In detId: " << cl->first << std::endl;
578  std::cout << "CLCT CFEBs do not match: " << sv[i].getCFEB() << " != " << cv[i].getCFEB() << std::endl;
579  }
580  if (((short)cv[i].getBX()) != ((short)sv[i].getBX()) - 4) {
581  std::cout << "In detId: " << cl->first << std::endl;
582  std::cout << "CLCT BX do not match: " << sv[i].getBX() - 4 << " != " << cv[i].getBX() << std::endl;
583  }
584  if (cv[i].getFullBX() != sv[i].getFullBX()) {
585  std::cout << "In detId: " << cl->first << std::endl;
586  std::cout << "CLCT Full BX do not match: " << sv[i].getFullBX() << " != " << cv[i].getFullBX() << std::endl;
587  }
588  if (cv[i].getTrknmb() != sv[i].getTrknmb()) {
589  std::cout << "In detId: " << cl->first << std::endl;
590  std::cout << "CLCT Track numbers do not match: " << sv[i].getTrknmb() << " != " << cv[i].getTrknmb()
591  << std::endl;
592  }
593  }
594  }
595  for (al = alcts.begin(); al != alcts.end(); ++al) {
596  if (al->second.first.size() != al->second.second.size()) {
597  std::cout << "Major error! # of ALCT digis in detID: " << al->first << " is not equal between sim and unpacked!"
598  << std::endl;
599  //eventually do more in this case!
600 
601  std::vector<CSCALCTDigi> a = al->second.second;
602  std::vector<CSCALCTDigi> b = al->second.first;
603  std::cout << "SIM OUTPUT:" << std::endl;
604  for (std::vector<CSCALCTDigi>::const_iterator i = a.begin(); i != a.end(); ++i)
605  i->print();
606  std::cout << "UNPACKER OUTPUT:" << std::endl;
607  for (std::vector<CSCALCTDigi>::const_iterator i = b.begin(); i != b.end(); ++i)
608  i->print();
609  }
610  int max = std::min(al->second.first.size(), al->second.second.size());
611  std::vector<CSCALCTDigi> cv = al->second.first;
612  std::vector<CSCALCTDigi> sv = al->second.second;
613  for (int i = 0; i < max; ++i) {
614  if (cv[i].getKeyWG() != sv[i].getKeyWG()) {
615  std::cout << "In detId: " << al->first << std::endl;
616  std::cout << "ALCT key wire groups do not match: " << sv[i].getKeyWG() << " != " << cv[i].getKeyWG()
617  << std::endl;
618  }
619  if (cv[i].isValid() != sv[i].isValid()) {
620  std::cout << "In detId: " << al->first << std::endl;
621  std::cout << "ALCT Valid bits do not match: " << sv[i].isValid() << " != " << cv[i].isValid() << std::endl;
622  }
623  if (cv[i].getQuality() != sv[i].getQuality()) {
624  std::cout << "In detId: " << al->first << std::endl;
625  std::cout << "ALCT qualities do not match: " << sv[i].getQuality() << " != " << cv[i].getQuality() << std::endl;
626  }
627  if (cv[i].getAccelerator() != sv[i].getAccelerator()) {
628  std::cout << "In detId: " << al->first << std::endl;
629  std::cout << "ALCT accelerator bits do not match: " << sv[i].getAccelerator()
630  << " != " << cv[i].getAccelerator() << std::endl;
631  }
632  if (cv[i].getCollisionB() != sv[i].getCollisionB()) {
633  std::cout << "In detId: " << al->first << std::endl;
634  std::cout << "ALCT CollisionB flags do not match: " << sv[i].getCollisionB() << " != " << cv[i].getCollisionB()
635  << std::endl;
636  }
637  if ((cv[i].getBX()) != (sv[i].getBX())) {
638  std::cout << "In detId: " << al->first << std::endl;
639  std::cout << "ALCT BX do not match: " << sv[i].getBX() << " != " << cv[i].getBX() << std::endl;
640  }
641  if (cv[i].getFullBX() != sv[i].getFullBX()) {
642  std::cout << "In detId: " << cl->first << std::endl;
643  std::cout << "ALCT Full BX do not match: " << sv[i].getFullBX() << " != " << cv[i].getFullBX() << std::endl;
644  }
645  }
646  }
647  for (lc = lcts.begin(); lc != lcts.end(); ++lc) {
648  if (lc->second.first.size() != lc->second.second.size()) {
649  std::cout << "Major error! # of Correlated LCT digis in detID: " << lc->first
650  << " is not equal between sim and unpacked!" << std::endl;
651  //eventually do more in this case!
652 
653  std::vector<CSCCorrelatedLCTDigi> a = lc->second.second;
654  std::vector<CSCCorrelatedLCTDigi> b = lc->second.first;
655  std::cout << "SIM OUTPUT:" << std::endl;
656  for (std::vector<CSCCorrelatedLCTDigi>::const_iterator i = a.begin(); i != a.end(); ++i)
657  i->print();
658  std::cout << "UNPACKER OUTPUT:" << std::endl;
659  for (std::vector<CSCCorrelatedLCTDigi>::const_iterator i = b.begin(); i != b.end(); ++i)
660  i->print();
661  }
662  int max = std::min(lc->second.first.size(), lc->second.second.size());
663  std::vector<CSCCorrelatedLCTDigi> cv = lc->second.first;
664  std::vector<CSCCorrelatedLCTDigi> sv = lc->second.second;
665  for (int i = 0; i < max; ++i) {
666  if (cv[i].getStrip() != sv[i].getStrip()) {
667  std::cout << "In detId: " << lc->first << std::endl;
668  std::cout << "Correlated LCT strips do not match: " << sv[i].getStrip() << " != " << cv[i].getStrip()
669  << std::endl;
670  }
671  if (cv[i].getKeyWG() != sv[i].getKeyWG()) {
672  std::cout << "In detId: " << lc->first << std::endl;
673  std::cout << "Correlated LCT key wire groups do not match: " << sv[i].getKeyWG() << " != " << cv[i].getKeyWG()
674  << std::endl;
675  }
676  if (cv[i].isValid() != sv[i].isValid()) {
677  std::cout << "In detId: " << lc->first << std::endl;
678  std::cout << "Correlated LCT Valid bits do not match: " << sv[i].isValid() << " != " << cv[i].isValid()
679  << std::endl;
680  }
681  if (cv[i].getQuality() != sv[i].getQuality()) {
682  std::cout << "In detId: " << lc->first << std::endl;
683  std::cout << "Correlated LCT qualities do not match: " << sv[i].getQuality() << " != " << cv[i].getQuality()
684  << std::endl;
685  }
686  if (cv[i].getPattern() != sv[i].getPattern()) {
687  std::cout << "In detId: " << lc->first << std::endl;
688  std::cout << "Correlated LCT ALCT patterns do not match: " << sv[i].getPattern() << " != " << cv[i].getPattern()
689  << std::endl;
690  }
691  if (cv[i].getCLCTPattern() != sv[i].getCLCTPattern()) {
692  std::cout << "In detId: " << lc->first << std::endl;
693  std::cout << "Correlated LCT CLCT patterns do not match: " << sv[i].getCLCTPattern()
694  << " != " << cv[i].getCLCTPattern() << std::endl;
695  }
696  if (cv[i].getStripType() != sv[i].getStripType()) {
697  std::cout << "In detId: " << lc->first << std::endl;
698  std::cout << "Correlated LCT strip types do not match: " << sv[i].getStripType()
699  << " != " << cv[i].getStripType() << std::endl;
700  }
701  if (cv[i].getBend() != sv[i].getBend()) {
702  std::cout << "In detId: " << lc->first << std::endl;
703  std::cout << "Correlated LCT bends do not match: " << sv[i].getBend() << " != " << cv[i].getBend() << std::endl;
704  }
705  if (cv[i].getMPCLink() != sv[i].getMPCLink()) {
706  std::cout << "In detId: " << lc->first << std::endl;
707  std::cout << "Correlated LCT MPC Links do not match: " << sv[i].getMPCLink() << " != " << cv[i].getMPCLink()
708  << std::endl;
709  }
710  if ((cv[i].getBX()) != (sv[i].getBX() - 6)) {
711  std::cout << "In detId: " << lc->first << std::endl;
712  std::cout << "Correlated LCT BX do not match: " << sv[i].getBX() - 6 << " != " << cv[i].getBX() << std::endl;
713  }
714  if (cv[i].getCSCID() != sv[i].getCSCID()) {
715  std::cout << "In detId: " << lc->first << std::endl;
716  std::cout << "Correlated LCT CSCIDs do not match: " << sv[i].getCSCID() << " != " << cv[i].getCSCID()
717  << std::endl;
718  }
719  if (cv[i].getBX0() != sv[i].getBX0()) {
720  std::cout << "In detId: " << lc->first << std::endl;
721  std::cout << "Correlated LCT BX0s do not match: " << sv[i].getBX0() << " != " << cv[i].getBX0() << std::endl;
722  }
723  if (cv[i].getSyncErr() != sv[i].getSyncErr()) {
724  std::cout << "In detId: " << lc->first << std::endl;
725  std::cout << "Correlated LCT SyncErrs do not match: " << sv[i].getSyncErr() << " != " << cv[i].getSyncErr()
726  << std::endl;
727  }
728  if (cv[i].getTrknmb() != sv[i].getTrknmb()) {
729  std::cout << "In detId: " << lc->first << std::endl;
730  std::cout << "Correlated LCT Track numbers do not match: " << sv[i].getTrknmb() << " != " << cv[i].getTrknmb()
731  << std::endl;
732  }
733  }
734  }
735  if (tracks.get().size() != simtracks.get().size()) {
736  std::cout << "Major error! # of L1 Tracks is not equal between sim and unpacked!" << std::endl;
737  std::vector<csc::L1Track> a = simtracks.get();
738  std::vector<csc::L1Track> b = tracks.get();
739  std::cout << "SIM OUTPUT:" << std::endl;
740  for (std::vector<csc::L1Track>::const_iterator i = a.begin(); i != a.end(); ++i)
741  i->print();
742  std::cout << "UNPACKER OUTPUT:" << std::endl;
743  for (std::vector<csc::L1Track>::const_iterator i = b.begin(); i != b.end(); ++i)
744  i->print();
745  }
746 
747  return _err;
748 }

References a, al1_token, al2_token, CustomPhysics_cfi::amplitude, b, c, cham_token, GetRecoTauVFromDQM_MC_cff::cl, cl1_token, cl2_token, fileCollector::cmp, co1_token, co2_token, gather_cfg::cout, cuy::cv, TauDecayModes::dec, MillePedeFileConverter_cfg::e, CSCTriggerContainer< T >::get(), edm::EventSetup::getHandle(), mps_fire::i, iEvent, sistrip::SpyUtilities::isValid(), dqmdumpme::k, SiStripPI::max, min(), EcalCondDBWriter_cfi::pedestal, edm::ESHandle< T >::product(), CSCTriggerContainer< T >::push_back(), relabelCompDigis(), relabelStripDigis(), alignCSCRings::s, sanitizeWireDigis(), sd1_token, sd2_token, edm::second(), findQualityFiles::size, DigiDM_cff::strips, pfDeepBoostedJetPreprocessParams_cfi::sv, tr1_token, tr2_token, tracks, ts1_token, ts2_token, w, wd1_token, wd2_token, DigiDM_cff::wires, zeroSupCompDigis(), zeroSupStripDigis(), and SurfaceOrientation::zplus.

◆ relabelCompDigis()

std::vector< CSCComparatorDigi > CSCDigiValidator::relabelCompDigis ( const CSCChamberMap m,
CSCDetId  _id,
std::vector< CSCComparatorDigi >::const_iterator  b,
std::vector< CSCComparatorDigi >::const_iterator  e 
)
private

Definition at line 802 of file CSCDigiValidator.cc.

805  {
806  std::vector<CSCComparatorDigi> _r; // the vector of comp digis with appropriate strip #'s
807 
808  bool me1a = _id.station() == 1 && _id.ring() == 4;
809  //bool zplus = _id.endcap()==1;
810  //bool me1b = _id.station()==1 && _id.ring()==1;
811 
812  for (std::vector<CSCComparatorDigi>::const_iterator i = b; i != e; ++i) {
813  int strip = i->getStrip();
814 
815  // if(me1a&&zplus) strip=17-strip;
816  // if(me1b&&!zplus) strip=65-strip;
817  if (me1a)
818  strip += 64;
819 
820  _r.push_back(CSCComparatorDigi(strip, i->getComparator(), i->getTimeBinWord()));
821  }
822  return _r;
823 }

References b, MillePedeFileConverter_cfg::e, mps_fire::i, CSCDetId::ring(), CSCDetId::station(), and digitizers_cfi::strip.

Referenced by filter().

◆ relabelStripDigis()

std::vector< CSCStripDigi > CSCDigiValidator::relabelStripDigis ( const CSCChamberMap m,
CSCDetId  _id,
std::vector< CSCStripDigi >::const_iterator  b,
std::vector< CSCStripDigi >::const_iterator  e 
)
private

Definition at line 779 of file CSCDigiValidator.cc.

782  {
783  std::vector<CSCStripDigi> _r; // the vector of strip digis with appropriate strip #'s
784 
785  //bool me1a = _id.station()==1 && _id.ring()==4;
786  //bool zplus = _id.endcap()==1;
787  //bool me1b = _id.station()==1 && _id.ring()==1;
788 
789  for (std::vector<CSCStripDigi>::const_iterator i = b; i != e; ++i) {
790  int strip = i->getStrip();
791 
792  //if(me1a&&zplus) strip=17-strip;
793  //if(me1b&&!zplus) strip=(65-strip-1)%(m->dmb(_id)*16) + 1;
794  //if(me1a) strip+=64;
795 
796  _r.push_back(
797  CSCStripDigi(strip, i->getADCCounts(), i->getADCOverflow(), i->getOverlappedSample(), i->getErrorstat()));
798  }
799  return _r;
800 }

References b, MillePedeFileConverter_cfg::e, mps_fire::i, and digitizers_cfi::strip.

Referenced by filter().

◆ sanitizeStripDigis()

std::vector< CSCStripDigi > CSCDigiValidator::sanitizeStripDigis ( std::vector< CSCStripDigi >::const_iterator  b,
std::vector< CSCStripDigi >::const_iterator  e 
)
private

Definition at line 825 of file CSCDigiValidator.cc.

826  {
827  std::vector<CSCStripDigi> _r; // vector of digis in proper order
828 
829  return _r;
830 }

◆ sanitizeWireDigis()

std::vector< CSCWireDigi > CSCDigiValidator::sanitizeWireDigis ( std::vector< CSCWireDigi >::const_iterator  b,
std::vector< CSCWireDigi >::const_iterator  e 
)
private

Definition at line 753 of file CSCDigiValidator.cc.

754  {
755  typedef std::map<int, std::vector<CSCWireDigi> > wire2digi;
756 
757  std::vector<CSCWireDigi> _r; // the resulting vector of wire digis
758  wire2digi _wr2digis; // map of wires to a set of digis
759 
760  for (std::vector<CSCWireDigi>::const_iterator i = b; i != e; ++i)
761  _wr2digis[i->getWireGroup()].push_back(*i);
762 
763  for (wire2digi::const_iterator i = _wr2digis.begin(); i != _wr2digis.end(); ++i) {
764  int wire = i->first;
765  unsigned tbin = 0x0;
766 
767  for (std::vector<CSCWireDigi>::const_iterator d = i->second.begin(); d != i->second.end(); ++d) {
768  std::vector<int> binson = d->getTimeBinsOn();
769  for (std::vector<int>::const_iterator t = binson.begin(); t != binson.end(); ++t)
770  tbin |= 1 << (*t);
771  }
772 
773  _r.push_back(CSCWireDigi(wire, tbin));
774  }
775 
776  return _r;
777 }

References b, ztail::d, MillePedeFileConverter_cfg::e, mps_fire::i, and submitPVValidationJobs::t.

Referenced by filter().

◆ zeroSupCompDigis()

std::vector< CSCComparatorDigi > CSCDigiValidator::zeroSupCompDigis ( std::vector< CSCComparatorDigi >::const_iterator  b,
std::vector< CSCComparatorDigi >::const_iterator  e 
)
private

Definition at line 852 of file CSCDigiValidator.cc.

853  {
854  std::vector<CSCComparatorDigi> _r;
855 
856  for (std::vector<CSCComparatorDigi>::const_iterator i = b; i != e; ++i) {
857  bool present = false;
858 
859  if (i->getTimeBin() < 10)
860  present = true;
861 
862  if (present)
863  _r.push_back(*i);
864  }
865 
866  return _r;
867 }

References b, MillePedeFileConverter_cfg::e, and mps_fire::i.

Referenced by filter().

◆ zeroSupStripDigis()

std::vector< CSCStripDigi > CSCDigiValidator::zeroSupStripDigis ( std::vector< CSCStripDigi >::const_iterator  b,
std::vector< CSCStripDigi >::const_iterator  e 
)
private

Definition at line 832 of file CSCDigiValidator.cc.

833  {
834  std::vector<CSCStripDigi> _r; // zero-suppressed strip digis
835  std::vector<int> counts;
836 
837  for (std::vector<CSCStripDigi>::const_iterator i = b; i != e; ++i) {
838  bool nonzero = false;
839  counts = i->getADCCounts();
840  for (std::vector<int>::const_iterator a = counts.begin(); a != counts.end(); ++a)
841  if ((*a) != 0)
842  nonzero = true;
843 
844  if (nonzero)
845  _r.push_back(*i);
846  }
847 
848  return _r;
849 }

References a, b, dqmiodumpmetadata::counts, MillePedeFileConverter_cfg::e, mps_fire::i, and beamvalidation::nonzero().

Referenced by filter().

Member Data Documentation

◆ al1_token

edm::EDGetTokenT<CSCALCTDigiCollection> CSCDigiValidator::al1_token
private

Definition at line 82 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ al2_token

edm::EDGetTokenT<CSCALCTDigiCollection> CSCDigiValidator::al2_token
private

Definition at line 91 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ alct1

edm::InputTag CSCDigiValidator::alct1
private

Definition at line 76 of file CSCDigiValidator.cc.

◆ alct2

edm::InputTag CSCDigiValidator::alct2
private

Definition at line 77 of file CSCDigiValidator.cc.

◆ cd1_token

edm::EDGetTokenT<CSCComparatorDigiCollection> CSCDigiValidator::cd1_token
private

Definition at line 81 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator().

◆ cd2_token

edm::EDGetTokenT<CSCComparatorDigiCollection> CSCDigiValidator::cd2_token
private

Definition at line 90 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator().

◆ cham_token

edm::ESGetToken<CSCChamberMap, CSCChamberMapRcd> CSCDigiValidator::cham_token
private

Definition at line 96 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ cl1_token

edm::EDGetTokenT<CSCCLCTDigiCollection> CSCDigiValidator::cl1_token
private

Definition at line 83 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ cl2_token

edm::EDGetTokenT<CSCCLCTDigiCollection> CSCDigiValidator::cl2_token
private

Definition at line 92 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ clct1

edm::InputTag CSCDigiValidator::clct1
private

Definition at line 76 of file CSCDigiValidator.cc.

◆ clct2

edm::InputTag CSCDigiValidator::clct2
private

Definition at line 77 of file CSCDigiValidator.cc.

◆ co1_token

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> CSCDigiValidator::co1_token
private

Definition at line 84 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ co2_token

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> CSCDigiValidator::co2_token
private

Definition at line 93 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ comp1

edm::InputTag CSCDigiValidator::comp1
private

Definition at line 76 of file CSCDigiValidator.cc.

◆ comp2

edm::InputTag CSCDigiValidator::comp2
private

Definition at line 77 of file CSCDigiValidator.cc.

◆ csctf1

edm::InputTag CSCDigiValidator::csctf1
private

Definition at line 76 of file CSCDigiValidator.cc.

◆ csctf2

edm::InputTag CSCDigiValidator::csctf2
private

Definition at line 77 of file CSCDigiValidator.cc.

◆ csctfstubs1

edm::InputTag CSCDigiValidator::csctfstubs1
private

Definition at line 76 of file CSCDigiValidator.cc.

◆ csctfstubs2

edm::InputTag CSCDigiValidator::csctfstubs2
private

Definition at line 77 of file CSCDigiValidator.cc.

◆ lct1

edm::InputTag CSCDigiValidator::lct1
private

Definition at line 76 of file CSCDigiValidator.cc.

◆ lct2

edm::InputTag CSCDigiValidator::lct2
private

Definition at line 77 of file CSCDigiValidator.cc.

◆ sd1_token

edm::EDGetTokenT<CSCStripDigiCollection> CSCDigiValidator::sd1_token
private

Definition at line 80 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ sd2_token

edm::EDGetTokenT<CSCStripDigiCollection> CSCDigiValidator::sd2_token
private

Definition at line 89 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ strip1

edm::InputTag CSCDigiValidator::strip1
private

Definition at line 76 of file CSCDigiValidator.cc.

◆ strip2

edm::InputTag CSCDigiValidator::strip2
private

Definition at line 77 of file CSCDigiValidator.cc.

◆ tr1_token

edm::EDGetTokenT<L1CSCTrackCollection> CSCDigiValidator::tr1_token
private

Definition at line 85 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ tr2_token

edm::EDGetTokenT<L1CSCTrackCollection> CSCDigiValidator::tr2_token
private

Definition at line 94 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ ts1_token

edm::EDGetTokenT<CSCTriggerContainer<csctf::TrackStub> > CSCDigiValidator::ts1_token
private

Definition at line 86 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ ts2_token

edm::EDGetTokenT<CSCTriggerContainer<csctf::TrackStub> > CSCDigiValidator::ts2_token
private

Definition at line 95 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ wd1_token

edm::EDGetTokenT<CSCWireDigiCollection> CSCDigiValidator::wd1_token
private

Definition at line 79 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ wd2_token

edm::EDGetTokenT<CSCWireDigiCollection> CSCDigiValidator::wd2_token
private

Definition at line 88 of file CSCDigiValidator.cc.

Referenced by CSCDigiValidator(), and filter().

◆ wire1

edm::InputTag CSCDigiValidator::wire1
private

Definition at line 76 of file CSCDigiValidator.cc.

◆ wire2

edm::InputTag CSCDigiValidator::wire2
private

Definition at line 77 of file CSCDigiValidator.cc.

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
CSCDigiValidator::wd1_token
edm::EDGetTokenT< CSCWireDigiCollection > wd1_token
Definition: CSCDigiValidator.cc:79
mps_fire.i
i
Definition: mps_fire.py:428
CustomPhysics_cfi.amplitude
amplitude
Definition: CustomPhysics_cfi.py:12
CSCDigiValidator::wd2_token
edm::EDGetTokenT< CSCWireDigiCollection > wd2_token
Definition: CSCDigiValidator.cc:88
cuy.cv
cv
Definition: cuy.py:364
CSCDigiValidator::ts1_token
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > ts1_token
Definition: CSCDigiValidator.cc:86
min
T min(T a, T b)
Definition: MathUtil.h:58
CSCDigiValidator::ts2_token
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > ts2_token
Definition: CSCDigiValidator.cc:95
edm
HLT enums.
Definition: AlignableModifier.h:19
CSCDetId::ring
int ring() const
Definition: CSCDetId.h:68
DigiDM_cff.wires
wires
Definition: DigiDM_cff.py:33
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
CSCDigiValidator::sd2_token
edm::EDGetTokenT< CSCStripDigiCollection > sd2_token
Definition: CSCDigiValidator.cc:89
gather_cfg.cout
cout
Definition: gather_cfg.py:144
CSCDigiValidator::co1_token
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co1_token
Definition: CSCDigiValidator.cc:84
CSCDigiValidator::cham_token
edm::ESGetToken< CSCChamberMap, CSCChamberMapRcd > cham_token
Definition: CSCDigiValidator.cc:96
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
CSCDigiValidator::cd2_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd2_token
Definition: CSCDigiValidator.cc:90
edm::Handle< CSCWireDigiCollection >
MuonDigiCollection::const_iterator
std::vector< DigiType >::const_iterator const_iterator
Definition: MuonDigiCollection.h:94
CSCDigiValidator::tr2_token
edm::EDGetTokenT< L1CSCTrackCollection > tr2_token
Definition: CSCDigiValidator.cc:94
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
CSCDigiValidator::sanitizeWireDigis
std::vector< CSCWireDigi > sanitizeWireDigis(std::vector< CSCWireDigi >::const_iterator, std::vector< CSCWireDigi >::const_iterator)
Definition: CSCDigiValidator.cc:753
alignCSCRings.s
s
Definition: alignCSCRings.py:92
CSCDigiValidator::zeroSupStripDigis
std::vector< CSCStripDigi > zeroSupStripDigis(std::vector< CSCStripDigi >::const_iterator, std::vector< CSCStripDigi >::const_iterator)
Definition: CSCDigiValidator.cc:832
CSCDigiValidator::relabelStripDigis
std::vector< CSCStripDigi > relabelStripDigis(const CSCChamberMap *, CSCDetId, std::vector< CSCStripDigi >::const_iterator, std::vector< CSCStripDigi >::const_iterator)
Definition: CSCDigiValidator.cc:779
w
const double w
Definition: UKUtility.cc:23
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:352
edm::ESHandle
Definition: DTSurvey.h:22
CSCComparatorDigi
Definition: CSCComparatorDigi.h:16
dqmdumpme.k
k
Definition: dqmdumpme.py:60
sistrip::SpyUtilities::isValid
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
Definition: SiStripSpyUtilities.cc:124
b
double b
Definition: hdecay.h:118
CSCDigiValidator::zeroSupCompDigis
std::vector< CSCComparatorDigi > zeroSupCompDigis(std::vector< CSCComparatorDigi >::const_iterator, std::vector< CSCComparatorDigi >::const_iterator)
Definition: CSCDigiValidator.cc:852
a
double a
Definition: hdecay.h:119
tracks
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
Definition: CAHitNtupletGeneratorKernelsImpl.h:159
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
CSCWireDigi
Definition: CSCWireDigi.h:14
CSCDigiValidator::cd1_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd1_token
Definition: CSCDigiValidator.cc:81
CSCDetId
Definition: CSCDetId.h:26
CSCChamberMap
Definition: CSCChamberMap.h:11
iEvent
int iEvent
Definition: GenABIO.cc:224
CSCDigiValidator::cl1_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl1_token
Definition: CSCDigiValidator.cc:83
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
EcalCondDBWriter_cfi.pedestal
pedestal
Definition: EcalCondDBWriter_cfi.py:49
beamvalidation.nonzero
def nonzero(self)
Definition: beamvalidation.py:41
CSCDigiValidator::relabelCompDigis
std::vector< CSCComparatorDigi > relabelCompDigis(const CSCChamberMap *m, CSCDetId _id, std::vector< CSCComparatorDigi >::const_iterator b, std::vector< CSCComparatorDigi >::const_iterator e)
Definition: CSCDigiValidator.cc:802
CSCDigiValidator::sd1_token
edm::EDGetTokenT< CSCStripDigiCollection > sd1_token
Definition: CSCDigiValidator.cc:80
CSCDigiValidator::cl2_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl2_token
Definition: CSCDigiValidator.cc:92
CSCStripDigi
Definition: CSCStripDigi.h:17
CSCDigiValidator::al1_token
edm::EDGetTokenT< CSCALCTDigiCollection > al1_token
Definition: CSCDigiValidator.cc:82
CSCDigiValidator::co2_token
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co2_token
Definition: CSCDigiValidator.cc:93
fileCollector.cmp
cmp
Definition: fileCollector.py:125
SurfaceOrientation::zplus
Definition: Surface.h:19
dqmiodumpmetadata.counts
counts
Definition: dqmiodumpmetadata.py:25
CSCTriggerContainer< csc::L1Track >
CSCTriggerContainer::push_back
void push_back(const T &data)
Definition: CSCTriggerContainer.h:51
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CSCDigiValidator::al2_token
edm::EDGetTokenT< CSCALCTDigiCollection > al2_token
Definition: CSCDigiValidator.cc:91
CSCDigiValidator::tr1_token
edm::EDGetTokenT< L1CSCTrackCollection > tr1_token
Definition: CSCDigiValidator.cc:85
ztail.d
d
Definition: ztail.py:151
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
DigiContainerIterator
Definition: MuonDigiCollection.h:30
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
edm::InputTag
Definition: InputTag.h:15
DigiDM_cff.strips
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers....
Definition: DigiDM_cff.py:32
CSCTriggerContainer::get
std::vector< T > get() const
Definition: CSCTriggerContainer.h:83
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37