CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
CSCDigiValidator Class Reference

#include <UserCode/CSCDigiValidator/src/CSCDigiValidator.cc>

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
 
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 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::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
 
bool reorderStrips
 
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 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>
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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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 35 of file CSCDigiValidator.h.

Constructor & Destructor Documentation

◆ CSCDigiValidator()

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

Definition at line 25 of file CSCDigiValidator.cc.

25  {
26  wd1_token = consumes<CSCWireDigiCollection>(iConfig.getParameter<edm::InputTag>("inputWire"));
27  wd2_token = consumes<CSCWireDigiCollection>(iConfig.getParameter<edm::InputTag>("repackWire"));
28  sd1_token = consumes<CSCStripDigiCollection>(iConfig.getParameter<edm::InputTag>("inputStrip"));
29  sd2_token = consumes<CSCStripDigiCollection>(iConfig.getParameter<edm::InputTag>("inputStrip"));
30  cd1_token = consumes<CSCComparatorDigiCollection>(iConfig.getParameter<edm::InputTag>("inputComp"));
31  cd2_token = consumes<CSCComparatorDigiCollection>(iConfig.getParameter<edm::InputTag>("RepackComp"));
32  al1_token = consumes<CSCALCTDigiCollection>(iConfig.getParameter<edm::InputTag>("inputALCT"));
33  al2_token = consumes<CSCALCTDigiCollection>(iConfig.getParameter<edm::InputTag>("repackALCT"));
34  cl1_token = consumes<CSCCLCTDigiCollection>(iConfig.getParameter<edm::InputTag>("inputCLCT"));
35  cl2_token = consumes<CSCCLCTDigiCollection>(iConfig.getParameter<edm::InputTag>("repackCLCT"));
36  co1_token = consumes<CSCCorrelatedLCTDigiCollection>(iConfig.getParameter<edm::InputTag>("inputCorrLCT"));
37  co2_token = consumes<CSCCorrelatedLCTDigiCollection>(iConfig.getParameter<edm::InputTag>("repackCorrLCT"));
38  tr1_token = consumes<L1CSCTrackCollection>(iConfig.getParameter<edm::InputTag>("inputCSCTF"));
39  tr2_token = consumes<L1CSCTrackCollection>(iConfig.getParameter<edm::InputTag>("repackCSCTF"));
40  ts1_token = consumes<CSCTriggerContainer<csctf::TrackStub> >(iConfig.getParameter<edm::InputTag>("inputCSCTFStubs"));
41  ts2_token = consumes<CSCTriggerContainer<csctf::TrackStub> >(iConfig.getParameter<edm::InputTag>("repackCSCTFStubs"));
42 
43  // reorderStrips(iConfig.getUntrackedParameter<bool>("applyStripReordering",true))
44 }

References al1_token, al2_token, cd1_token, cd2_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 46 of file CSCDigiValidator.cc.

46 {}

Member Function Documentation

◆ beginJob()

void CSCDigiValidator::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 797 of file CSCDigiValidator.cc.

797 {}

◆ endJob()

void CSCDigiValidator::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 799 of file CSCDigiValidator.cc.

799 {}

◆ filter()

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

Implements edm::EDFilter.

Definition at line 48 of file CSCDigiValidator.cc.

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

References a, al1_token, al2_token, CustomPhysics_cfi::amplitude, b, HltBtagPostValidation_cff::c, 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::get(), get, mps_fire::i, iEvent, 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, PDWG_EXOHSCP_cff::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 730 of file CSCDigiValidator.cc.

733  {
734  std::vector<CSCComparatorDigi> _r; // the vector of comp digis with appropriate strip #'s
735 
736  bool me1a = _id.station() == 1 && _id.ring() == 4;
737  //bool zplus = _id.endcap()==1;
738  //bool me1b = _id.station()==1 && _id.ring()==1;
739 
740  for (std::vector<CSCComparatorDigi>::const_iterator i = b; i != e; ++i) {
741  int strip = i->getStrip();
742 
743  // if(me1a&&zplus) strip=17-strip;
744  // if(me1b&&!zplus) strip=65-strip;
745  if (me1a)
746  strip += 64;
747 
748  _r.push_back(CSCComparatorDigi(strip, i->getComparator(), i->getTimeBinWord()));
749  }
750  return _r;
751 }

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 707 of file CSCDigiValidator.cc.

