-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TRD calibration subdirectory added (#5894)
* TRD calibration subdirectory added - template for vDrift calibration - after global tracking angular differences between TRD-only tracks and tracklets are collected - small correction to always update to the correct pad plane during track following, since the pad row size depends also on the stack, not only on the layer * Remove copy-paste artifact (wrong comment)
- Loading branch information
Showing
12 changed files
with
326 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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 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 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,17 @@ | ||
#Copyright CERN and copyright holders of ALICE O2.This software is distributed | ||
#under the terms of the GNU General Public License v3(GPL Version 3), copied | ||
#verbatim in the file "COPYING". | ||
# | ||
#See http: //alice-o2.web.cern.ch/license for full licensing information. | ||
# | ||
#In applying this license CERN does not waive the privileges and immunities | ||
#granted to it by virtue of its status as an Intergovernmental Organization or | ||
#submit itself to any jurisdiction. | ||
|
||
o2_add_library(TRDCalibration | ||
SOURCES src/CalibVDrift.cxx | ||
PUBLIC_LINK_LIBRARIES O2::TRDBase | ||
O2::DataFormatsTRD) | ||
|
||
o2_target_root_dictionary(TRDCalibration | ||
HEADERS include/TRDCalibration/CalibVDrift.h) |
68 changes: 68 additions & 0 deletions
68
Detectors/TRD/calibration/include/TRDCalibration/CalibVDrift.h
This file contains 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,68 @@ | ||
// Copyright CERN and copyright holders of ALICE O2. This software is | ||
// distributed under the terms of the GNU General Public License v3 (GPL | ||
// Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// See http://alice-o2.web.cern.ch/license for full licensing information. | ||
// | ||
// In applying this license CERN does not waive the privileges and immunities | ||
// granted to it by virtue of its status as an Intergovernmental Organization | ||
// or submit itself to any jurisdiction. | ||
|
||
#ifndef ALICEO2_TRD_CALIBVDRIFT_H_ | ||
#define ALICEO2_TRD_CALIBVDRIFT_H_ | ||
|
||
/// \file CalibVDrift.h | ||
/// \author Ole Schmidt, ole.schmidt@cern.ch | ||
|
||
#include "DataFormatsTRD/Constants.h" | ||
#include <array> | ||
|
||
namespace o2 | ||
{ | ||
namespace trd | ||
{ | ||
|
||
/// \brief VDrift calibration class | ||
/// | ||
/// This class is used to determine chamber-wise vDrift values | ||
/// | ||
/// origin: TRD | ||
/// \author Ole Schmidt, ole.schmidt@cern.ch | ||
|
||
class CalibVDrift | ||
{ | ||
public: | ||
/// default constructor | ||
CalibVDrift() = default; | ||
|
||
/// default destructor | ||
~CalibVDrift() = default; | ||
|
||
/// set input angular difference sums | ||
void setAngleDiffSums(float* input) | ||
{ | ||
for (int i = 0; i < constants::MAXCHAMBER * constants::NBINSANGLEDIFF; ++i) { | ||
mAngleDiffSums[i] = input[i]; | ||
} | ||
} | ||
|
||
/// set input angular difference bin counters | ||
void setAngleDiffCounters(short* input) | ||
{ | ||
for (int i = 0; i < constants::MAXCHAMBER * constants::NBINSANGLEDIFF; ++i) { | ||
mAngleDiffCounters[i] = input[i]; | ||
} | ||
} | ||
|
||
/// main processing function | ||
void process(); | ||
|
||
private: | ||
std::array<float, constants::MAXCHAMBER * constants::NBINSANGLEDIFF> mAngleDiffSums{}; ///< input TRD track to tracklet angular difference sums per bin | ||
std::array<short, constants::MAXCHAMBER * constants::NBINSANGLEDIFF> mAngleDiffCounters{}; ///< input bin counters | ||
}; | ||
|
||
} // namespace trd | ||
|
||
} // namespace o2 | ||
#endif |
This file contains 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,50 @@ | ||
// Copyright CERN and copyright holders of ALICE O2. This software is | ||
// distributed under the terms of the GNU General Public License v3 (GPL | ||
// Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// See http://alice-o2.web.cern.ch/license for full licensing information. | ||
// | ||
// In applying this license CERN does not waive the privileges and immunities | ||
// granted to it by virtue of its status as an Intergovernmental Organization | ||
// or submit itself to any jurisdiction. | ||
|
||
/// \file CalibVDrift.cxx | ||
/// \author Ole Schmidt, ole.schmidt@cern.ch | ||
|
||
#include "TFile.h" | ||
#include "TH2F.h" | ||
|
||
#include <fairlogger/Logger.h> | ||
|
||
#include "TRDCalibration/CalibVDrift.h" | ||
|
||
using namespace o2::trd; | ||
using namespace o2::trd::constants; | ||
|
||
void CalibVDrift::process() | ||
{ | ||
LOG(info) << "Started processing for vDrift calibration"; | ||
|
||
for (int iDet = 0; iDet < constants::MAXCHAMBER; ++iDet) { | ||
for (int iBin = 0; iBin < constants::NBINSANGLEDIFF; ++iBin) { // note: iBin = constants::NBINSANGLEDIFF - 1 is under-/overflow bin | ||
short nEntries = mAngleDiffCounters[iDet * constants::NBINSANGLEDIFF + iBin]; | ||
float angleDiffSum = mAngleDiffSums[iDet * constants::NBINSANGLEDIFF + iBin]; | ||
if (nEntries > 0) { | ||
LOGF(INFO, "Found %i entrie(s) in chamber %i, bin %i. Average angular deviation: %f", nEntries, iDet, iBin, angleDiffSum / nEntries); | ||
} | ||
} | ||
} | ||
|
||
/* | ||
// as an example I loop over the input, create a histogram and write it to a file | ||
auto fOut = TFile::Open("trdcalibdummy.root", "recreate"); | ||
auto hXY = std::make_unique<TH2F>("histDummy", "foo", 100, -60, 60, 100, 250, 400); // xy distribution of TRD space points | ||
for (int i = 0; i < mAngulerDeviationProf.size(); ++i) { | ||
hXY->Fill(mAngulerDeviationProf[i].mX[0], mAngulerDeviationProf[i].mR); | ||
} | ||
fOut->cd(); | ||
hXY->Write(); | ||
hXY.reset(); // delete the histogram before closing the output file | ||
fOut->Close(); | ||
*/ | ||
} |
This file contains 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,19 @@ | ||
// Copyright CERN and copyright holders of ALICE O2. This software is | ||
// distributed under the terms of the GNU General Public License v3 (GPL | ||
// Version 3), copied verbatim in the file "COPYING". | ||
// | ||
// See http://alice-o2.web.cern.ch/license for full licensing information. | ||
// | ||
// In applying this license CERN does not waive the privileges and immunities | ||
// granted to it by virtue of its status as an Intergovernmental Organization | ||
// or submit itself to any jurisdiction. | ||
|
||
#ifdef __CLING__ | ||
|
||
#pragma link off all globals; | ||
#pragma link off all classes; | ||
#pragma link off all functions; | ||
|
||
#pragma link C++ class o2::trd::CalibVDrift + ; | ||
|
||
#endif |
This file contains 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 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 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 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.