CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
ShallowClustersProducer Class Reference
Inheritance diagram for ShallowClustersProducer:
edm::stream::EDProducer<>

Classes

struct  moduleVars
 
struct  NearDigis
 

Public Member Functions

 ShallowClustersProducer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 

Private Attributes

std::string Prefix
 
SiStripClusterInfo siStripClusterInfo_
 
edm::InputTag theClustersLabel
 
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > theClustersToken_
 
edm::EDGetTokenT< edm::DetSetVector< SiStripProcessedRawDigi > > theDigisToken_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtopoToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 18 of file ShallowClustersProducer.cc.

Constructor & Destructor Documentation

◆ ShallowClustersProducer()

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

Definition at line 52 of file ShallowClustersProducer.cc.

53  : Prefix(iConfig.getParameter<std::string>("Prefix")),
54  topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd>()),
55  siStripClusterInfo_(consumesCollector()) {
56  produces<std::vector<unsigned>>(Prefix + "number");
57  produces<std::vector<unsigned>>(Prefix + "width");
58  produces<std::vector<float>>(Prefix + "variance");
59  produces<std::vector<float>>(Prefix + "barystrip");
60  produces<std::vector<float>>(Prefix + "middlestrip");
61  produces<std::vector<unsigned>>(Prefix + "charge");
62  produces<std::vector<float>>(Prefix + "noise");
63  produces<std::vector<float>>(Prefix + "ston");
64  produces<std::vector<unsigned>>(Prefix + "seedstrip");
65  produces<std::vector<unsigned>>(Prefix + "seedindex");
66  produces<std::vector<unsigned>>(Prefix + "seedcharge");
67  produces<std::vector<float>>(Prefix + "seednoise");
68  produces<std::vector<float>>(Prefix + "seedgain");
69  produces<std::vector<unsigned>>(Prefix + "qualityisbad");
70 
71  produces<std::vector<float>>(Prefix + "rawchargeC");
72  produces<std::vector<float>>(Prefix + "rawchargeL");
73  produces<std::vector<float>>(Prefix + "rawchargeR");
74  produces<std::vector<float>>(Prefix + "rawchargeLL");
75  produces<std::vector<float>>(Prefix + "rawchargeRR");
76  produces<std::vector<float>>(Prefix + "eta");
77  produces<std::vector<float>>(Prefix + "foldedeta");
78  produces<std::vector<float>>(Prefix + "etaX");
79  produces<std::vector<float>>(Prefix + "etaasymm");
80  produces<std::vector<float>>(Prefix + "outsideasymm");
81  produces<std::vector<float>>(Prefix + "neweta");
82  produces<std::vector<float>>(Prefix + "newetaerr");
83 
84  produces<std::vector<unsigned>>(Prefix + "detid");
85  produces<std::vector<int>>(Prefix + "subdetid");
86  produces<std::vector<int>>(Prefix + "module");
87  produces<std::vector<int>>(Prefix + "side");
88  produces<std::vector<int>>(Prefix + "layerwheel");
89  produces<std::vector<int>>(Prefix + "stringringrod");
90  produces<std::vector<int>>(Prefix + "petal");
91  produces<std::vector<int>>(Prefix + "stereo");
92 
93  theClustersToken_ = consumes<edmNew::DetSetVector<SiStripCluster>>(iConfig.getParameter<edm::InputTag>("Clusters"));
94  theDigisToken_ = consumes<edm::DetSetVector<SiStripProcessedRawDigi>>(edm::InputTag("siStripProcessedRawDigis", ""));
95 }

References edm::ParameterSet::getParameter(), HLT_FULL_cff::InputTag, Prefix, theClustersToken_, and theDigisToken_.

Member Function Documentation

◆ produce()

void ShallowClustersProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 97 of file ShallowClustersProducer.cc.

