CMS 3D CMS Logo

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

#include <myTKAnalyses/TrackRecoMonitoring/src/SeedMultiplicityAnalyzer.cc>

Inheritance diagram for SeedMultiplicityAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Classes

class  FromTrackRefSeedFilter
 

Public Member Functions

 SeedMultiplicityAnalyzer (const edm::ParameterSet &)
 
 ~SeedMultiplicityAnalyzer () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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 analyze (const edm::Event &, const edm::EventSetup &) override
 

Private Attributes

std::vector< unsigned int > _binseta
 
std::vector< unsigned int > _binsmult
 
std::string _buildername
 
std::vector< TH2F * > _hbpixcluslenangle
 
std::vector< TH2F * > _hbpixclusleneta
 
std::vector< TH2F * > _hfpixcluslenangle
 
std::vector< TH2F * > _hfpixclusleneta
 
std::vector< TH1F * > _hpixelrhmult
 
std::vector< TH1F * > _hseedeta
 
std::vector< std::vector< TH2F * > > _hseedeta2D
 
std::vector< TH1F * > _hseedmult
 
std::vector< std::vector< TH2F * > > _hseedmult2D
 
std::vector< TH2F * > _hseedphieta
 
std::vector< std::string > _labels
 
std::vector< double > _maxs
 
std::vector< edm::EDGetTokenT< std::map< unsigned int, int > > > _multiplicityMapTokens
 
std::vector< unsigned int > _seedbins
 
std::vector< edm::EDGetTokenT< TrajectorySeedCollection > > _seedcollTokens
 
std::vector< FromTrackRefSeedFilter_seedfilters
 
std::vector< double > _seedmax
 
std::vector< unsigned int > _selections
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 72 of file SeedMultiplicityAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 137 of file SeedMultiplicityAnalyzer.cc.

References _binseta, _binsmult, _hbpixcluslenangle, _hbpixclusleneta, _hfpixcluslenangle, _hfpixclusleneta, _hpixelrhmult, _hseedeta, _hseedeta2D, _hseedmult, _hseedmult2D, _hseedphieta, _labels, _maxs, _multiplicityMapTokens, _seedbins, _seedcollTokens, _seedfilters, _seedmax, _selections, edm::EDConsumerBase::consumes(), edm::EDConsumerBase::consumesCollector(), edm::InputTag::encode(), ALCARECOTkAlBeamHalo_cff::filter, edm::ParameterSet::getParameter(), mps_fire::i, M_PI, TFileService::make(), and AlCaHLTBitMon_QueryRunRegistry::string.

