Skip to content
Snippets Groups Projects
Commit 80d14ecb authored by Dave Casper's avatar Dave Casper
Browse files

Generate neutral alignment files

parent 7eaf54a7
No related branches found
No related tags found
No related merge requests found
Showing
with 1316 additions and 22 deletions
......@@ -13,6 +13,7 @@ atlas_depends_on_subdirs( PRIVATE
Scintillator/ScintDetDescr/ScintReadoutGeometry
Tracker/TrackerDetDescr/TrackerReadoutGeometry
MagneticField/MagFieldInterfaces
Tracker/TrackerAlignTools/TrackerAlignGenTools
)
# External dependencies:
......
#!/usr/bin/env python
import sys
def GeoModelTestCfg(flags):
def GeoModelTestCfg(flags, name="GeoModelTestAlg", **kwargs):
kwargs.setdefault("AlignDbTool", "TrackerAlignDBTool/DefaultAlignDBTool")
from FaserGeoModel.FaserGeoModelConfig import FaserGeometryCfg
a = FaserGeometryCfg(flags)
......@@ -11,18 +13,20 @@ def GeoModelTestCfg(flags):
fieldSvc = a.getService("FaserFieldSvc")
from GeoModelTest.GeoModelTestConf import GeoModelTestAlg
a.addEventAlgo(GeoModelTestAlg())
a.getEventAlgo("GeoModelTestAlg").FieldService = fieldSvc
a.addEventAlgo(GeoModelTestAlg(name, **kwargs))
a.getEventAlgo(name).FieldService = fieldSvc
return a
if __name__ == "__main__":
# from AthenaCommon.Logging import log, logging
#from AthenaCommon.Constants import VERBOSE, INFO
# from AthenaCommon.Constants import VERBOSE, INFO
# log.setLevel(VERBOSE)
from AthenaCommon.Configurable import Configurable
from AthenaConfiguration.ComponentFactory import CompFactory
Configurable.configurableRun3Behavior = True
# Flag definition
from CalypsoConfiguration.AllConfigFlags import ConfigFlags
......@@ -43,14 +47,20 @@ if __name__ == "__main__":
# Configuration
from AthenaConfiguration.MainServicesConfig import MainServicesSerialCfg
# from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from AthenaPoolCnvSvc.PoolWriteConfig import PoolWriteCfg
acc = MainServicesSerialCfg()
# acc.merge(PoolReadCfg(ConfigFlags))
acc.merge(GeoModelTestCfg(ConfigFlags))
acc.merge(PoolWriteCfg(ConfigFlags))
acc.merge(GeoModelTestCfg(ConfigFlags,
AlignDbTool=CompFactory.TrackerAlignDBTool("AlignDbTool",
OutputTool = CompFactory.AthenaOutputStreamTool("DbStreamTool",
OutputFile = "myAlignDb.pool.root"))))
acc.getService("IOVDbSvc").dbConnection = "sqlite://;schema=ALLP200.db;dbname=OFLP200"
acc.getService("PoolSvc").SortReplicas = False # protects against random failures to find sqlite file
# logging.getLogger('forcomps').setLevel(VERBOSE)
# acc.foreach_component("*").OutputLevel = VERBOSE
# acc.foreach_component("*ClassID*").OutputLevel = INFO
# Execute and finish
sys.exit(int(acc.run(maxEvents=1).isFailure()))
sys.exit(int(acc.run(maxEvents=1).isFailure()))
\ No newline at end of file
......@@ -22,6 +22,7 @@ GeoModelTestAlg::~GeoModelTestAlg() { }
StatusCode GeoModelTestAlg::initialize()
{
ATH_CHECK(m_field.retrieve());
ATH_CHECK(m_alignTool.retrieve());
return StatusCode::SUCCESS;
}
......@@ -62,6 +63,11 @@ StatusCode GeoModelTestAlg::execute()
ATH_CHECK(testField());
ATH_CHECK(m_alignTool->createDB());
ATH_CHECK(m_alignTool->sortTrans());
ATH_CHECK(m_alignTool->outputObjs());
ATH_CHECK(m_alignTool->fillDB("",1,0,9999999,9999999));
return StatusCode::SUCCESS;
}
......
#include "AthenaBaseComps/AthAlgorithm.h"
#include "MagFieldInterfaces/IMagFieldSvc.h"
#include "TrackerAlignGenTools/ITrackerAlignDBTool.h"
// Minimalist algorithm to test retrieval of constructed geometry from DetStore
......@@ -32,4 +33,6 @@ class GeoModelTestAlg : public AthAlgorithm
Gaudi::Property<int> m_numSctStripsPerSensor {this, "NumSCTStripsPerSensor", 768,"Number of readout strips per sensor in the SCT detector"};
ServiceHandle<MagField::IMagFieldSvc> m_field { this, "FieldService", "FaserFieldSvc" };
ToolHandle<ITrackerAlignDBTool> m_alignTool { this, "AlignDbTool", "TrackerAlignDBTool" };
};
\ No newline at end of file
################################################################################
# Package: TrackerAlignGenTools
################################################################################
# Declare the package name:
atlas_subdir( TrackerAlignGenTools )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaBaseComps
Control/AthenaKernel
Database/AthenaPOOL/AthenaPoolUtilities
DetectorDescription/GeoPrimitives
DetectorDescription/Identifier
# Event/EventPrimitives
# InnerDetector/InDetAlignEvent/InDetAlignTrkInfo
# InnerDetector/InDetAlignTools/InDetAlignToolInterfaces
# InnerDetector/InDetRecEvent/InDetPrepRawData
# Tracking/TrkEvent/TrkEventPrimitives
# Tracking/TrkEvent/TrkEventUtils
# Tracking/TrkEvent/TrkTrack
# Tracking/TrkExtrapolation/TrkExInterfaces
# Tracking/TrkTools/TrkToolInterfaces
Event/EventContainers
PRIVATE
Control/AthContainers
Database/RegistrationServices
DetectorDescription/FaserDetDescr
DetectorDescription/DetDescrCond/DetDescrConditions
GaudiKernel
Tracker/TrackerDetDescr/TrackerIdentifier
Tracker/TrackerDetDescr/TrackerReadoutGeometry
# Simulation/G4Sim/TrackRecord
# Tracking/TrkEvent/TrkMeasurementBase
# Tracking/TrkEvent/TrkParameters
# Tracking/TrkEvent/TrkPrepRawData
# Tracking/TrkEvent/TrkRIO_OnTrack
# Tracking/TrkEvent/TrkTrackSummary
# Tracking/TrkEvent/TrkTruthData
# Tracking/TrkFitter/TrkFitterInterfaces
)
# External dependencies:
find_package( CLHEP )
find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
find_package( Eigen )
find_package( HepMC )
find_package( HepPDT )
# Component(s) in the package:
atlas_add_component( TrackerAlignGenTools
src/*.cxx
src/components/*.cxx
INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
LINK_LIBRARIES ${CORAL_LIBRARIES} ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GeoPrimitives Identifier EventPrimitives AthenaKernel AthContainers FaserDetDescr DetDescrConditions GaudiKernel TrackerIdentifier TrackerReadoutGeometry )
# LINK_LIBRARIES ${CORAL_LIBRARIES} ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} ${HEPMC_LIBRARIES} ${EIGEN_LIBRARIES} AthenaBaseComps AthenaPoolUtilities GeoPrimitives Identifier EventPrimitives InDetAlignTrkInfo InDetPrepRawData TrkEventPrimitives TrkEventUtils TrkTrack TrkExInterfaces TrkToolInterfaces AthenaKernel AthContainers AtlasDetDescr DetDescrConditions GaudiKernel InDetIdentifier InDetReadoutGeometry TrkMeasurementBase TrkParameters TrkPrepRawData TrkRIO_OnTrack TrkTrackSummary TrkTruthData TrkFitterInterfaces EventContainers )
# Install files from the package:
atlas_install_headers( TrackerAlignGenTools )
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TRACKERALIGNTOOLS_ALIGNDBTOOL_IH
#define TRACKERALIGNTOOLS_ALIGNDBTOOL_IH
// ITrackerAlignDBTool.h
// an AlgTool to manage the tracker alignment database classes
// abstract interface class, actual implementation and doc
// is in TrackerAlignDBTool.h
// Richard Hawkings, started 11/4/05
#include "GaudiKernel/IAlgTool.h"
#include "EventPrimitives/EventPrimitives.h"
#include "GeoPrimitives/GeoPrimitives.h"
class Identifier;
static const InterfaceID
IID_TRACKERALIGN_ITrackerAlignDBTool("ITrackerAlignDBTool",1,0);
class ITrackerAlignDBTool: virtual public IAlgTool {
public:
static const InterfaceID& interfaceID();
virtual StatusCode createDB() const =0;
// virtual void dispGroup(const int, const int, const int, const int, const int,
// const float, const float, const float,
// const int, const int, const int) const =0;
// virtual void writeFile(const bool, const std::string) const =0;
// virtual void writeGlobalFolderFile( const std::string file) const =0;
// virtual void readTextFile(const std::string) const =0;
// virtual void readNtuple(const std::string) const =0;
// virtual bool idToDetSet(const Identifier,
// int&,int&,int&,int&,int&) const =0;
// virtual std::string dirkey(const Identifier&, const int) const =0;
// virtual std::string dirkey(const int,const int, const int, const int) const =0; // new function
// virtual bool setTrans(const Identifier&, const int, const Amg::Transform3D& )
// const =0;
// virtual bool setTrans(const Identifier& ident, const int level,
// const Amg::Vector3D & translate, double alpha, double beta, double gamma) const = 0;
// virtual bool tweakTrans(const Identifier&, const int, const Amg::Transform3D&)
// const =0;
// virtual bool tweakTrans(const Identifier& ident, const int level,
// const Amg::Vector3D& translate, double alpha,
// double beta, double gamma) const = 0;
// virtual Identifier getL1L2fromL3Identifier( const Identifier& ident
// , const int& level
// ) const=0 ;
// virtual Amg::Transform3D getTransL123( const Identifier& ident ) const=0 ;
// virtual Amg::Transform3D getTrans(const Identifier&, const int) const=0;
virtual StatusCode outputObjs() const=0;
virtual StatusCode fillDB(const std::string, const unsigned int,const unsigned int,
const unsigned int, const unsigned int) const=0;
virtual StatusCode printDB(const int) const=0;
virtual StatusCode sortTrans() const=0;
// virtual void extractAlphaBetaGamma(const Amg::Transform3D & trans,
// double& alpha, double& beta, double &gamma) const=0;
};
inline const InterfaceID& ITrackerAlignDBTool::interfaceID()
{ return IID_TRACKERALIGN_ITrackerAlignDBTool; }
#endif // TRACKERALIGNTOOLS_ALIGNDBTOOL_IH
This diff is collapsed.
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TRACKERALIGNGENTOOLS_ALIGNDBTOOL_H
#define TRACKERALIGNGENTOOLS_ALIGNDBTOOL_H
// TrackerAlignDBTool.h
// an AlgTool to manage the tracker alignment database classes
// Richard Hawkings, started 8/4/05
//
// This AlgTool provides utilities to manage the Tracker alignment conditions
// data in the transient store, and to read and write it in a variety of
// formats
// Tool methods provided:
// createDB - create a 'null' set of AlignableTransforms, with no shifts
// dispGroup - apply a pattern to displace a group of modules randomly
// or systematically
// printDB - printout details of all the module transforms
// writeFile - export database contents on a text file or ntuple
// readTextFile - import database from text file
// readNtuple - import database from ntuple
//
// The following utility methods are also exposed
// idToDetSet - convert an SCT/pixel Identifier to set of integers
// specifying detector,barrel/ec,layer,ring, sector (and side for SCT)
// dirkey - return the AlignableTransform TDS key for a given module
// (by Identifier or set of integers)
// setTrans - set the transformation for a particular module, identified by
// a given Identifier
// tweakTrans - tweak (add to existing transform) the transformation for
// a particular module, identified by a given Identifier
#include <vector>
#include <string>
#include "AthenaBaseComps/AthAlgTool.h"
#include "GaudiKernel/ServiceHandle.h"
#include "TrackerAlignGenTools/ITrackerAlignDBTool.h"
#include "AthenaPoolUtilities/CondAttrListCollection.h"
#include "AthenaKernel/IAthenaOutputStreamTool.h"
class FaserSCT_ID;
class AlignableTransform;
namespace TrackerDD {
class SCT_DetectorManager;
}
class TrackerAlignDBTool: virtual public ITrackerAlignDBTool, public AthAlgTool {
public:
TrackerAlignDBTool(const std::string& type, const std::string& name,
const IInterface* parent);
virtual ~TrackerAlignDBTool();
virtual StatusCode initialize();
virtual StatusCode finalize();
// tool methods
// create null database in TDS for subsequent manipulation
virtual StatusCode createDB() const;
// displace a group of modules
// modules to effect are specified by dettype (1=pixel, 2=SCT, -1 both),
// bec (barrel=0, 2 for both endcaps, -1 for all), layer (0 to n-1, -1=all)
// ring (-1=all) and sector (-1=all)
// rphidisp,rdisp and zdisp specify the offsets to be used
// syst specifies what will be done, 1=systematic displacement of affected
// modules, 2=random (rphidisp etc are RMS), 3,4=systematic and random
// displacements but interpreting r/phi/zdisp as x/y/z, 5 chooses the
// same randomised numbers for all modules;
// level specifies the level oill look for the right balance of CERN staff supervisors and ATLAS
//USERS supervisors; f transformations affected
// skip=n optionally skips n random numbers to enable different patterns
// virtual void dispGroup(const int dettype, const int bec, const int layer,
// const int ring, const int sector,
// const float rphidisp, const float rdisp, const float zdisp,
// const int syst, const int level, const int skip) const;
// write database contents to flat text file or ntuple
// for flat file, file gives filename, for ntuple, file is e.g.
// /NTUPLES/FILE1
// virtual void writeFile(const bool ntuple, const std::string file) const;
// write GlobalFolder txt files
// virtual void writeGlobalFolderFile( const std::string file) const;
// read back database from text file
// virtual void readTextFile(const std::string file) const;
// read back database from text file
// void readOldTextFile(const std::string file) const;
// read back database from ntuple
// virtual void readNtuple(const std::string file) const;
// set a particular transform specified by Identifier
// virtual bool setTrans(const Identifier& ident, const int level,
// const Amg::Transform3D& trans) const;
// As above but takes translation and rotations alpha, beta, gamma (rotations around x,y,z axes) as input.
// Calculates transform as HepGeom::Translate3D(translate) * HepGeom::RotateX3D(alpha) * HepGeom::RotateY3D(beta) * HepGeom::RotateZ3D(gamma)
// virtual bool setTrans(const Identifier& ident, const int level,
// const Amg::Vector3D& translate, double alpha, double beta, double gamma) const;
// tweak a particular transform specified by Identifier (i.e. add to
// already existing transformation)
// virtual bool tweakTrans(const Identifier& ident, const int level,
// const Amg::Transform3D& trans) const;
// As above but takes translation and rotations alpha, beta, gamma (rotations around x,y,z axes) as input.
// Calculates transform as HepGeom::Translate3D(translate) * HepGeom::RotateX3D(alpha) * HepGeom::RotateY3D(beta) * HepGeom::RotateZ3D(gamma)
// virtual bool tweakTrans(const Identifier& ident, const int level,
// const Amg::Vector3D& translate, double alpha, double beta, double gamma) const;
/** This is the tweak function for the GlobalFolder DB **/
// virtual bool tweakGlobalFolder(const Identifier& ident, const int level,
// const Amg::Transform3D& trans) const ;
/** convert L3 module identifier to L1 or L2 */
// virtual Identifier getL1L2fromL3Identifier( const Identifier& ident
// , const int& level
// ) const ;
/** get cumulative L1, L2, L3 trafo for (L3-) module. Result is in local frame. */
// virtual Amg::Transform3D getTransL123( const Identifier& ident ) const ;
/** return value of particular transform specified by identifier and level
calculates L1 and L2 identifiers automatically by getL1L2fromL3Identifier
if L3 identifier passed. L1, L2 are in global, L3 in local frame. */
// virtual Amg::Transform3D getTrans( const Identifier& ident
// , const int level
// ) const ;
// write the transforms to outputstream
virtual StatusCode outputObjs() const;
// write the transform IOVs to IOVDB
virtual StatusCode fillDB(const std::string tag,
const unsigned int run1, const unsigned int event1,
const unsigned int run2, const unsigned int event2) const;
// print the transforms, level=1 lists sizes, level=2 lists all transforms
virtual StatusCode printDB(const int level) const;
// sort all the AlignableTransform objects so searches/inserts work properly
virtual StatusCode sortTrans() const;
private:
// convert an Identifier to a set of integers specifying station
// layer, ring (eta), sector (phi), and side (0/1)
virtual bool idToDetSet(const Identifier ident,
int& bec,int& layer,int& ring,int& sector,int& side) const;
// return the AlignableTransform name where the transform for the given
// module can be found, 3 levels corresponding to alignment hierarchy
virtual std::string dirkey(const Identifier&, const int) const;
virtual std::string dirkey(const int,const int, const int, const int) const;
//calculate three rotations around locX,locY,locY = alpha,beta,gamma out of an HepGeom::Transform3D
void extractAlphaBetaGamma(const Amg::Transform3D & trans,
double& alpha, double& beta, double &gamma) const;
ServiceHandle < IToolSvc > p_toolsvc;
const FaserSCT_ID* m_sctid;
const TrackerDD::SCT_DetectorManager* m_sctman;
std::vector<std::string> m_alignobjs;
std::vector<int> m_alignchans;
bool m_par_scttwoside; // create structures with separated SCT module sides
/** name of the root folder for constants, which can be set via
the <key> syntax. Default: /Tracker/Align. */
std::string m_par_dbroot;
/** the base part of the key for loading AlignableTransform objects
from the Transient Data Store. Default: /Tracker/Align */
std::string m_par_dbkey;
AlignableTransform* getTransPtr(const std::string key) const;
const AlignableTransform* cgetTransPtr(const std::string key) const;
bool m_dynamicDB;
bool m_forceUserDBConfig;
mutable ToolHandle<IAthenaOutputStreamTool> m_outputTool { this, "OutputTool", "AthenaOutputStreamTool/CondStream1"} ;
};
#endif // TRACKERALIGNGENTOOLS_ALIGNDBTOOL_H
#include "../TrackerAlignDBTool.h"
// #include "InDetAlignGenTools/InDetAlignTrackSelTool.h"
// #include "InDetAlignGenTools/InDetAlignFillTrack.h"
// #include "InDetAlignGenTools/InDetAlignOverlapTool.h"
// #include "InDetAlignGenTools/InDetAlignFillSiCluster.h"
// #include "InDetAlignGenTools/RefitSiOnlyTool.h"
// #include "InDetAlignGenTools/InDetAlignHitQualSelTool.h"
DECLARE_COMPONENT( TrackerAlignDBTool )
// DECLARE_COMPONENT( InDetAlignTrackSelTool )
// DECLARE_COMPONENT( InDetAlignFillTrack )
// DECLARE_COMPONENT( InDetAlignOverlapTool )
// DECLARE_COMPONENT( InDetAlignFillSiCluster )
// DECLARE_COMPONENT( InDetAlignHitQualSelTool )
// DECLARE_COMPONENT( InDetAlignment::RefitSiOnlyTool )
......@@ -179,7 +179,17 @@ void SCT_DetectorFactory::create(GeoPhysVol *world)
m_detectorManager->addAlignFolderType(TrackerDD::static_run1);
m_detectorManager->addFolder("/Tracker/Align");
m_detectorManager->addChannel("/Tracker/Align/Tracker", 3, TrackerDD::global);
m_detectorManager->addChannel("/Tracker/Align/Stations", 3, TrackerDD::global); // Stations in world
m_detectorManager->addChannel("/Tracker/Align/Planes", 2, TrackerDD::global); // Planes in world
m_detectorManager->addChannel("/Tracker/Align/Upstream1", 1, TrackerDD::local); // Modules in planes and wafers in modules
m_detectorManager->addChannel("/Tracker/Align/Upstream2", 1, TrackerDD::local);
m_detectorManager->addChannel("/Tracker/Align/Upstream3", 1, TrackerDD::local);
m_detectorManager->addChannel("/Tracker/Align/Central1" , 1, TrackerDD::local);
m_detectorManager->addChannel("/Tracker/Align/Central2" , 1, TrackerDD::local);
m_detectorManager->addChannel("/Tracker/Align/Central3" , 1, TrackerDD::local);
m_detectorManager->addChannel("/Tracker/Align/Downstream1", 1, TrackerDD::local);
m_detectorManager->addChannel("/Tracker/Align/Downstream2", 1, TrackerDD::local);
m_detectorManager->addChannel("/Tracker/Align/Downstream3", 1, TrackerDD::local);
// m_detectorManager->addFolder("/Indet/Align");
// m_detectorManager->addChannel("/Indet/Align/ID",3,InDetDD::global);
// m_detectorManager->addChannel("/Indet/Align/SCT",2,InDetDD::global);
......
......@@ -107,13 +107,11 @@ SCT_Plane::build(SCT_Identifier id)
plane->add(new GeoNameTag("Side#" + intToString(side)));
plane->add(new GeoIdentifierTag(side));
int iz = -1 + 2 * side;
GeoAlignableTransform* transform = new GeoAlignableTransform(GeoTrf::Translate3D(0.0, 0.0, iz * m_sideHalfPitch) *
GeoTrf::RotateY3D(-iz * 90 * Gaudi::Units::deg));
GeoTransform* transform = new GeoTransform(GeoTrf::Translate3D(0.0, 0.0, iz * m_sideHalfPitch) *
GeoTrf::RotateY3D(-iz * 90 * Gaudi::Units::deg));
plane->add(transform);
GeoVPhysVol* halfPlanePV = m_halfPlane->build(id, -iz);
plane->add(halfPlanePV);
// Store alignable transform; unclear if we can do this...
m_detectorManager->addAlignableTransform(2, id.getWaferId(), transform, halfPlanePV);
}
// Extra Material
......
......@@ -179,7 +179,7 @@ namespace TrackerDD {
FrameType frame,
GeoVAlignmentStore* alignStore) const
{
ATH_MSG_FATAL("Called un-updated SCT_DetectorManager::setAlignableTransformDelta with level " << level );
if (level == 0) { // 0 - At the element level
// We retrieve it via a hashId.
......@@ -329,8 +329,9 @@ namespace TrackerDD {
// New global alignment folders
bool SCT_DetectorManager::processGlobalAlignment(const std::string & key, int level, FrameType frame,
const CondAttrListCollection* obj, GeoVAlignmentStore* alignStore) const
{
ATH_MSG_INFO("Processing new global alignment containers with key " << key << " in the " << frame << " frame at level ");
{
ATH_MSG_FATAL("Calling un-updated SCT_DetectorManager::processGlobalAlignment method with key " << key << " and level " << level);
ATH_MSG_INFO("Processing new global alignment containers with key " << key << " in the " << frame << " frame at level " << level);
const CondAttrListCollection* atrlistcol=obj;
if(atrlistcol==nullptr and m_detStore->retrieve(atrlistcol,key)!=StatusCode::SUCCESS) {
......@@ -394,13 +395,15 @@ namespace TrackerDD {
}
bool SCT_DetectorManager::processSpecialAlignment(
const std::string &, TrackerDD::AlignFolderType) const {
const std::string &,
TrackerDD::AlignFolderType) const {
return false;
}
bool SCT_DetectorManager::processSpecialAlignment(const std::string& /*key*/,
const CondAttrListCollection* /*obj*/,
GeoVAlignmentStore* /*alignStore*/) const {
bool SCT_DetectorManager::processSpecialAlignment(
const std::string& /*key*/,
const CondAttrListCollection* /*obj*/,
GeoVAlignmentStore* /*alignStore*/) const {
return false;
}
......
......@@ -205,7 +205,7 @@ namespace TrackerDD
StatusCode TrackerDetectorManager::align(const RawAlignmentObjects& alignObjects, GeoVAlignmentStore* alignStore) const
{
ATH_MSG_DEBUG("align() called from an alignment CondAlg");
ATH_MSG_DEBUG("align() called from an alignment CondAlg with " << alignObjects.size() << " folders in RawAlignmentObjects");
if (!getIdHelper()) return StatusCode::SUCCESS; // To Do: is it really a success?
bool alignmentChange = false;
......@@ -273,7 +273,7 @@ namespace TrackerDD
{
bool alignmentChange = false;
ATH_MSG_DEBUG("Dealing with key as container");
ATH_MSG_DEBUG("Dealing with AlignmentContainer " << key );
const AlignableTransformContainer* container;
if (StatusCode::SUCCESS!=m_detStore->retrieve(container, key)) {
ATH_MSG_ERROR("Cannot find AlignableTransformContainer for key "
......@@ -309,11 +309,16 @@ namespace TrackerDD
// This should not occur in normal situations so we force job to abort.
throw std::runtime_error("Unable to apply Tracker alignments.");
}
else
{
ATH_MSG_DEBUG("Processing container with " << container->size() << " AlignableTransforms");
}
// loop over all the AlignableTransform objects in the collection
// use only the last ones.
std::map<const std::string, const AlignableTransform*> stringToTransform;
for (DataVector<AlignableTransform>::const_iterator pat=container->begin();
pat!=container->end();++pat) {
ATH_MSG_DEBUG("Found AlignableTransform with tag " << (*pat)->tag());
stringToTransform[(*pat)->tag()] = *pat;
}
for (std::pair<const std::string, const AlignableTransform*> value: stringToTransform) {
......@@ -333,9 +338,9 @@ namespace TrackerDD
// returns -1 if unrecognized.
const LevelInfo & levelInfo = getLevel(key);
if (levelInfo.isValid()) {
ATH_MSG_VERBOSE("Processing channel: " << key);
ATH_MSG_VERBOSE("Processing channel: " << key << " with " << transformCollection->size() << " elements");
} else {
ATH_MSG_DEBUG("Channel " << key << " not registered in this manager");
ATH_MSG_DEBUG("Channel " << key << " with " << transformCollection->size() << " elements not registered in this manager");
}
// return silently if unrecognised - this can happen in container mode
// when a single container holds transforms for both pixel and SCT
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment