CMS 3D CMS Logo

HIPixelTrackFilterProducer.cc
Go to the documentation of this file.
3 
6 
12 
16 
18 public:
19  explicit HIPixelTrackFilterProducer(const edm::ParameterSet& iConfig);
20  ~HIPixelTrackFilterProducer() override;
21 
22  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
23 
24 private:
25  void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override;
26 
33 };
34 
36  theClusterShapeCacheToken(consumes<SiPixelClusterShapeCache>(iConfig.getParameter<edm::InputTag>("clusterShapeCacheSrc"))),
37  theVertexCollectionToken(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("VertexCollection"))),
38  theTIPMax( iConfig.getParameter<double>("tipMax") ),
39  theNSigmaTipMaxTolerance( iConfig.getParameter<double>("nSigmaTipMaxTolerance")),
40  theLIPMax( iConfig.getParameter<double>("lipMax") ),
41  theNSigmaLipMaxTolerance( iConfig.getParameter<double>("nSigmaLipMaxTolerance")),
42  theChi2Max( iConfig.getParameter<double>("chi2") ),
43  thePtMin( iConfig.getParameter<double>("ptMin") ),
44  thePtMax( iConfig.getParameter<double>("ptMax") ),
45  useClusterShape( iConfig.getParameter<bool>("useClusterShape") )
46 {
47  produces<PixelTrackFilter>();
48 }
49 
52 
53  desc.add<edm::InputTag>("clusterShapeCacheSrc", edm::InputTag("siPixelClusterShapeCache"));
54  desc.add<edm::InputTag>("VertexCollection", edm::InputTag("hiSelectedPixelVertex"));
55  desc.add<double>("ptMin", 1.5);
56  desc.add<double>("ptMax", 999999.);
57  desc.add<double>("tipMax", 0);
58  desc.add<double>("nSigmaTipMaxTolerance", 6.0);
59  desc.add<double>("lipMax", 0.3);
60  desc.add<double>("nSigmaLipMaxTolerance", 0);
61  desc.add<double>("chi2", 1000);
62  desc.add<bool>("useClusterShape", false);
63 
64  descriptions.add("hiPixelTrackFilter", desc);
65 }
66 
68 
72 
76 
77  if(!vertices->empty()) {
78  edm::LogInfo("HeavyIonVertexing")
79  << "[HIPixelTrackFilterProducer] Pixel track selection based on best vertex"
80  << "\n vz = " << vertices->begin()->z()
81  << "\n vz sigma = " << vertices->begin()->zError();
82  } else {
85 
86  edm::LogError("HeavyIonVertexing") // this can be made a warning when operator() is fixed
87  << "No vertex found in collection '" << labels.module << "'";
88  }
89 
90  auto impl = std::make_unique<HIPixelTrackFilter>(cache.product(), thePtMin, thePtMax, iSetup,
91  vertices,
94  theChi2Max,
96  auto prod = std::make_unique<PixelTrackFilter>(std::move(impl));
97  iEvent.put(std::move(prod));
98 }
99 
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::EDGetTokenT< reco::VertexCollection > theVertexCollectionToken
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
HIPixelTrackFilterProducer(const edm::ParameterSet &iConfig)
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
char const * module
Definition: ProductLabels.h:5
T const * product() const
Definition: Handle.h:74
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
fixed size matrix
HLT enums.
def cache(function)
Definition: utilities.py:3
edm::EDGetTokenT< SiPixelClusterShapeCache > theClusterShapeCacheToken
def move(src, dest)
Definition: eostools.py:511