710  {
711  std::vector<CSCStripDigi> _r; // the vector of strip digis with appropriate strip #'s
712 
713  //bool me1a = _id.station()==1 && _id.ring()==4;
714  //bool zplus = _id.endcap()==1;
715  //bool me1b = _id.station()==1 && _id.ring()==1;
716 
717  for (std::vector<CSCStripDigi>::const_iterator i = b; i != e; ++i) {
718  int strip = i->getStrip();
719 
720  //if(me1a&&zplus) strip=17-strip;
721  //if(me1b&&!zplus) strip=(65-strip-1)%(m->dmb(_id)*16) + 1;
722  //if(me1a) strip+=64;
723 
724  _r.push_back(
725  CSCStripDigi(strip, i->getADCCounts(), i->getADCOverflow(), i->getOverlappedSample(), i->getErrorstat()));
726  }
727  return _r;
728 }

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 753 of file CSCDigiValidator.cc.

754  {
755  std::vector<CSCStripDigi> _r; // vector of digis in proper order
756 
757  return _r;
758 }

◆ sanitizeWireDigis()

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

Definition at line 681 of file CSCDigiValidator.cc.

682  {
683  typedef std::map<int, std::vector<CSCWireDigi> > wire2digi;
684 
685  std::vector<CSCWireDigi> _r; // the resulting vector of wire digis
686  wire2digi _wr2digis; // map of wires to a set of digis
687 
688  for (std::vector<CSCWireDigi>::const_iterator i = b; i != e; ++i)
689  _wr2digis[i->getWireGroup()].push_back(*i);
690 
691  for (wire2digi::const_iterator i = _wr2digis.begin(); i != _wr2digis.end(); ++i) {
692  int wire = i->first;
693  unsigned tbin = 0x0;
694 
695  for (std::vector<CSCWireDigi>::const_iterator d = i->second.begin(); d != i->second.end(); ++d) {
696  std::vector<int> binson = d->getTimeBinsOn();
697  for (std::vector<int>::const_iterator t = binson.begin(); t != binson.end(); ++t)
698  tbin |= 1 << (*t);
699  }
700 
701  _r.push_back(CSCWireDigi(wire, tbin));
702  }
703 
704  return _r;
705 }

References b, ztail::d, MillePedeFileConverter_cfg::e, mps_fire::i, and OrderedSet::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 780 of file CSCDigiValidator.cc.

781  {
782  std::vector<CSCComparatorDigi> _r;
783 
784  for (std::vector<CSCComparatorDigi>::const_iterator i = b; i != e; ++i) {
785  bool present = false;
786 
787  if (i->getTimeBin() < 10)
788  present = true;
789 
790  if (present)
791  _r.push_back(*i);
792  }
793 
794  return _r;
795 }

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 760 of file CSCDigiValidator.cc.

761  {
762  std::vector<CSCStripDigi> _r; // zero-suppressed strip digis
763  std::vector<int> counts;
764 
765  for (std::vector<CSCStripDigi>::const_iterator i = b; i != e; ++i) {
766  bool nonzero = false;
767  counts = i->getADCCounts();
768  for (std::vector<int>::const_iterator a = counts.begin(); a != counts.end(); ++a)
769  if ((*a) != 0)
770  nonzero = true;
771 
772  if (nonzero)
773  _r.push_back(*i);
774  }
775 
776  return _r;
777 }

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 71 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ al2_token

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

Definition at line 80 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ alct1

edm::InputTag CSCDigiValidator::alct1
private

Definition at line 63 of file CSCDigiValidator.h.

◆ alct2

edm::InputTag CSCDigiValidator::alct2
private

Definition at line 64 of file CSCDigiValidator.h.

◆ cd1_token

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

Definition at line 70 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator().

◆ cd2_token

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

Definition at line 79 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator().

◆ cl1_token

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

Definition at line 72 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ cl2_token

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

Definition at line 81 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ clct1

edm::InputTag CSCDigiValidator::clct1
private

Definition at line 63 of file CSCDigiValidator.h.

◆ clct2

edm::InputTag CSCDigiValidator::clct2
private

Definition at line 64 of file CSCDigiValidator.h.

◆ co1_token

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

Definition at line 73 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ co2_token

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

Definition at line 82 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ comp1

edm::InputTag CSCDigiValidator::comp1
private

Definition at line 63 of file CSCDigiValidator.h.

◆ comp2

edm::InputTag CSCDigiValidator::comp2
private

Definition at line 64 of file CSCDigiValidator.h.

◆ csctf1

edm::InputTag CSCDigiValidator::csctf1
private

Definition at line 63 of file CSCDigiValidator.h.

◆ csctf2

edm::InputTag CSCDigiValidator::csctf2
private

Definition at line 64 of file CSCDigiValidator.h.

◆ csctfstubs1

edm::InputTag CSCDigiValidator::csctfstubs1
private

Definition at line 63 of file CSCDigiValidator.h.

◆ csctfstubs2

edm::InputTag CSCDigiValidator::csctfstubs2
private

Definition at line 64 of file CSCDigiValidator.h.

◆ lct1

edm::InputTag CSCDigiValidator::lct1
private