137  :
138  _buildername(iConfig.getParameter<std::string>("TTRHBuilder")),
141 {
142  //now do what ever initialization is needed
143 
144  //
145 
146 
147  std::vector<edm::ParameterSet> seedCollectionConfigs =
148  iConfig.getParameter<std::vector<edm::ParameterSet> >("seedCollections");
149 
150  for(std::vector<edm::ParameterSet>::const_iterator scps=seedCollectionConfigs.begin();scps!=seedCollectionConfigs.end();++scps) {
151 
152  _seedcollTokens.push_back(consumes<TrajectorySeedCollection>(scps->getParameter<edm::InputTag>("src")));
153  _seedbins.push_back(scps->getUntrackedParameter<unsigned int>("nBins",1000));
154  _seedmax.push_back(scps->getUntrackedParameter<double>("maxValue",100000.));
155 
156  if(scps->exists("trackFilter")) {
157  _seedfilters.push_back(FromTrackRefSeedFilter(consumesCollector(),scps->getParameter<edm::ParameterSet>("trackFilter")));
158  }
159  else {
160  _seedfilters.push_back(FromTrackRefSeedFilter());
161  }
162  }
163 
164  std::vector<edm::ParameterSet> correlationConfigs =
165  iConfig.getParameter<std::vector<edm::ParameterSet> >("multiplicityCorrelations");
166 
167  for(std::vector<edm::ParameterSet>::const_iterator ps=correlationConfigs.begin();ps!=correlationConfigs.end();++ps) {
168 
169  _multiplicityMapTokens.push_back(consumes<std::map<unsigned int, int> >(ps->getParameter<edm::InputTag>("multiplicityMap")));
170  _labels.push_back(ps->getParameter<std::string>("detLabel"));
171  _selections.push_back(ps->getParameter<unsigned int>("detSelection"));
172  _binsmult.push_back(ps->getParameter<unsigned int>("nBins"));
173  _binseta.push_back(ps->getParameter<unsigned int>("nBinsEta"));
174  _maxs.push_back(ps->getParameter<double>("maxValue"));
175 
176  }
177 
178 
179 
181 
182  std::vector<unsigned int>::const_iterator nseedbins = _seedbins.begin();
183  std::vector<double>::const_iterator seedmax = _seedmax.begin();
184  std::vector<FromTrackRefSeedFilter>::const_iterator filter = _seedfilters.begin();
185 
186  for(std::vector<edm::ParameterSet>::const_iterator scps=seedCollectionConfigs.begin();scps!=seedCollectionConfigs.end();++scps,++nseedbins,++seedmax,++filter) {
187 
188  std::string extendedlabel = std::string(scps->getParameter<edm::InputTag>("src").encode()) + filter->suffix();
189 
190  std::string hname = extendedlabel + std::string("_mult");
191  std::string htitle = extendedlabel + std::string(" seed multiplicity");
192  _hseedmult.push_back(tfserv->make<TH1F>(hname.c_str(),htitle.c_str(),*nseedbins+1,0.5-*seedmax/(*nseedbins),*seedmax+0.5));
193  _hseedmult[_hseedmult.size()-1]->GetXaxis()->SetTitle("seeds"); _hseedmult[_hseedmult.size()-1]->GetYaxis()->SetTitle("events");
194 
195  hname = extendedlabel + std::string("_eta");
196  htitle = extendedlabel + std::string(" seed pseudorapidity");
197  _hseedeta.push_back(tfserv->make<TH1F>(hname.c_str(),htitle.c_str(),80,-4.,4.));
198  _hseedeta[_hseedeta.size()-1]->GetXaxis()->SetTitle("#eta"); _hseedeta[_hseedeta.size()-1]->GetYaxis()->SetTitle("seeds");
199 
200  hname = extendedlabel + std::string("_phieta");
201  htitle = extendedlabel + std::string(" seed phi vs pseudorapidity");
202  _hseedphieta.push_back(tfserv->make<TH2F>(hname.c_str(),htitle.c_str(),80,-4.,4.,80,-M_PI,M_PI));
203  _hseedphieta[_hseedphieta.size()-1]->GetXaxis()->SetTitle("#eta"); _hseedphieta[_hseedphieta.size()-1]->GetYaxis()->SetTitle("#phi");
204 
205  _hseedmult2D.push_back(std::vector<TH2F*>());
206  _hseedeta2D.push_back(std::vector<TH2F*>());
207 
208 
209  hname = extendedlabel + std::string("_npixelrh");
210  htitle = extendedlabel + std::string(" seed SiPixelRecHit multiplicity");
211  _hpixelrhmult.push_back(tfserv->make<TH1F>(hname.c_str(),htitle.c_str(),5,-.5,4.5));
212  _hpixelrhmult[_hpixelrhmult.size()-1]->GetXaxis()->SetTitle("NRecHits"); _hpixelrhmult[_hpixelrhmult.size()-1]->GetYaxis()->SetTitle("seeds");
213 
214  hname = extendedlabel + std::string("_bpixleneta");
215  htitle = extendedlabel + std::string(" seed BPIX cluster length vs pseudorapidity");
216  _hbpixclusleneta.push_back(tfserv->make<TH2F>(hname.c_str(),htitle.c_str(),80,-4.,4.,40,-0.5,39.5));
217  _hbpixclusleneta[_hbpixclusleneta.size()-1]->GetXaxis()->SetTitle("#eta"); _hbpixclusleneta[_hbpixclusleneta.size()-1]->GetYaxis()->SetTitle("length");
218 
219  hname = extendedlabel + std::string("_fpixleneta");
220  htitle = extendedlabel + std::string(" seed FPIX cluster length vs pseudorapidity");
221  _hfpixclusleneta.push_back(tfserv->make<TH2F>(hname.c_str(),htitle.c_str(),80,-4.,4.,40,-0.5,39.5));
222  _hfpixclusleneta[_hfpixclusleneta.size()-1]->GetXaxis()->SetTitle("#eta"); _hfpixclusleneta[_hfpixclusleneta.size()-1]->GetYaxis()->SetTitle("length");
223 
224  hname = extendedlabel + std::string("_bpixlenangle");
225  htitle = extendedlabel + std::string(" seed BPIX cluster length vs track projection");
226  _hbpixcluslenangle.push_back(tfserv->make<TH2F>(hname.c_str(),htitle.c_str(),200,-1.,1.,40,-0.5,39.5));
227  _hbpixcluslenangle[_hbpixcluslenangle.size()-1]->GetXaxis()->SetTitle("projection"); _hbpixcluslenangle[_hbpixcluslenangle.size()-1]->GetYaxis()->SetTitle("length");
228 
229  hname = extendedlabel + std::string("_fpixlenangle");
230  htitle = extendedlabel + std::string(" seed FPIX cluster length vs track projection");
231  _hfpixcluslenangle.push_back(tfserv->make<TH2F>(hname.c_str(),htitle.c_str(),200,-1.,1.,40,-0.5,39.5));
232  _hfpixcluslenangle[_hfpixcluslenangle.size()-1]->GetXaxis()->SetTitle("projection"); _hfpixcluslenangle[_hfpixcluslenangle.size()-1]->GetYaxis()->SetTitle("length");
233 
234 
235  for(unsigned int i=0;i< _multiplicityMapTokens.size() ; ++i) {
236 
237 
238  std::string hname2D = extendedlabel + _labels[i];
239  hname2D += "_mult";
240  std::string htitle2D = extendedlabel + " seeds multiplicity";
241  htitle2D += " vs ";
242  htitle2D += _labels[i];
243  htitle2D += " hits";
244  _hseedmult2D[_hseedmult2D.size()-1].push_back(tfserv->make<TH2F>(hname2D.c_str(),htitle2D.c_str(),_binsmult[i],0.,_maxs[i],
245  *nseedbins+1,0.5-*seedmax/(*nseedbins),*seedmax+0.5));
246  _hseedmult2D[_hseedmult2D.size()-1][_hseedmult2D[_hseedmult2D.size()-1].size()-1]->GetXaxis()->SetTitle("hits");
247  _hseedmult2D[_hseedmult2D.size()-1][_hseedmult2D[_hseedmult2D.size()-1].size()-1]->GetYaxis()->SetTitle("seeds");
248 
249  hname2D = extendedlabel + _labels[i];
250  hname2D += "_eta";
251  htitle2D = extendedlabel + " seeds pseudorapidity";
252  htitle2D += " vs ";
253  htitle2D += _labels[i];
254  htitle2D += " hits";
255  _hseedeta2D[_hseedeta2D.size()-1].push_back(tfserv->make<TH2F>(hname2D.c_str(),htitle2D.c_str(),_binseta[i],0.,_maxs[i],
256  80,-4.,4.));
257  _hseedeta2D[_hseedeta2D.size()-1][_hseedeta2D[_hseedeta2D.size()-1].size()-1]->GetXaxis()->SetTitle("hits");
258  _hseedeta2D[_hseedeta2D.size()-1][_hseedeta2D[_hseedeta2D.size()-1].size()-1]->GetYaxis()->SetTitle("#eta");
259 
260 
261  }
262 
263  }
264 
265 }
T getParameter(std::string const &) const
std::vector< FromTrackRefSeedFilter > _seedfilters
std::vector< unsigned int > _binseta
std::vector< unsigned int > _selections
std::vector< std::string > _labels
std::vector< TH2F * > _hfpixcluslenangle
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< std::vector< TH2F * > > _hseedeta2D
std::vector< TH2F * > _hfpixclusleneta
std::vector< unsigned int > _binsmult
std::string encode() const
Definition: InputTag.cc:159
std::vector< edm::EDGetTokenT< std::map< unsigned int, int > > > _multiplicityMapTokens
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::vector< edm::EDGetTokenT< TrajectorySeedCollection > > _seedcollTokens
std::vector< unsigned int > _seedbins
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
#define M_PI
std::vector< TH2F * > _hseedphieta
std::vector< TH1F * > _hpixelrhmult
std::vector< TH2F * > _hbpixcluslenangle
std::vector< std::vector< TH2F * > > _hseedmult2D
std::vector< TH2F * > _hbpixclusleneta
SeedMultiplicityAnalyzer::~SeedMultiplicityAnalyzer ( )
override

