CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ClusterShapeHitFilterESProducer.cc
Go to the documentation of this file.
2 
4 
8 
10 
11 /*****************************************************************************/
13  (const edm::ParameterSet& iConfig):
14  use_PixelShapeFile( iConfig.exists("PixelShapeFile")?iConfig.getParameter<std::string>("PixelShapeFile"):"RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape.par")
15 {
16 
17  std::string componentName = iConfig.getParameter<std::string>("ComponentName");
18  minGoodPixelCharge_= 0,
19  minGoodStripCharge_ = (clusterChargeCut(iConfig));
20  cutOnPixelCharge_ = false;
21  cutOnStripCharge_ = minGoodStripCharge_>0;
22  cutOnPixelShape_ = (iConfig.exists("doPixelShapeCut") ? iConfig.getParameter<bool>("doPixelShapeCut") : true);
23  cutOnStripShape_ = (iConfig.exists("doStripShapeCut") ? iConfig.getParameter<bool>("doStripShapeCut") : true);
24 
25  edm::LogInfo("ClusterShapeHitFilterESProducer")
26  << " with name: " << componentName;
27 
28  setWhatProduced(this, componentName);
29 }
30 
31 
32 /*****************************************************************************/
34  ()
35 {
36 }
37 
38 /*****************************************************************************/
42 {
43  using namespace edm::es;
44 
45  // get all from SiStripLorentzAngle (why not!)
46 
47  // Retrieve magnetic field
49  iRecord.getRecord<TkStripCPERecord>().getRecord<IdealMagneticFieldRecord>().get(field);
50 
51  // Retrieve geometry
53  iRecord.getRecord<TkStripCPERecord>().getRecord<TrackerDigiGeometryRecord>().get(geo);
54 
55  // Retrieve pixel Lorentz
57  iRecord.getRecord<TkPixelCPERecord>().getRecord<SiPixelLorentzAngleRcd>().get(pixel);
58 
59  // Retrieve strip Lorentz
61  iRecord.getRecord<TkStripCPERecord>().getRecord<SiStripLorentzAngleDepRcd>().get(strip);
62 
63 
64 
65  // Produce the filter using the plugin factory
67  aFilter(new ClusterShapeHitFilter( geo.product(),
68  field.product(),
69  pixel.product(),
70  strip.product(),
71  &use_PixelShapeFile));
72  aFilter->setShapeCuts(cutOnPixelShape_, cutOnStripShape_);
73  aFilter->setChargeCuts(cutOnPixelCharge_, minGoodPixelCharge_, cutOnStripCharge_,
74  minGoodStripCharge_);
75  return aFilter;
76 }
T getParameter(std::string const &) const
std::auto_ptr< ClusterShapeHitFilter > ReturnType
bool exists(std::string const &parameterName) const
checks if a parameter exists
float clusterChargeCut(const edm::ParameterSet &conf, const char *name="clusterChargeCut")
ClusterShapeHitFilterESProducer(const edm::ParameterSet &)
ReturnType produce(const ClusterShapeHitFilter::Record &)
void get(HolderT &iHolder) const