Definition at line 63 of file CSCDigiValidator.h.

◆ lct2

edm::InputTag CSCDigiValidator::lct2
private

Definition at line 64 of file CSCDigiValidator.h.

◆ reorderStrips

bool CSCDigiValidator::reorderStrips
private

Definition at line 66 of file CSCDigiValidator.h.

◆ sd1_token

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

Definition at line 69 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ sd2_token

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

Definition at line 78 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ strip1

edm::InputTag CSCDigiValidator::strip1
private

Definition at line 63 of file CSCDigiValidator.h.

◆ strip2

edm::InputTag CSCDigiValidator::strip2
private

Definition at line 64 of file CSCDigiValidator.h.

◆ tr1_token

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

Definition at line 74 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ tr2_token

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

Definition at line 83 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ ts1_token

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

Definition at line 75 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ ts2_token

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

Definition at line 84 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ wd1_token

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

Definition at line 68 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ wd2_token

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

Definition at line 77 of file CSCDigiValidator.h.

Referenced by CSCDigiValidator(), and filter().

◆ wire1

edm::InputTag CSCDigiValidator::wire1
private

Definition at line 63 of file CSCDigiValidator.h.

◆ wire2

edm::InputTag CSCDigiValidator::wire2
private

Definition at line 64 of file CSCDigiValidator.h.

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
CSCDigiValidator::wd1_token
edm::EDGetTokenT< CSCWireDigiCollection > wd1_token
Definition: CSCDigiValidator.h:68
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
mps_fire.i
i
Definition: mps_fire.py:355
CustomPhysics_cfi.amplitude
amplitude
Definition: CustomPhysics_cfi.py:12
CSCDigiValidator::wd2_token
edm::EDGetTokenT< CSCWireDigiCollection > wd2_token
Definition: CSCDigiValidator.h:77
cuy.cv
cv
Definition: cuy.py:364
CSCDigiValidator::ts1_token
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > ts1_token
Definition: CSCDigiValidator.h:75
min
T min(T a, T b)
Definition: MathUtil.h:58
CSCDigiValidator::ts2_token
edm::EDGetTokenT< CSCTriggerContainer< csctf::TrackStub > > ts2_token
Definition: CSCDigiValidator.h:84
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.h:78
gather_cfg.cout
cout
Definition: gather_cfg.py:144
CSCDigiValidator::co1_token
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co1_token
Definition: CSCDigiValidator.h:73
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
CSCDigiValidator::cd2_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd2_token
Definition: CSCDigiValidator.h:79
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.h:83
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:681
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:760
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
CSCDigiValidator::relabelStripDigis
std::vector< CSCStripDigi > relabelStripDigis(const CSCChamberMap *, CSCDetId, std::vector< CSCStripDigi >::const_iterator, std::vector< CSCStripDigi >::const_iterator)
Definition: CSCDigiValidator.cc:707
w
const double w
Definition: UKUtility.cc:23
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:226
edm::ESHandle
Definition: DTSurvey.h:22
CSCComparatorDigi
Definition: CSCComparatorDigi.h:16
dqmdumpme.k
k
Definition: dqmdumpme.py:60
OrderedSet.t
t
Definition: OrderedSet.py:90
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:780
a
double a
Definition: hdecay.h:119
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
CSCWireDigi
Definition: CSCWireDigi.h:14
CSCDigiValidator::cd1_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd1_token
Definition: CSCDigiValidator.h:70
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.h:72
EcalCondDBWriter_cfi.pedestal
pedestal
Definition: EcalCondDBWriter_cfi.py:49
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
get
#define get
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:730
CSCDigiValidator::sd1_token
edm::EDGetTokenT< CSCStripDigiCollection > sd1_token
Definition: CSCDigiValidator.h:69
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
CSCDigiValidator::cl2_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl2_token
Definition: CSCDigiValidator.h:81
CSCStripDigi
Definition: CSCStripDigi.h:17
CSCDigiValidator::al1_token
edm::EDGetTokenT< CSCALCTDigiCollection > al1_token
Definition: CSCDigiValidator.h:71
CSCDigiValidator::co2_token
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co2_token
Definition: CSCDigiValidator.h:82
fileCollector.cmp
cmp
Definition: fileCollector.py:125
CSCChamberMapRcd
Definition: CSCChamberMapRcd.h:5
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
CSCDigiValidator::al2_token
edm::EDGetTokenT< CSCALCTDigiCollection > al2_token
Definition: CSCDigiValidator.h:80
CSCDigiValidator::tr1_token
edm::EDGetTokenT< L1CSCTrackCollection > tr1_token
Definition: CSCDigiValidator.h:74
ztail.d
d
Definition: ztail.py:151
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
DigiContainerIterator
Definition: MuonDigiCollection.h:30
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