Definition at line 268 of file SeedMultiplicityAnalyzer.cc.

269 {
270 
271  // do anything here that needs to be done at desctruction time
272  // (e.g. close files, deallocate resources etc.)
273 
274 }

Member Function Documentation

void SeedMultiplicityAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 283 of file SeedMultiplicityAnalyzer.cc.

References _buildername, _hbpixcluslenangle, _hbpixclusleneta, _hfpixcluslenangle, _hfpixclusleneta, _hpixelrhmult, _hseedeta, _hseedeta2D, _hseedmult, _hseedmult2D, _hseedphieta, _multiplicityMapTokens, _seedcollTokens, _seedfilters, _selections, TransientTrackingRecHitBuilder::build(), SiPixelRecHit::cluster(), coll, DetId::det(), PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), ALCARECOTkAlBeamHalo_cff::filter, TrackingRecHit::geographicalId(), edm::EventSetup::get(), edm::Event::getByToken(), TrajectoryStateOnSurface::globalMomentum(), mps_fire::i, iseed, TrajectoryStateOnSurface::isValid(), TrajectoryStateOnSurface::localMomentum(), phi, PV3DBase< T, PVType, FrameType >::phi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, edm::ESHandle< T >::product(), DetId::rawId(), rpcPointValidation_cfi::recHit, TrackInfoProducer_cfi::rechits, SurveyInfoScenario_cff::seed, mathSSE::sqrt(), DetId::subdetId(), DetId::Tracker, trajectoryStateTransform::transientState(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

284 {
285  using namespace edm;
286 
287  // compute cluster multiplicities
288 
289  std::vector<int> tmpmult(_multiplicityMapTokens.size(),-1);
290  for(unsigned int i=0;i<_multiplicityMapTokens.size();++i) {
292  iEvent.getByToken(_multiplicityMapTokens[i],mults);
293 
294  // check if the selection exists
295 
296  std::map<unsigned int, int>::const_iterator mult = mults->find(_selections[i]);
297 
298  if(mult!=mults->end()) {
299  tmpmult[i]=mult->second;
300  }
301  else {
302  edm::LogWarning("DetSelectionNotFound") << " DetSelection "
303  << _selections[i] << " not found";
304  }
305  }
306 
307  // preparation for loop on seeds
308 
309  // TrajectoryStateTransform tsTransform;
310  TSCBLBuilderNoMaterial tscblBuilder; // I could have used TSCBLBuilderWithPropagator
311 
313  iSetup.get<IdealMagneticFieldRecord>().get(theMF);
314 
316  iSetup.get<TransientRecHitRecord>().get(_buildername,theTTRHBuilder);
317 
318  // I need:
319  // - beamspot bs POSTPONED
320 
321  std::vector<TH1F*>::iterator histomult=_hseedmult.begin();
322  std::vector<std::vector<TH2F*> >::iterator histomult2D=_hseedmult2D.begin();
323  std::vector<TH1F*>::iterator histoeta=_hseedeta.begin();
324  std::vector<TH2F*>::iterator histophieta=_hseedphieta.begin();
325  std::vector<std::vector<TH2F*> >::iterator histoeta2D=_hseedeta2D.begin();
326  std::vector<TH1F*>::iterator hpixelrhmult=_hpixelrhmult.begin();
327  std::vector<TH2F*>::iterator histobpixleneta=_hbpixclusleneta.begin();
328  std::vector<TH2F*>::iterator histofpixleneta=_hfpixclusleneta.begin();
329  std::vector<TH2F*>::iterator histobpixlenangle=_hbpixcluslenangle.begin();
330  std::vector<TH2F*>::iterator histofpixlenangle=_hfpixcluslenangle.begin();
331  std::vector<FromTrackRefSeedFilter>::iterator filter=_seedfilters.begin();
332 
333  // loop on seed collections
334 
335  for(std::vector<edm::EDGetTokenT<TrajectorySeedCollection>>::const_iterator coll=_seedcollTokens.begin();
336  coll!=_seedcollTokens.end() &&
337  histomult!=_hseedmult.end() && histomult2D!=_hseedmult2D.end() &&
338  histoeta!=_hseedeta.end() && histoeta2D!=_hseedeta2D.end() &&
339  histophieta!=_hseedphieta.end() &&
340  hpixelrhmult!= _hpixelrhmult.end() &&
341  histobpixleneta != _hbpixclusleneta.end() && histofpixleneta != _hfpixclusleneta.end() &&
342  histobpixlenangle != _hbpixcluslenangle.end() && histofpixlenangle != _hfpixcluslenangle.end() ;
343  ++coll,++histomult,++histomult2D,++histoeta,++histophieta,++histoeta2D,++hpixelrhmult,
344  ++histobpixleneta,++histofpixleneta,++histobpixlenangle,++histofpixlenangle,++filter) {
345 
346  filter->prepareEvent(iEvent);
347 
349  iEvent.getByToken(*coll,seeds);
350 
351  /*
352  (*histomult)->Fill(seeds->size());
353 
354  for(unsigned int i=0;i<_multiplicityMaps.size();++i) {
355  if(tmpmult[i]>=0) (*histomult2D)[i]->Fill(tmpmult[i],seeds->size());
356  }
357  */
358 
359  // loop on seeds
360 
361  unsigned int nseeds=0;
362  unsigned int iseed=0;
363  for(TrajectorySeedCollection::const_iterator seed= seeds->begin(); seed!=seeds->end(); ++seed,++iseed) {
364 
365  if(filter->isSelected(iseed)) {
366 
367  ++nseeds;
368 
369  TransientTrackingRecHit::RecHitPointer recHit = theTTRHBuilder->build(&*(seed->recHits().second-1));
370  TrajectoryStateOnSurface state = trajectoryStateTransform::transientState( seed->startingState(), recHit->surface(), theMF.product());
371  // TrajectoryStateClosestToBeamLine tsAtClosestApproachSeed = tscblBuilder(*state.freeState(),bs); // here I need them BS
372 
373  double eta = state.globalMomentum().eta();
374  double phi = state.globalMomentum().phi();
375 
376  (*histoeta)->Fill(eta);
377  (*histophieta)->Fill(eta,phi);
378 
379  for(unsigned int i=0;i<_multiplicityMapTokens.size();++i) {
380  if(tmpmult[i]>=0) (*histoeta2D)[i]->Fill(tmpmult[i],eta);
381  }
382 
383  // loop on rec hits
384 
385  TrajectorySeed::range rechits = seed->recHits();
386 
387  int npixelrh = 0;
388  for(TrajectorySeed::const_iterator hit = rechits.first; hit!= rechits.second; ++hit) {
389  const SiPixelRecHit* sphit = dynamic_cast<const SiPixelRecHit*>(&(*hit));
390  if(sphit) {
391  ++npixelrh;
392  // compute state on recHit surface
393  TransientTrackingRecHit::RecHitPointer ttrhit = theTTRHBuilder->build(&*hit);
394  TrajectoryStateOnSurface tsos = trajectoryStateTransform::transientState( seed->startingState(), ttrhit->surface(), theMF.product());
395 
397  (*histobpixleneta)->Fill(eta,sphit->cluster()->sizeY());
398  if(tsos.isValid()) {
399  // double normdx = sin(atan2(tsos.localMomentum().x(),tsos.localMomentum().z()));
400  double normdx = tsos.localMomentum().x()/sqrt(tsos.localMomentum().x()*tsos.localMomentum().x()+
401  tsos.localMomentum().z()*tsos.localMomentum().z());
402  (*histobpixlenangle)->Fill(normdx,sphit->cluster()->sizeY());
403  }
404  }
406  (*histofpixleneta)->Fill(eta,sphit->cluster()->sizeX());
407  if(tsos.isValid()) {
408  // double normdy = sin(atan2(tsos.localMomentum().y(),tsos.localMomentum().z()));
409  double normdy = tsos.localMomentum().y()/sqrt(tsos.localMomentum().y()*tsos.localMomentum().y()+
410  tsos.localMomentum().z()*tsos.localMomentum().z());
411  (*histofpixlenangle)->Fill(normdy,sphit->cluster()->sizeX());
412  }
413  }
414  else {
415  edm::LogError("InconsistentSiPixelRecHit") << "SiPixelRecHit with a non-pixel DetId " << sphit->geographicalId().rawId();
416  }
417  }
418  }
419  (*hpixelrhmult)->Fill(npixelrh);
420  }
421  }
422  (*histomult)->Fill(nseeds);
423 
424  for(unsigned int i=0;i<_multiplicityMapTokens.size();++i) {
425  if(tmpmult[i]>=0) (*histomult2D)[i]->Fill(tmpmult[i],nseeds);
426  }
427 
428  }
429 }
std::vector< FromTrackRefSeedFilter > _seedfilters
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
std::vector< unsigned int > _selections
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
T y() const
Definition: PV3DBase.h:63
std::vector< TH2F * > _hfpixcluslenangle
std::vector< std::vector< TH2F * > > _hseedeta2D
std::vector< TH2F * > _hfpixclusleneta
std::vector< edm::EDGetTokenT< std::map< unsigned int, int > > > _multiplicityMapTokens
std::vector< edm::EDGetTokenT< TrajectorySeedCollection > > _seedcollTokens
LocalVector localMomentum() const
recHitContainer::const_iterator const_iterator
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
std::pair< const_iterator, const_iterator > range
std::shared_ptr< TrackingRecHit const > RecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
std::vector< TH2F * > _hseedphieta
JetCorrectorParametersCollection coll
Definition: classes.h:10
std::vector< TH1F * > _hpixelrhmult
int iseed
Definition: AMPTWrapper.h:124
TrajectoryStateOnSurface transientState(const PTrajectoryStateOnDet &ts, const Surface *surface, const MagneticField *field)
std::vector< TH2F * > _hbpixcluslenangle
ClusterRef cluster() const
Definition: SiPixelRecHit.h:49
std::vector< std::vector< TH2F * > > _hseedmult2D
T eta() const
Definition: PV3DBase.h:76
HLT enums.
GlobalVector globalMomentum() const
T get() const
Definition: EventSetup.h:71
DetId geographicalId() const
T x() const
Definition: PV3DBase.h:62
T const * product() const
Definition: ESHandle.h:86
std::vector< TH2F * > _hbpixclusleneta
Our base class.
Definition: SiPixelRecHit.h:23
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:39