97  {
98  //Retrieve tracker topology from geometry
100  const TrackerTopology* const tTopo = tTopoHandle.product();
101 
103 
104  auto number = std::make_unique<std::vector<unsigned>>(7, 0);
105  auto width = std::make_unique<std::vector<unsigned>>();
106  auto variance = std::make_unique<std::vector<float>>();
107  auto barystrip = std::make_unique<std::vector<float>>();
108  auto middlestrip = std::make_unique<std::vector<float>>();
109  auto charge = std::make_unique<std::vector<unsigned>>();
110  auto noise = std::make_unique<std::vector<float>>();
111  auto ston = std::make_unique<std::vector<float>>();
112  auto seedstrip = std::make_unique<std::vector<unsigned>>();
113  auto seedindex = std::make_unique<std::vector<unsigned>>();
114  auto seedcharge = std::make_unique<std::vector<unsigned>>();
115  auto seednoise = std::make_unique<std::vector<float>>();
116  auto seedgain = std::make_unique<std::vector<float>>();
117  auto qualityisbad = std::make_unique<std::vector<unsigned>>();
118 
119  auto rawchargeC = std::make_unique<std::vector<float>>();
120  auto rawchargeL = std::make_unique<std::vector<float>>();
121  auto rawchargeR = std::make_unique<std::vector<float>>();
122  auto rawchargeLL = std::make_unique<std::vector<float>>();
123  auto rawchargeRR = std::make_unique<std::vector<float>>();
124  auto etaX = std::make_unique<std::vector<float>>();
125  auto eta = std::make_unique<std::vector<float>>();
126  auto foldedeta = std::make_unique<std::vector<float>>();
127  auto etaasymm = std::make_unique<std::vector<float>>();
128  auto outsideasymm = std::make_unique<std::vector<float>>();
129  auto neweta = std::make_unique<std::vector<float>>();
130  auto newetaerr = std::make_unique<std::vector<float>>();
131 
132  auto detid = std::make_unique<std::vector<unsigned>>();
133  auto subdetid = std::make_unique<std::vector<int>>();
134  auto side = std::make_unique<std::vector<int>>();
135  auto module = std::make_unique<std::vector<int>>();
136  auto layerwheel = std::make_unique<std::vector<int>>();
137  auto stringringrod = std::make_unique<std::vector<int>>();
138  auto petal = std::make_unique<std::vector<int>>();
139  auto stereo = std::make_unique<std::vector<int>>();
140 
142  // iEvent.getByLabel(theClustersLabel, clusters);
143  iEvent.getByToken(theClustersToken_, clusters);
144 
146  // iEvent.getByLabel("siStripProcessedRawDigis", "", rawProcessedDigis);
147  iEvent.getByToken(theDigisToken_, rawProcessedDigis);
148 
150  for (; itClusters != clusters->end(); ++itClusters) {
151  uint32_t id = itClusters->id();
152  const moduleVars moduleV(id, tTopo);
153  for (edmNew::DetSet<SiStripCluster>::const_iterator cluster = itClusters->begin(); cluster != itClusters->end();
154  ++cluster) {
155  siStripClusterInfo_.setCluster(*cluster, id);
157  const NearDigis digis = rawProcessedDigis.isValid() ? NearDigis(info, *rawProcessedDigis) : NearDigis(info);
158 
159  (number->at(0))++;
160  (number->at(moduleV.subdetid))++;
161  width->push_back(cluster->amplitudes().size());
162  barystrip->push_back(cluster->barycenter());
163  variance->push_back(info.variance());
164  middlestrip->push_back(info.firstStrip() + info.width() / 2.0);
165  charge->push_back(info.charge());
166  noise->push_back(info.noiseRescaledByGain());
167  ston->push_back(info.signalOverNoise());
168  seedstrip->push_back(info.maxStrip());
169  seedindex->push_back(info.maxIndex());
170  seedcharge->push_back(info.maxCharge());
171  seednoise->push_back(info.stripNoisesRescaledByGain().at(info.maxIndex()));
172  seedgain->push_back(info.stripGains().at(info.maxIndex()));
173  qualityisbad->push_back(info.IsAnythingBad());
174 
175  rawchargeC->push_back(digis.max);
176  rawchargeL->push_back(digis.left);
177  rawchargeR->push_back(digis.right);
178  rawchargeLL->push_back(digis.Lleft);
179  rawchargeRR->push_back(digis.Rright);
180  etaX->push_back(digis.etaX());
181  eta->push_back(digis.eta());
182  etaasymm->push_back(digis.etaasymm());
183  outsideasymm->push_back(digis.outsideasymm());
184  neweta->push_back((digis.last - digis.first) / info.charge());
185  newetaerr->push_back((sqrt(digis.last + digis.first)) / pow(info.charge(), 1.5));
186 
187  detid->push_back(id);
188  subdetid->push_back(moduleV.subdetid);
189  side->push_back(moduleV.side);
190  module->push_back(moduleV.module);
191  layerwheel->push_back(moduleV.layerwheel);
192  stringringrod->push_back(moduleV.stringringrod);
193  petal->push_back(moduleV.petal);
194  stereo->push_back(moduleV.stereo);
195  }
196  }
197 
198  iEvent.put(std::move(number), Prefix + "number");
199  iEvent.put(std::move(width), Prefix + "width");
200  iEvent.put(std::move(variance), Prefix + "variance");
201  iEvent.put(std::move(barystrip), Prefix + "barystrip");
202  iEvent.put(std::move(middlestrip), Prefix + "middlestrip");
203  iEvent.put(std::move(charge), Prefix + "charge");
204  iEvent.put(std::move(noise), Prefix + "noise");
205  iEvent.put(std::move(ston), Prefix + "ston");
206  iEvent.put(std::move(seedstrip), Prefix + "seedstrip");
207  iEvent.put(std::move(seedindex), Prefix + "seedindex");
208  iEvent.put(std::move(seedcharge), Prefix + "seedcharge");
209  iEvent.put(std::move(seednoise), Prefix + "seednoise");
210  iEvent.put(std::move(seedgain), Prefix + "seedgain");
211  iEvent.put(std::move(qualityisbad), Prefix + "qualityisbad");
212 
213  iEvent.put(std::move(rawchargeC), Prefix + "rawchargeC");
214  iEvent.put(std::move(rawchargeL), Prefix + "rawchargeL");
215  iEvent.put(std::move(rawchargeR), Prefix + "rawchargeR");
216  iEvent.put(std::move(rawchargeLL), Prefix + "rawchargeLL");
217  iEvent.put(std::move(rawchargeRR), Prefix + "rawchargeRR");
218  iEvent.put(std::move(etaX), Prefix + "etaX");
219  iEvent.put(std::move(eta), Prefix + "eta");
220  iEvent.put(std::move(foldedeta), Prefix + "foldedeta");
221  iEvent.put(std::move(etaasymm), Prefix + "etaasymm");
222  iEvent.put(std::move(outsideasymm), Prefix + "outsideasymm");
223  iEvent.put(std::move(neweta), Prefix + "neweta");
224  iEvent.put(std::move(newetaerr), Prefix + "newetaerr");
225 
226  iEvent.put(std::move(detid), Prefix + "detid");
227  iEvent.put(std::move(subdetid), Prefix + "subdetid");
228  iEvent.put(std::move(module), Prefix + "module");
229  iEvent.put(std::move(side), Prefix + "side");
230  iEvent.put(std::move(layerwheel), Prefix + "layerwheel");
231  iEvent.put(std::move(stringringrod), Prefix + "stringringrod");
232  iEvent.put(std::move(petal), Prefix + "petal");
233  iEvent.put(std::move(stereo), Prefix + "stereo");
234 }

