-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Unpacker for phase-2 outer tracker #4617
Conversation
The Phase2TrackerDigi is designed to store raw digis for both PS and 2S modules. Since data is digital, only the position of the hit is stored. Position has 2 coordinates: row and column, or alternatively strip and edge. The current implementation works for up to 32x1016 cells.
That dataformat is designed to represent 1D clusters, as found in strips. Compared to the SiStripCluster, there is no need to track strip charges, which makes the barycenter calculation simpler. Also, the reference point (beginning) is a 2D digi for phase2.
Phase2TrackerCluster2D are representing a 2D cluster made of digital digi. Each cluster is defined by its anchor point (a digi) and a set of 2D offsets. It has a size, and a position.
This simple dataformat is to hold the stubs as they come from the hardware. Therefore, it has no reference to sim objects, nor direct links to digis or clusters.
Created a new Phase2TrackerCabling and Phase2TrackerModule objects to hold the relations between detid, gbtid, fedid, cooling and power. The next step is to create a ESSource to fill the object (first from ParameterSets, later from db). It will then be used in the new phase2 unpacker. Conflicts: CondFormats/SiStripObjects/src/classes.h Done: kept head of classes.h and applied the change to headers.h
A single simple ESSource is implemented for now. It is similar to a "Fake" source and reads the intended cabling from the cmssw cfg.
CheckPhase2Cabling has been added to the tests of CalibTracker/SiStripESProducers. It allowed to validate the concept. On that occasion, few adjustments were done and new methods to print the cabling introduced.
Since the cabling may be accessed via diverse threads, it is not possible to use the mutable keyword in it. Changes were made to pre-sort three vectors of indices at construction time. After that, the object doesn't have to be altered.
Now uses tokens to access FED raw buffers. I also took the opportunity to get rid of the hardcoded input label.
Phase2TrackerDigi( unsigned int row, unsigned int col) { | ||
assert(row<1016); | ||
assert(col<32); | ||
theChannel = (row%1016)|((col%32)<<10); |
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.
given the assert why the (very costly) %?
would not
row|(col<<10) be enough?
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.
Is there no risk for the assert to be optimized out? Even in that case, I agree that this is a belt and braces solution, and I am happily removing the %.
+1 |
+1 |
Unpacker for phase-2 outer tracker
This pull request introduces the code required to unpack data coming from the prototypes of phase-2 tracker 2S modules, and is designed to evolve towards the code used for future data-taking with CMS. It was tested with actual data collected in December in DESY, and presented at the tracker simulation upgrade meeting on June 17: https://indico.cern.ch/event/305424/session/3/contribution/4/material/slides/0.pdf
While it touches several packages, there is basically no modification of existing code. These are new classes designed to live without interfering with the existing code. Additions are for the unpacker itself (in EventFilter), for the digi data format (in DataFormat) and for the cabling (CondFormat and related).