Member Data Documentation

std::vector<unsigned int> SeedMultiplicityAnalyzer::_binseta
private

Definition at line 110 of file SeedMultiplicityAnalyzer.cc.

Referenced by SeedMultiplicityAnalyzer().

std::vector<unsigned int> SeedMultiplicityAnalyzer::_binsmult
private

Definition at line 109 of file SeedMultiplicityAnalyzer.cc.

Referenced by SeedMultiplicityAnalyzer().

std::string SeedMultiplicityAnalyzer::_buildername
private

Definition at line 101 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze().

std::vector<TH2F*> SeedMultiplicityAnalyzer::_hbpixcluslenangle
private

Definition at line 118 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<TH2F*> SeedMultiplicityAnalyzer::_hbpixclusleneta
private

Definition at line 116 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<TH2F*> SeedMultiplicityAnalyzer::_hfpixcluslenangle
private

Definition at line 119 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<TH2F*> SeedMultiplicityAnalyzer::_hfpixclusleneta
private

Definition at line 117 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<TH1F*> SeedMultiplicityAnalyzer::_hpixelrhmult
private

Definition at line 115 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<TH1F*> SeedMultiplicityAnalyzer::_hseedeta
private

Definition at line 113 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<std::vector<TH2F*> > SeedMultiplicityAnalyzer::_hseedeta2D
private