References edmNew::DetSetVector< T >::begin(), ALCARECOTkAlJpsiMuMu_cff::charge, bsc_activity_cfg::clusters, edmNew::DetSetVector< T >::end(), ShallowClustersProducer::NearDigis::eta(), PVValHelper::eta, ShallowClustersProducer::NearDigis::etaasymm(), ShallowClustersProducer::NearDigis::etaX(), ShallowClustersProducer::NearDigis::first, edm::EventSetup::getHandle(), edmNew::DetSetVector< T >::id(), iEvent, info(), SiStripClusterInfo::initEvent(), edm::HandleBase::isValid(), ShallowClustersProducer::NearDigis::last, ShallowClustersProducer::moduleVars::layerwheel, ShallowClustersProducer::NearDigis::left, ShallowClustersProducer::NearDigis::Lleft, ShallowClustersProducer::NearDigis::max, ShallowClustersProducer::moduleVars::module, eostools::move(), hgcalDigitizer_cfi::noise, contentValuesFiles::number, ShallowClustersProducer::NearDigis::outsideasymm(), ShallowClustersProducer::moduleVars::petal, funct::pow(), Prefix, edm::ESHandle< T >::product(), ShallowClustersProducer::NearDigis::right, ShallowClustersProducer::NearDigis::Rright, SiStripClusterInfo::setCluster(), ShallowClustersProducer::moduleVars::side, siStripClusterInfo_, mathSSE::sqrt(), ShallowClustersProducer::moduleVars::stereo, ShallowClustersProducer::moduleVars::stringringrod, ShallowClustersProducer::moduleVars::subdetid, theClustersToken_, theDigisToken_, topoToken_, and ApeEstimator_cff::width.

