-
Notifications
You must be signed in to change notification settings - Fork 514
TRD: improve anchoring using CCDB objects #15890
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
glegras
wants to merge
4
commits into
AliceO2Group:dev
Choose a base branch
from
glegras:trdsimu
base: dev
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
Changes from all commits
Commits
Show all changes
4 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,7 +160,9 @@ void Digitizer::process(std::vector<Hit> const& hits) | |
| auto& signalsMap = mSignalsMapCollection[det]; | ||
| // Jump to the next detector if the detector is | ||
| // switched off, not installed, etc | ||
| if (mCalib->getChamberStatus()->isNoData(det)) { | ||
| // In the chamber Fed status, 3 corresponds to good chamber | ||
| // if (mCalib->getChamberStatus()->isNoData(det)) { | ||
| if (getFedChamberStatus(det) != 3) { | ||
| continue; | ||
| } | ||
| if (!mGeo->chamberInGeometry(det)) { | ||
|
|
@@ -199,7 +201,7 @@ bool Digitizer::convertHits(const int det, const std::vector<Hit>& hits, SignalC | |
|
|
||
| double padSignal[mNpad]; | ||
|
|
||
| const double calExBDetValue = mCalib->getExB(det); // T * V/cm (check units) | ||
| const double calExBDetValue = mCalVdriftExB->getExB(det, true); // T * V/cm (check units) | ||
| const PadPlane* padPlane = mGeo->getPadPlane(det); | ||
| const int layer = mGeo->getLayer(det); | ||
| const float rowEndROC = padPlane->getRowEndROC(); | ||
|
|
@@ -253,8 +255,11 @@ bool Digitizer::convertHits(const int det, const std::vector<Hit>& hits, SignalC | |
| absDriftLength /= std::sqrt(1 / (1 + calExBDetValue * calExBDetValue)); | ||
| } | ||
|
|
||
| float driftVelocity = mCalib->getVDrift(det, colE, rowE); // The drift velocity | ||
| float t0 = mCalib->getT0(det, colE, rowE); // The T0 velocity | ||
| float driftVelocity = constants::VDRIFTDEFAULT; // The default drift velocity | ||
| if (TMath::Abs(mCalVdriftExB->getVdrift(det, true) - constants::VDRIFTDEFAULT) > 1e-6) { | ||
| driftVelocity = mCalVdriftExB->getVdrift(det, true) * constants::VDRIFTDEFAULT / mSimParam.getEffVdriftDefault(); // If they are available in the CCDB, we anchor the vdrift variations | ||
| } | ||
| float t0 = mCalib->getT0(det, colE, rowE); // The T0 velocity | ||
|
Comment on lines
+259
to
+262
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's good to access calib objects via standard DPL fetcher instead of locally instantiated BasicCCDBManager, but why not doing this for all objecs and getting rid of the mCalib entirely? |
||
|
|
||
| // Loop over all created electrons | ||
| const int nElectrons = std::fabs(qTotal); | ||
|
|
@@ -277,7 +282,8 @@ bool Digitizer::convertHits(const int det, const std::vector<Hit>& hits, SignalC | |
|
|
||
| // Apply E x B effects | ||
| if (mSimParam.isExBOn()) { | ||
| locCd = locCd + calExBDetValue * driftLength; | ||
| // minus sign is necessary to be compatible with how Vdrift and ExB are calibrated | ||
| locCd = locCd - TMath::Tan(calExBDetValue) * driftLength; | ||
| } | ||
| // The electron position after diffusion and ExB in pad coordinates. | ||
| rowE = padPlane->getPadRowNumberROC(locRd); | ||
|
|
@@ -292,7 +298,7 @@ bool Digitizer::convertHits(const int det, const std::vector<Hit>& hits, SignalC | |
| continue; | ||
| } | ||
| const double colOffset = padPlane->getPadColOffset(colE, locCd + offsetTilt); | ||
| driftVelocity = mCalib->getVDrift(det, colE, rowE); // The drift velocity for the updated col and row | ||
| // driftVelocity = mCalib->getVDrift(det, colE, rowE); // The drift velocity for the updated col and row | ||
| t0 = mCalib->getT0(det, colE, rowE); // The T0 velocity for the updated col and row | ||
| // Convert the position to drift time [mus], using either constant drift velocity or | ||
| // time structure of drift cells (non-isochronity, GARFIELD calculation). | ||
|
|
@@ -313,7 +319,8 @@ bool Digitizer::convertHits(const int det, const std::vector<Hit>& hits, SignalC | |
| } | ||
|
|
||
| // Apply the gas gain including fluctuations | ||
| const double signal = -(mSimParam.getGasGain()) * mLogRandomRings[thread].getNextValue(); | ||
| double timeDepGainFactor = mCalGain->getMPVdEdx(det, true) / constants::MPVDEDXDEFAULT; | ||
| const double signal = -(mSimParam.getGasGain()) * timeDepGainFactor * mLogRandomRings[thread].getNextValue(); | ||
|
|
||
| // Apply the pad response | ||
| if (mSimParam.prfOn()) { | ||
|
|
@@ -424,10 +431,10 @@ bool Digitizer::convertSignalsToADC(SignalContainer& signalMapCont, DigitContain | |
| int halfchamberside = (mcm > 3) ? 1 : 0; // 0=Aside, 1=Bside | ||
|
|
||
| // Halfchambers that are switched off, masked by mCalib | ||
| if ((halfchamberside == 0 && mCalib->getChamberStatus()->isNoDataSideA(det)) || | ||
| /*if ((halfchamberside == 0 && mCalib->getChamberStatus()->isNoDataSideA(det)) || | ||
| (halfchamberside == 1 && mCalib->getChamberStatus()->isNoDataSideB(det))) { | ||
| continue; | ||
| } | ||
| }*/ | ||
|
|
||
| // Check whether pad is masked | ||
| // Bridged pads are not considered yet!!! | ||
|
|
||
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.
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.
Statements w/o {} trigger code-checker failure.