Definition at line 121 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<TH1F*> SeedMultiplicityAnalyzer::_hseedmult
private

Definition at line 112 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<std::vector<TH2F*> > SeedMultiplicityAnalyzer::_hseedmult2D
private

Definition at line 120 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<TH2F*> SeedMultiplicityAnalyzer::_hseedphieta
private

Definition at line 114 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<std::string> SeedMultiplicityAnalyzer::_labels
private
std::vector<double> SeedMultiplicityAnalyzer::_maxs
private

Definition at line 111 of file SeedMultiplicityAnalyzer.cc.

Referenced by SeedMultiplicityAnalyzer().

std::vector<edm::EDGetTokenT<std::map<unsigned int, int> > > SeedMultiplicityAnalyzer::_multiplicityMapTokens
private

Definition at line 106 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<unsigned int> SeedMultiplicityAnalyzer::_seedbins
private

Definition at line 103 of file SeedMultiplicityAnalyzer.cc.

Referenced by SeedMultiplicityAnalyzer().

std::vector<edm::EDGetTokenT<TrajectorySeedCollection> > SeedMultiplicityAnalyzer::_seedcollTokens
private

Definition at line 102 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<FromTrackRefSeedFilter> SeedMultiplicityAnalyzer::_seedfilters
private

Definition at line 105 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().

std::vector<double> SeedMultiplicityAnalyzer::_seedmax
private

Definition at line 104 of file SeedMultiplicityAnalyzer.cc.

Referenced by SeedMultiplicityAnalyzer().

std::vector<unsigned int> SeedMultiplicityAnalyzer::_selections
private

Definition at line 108 of file SeedMultiplicityAnalyzer.cc.

Referenced by analyze(), and SeedMultiplicityAnalyzer().