-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Rawprime workflow with approximated siStrip clusters for heavy ions #38423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Configuration/ProcessModifiers/python/approxSiStripClusters_cff.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| import FWCore.ParameterSet.Config as cms | ||
|
|
||
| approxSiStripClusters = cms.Modifier() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,12 @@ | |
| #define DATAFORMATS_SISTRIPCLUSTER_H | ||
|
|
||
| #include "DataFormats/SiStripDigi/interface/SiStripDigi.h" | ||
| #include "DataFormats/SiStripCluster/interface/SiStripApproximateCluster.h" | ||
| #include <vector> | ||
| #include <numeric> | ||
| #include <iostream> | ||
|
|
||
| class SiStripApproximateCluster; | ||
|
|
||
| class SiStripCluster { | ||
| public: | ||
|
|
@@ -34,6 +38,8 @@ class SiStripCluster { | |
| firstStrip_ |= mergedValueMask; // if this is a candidate merged cluster | ||
| } | ||
|
|
||
| SiStripCluster(const SiStripApproximateCluster cluster); | ||
|
|
||
| // extend the cluster | ||
| template <typename Iter> | ||
| void extend(Iter begin, Iter end) { | ||
|
|
@@ -74,7 +80,7 @@ class SiStripCluster { | |
| /** total charge | ||
| * | ||
| */ | ||
| int charge() const { return std::accumulate(begin(), end(), int(0)); } | ||
| int charge() const; | ||
|
|
||
| /** Test (set) the merged status of the cluster | ||
| * | ||
|
|
@@ -90,6 +96,10 @@ class SiStripCluster { | |
|
|
||
| uint16_t firstStrip_ = 0; | ||
|
|
||
| //these are used if amplitude information is not available (using approximate cluster constructor) | ||
| float barycenter_ = 0; | ||
| int charge_ = 0; | ||
|
|
||
| // [email protected], 01/05/12 | ||
| // Add cluster errors to be used by rechits from split clusters. | ||
| // A rechit from a split cluster has larger errors than rechits from normal clusters. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #include "DataFormats/SiStripCluster/interface/SiStripApproximateCluster.h" | ||
|
|
||
| SiStripApproximateCluster::SiStripApproximateCluster(const SiStripCluster& cluster) { | ||
| barycenter_ = cluster.barycenter(); | ||
| width_ = cluster.size(); | ||
| avgCharge_ = cluster.charge() / cluster.size(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
RecoLocalTracker/SiStripClusterizer/plugins/SiStripApprox2Clusters.cc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| #include "FWCore/Framework/interface/MakerMacros.h" | ||
| #include "FWCore/Framework/interface/Frameworkfwd.h" | ||
| #include "FWCore/Framework/interface/global/EDProducer.h" | ||
| #include "FWCore/Framework/interface/Event.h" | ||
| #include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
| #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" | ||
| #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" | ||
| #include "FWCore/Utilities/interface/InputTag.h" | ||
| #include "DataFormats/SiStripCluster/interface/SiStripApproximateCluster.h" | ||
| #include "DataFormats/SiStripCluster/interface/SiStripCluster.h" | ||
| #include "DataFormats/Common/interface/DetSetVectorNew.h" | ||
| #include "DataFormats/Common/interface/DetSetVector.h" | ||
|
|
||
| #include <vector> | ||
| #include <memory> | ||
|
|
||
| class SiStripApprox2Clusters : public edm::global::EDProducer<> { | ||
| public: | ||
| explicit SiStripApprox2Clusters(const edm::ParameterSet& conf); | ||
|
|
||
| void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; | ||
| static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); | ||
|
|
||
| private: | ||
| edm::EDGetTokenT<edmNew::DetSetVector<SiStripApproximateCluster>> clusterToken_; | ||
| }; | ||
|
|
||
| SiStripApprox2Clusters::SiStripApprox2Clusters(const edm::ParameterSet& conf) { | ||
| clusterToken_ = consumes<edmNew::DetSetVector<SiStripApproximateCluster>>( | ||
| conf.getParameter<edm::InputTag>("inputApproxClusters")); | ||
| produces<edmNew::DetSetVector<SiStripCluster>>(); | ||
| } | ||
|
|
||
| void SiStripApprox2Clusters::produce(edm::StreamID id, edm::Event& event, const edm::EventSetup& iSetup) const { | ||
| auto result = std::make_unique<edmNew::DetSetVector<SiStripCluster>>(); | ||
| const auto& clusterCollection = event.get(clusterToken_); | ||
|
|
||
| for (const auto& detClusters : clusterCollection) { | ||
| edmNew::DetSetVector<SiStripCluster>::FastFiller ff{*result, detClusters.id()}; | ||
|
|
||
| for (const auto& cluster : detClusters) { | ||
| ff.push_back(SiStripCluster(cluster)); | ||
| } | ||
| } | ||
|
|
||
| event.put(std::move(result)); | ||
| } | ||
|
|
||
| void SiStripApprox2Clusters::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { | ||
| edm::ParameterSetDescription desc; | ||
| desc.add<edm::InputTag>("inputApproxClusters", edm::InputTag("siStripClusters")); | ||
| descriptions.add("SiStripApprox2Clusters", desc); | ||
| } | ||
|
|
||
| DEFINE_FWK_MODULE(SiStripApprox2Clusters); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
RecoLocalTracker/SiStripClusterizer/python/SiStripClusters2ApproxClusters_cff.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from RecoLocalTracker.SiStripClusterizer.SiStripClusters2ApproxClusters_cfi import * | ||
|
|
||
| from Configuration.ProcessModifiers.approxSiStripClusters_cff import approxSiStripClusters | ||
| SiStripClusters2ApproxClustersHLT = SiStripClusters2ApproxClusters.clone() | ||
| approxSiStripClusters.toModify(SiStripClusters2ApproxClustersHLT, inputClusters = "siStripClustersHLT") |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if we want to make this
RAW'nomenclature to stick. Doesn't seem to be very future-proof (what aboutRAW'', etc.).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RAW' to me just indicates that the data is partially processed at HLT, it's not about versioning. The next iteration would not be RAW'', it would still be RAW'. But ok, I'm completely agnostic about this terminology. I'm happy to call it whatever you suggest ;-)