Member Data Documentation

◆ Prefix

std::string ShallowClustersProducer::Prefix
private

Definition at line 24 of file ShallowClustersProducer.cc.

Referenced by produce(), and ShallowClustersProducer().

◆ siStripClusterInfo_

SiStripClusterInfo ShallowClustersProducer::siStripClusterInfo_
private

Definition at line 46 of file ShallowClustersProducer.cc.

Referenced by produce().

◆ theClustersLabel

edm::InputTag ShallowClustersProducer::theClustersLabel
private

Definition at line 23 of file ShallowClustersProducer.cc.

◆ theClustersToken_

edm::EDGetTokenT<edmNew::DetSetVector<SiStripCluster> > ShallowClustersProducer::theClustersToken_
private

Definition at line 44 of file ShallowClustersProducer.cc.

Referenced by produce(), and ShallowClustersProducer().

◆ theDigisToken_

edm::EDGetTokenT<edm::DetSetVector<SiStripProcessedRawDigi> > ShallowClustersProducer::theDigisToken_
private

Definition at line 45 of file ShallowClustersProducer.cc.

Referenced by produce(), and ShallowClustersProducer().

◆ topoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> ShallowClustersProducer::topoToken_
private

Definition at line 43 of file ShallowClustersProducer.cc.

Referenced by produce().

SiStripClusterInfo
Definition: SiStripClusterInfo.h:21
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
edmNew::DetSetVector::id
id_type id(size_t cell) const
Definition: DetSetVectorNew.h:564
ShallowClustersProducer::topoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: ShallowClustersProducer.cc:43
TrackerTopology
Definition: TrackerTopology.h:16
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
edmNew::DetSetVector::const_iterator
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
Definition: DetSetVectorNew.h:197
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
edmNew::DetSetVector::begin
const_iterator begin(bool update=false) const
Definition: DetSetVectorNew.h:530
edm::Handle
Definition: AssociativeIterator.h:50
contentValuesFiles.number
number
Definition: contentValuesFiles.py:53
PVValHelper::eta
Definition: PVValidationHelpers.h:69
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
edm::ESHandle< TrackerTopology >
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
SiStripClusterInfo::setCluster
void setCluster(const SiStripCluster &cluster, int detId)
Definition: SiStripClusterInfo.cc:16
hgcalDigitizer_cfi.noise
noise
Definition: hgcalDigitizer_cfi.py:155
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:148
ShallowClustersProducer::Prefix
std::string Prefix
Definition: ShallowClustersProducer.cc:24
ShallowClustersProducer::theClustersToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > theClustersToken_
Definition: ShallowClustersProducer.cc:44
SiStripClusterInfo::initEvent
void initEvent(const edm::EventSetup &iSetup)
Definition: SiStripClusterInfo.cc:10
eostools.move
def move(src, dest)
Definition: eostools.py:511
edmNew::DetSetVector::end
const_iterator end(bool update=false) const
Definition: DetSetVectorNew.h:535
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ShallowClustersProducer::theDigisToken_
edm::EDGetTokenT< edm::DetSetVector< SiStripProcessedRawDigi > > theDigisToken_
Definition: ShallowClustersProducer.cc:45
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::InputTag
Definition: InputTag.h:15
ShallowClustersProducer::siStripClusterInfo_
SiStripClusterInfo siStripClusterInfo_
Definition: ShallowClustersProducer.cc:46
edmNew::DetSet::const_iterator
const data_type * const_iterator
Definition: DetSetNew.h:31