-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Rpc digi dev v9 #47447
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
Open
bapavlov
wants to merge
11
commits into
cms-sw:master
Choose a base branch
from
bapavlov:rpc_digi_dev_v9
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rpc digi dev v9 #47447
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
01f0707
Squashed commit of the following:
bapavlov 08d428c
changes due to the move of RandomNumberGenerator
bapavlov 58c7faf
creating phase2_rpc_devel modifier
bapavlov 3ed0563
adding phase2_rpc_devel for DIGI
bapavlov a1a23f8
update: keep legacy simMuonRPCDigis for side-by-side validation
eigen1907 318caf8
add: implement rpcDevel upgrade workflow for RPC development
eigen1907 f72f1c9
Merge branch 'master' into rpc_digi_dev_v9
bapavlov e6c3db0
Update RPCDigiPhase2Producer.h to add edm::stream::WatchRuns
bapavlov ce2de8c
Update IRPCDigiProducer.h to include edm::stream::WatchRuns
bapavlov 1b00692
Update DataFormats/RPCDigi/src/classes_def.xml
bapavlov 526f678
Update DataFormats/RPCDigi/src/classes_def.xml
bapavlov 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import FWCore.ParameterSet.Config as cms | ||
|
|
||
| phase2_rpc_devel = 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| #ifndef IRPCDigi_IRPCDigi_h | ||
| #define IRPCDigi_IRPCDigi_h | ||
|
|
||
| /** \class IRPCDigi | ||
| * | ||
| * Digi for Improved Resisitive Plate Chamber (IRPC) | ||
| * | ||
| * \author Borislav Pavlov - University of Sofia | ||
| */ | ||
|
|
||
| #include <cstdint> | ||
| #include <iosfwd> | ||
|
|
||
| class IRPCDigi { | ||
| public: | ||
| explicit IRPCDigi(int strip, int bxLR, int bxHR, int sbxLR, int sbxHR, int fineLR, int fineHR); | ||
| IRPCDigi(); | ||
|
|
||
| bool operator==(const IRPCDigi& digi) const; | ||
| bool operator<(const IRPCDigi& digi) const; | ||
| void print() const; | ||
| int strip() const { return strip_; } | ||
| int bx() const { return bxLR_; } | ||
| int sbx() const { return sbxLR_; } | ||
| int bxLR() const { return bxLR_; } | ||
| int bxHR() const { return bxHR_; } | ||
| int sbxLR() const { return sbxLR_; } | ||
| int sbxHR() const { return sbxHR_; } | ||
| int fineLR() const { return fineLR_; } | ||
| int fineHR() const { return fineHR_; } | ||
|
|
||
| private: | ||
| uint16_t strip_; | ||
| int32_t bxLR_; //BX from low radius FEB | ||
| int32_t bxHR_; //BX from high radius FEB | ||
| int8_t sbxLR_; //sub-BX from low radius FEB | ||
| int8_t sbxHR_; //sub-BX from high radius FEB | ||
| int8_t fineLR_; //high resolution time rom low radius FEB | ||
| int8_t fineHR_; //high resolution time rom high radius FEB | ||
| }; | ||
|
|
||
| std::ostream& operator<<(std::ostream& o, const IRPCDigi& digi); | ||
|
|
||
| #endif |
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,15 @@ | ||
| #ifndef IRPCDigi_IRPCDigiCollection_h | ||
| #define IRPCDigi_IRPCDigiCollection_h | ||
| /** \class RPCDigiCollection | ||
| * | ||
| * \author Borislav Pavlov | ||
| * \date 14 July 2021 | ||
| */ | ||
|
|
||
| #include <DataFormats/MuonDetId/interface/RPCDetId.h> | ||
| #include <DataFormats/RPCDigi/interface/IRPCDigi.h> | ||
| #include <DataFormats/MuonData/interface/MuonDigiCollection.h> | ||
|
|
||
| typedef MuonDigiCollection<RPCDetId, IRPCDigi> IRPCDigiCollection; | ||
|
|
||
| #endif |
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,14 @@ | ||
| #include "DataFormats/RPCDigi/interface/IRPCDigi.h" | ||
|
|
||
| class IRPCDigiTime { | ||
| public: | ||
| IRPCDigiTime(const IRPCDigi& adigi); | ||
| float time(); | ||
| float coordinateY(); | ||
| float timeLR(); | ||
| float timeHR(); | ||
|
|
||
| private: | ||
| IRPCDigi theDigi; | ||
| float TDC2Time(int BX, int SBX, int FT); | ||
| }; |
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,34 @@ | ||
| #ifndef RPCDigi_RPCDigiPhase2_h | ||
| #define RPCDigi_RPCDigiPhase2_h | ||
|
|
||
| /** \class RPCDigiPhase2 | ||
| * | ||
| * Digi for Resisitive Plate Chamber, after Phase2 upgrade | ||
| * | ||
| * \author Borislav Pavlov - University of Sofia | ||
| */ | ||
|
|
||
| #include <cstdint> | ||
| #include <iosfwd> | ||
|
|
||
| class RPCDigiPhase2 { | ||
| public: | ||
| explicit RPCDigiPhase2(int strip, int bx, int sbx); | ||
| RPCDigiPhase2(); | ||
|
|
||
| bool operator==(const RPCDigiPhase2& digi) const; | ||
| bool operator<(const RPCDigiPhase2& digi) const; | ||
| void print() const; | ||
| int strip() const { return strip_; } | ||
| int bx() const { return bx_; } | ||
| int sbx() const { return sbx_; } | ||
|
|
||
| private: | ||
| uint16_t strip_; | ||
| int32_t bx_; // for BX | ||
| int8_t sbx_; // for sub-BX | ||
| }; | ||
|
|
||
| std::ostream& operator<<(std::ostream& o, const RPCDigiPhase2& digi); | ||
|
|
||
| #endif |
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,15 @@ | ||
| #ifndef RPCDigi_RPCDigiPhase2Collection_h | ||
| #define RPCDigi_RPCDigiPhase2Collection_h | ||
| /** \class RPCDigiCollection | ||
| * | ||
| * \author Borislav Pavlov | ||
| * \date 14 June 2024 | ||
| */ | ||
|
|
||
| #include <DataFormats/MuonDetId/interface/RPCDetId.h> | ||
| #include <DataFormats/RPCDigi/interface/RPCDigiPhase2.h> | ||
| #include <DataFormats/MuonData/interface/MuonDigiCollection.h> | ||
|
|
||
| typedef MuonDigiCollection<RPCDetId, RPCDigiPhase2> RPCDigiPhase2Collection; | ||
|
|
||
| #endif |
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,10 @@ | ||
| #include "DataFormats/RPCDigi/interface/RPCDigiPhase2.h" | ||
|
|
||
| class RPCDigiPhase2Time { | ||
| public: | ||
| RPCDigiPhase2Time(const RPCDigiPhase2& adigi); | ||
| float time(); | ||
|
|
||
| private: | ||
| RPCDigiPhase2 theDigi; | ||
| }; |
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,33 @@ | ||
| /** \file | ||
| * | ||
| * | ||
| * \author Borislav Pavlov - University of Sofia | ||
| * | ||
| */ | ||
|
|
||
| #include "DataFormats/RPCDigi/interface/IRPCDigi.h" | ||
| #include <iostream> | ||
|
|
||
| IRPCDigi::IRPCDigi(int strip, int bxLR, int bxHR, int sbxLR, int sbxHR, int fineLR, int fineHR) | ||
| : strip_(strip), bxLR_(bxLR), bxHR_(bxHR), sbxLR_(sbxLR), sbxHR_(sbxHR), fineLR_(fineLR), fineHR_(fineHR) {} | ||
|
|
||
| IRPCDigi::IRPCDigi() : strip_(0), bxLR_(0), sbxLR_(0) {} | ||
|
|
||
| // Comparison | ||
| bool IRPCDigi::operator==(const IRPCDigi& digi) const { | ||
| if (strip_ != digi.strip() || bxLR_ != digi.bx()) | ||
| return false; | ||
| return true; | ||
| } | ||
|
|
||
| ///Precedence operator | ||
| bool IRPCDigi::operator<(const IRPCDigi& digi) const { | ||
| if (digi.bx() == this->bx()) | ||
| return digi.strip() < this->strip(); | ||
| else | ||
| return digi.bx() < this->bx(); | ||
| } | ||
|
|
||
| std::ostream& operator<<(std::ostream& o, const IRPCDigi& digi) { return o << " " << digi.strip() << " " << digi.bx(); } | ||
|
|
||
| void IRPCDigi::print() const { std::cout << "Strip " << strip() << " bx " << bx() << std::endl; } |
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,16 @@ | ||
| #include "DataFormats/RPCDigi/interface/IRPCDigiTime.h" | ||
|
|
||
| IRPCDigiTime::IRPCDigiTime(const IRPCDigi& adigi) : theDigi(adigi) {} | ||
|
|
||
| float IRPCDigiTime::time() { return (timeLR() + timeHR()) / 2.; } | ||
|
|
||
| float IRPCDigiTime::coordinateY() { | ||
| const double signal_speed = 0.66 * 299792458e-7; //signal propagation speed [cm/ns] | ||
| return signal_speed * (timeLR() - timeHR()) / 2.; | ||
| } | ||
|
|
||
| float IRPCDigiTime::timeLR() { return TDC2Time(theDigi.bxLR(), theDigi.sbxLR(), theDigi.fineLR()); } | ||
|
|
||
| float IRPCDigiTime::timeHR() { return TDC2Time(theDigi.bxHR(), theDigi.sbxHR(), theDigi.fineHR()); } | ||
|
|
||
| float IRPCDigiTime::TDC2Time(int BX, int SBX, int FT) { return 25. * BX + 2.5 * SBX + 0.2 * FT; } |
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,34 @@ | ||
| /** \file | ||
| * | ||
| * | ||
| * \author Borislav Pavlov - University of Sofia | ||
| * | ||
| */ | ||
|
|
||
| #include "DataFormats/RPCDigi/interface/RPCDigiPhase2.h" | ||
| #include <iostream> | ||
|
|
||
| RPCDigiPhase2::RPCDigiPhase2(int strip, int bx, int sbx) : strip_(strip), bx_(bx), sbx_(sbx) {} | ||
|
|
||
| RPCDigiPhase2::RPCDigiPhase2() : strip_(0), bx_(0), sbx_(0) {} | ||
|
|
||
| // Comparison | ||
| bool RPCDigiPhase2::operator==(const RPCDigiPhase2& digi) const { | ||
| if (strip_ != digi.strip() || bx_ != digi.bx()) | ||
| return false; | ||
| return true; | ||
| } | ||
|
|
||
| ///Precedence operator | ||
| bool RPCDigiPhase2::operator<(const RPCDigiPhase2& digi) const { | ||
| if (digi.bx() == this->bx()) | ||
| return digi.strip() < this->strip(); | ||
| else | ||
| return digi.bx() < this->bx(); | ||
| } | ||
|
|
||
| std::ostream& operator<<(std::ostream& o, const RPCDigiPhase2& digi) { | ||
| return o << " " << digi.strip() << " " << digi.bx(); | ||
| } | ||
|
|
||
| void RPCDigiPhase2::print() const { std::cout << "Strip " << strip() << " bx " << bx() << std::endl; } |
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/RPCDigi/interface/RPCDigiPhase2Time.h" | ||
|
|
||
| RPCDigiPhase2Time::RPCDigiPhase2Time(const RPCDigiPhase2& adigi) : theDigi(adigi) {} | ||
|
|
||
| float RPCDigiPhase2Time::time() { | ||
| return 25. * theDigi.bx() + 1.5625 * theDigi.sbx(); // 25./16. = 1.5625 ns | ||
| } |
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
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.
Uh oh!
There was an error while loading. Please reload this page.