81 LOGP(error,
"Detector {} must implement its own ProcessPoints method",
getName());
97 LOG(fatal) << __PRETTY_FUNCTION__ <<
" is disabled";
126 LOG(info) <<
"Applying alignment from Millepede solution";
135 LOGP(info,
"caching reference CCDB for {}",
getName());
137 const auto* algVec = ggHelper.getAlignment(
mDetID);
138 for (
const auto& alg : *algVec) {
141 LOGP(fatal,
"Volume {} not found", alg.getSymName());
143 auto mat = alg.createMatrix();
153 LOG(fatal) <<
"Volume " << vol->GetName() <<
" was already added to " <<
mDetID.
getName();
210 LOG(warning) <<
"No sensors defined";
237 for (
int iv = 0; iv < nvol; iv++) {
261 for (
int iv = 0; iv < nvol; iv++) {
288 for (
int iv = 0; iv < nvol; iv++) {
304 int md((mx + mn) >> 1), vids(
getSensor(md)->getVolID());
307 }
else if (vid > vids) {
322 printf(
"\nDetector:%5s %5d volumes %5d sensors {VolID: %5d-%5d} Def.Sys.Err: %.4e %.4e | Stat:%d\n",
326 printf(
"Errors assignment: ");
330 printf(
"from TrackPoints\n");
333 printf(
"Allowed in Collisions: %7s | Cosmic: %7s\n",
336 printf(
"Obligatory in Collisions: %7s | Cosmic: %7s\n",
356 LOG(info) <<
"Adding sys.error " << std::fixed << std::setprecision(4) << sigy <<
" " << sigz <<
" to all sensors";
369 LOG(fatal) <<
"setUseErrorParam is not implemented for this detector";
377 LOG(fatal) <<
"If needed, this method has to be implemented for specific detector";
384 LOG(fatal) <<
"defineVolumes method has to be implemented for specific detector";
403 for (
int iv = 0; iv < nvol; iv++) {
420 for (
int iv = 0; iv < nvol; iv++) {
441 std::vector<o2::detectors::AlignParam> arr;
443 for (
int iv = 0; iv < nvol; iv++) {
450 TFile outalg(fmt::format(
"alignment{}.root",
getName()).c_str(),
"recreate");
453 LOGP(info,
"storing {} alignment in {}",
getName(), outalg.GetName());
497 for (
int iv = 0; iv < nvol; iv++) {
511 for (
int iv = 0; iv < nvol; iv++) {
538 std::regex selRegEx(regexStr);
545 if (!regexStr.empty() && !std::regex_match(vol->
getSymName(), selRegEx)) {
560 std::regex selRegEx(regexStr);
566 if (!regexStr.empty() && !std::regex_match(vol->
getSymName(), selRegEx)) {
580 std::regex selRegEx(regexStr);
586 if (!regexStr.empty() && !std::regex_match(vol->
getSymName(), selRegEx)) {
593 if (condErr >= 0 && !vol->
isFreeDOF(dof)) {
609 TString mts =
match, syms;
610 auto cstr =
getController()->getConstraints().emplace_back();
613 cstr.constrainDOF(
i);
615 cstr.unConstrainDOF(
i);
617 cstr.setSigma(
i, sigma[
i]);
624 if (!mts.IsNull() && !(syms = vol->
getSymName()).Contains(mts)) {
630 if (!cstr.getNChildren()) {
631 LOG(info) <<
"No volume passed filter " <<
match;
641 LOG(fatal) <<
"Detector CalibDOFs limited to " <<
kNMaxKalibDOF <<
", requested " << dof;
652 LOG(fatal) <<
"Detector CalibDOFs limited to " <<
kNMaxKalibDOF <<
", requested " << dof;
696 TFile* fl = TFile::Open(outFName,
"recreate");
697 TTree* tr =
new TTree(
"snpos", Form(
"sensor poisitions for %s",
mDetID.
getName()));
698 tr->Branch(
"volID", &spos.volID,
"volID/I");
699 tr->Branch(
"pId", &spos.pId,
"pId[3]/D");
700 tr->Branch(
"pRf", &spos.pRf,
"pRf[3]/D");
701 tr->Branch(
"pRc", &spos.pRc,
"pRc[3]/D");
703 for (
int isn = 0; isn < ns; isn++) {
ClassImp(o2::align::AlignableDetector)
Base class for detector: wrapper for set of volumes.
End-chain alignment volume in detector branch, where the actual measurement is done.
Track model for the alignment.
std::string getName(const TDataMember *dm, int index, int size)
Steering class for the global alignment.
Helper for geometry and GRP related CCDB requests.
Descriptor of geometrical constraint.
Definition of the Names Generator class.
~AlignableDetector() override
virtual void applyAlignmentFromMPSol()
virtual int processPoints(GIndex gid, int npntCut=0, bool inv=false)
virtual void defineVolumes()
bool mObligatory[utils::NTrackTypes]
int selectVolumes(std::vector< AlignableVolume * > cont, int lev=-1, const std::string ®exStr="")
AlignableSensor * getSensor(int id) const
int mNPointsSel[utils::NTrackTypes]
virtual void writeLabeledPedeResults(FILE *parOut) const
void calcFree(bool condFree=false)
virtual void acknowledgeNewRun(int run)
virtual void setUseErrorParam(int v=0)
void constrainOrphans(const double *sigma, const char *match=nullptr)
virtual void defineMatrices()
virtual void writeSensorPositions(const char *outFName)
AlignableDetector()=default
bool getInitDOFsDone() const
void setObligatory(int tp, bool v=true)
int volID2SID(int vid) const
virtual void addVolume(AlignableVolume *vol)
virtual void updateL2GRecoMatrices()
virtual void updatePointByTrackInfo(AlignmentPoint *pnt, const trackParam_t *t) const
bool IsDisabledCosm() const
bool ownsDOFID(int id) const
AlignableVolume * getVolOfDOFID(int id) const
AlignableVolume * getVolume(int id) const
bool IsDisabledColl() const
virtual double getCalibDOFValWithCal(int) const
bool isFreeDOF(int dof) const
void setDOFCondition(int dof, float condErr, int lev=-1, const std::string ®exStr="")
virtual void writeAlignmentResults() const
virtual void writePedeInfo(FILE *parOut, const Option_t *opt="") const
bool isObligatory(int tp) const
bool getInitGeomDone() const
void setFreeDOFPattern(uint64_t pat)
virtual void cacheReferenceCCDB()
void addAutoConstraints() const
void Print(const Option_t *opt="") const override
void setAddError(double y, double z)
bool isCondDOF(int dof) const
virtual void writeCalibrationResults() const
virtual const char * getCalibDOFName(int) const
void setAddError(double y, double z)
virtual void applyAlignmentFromMPSol()
virtual void prepareMatrixL2G(bool reco=false)
virtual void writePedeInfo(FILE *parOut, const Option_t *opt="") const
virtual bool isSensor() const
void Print(const Option_t *opt="") const override
virtual void prepareMatrixL2GIdeal()
void addAutoConstraints()
const TGeoHMatrix & getMatrixL2G() const
void setGlobalDeltaRef(const TGeoHMatrix &mat)
virtual void writeLabeledPedeResults(FILE *parOut) const
const TGeoHMatrix & getMatrixL2GReco() const
bool isFreeDOF(int dof) const
bool ownsDOFID(int id) const
AlignableVolume * getVolOfDOFID(int id) const
void setChildrenConstrainPattern(uint32_t pat)
bool isDummyEnvelope() const
void createAlignmentObjects(std::vector< o2::detectors::AlignParam > &arr, const TGeoHMatrix *envelopeDelta=nullptr) const
const TGeoHMatrix & getMatrixL2GIdeal() const
virtual int finalizeStat()
AlignableVolume * getParent() const
virtual void prepareMatrixT2L()
const char * getSymName() const
void setFreeDOFPattern(uint32_t pat)
void setObligatoryDetector(DetID id, int tp, bool v=true)
void expandGlobalsBy(int n)
void setParLab(int par, int lab)
const float * getParVals() const
void setFirstParGloID(int id)
float getParVal(int par) const
int getNCalibDOFs() const
const float * getParErrs() const
float getParErr(int par) const
void setParErr(int par, double e=0)
static GRPGeomHelper & instance()
static constexpr std::string_view CCDBOBJECT
Static class with identifiers, bitmasks and names for ALICE detectors.
static constexpr const char * getName(ID id)
names of defined detectors
bool match(const std::vector< std::string > &queries, const char *pattern)
constexpr bool isZeroAbs(double d) noexcept
typename track::TrackParametrizationWithError< double > trackParam_t
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"