ATLAS Offline Software
Loading...
Searching...
No Matches
SurveyConstraintTestAlg Class Reference

#include <SurveyConstraintTestAlg.h>

Inheritance diagram for SurveyConstraintTestAlg:
Collaboration diagram for SurveyConstraintTestAlg:

Public Member Functions

virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
virtual StatusCode finalize () override
StatusCode BookHist ()
void CreateMisAlignNtuple ()
 AthAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ISurveyConstraint * m_SurvConstr {}
const PixelID * m_pixid {}
const SCT_ID * m_sctid {}
TH1 * m_h_PixEC_Align_Disk [6] {}
TH1 * m_h_PixEC_Align_first [6] {}
TH1 * m_h_PixEC_Align [6] {}
int m_AlignResults_nModules {}
NTuple::Item< double > m_AlignResults_x
NTuple::Item< double > m_AlignResults_y
NTuple::Item< double > m_AlignResults_z
NTuple::Item< double > m_AlignResults_alpha
NTuple::Item< double > m_AlignResults_beta
NTuple::Item< double > m_AlignResults_gamma
NTuple::Item< long > m_AlignResults_Identifier_ID
NTuple::Item< long > m_AlignResults_Identifier_SCT
NTuple::Item< long > m_AlignResults_Identifier_BarrelEC
NTuple::Item< long > m_AlignResults_Identifier_LayerDisc
NTuple::Item< long > m_AlignResults_Identifier_Phi
NTuple::Item< long > m_AlignResults_Identifier_Eta
Gaudi::Property< int > m_NLoop {this, "NLoop", 1}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 18 of file SurveyConstraintTestAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 376 of file AthCommonDataStore.h.

Member Function Documentation

◆ AthAlgorithm()

AthAlgorithm::AthAlgorithm ( const std::string & name,
ISvcLocator * pSvcLocator )

Constructor.

Definition at line 31 of file AthAlgorithm.cxx.

11 :
12 AthCommonAlgorithm<Gaudi::Algorithm>( name, pSvcLocator )
13{
14 // default cardinality for non-reentrant algorithms
15 setProperty( "Cardinality", 1 ).orThrow("Unable to set property 'Cardinality'", name);
16}
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
AthCommonAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)

◆ BookHist()

StatusCode SurveyConstraintTestAlg::BookHist ( )

Definition at line 260 of file SurveyConstraintTestAlg.cxx.

260 {
261 ServiceHandle<ITHistSvc> histSvc ("THistSvc", "SurveyConstraintTestAlg");
262 ATH_CHECK( histSvc.retrieve() );
263
264 auto book = [&] (TH1*& h,
265 const char* name,
266 const char* title,
267 int nbins,
268 float xlo,
269 float xhi)
270 {
271 h = new TH1F (name, title, nbins, xlo, xhi);
272 const static std::string prefix = "/stat/MisAlign/";
273 return histSvc->regHist (prefix + name, h);
274 };
275
276 ATH_CHECK( book (m_h_PixEC_Align_Disk[0], "Misalignment Disk X [mu]", "Misalignment Disk X [mu]",100, -50.,50.) );
277 ATH_CHECK( book (m_h_PixEC_Align_Disk[1], "Misalignment Disk Y [mu]", "Misalignment Disk Y [mu]",100, -100.,100.) );
278 ATH_CHECK( book (m_h_PixEC_Align_Disk[2], "Misalignment Disk Z [mu]", "Misalignment Disk Z [mu]",100, -200.,200.) );
279 ATH_CHECK( book (m_h_PixEC_Align_Disk[3], "Misalignment Disk PhiX [mrad]", "Misalignment Disk PhiX [mrad]",100, -2.,2.) );
280 ATH_CHECK( book (m_h_PixEC_Align_Disk[4], "Misalignment Disk PhiY [mrad]", "Misalignment Disk PhiY [mrad]",100, -5.,5.) );
281 ATH_CHECK( book (m_h_PixEC_Align_Disk[5], "Misalignment Disk PhiZ [mrad]", "Misalignment Disk PhiZ [mrad]",100, -2.,2.) );
282
283 ATH_CHECK( book (m_h_PixEC_Align_first[0], "Misalignment first X [mu]", "Misalignment first X [mu]",100, -50.,50.) );
284 ATH_CHECK( book (m_h_PixEC_Align_first[1], "Misalignment first Y [mu]", "Misalignment first Y [mu]",100, -100.,100.) );
285 ATH_CHECK( book (m_h_PixEC_Align_first[2], "Misalignment first Z [mu]", "Misalignment first Z [mu]",100, -200.,200.) );
286 ATH_CHECK( book (m_h_PixEC_Align_first[3], "Misalignment first PhiX [mrad]", "Misalignment first PhiX [mrad]",100, -2.,2.) );
287 ATH_CHECK( book (m_h_PixEC_Align_first[4], "Misalignment first PhiY [mrad]", "Misalignment first PhiY [mrad]",100, -5.,5.) );
288 ATH_CHECK( book (m_h_PixEC_Align_first[5], "Misalignment first PhiZ [mrad]", "Misalignment first PhiZ [mrad]",100, -2.,2.) );
289
290 ATH_CHECK( book (m_h_PixEC_Align[0], "Misalignment X [mu]", "Misalignment X [mu]",100, -50.,50.) );
291 ATH_CHECK( book (m_h_PixEC_Align[1], "Misalignment Y [mu]", "Misalignment Y [mu]",100, -100.,100.) );
292 ATH_CHECK( book (m_h_PixEC_Align[2], "Misalignment Z [mu]", "Misalignment Z [mu]",100, -200.,200.) );
293 ATH_CHECK( book (m_h_PixEC_Align[3], "Misalignment PhiX [mrad]", "Misalignment PhiX [mrad]",100, -2.,2.) );
294 ATH_CHECK( book (m_h_PixEC_Align[4], "Misalignment PhiY [mrad]", "Misalignment PhiY [mrad]",100, -5.,5.) );
295 ATH_CHECK( book (m_h_PixEC_Align[5], "Misalignment PhiZ [mrad]", "Misalignment PhiZ [mrad]",100, -2.,2.) );
296
297 return StatusCode::SUCCESS;
298}
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual StatusCode book()
Declare tuple variables.
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)

◆ CreateMisAlignNtuple()

void SurveyConstraintTestAlg::CreateMisAlignNtuple ( )

Definition at line 49 of file SurveyConstraintTestAlg.cxx.

49 {
51 // initialize AlignResults NTuple
52 const std::string resultPath{"NTUPLES/FILE1/InitialAlignment"};
53 NTupleFilePtr file1(ntupleSvc(), "/NTUPLES/FILE1");
54
55 NTuplePtr nt(ntupleSvc(), resultPath);
56 if ( !nt ) { // Check if already booked
57 nt = ntupleSvc()->book(resultPath, CLID_ColumnWiseTuple, "InitialAlignment");
58 if ( nt ) {
59 ATH_MSG_INFO( "InitialAlignment ntuple booked." );
60
61 sc = nt->addItem("x" , m_AlignResults_x);
62 sc = nt->addItem("y" , m_AlignResults_y);
63 sc = nt->addItem("z" , m_AlignResults_z);
64 sc = nt->addItem("alpha" , m_AlignResults_alpha);
65 sc = nt->addItem("beta" , m_AlignResults_beta);
66 sc = nt->addItem("gamma" , m_AlignResults_gamma);
67 sc = nt->addItem("ID" , m_AlignResults_Identifier_ID);
68 sc = nt->addItem("PixelSCT" , m_AlignResults_Identifier_SCT);
69 sc = nt->addItem("BarrelEC" , m_AlignResults_Identifier_BarrelEC);
70 sc = nt->addItem("LayerDisc" , m_AlignResults_Identifier_LayerDisc);
71 sc = nt->addItem("Phi" , m_AlignResults_Identifier_Phi);
72 sc = nt->addItem("Eta" , m_AlignResults_Identifier_Eta);
73
74 } else { // did not manage to book the N tuple....
75 ATH_MSG_ERROR( "Failed to book InitialAlignment ntuple." );
76 }
77 }
78
80 int SCT,barrel_ec,layer_disk,phi,eta;
81 std::map<Identifier, SurveyConstraintModule*, std::less<Identifier> > ModuleMap;
82 m_SurvConstr -> MMap(ModuleMap);
83 std::map<Identifier, SurveyConstraintModule*, std::less<Identifier> >::iterator it;
84 for (it = ModuleMap.begin(); it != ModuleMap.end(); ++it) {
85 const Identifier& ModuleID = (it->second)->moduleID();
86 SurveyConstraintModule* mut = ModuleMap[ModuleID];
87 if(mut->isPixel()){
88 SCT = 1;
89 barrel_ec = m_pixid->barrel_ec(ModuleID);
90 layer_disk = m_pixid->layer_disk(ModuleID);
91 phi = m_pixid->phi_module(ModuleID);
92 eta = m_pixid->eta_module(ModuleID);
93 } else {
94 if (m_sctid->side(ModuleID) != 0) continue;
95 SCT = 2;
96 barrel_ec = m_sctid->barrel_ec(ModuleID);
97 layer_disk = m_sctid->layer_disk(ModuleID);
98 phi = m_sctid->phi_module(ModuleID);
99 eta = m_sctid->eta_module(ModuleID);
100 }
101 Amg::VectorX Misalign = mut->DOCA_Vector();
102 m_AlignResults_x = Misalign[0];
103 m_AlignResults_y = Misalign[1];
104 m_AlignResults_z = Misalign[2];
105 m_AlignResults_alpha = Misalign[3];
106 m_AlignResults_beta = Misalign[4];
107 m_AlignResults_gamma = Misalign[5];
114
116
117 // Write out AlignResults ntuple
118 sc = ntupleSvc()->writeRecord(resultPath);
119 if (sc.isFailure()) {
120 ATH_MSG_ERROR( "Could not write InitialAlignment ntuple." );
121 }
122
123 } // end of module loop
124 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_INFO(x,...)
static Double_t sc
@ SCT
Definition RegSelEnums.h:25
INTupleSvc * ntupleSvc()
Amg::VectorX DOCA_Vector() const
NTuple::Item< long > m_AlignResults_Identifier_SCT
NTuple::Item< double > m_AlignResults_gamma
NTuple::Item< long > m_AlignResults_Identifier_ID
NTuple::Item< double > m_AlignResults_alpha
NTuple::Item< long > m_AlignResults_Identifier_LayerDisc
NTuple::Item< long > m_AlignResults_Identifier_Eta
NTuple::Item< long > m_AlignResults_Identifier_BarrelEC
NTuple::Item< double > m_AlignResults_y
NTuple::Item< double > m_AlignResults_z
NTuple::Item< double > m_AlignResults_beta
NTuple::Item< long > m_AlignResults_Identifier_Phi
NTuple::Item< double > m_AlignResults_x
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode SurveyConstraintTestAlg::execute ( const EventContext & ctx)
overridevirtual

Execute method.

Implements AthAlgorithm.

Definition at line 128 of file SurveyConstraintTestAlg.cxx.

128 {
129
130// Part 1: Get the messaging service, print where you are
131ATH_MSG_INFO( "execute()" );
132
133 float multipl=1.E3;
134
135 Amg::VectorX dparams(6); // alignment parameters
136 double deltachisq = 0;
137 Amg::VectorX DOCA_Vector(6);
138 Amg::MatrixX DOCA_Matrix(6,6);
139
140 // Pix EC
141 bool NewDisk = true, NewSector = true;
142 int previous_disk = -1, previous_sector = -1;
143 for(int i=0;i!=m_NLoop;++i){
144 if(i!=0){m_SurvConstr -> finalize().ignore();m_SurvConstr -> setup_SurveyConstraintModules();}
145 for (PixelID::const_id_iterator wafer_it=m_pixid->wafer_begin(); wafer_it!=m_pixid->wafer_end(); ++wafer_it) {
146 const Identifier Pixel_ModuleID = *wafer_it;
147 if(std::abs(m_pixid->barrel_ec(Pixel_ModuleID)) == 2){
148 ATH_CHECK(m_SurvConstr -> computeConstraint(Pixel_ModuleID,
149 dparams,
150 deltachisq,
151 DOCA_Vector,
152 DOCA_Matrix));
153
154
155 if(previous_disk == m_pixid->layer_disk(Pixel_ModuleID) &&
156 previous_sector == m_SurvConstr->SectorNumber(m_pixid->phi_module(Pixel_ModuleID)))
157 NewSector=false;
158 else NewSector=true;
159 if(previous_disk == m_pixid->layer_disk(Pixel_ModuleID))
160 NewDisk=false;
161 else NewDisk=true;
162 if (NewDisk) for (unsigned int i=0;i!=6;++i) m_h_PixEC_Align_Disk[i] -> Fill(multipl*dparams[i]);
163 if (NewSector) for (unsigned int i=0;i!=6;++i) m_h_PixEC_Align_first[i] -> Fill(multipl*dparams[i]);
164 else for (unsigned int i=0;i!=6;++i) m_h_PixEC_Align[i] -> Fill(multipl*dparams[i]);
165 previous_disk = m_pixid->layer_disk(Pixel_ModuleID);
166 previous_sector = m_SurvConstr->SectorNumber(m_pixid->phi_module(Pixel_ModuleID));
167
168 ATH_MSG_DEBUG( "Pixel_ModuleID = " << Pixel_ModuleID);
169 ATH_MSG_DEBUG( "alignment parameters = (" << dparams[0] << "," << dparams[1] << "," << dparams[2] << "," << dparams[3] << "," << dparams[4] << "," << dparams[5] << ")");
170 ATH_MSG_DEBUG( "chi^2 = " << deltachisq);
171 ATH_MSG_DEBUG( "DOCA_Vector = (" << DOCA_Vector[0] << "," << DOCA_Vector[1] << "," << DOCA_Vector[2] << "," << DOCA_Vector[3] << "," << DOCA_Vector[4] << "," << DOCA_Vector[5] << ")");
172 ATH_MSG_DEBUG( "DOCA_Matrix = (" <<DOCA_Matrix(0,0) << "," << DOCA_Matrix(1,0) << "," << DOCA_Matrix(2,0) << "," << DOCA_Matrix(3,0) << "," << DOCA_Matrix(4,0) << "," << DOCA_Matrix(5,0) << ")");
173 ATH_MSG_DEBUG( "DOCA_Matrix = (" <<DOCA_Matrix(0,1) << "," << DOCA_Matrix(1,1) << "," << DOCA_Matrix(2,1) << "," << DOCA_Matrix(3,1) << "," << DOCA_Matrix(4,1) << "," << DOCA_Matrix(5,1) << ")");
174 ATH_MSG_DEBUG( "DOCA_Matrix = (" <<DOCA_Matrix(0,0) << "," << DOCA_Matrix(1,1) << "," << DOCA_Matrix(2,2) << "," << DOCA_Matrix(3,2) << "," << DOCA_Matrix(4,4) << "," << DOCA_Matrix(5,5) << ")");
175 //break;
176 }
177 }
178 }
179
180 // Pix B
181 for (PixelID::const_id_iterator wafer_it=m_pixid->wafer_begin(); wafer_it!=m_pixid->wafer_end(); ++wafer_it) {
182 const Identifier Pixel_ModuleID = *wafer_it;
183 if(m_pixid->barrel_ec(Pixel_ModuleID) == 0){
184 ATH_CHECK(m_SurvConstr -> computeConstraint(Pixel_ModuleID,
185 dparams,
186 deltachisq,
187 DOCA_Vector,
188 DOCA_Matrix));
189 ATH_MSG_DEBUG( "Pixel Barrel ModuleID = " << Pixel_ModuleID);
190 ATH_MSG_DEBUG( "alignment parameters = (" << dparams[0] << "," << dparams[1] << "," << dparams[2] << "," << dparams[3] << "," << dparams[4] << "," << dparams[5] << ")");
191 ATH_MSG_DEBUG( "chi^2 = " << deltachisq);
192 ATH_MSG_DEBUG( "DOCA_Vector = (" << DOCA_Vector[0] << "," << DOCA_Vector[1] << "," << DOCA_Vector[2] << "," << DOCA_Vector[3] << "," << DOCA_Vector[4] << "," << DOCA_Vector[5] << ")");
193 ATH_MSG_DEBUG( "DOCA_Matrix = (" <<DOCA_Matrix(0,0) << "," << DOCA_Matrix(1,0) << "," << DOCA_Matrix(2,0) << "," << DOCA_Matrix(3,0) << "," << DOCA_Matrix(4,0) << "," << DOCA_Matrix(5,0) << ")");
194 ATH_MSG_DEBUG( "DOCA_Matrix = (" <<DOCA_Matrix(0,1) << "," << DOCA_Matrix(1,1) << "," << DOCA_Matrix(2,1) << "," << DOCA_Matrix(3,1) << "," << DOCA_Matrix(4,1) << "," << DOCA_Matrix(5,1) << ")");
195 ATH_MSG_DEBUG( "DOCA_Matrix = (" <<DOCA_Matrix(0,0) << "," << DOCA_Matrix(1,1) << "," << DOCA_Matrix(2,2) << "," << DOCA_Matrix(3,2) << "," << DOCA_Matrix(4,4) << "," << DOCA_Matrix(5,5) << ")");
196 break;
197 }
198 }
199
200 // SCT EC
201
202 for (SCT_ID::const_id_iterator wafer_it=m_sctid->wafer_begin(); wafer_it!=m_sctid->wafer_end(); ++wafer_it) {
203 const Identifier SCT_ModuleID = *wafer_it;
204 if(std::abs(m_sctid->barrel_ec(SCT_ModuleID)) == 2){
205 ATH_CHECK(m_SurvConstr -> computeConstraint(SCT_ModuleID,
206 dparams,
207 deltachisq,
208 DOCA_Vector,
209 DOCA_Matrix));
210 ATH_MSG_DEBUG( "SCT_ModuleID = " << SCT_ModuleID);
211 ATH_MSG_DEBUG( "alignment parameters = (" << dparams[0] << "," << dparams[1] << "," << dparams[2] << "," << dparams[3] << "," << dparams[4] << "," << dparams[5] << ")");
212 ATH_MSG_DEBUG( "chi^2 = " << deltachisq);
213 ATH_MSG_DEBUG( "DOCA_Vector = (" << DOCA_Vector[0] << "," << DOCA_Vector[1] << "," << DOCA_Vector[2] << "," << DOCA_Vector[3] << "," << DOCA_Vector[4] << "," << DOCA_Vector[5] << ")");
214 ATH_MSG_DEBUG( "DOCA_Matrix = (" <<DOCA_Matrix(0,0) << "," << DOCA_Matrix(1,0) << "," << DOCA_Matrix(2,0) << "," << DOCA_Matrix(3,0) << "," << DOCA_Matrix(4,0) << "," << DOCA_Matrix(5,0) << ")");
215 ATH_MSG_DEBUG( "DOCA_Matrix = (" <<DOCA_Matrix(0,1) << "," << DOCA_Matrix(1,1) << "," << DOCA_Matrix(2,1) << "," << DOCA_Matrix(3,1) << "," << DOCA_Matrix(4,1) << "," << DOCA_Matrix(5,1) << ")");
216 ATH_MSG_DEBUG( "DOCA_Matrix = (" <<DOCA_Matrix(0,0) << "," << DOCA_Matrix(1,1) << "," << DOCA_Matrix(2,2) << "," << DOCA_Matrix(3,2) << "," << DOCA_Matrix(4,4) << "," << DOCA_Matrix(5,5) << ")");
217 break;
218 }
219 }
220
221
222 // SCT B
223 for (SCT_ID::const_id_iterator wafer_it=m_sctid->wafer_begin(); wafer_it!=m_sctid->wafer_end(); ++wafer_it) {
224 const Identifier SCT_ModuleID = *wafer_it;
225 if(m_sctid->barrel_ec(SCT_ModuleID) == 0){
226 ATH_CHECK(m_SurvConstr -> computeConstraint(SCT_ModuleID,
227 dparams,
228 deltachisq,
229 DOCA_Vector,
230 DOCA_Matrix));
231 ATH_MSG_DEBUG( "SCT Barrel ModuleID = " << SCT_ModuleID);
232 ATH_MSG_DEBUG( "alignment parameters = (" << dparams[0] << "," << dparams[1] << "," << dparams[2] << "," << dparams[3] << "," << dparams[4] << "," << dparams[5] << ")");
233 ATH_MSG_DEBUG( "chi^2 = " << deltachisq);
234 ATH_MSG_DEBUG( "DOCA_Vector = (" << DOCA_Vector[0] << "," << DOCA_Vector[1] << "," << DOCA_Vector[2] << "," << DOCA_Vector[3] << "," << DOCA_Vector[4] << "," << DOCA_Vector[5] << ")");
235 ATH_MSG_DEBUG( "DOCA_Matrix = (" <<DOCA_Matrix(0,0) << "," << DOCA_Matrix(1,0) << "," << DOCA_Matrix(2,0) << "," << DOCA_Matrix(3,0) << "," << DOCA_Matrix(4,0) << "," << DOCA_Matrix(5,0) << ")");
236 ATH_MSG_DEBUG( "DOCA_Matrix = (" <<DOCA_Matrix(0,1) << "," << DOCA_Matrix(1,1) << "," << DOCA_Matrix(2,1) << "," << DOCA_Matrix(3,1) << "," << DOCA_Matrix(4,1) << "," << DOCA_Matrix(5,1) << ")");
237 ATH_MSG_DEBUG( "DOCA_Matrix = (" <<DOCA_Matrix(0,0) << "," << DOCA_Matrix(1,1) << "," << DOCA_Matrix(2,2) << "," << DOCA_Matrix(3,2) << "," << DOCA_Matrix(4,4) << "," << DOCA_Matrix(5,5) << ")");
238 break;
239 }
240 }
241
242 return StatusCode::SUCCESS;
243 }
#define ATH_MSG_DEBUG(x,...)
std::vector< Identifier >::const_iterator const_id_iterator
Definition PixelID.h:74
std::vector< Identifier >::const_iterator const_id_iterator
Definition SCT_ID.h:73
virtual StatusCode finalize() override
Gaudi::Property< int > m_NLoop
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode SurveyConstraintTestAlg::finalize ( )
overridevirtual

Definition at line 247 of file SurveyConstraintTestAlg.cxx.

247 {
248
249 // Part 1: Get the messaging service, print where you are
250 ATH_MSG_INFO( "finalize()" );
251
252 ATH_MSG_INFO( "mm = " << CLHEP::mm
253 << ", mrad = " << CLHEP::mrad
254 << ", micrometer = " << CLHEP::micrometer
255 << ", deg = " << CLHEP::deg);
256
257 return StatusCode::SUCCESS;
258}

◆ initialize()

StatusCode SurveyConstraintTestAlg::initialize ( )
overridevirtual

Definition at line 25 of file SurveyConstraintTestAlg.cxx.

25 {
26
27 // Part 1: Get the messaging service, print where you are
28 ATH_MSG_DEBUG( "initialize()" );
29
30 // Get The ToolSvc
31 SmartIF<IToolSvc> toolSvc{Gaudi::svcLocator()->service("ToolSvc")};
32 ATH_CHECK(toolSvc.isValid());
33
34 // Get SurveyConstraint from ToolService
35 ATH_CHECK( toolSvc->retrieveTool("SurveyConstraint",m_SurvConstr));
36
37 // get ID helpers from detector store (relying on GeoModel to put them)
38 ATH_CHECK(detStore()->retrieve(m_pixid));
39 ATH_CHECK(detStore()->retrieve(m_sctid));
40 ATH_MSG_DEBUG( "got ID helpers from detector store (relying on GeoModel to put them)" );
41
42 // book histograms
45
46return StatusCode::SUCCESS;
47}
const ServiceHandle< StoreGateSvc > & detStore() const

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_WARNING(x,...)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_AlignResults_alpha

NTuple::Item<double> SurveyConstraintTestAlg::m_AlignResults_alpha
private

Definition at line 39 of file SurveyConstraintTestAlg.h.

◆ m_AlignResults_beta

NTuple::Item<double> SurveyConstraintTestAlg::m_AlignResults_beta
private

Definition at line 40 of file SurveyConstraintTestAlg.h.

◆ m_AlignResults_gamma

NTuple::Item<double> SurveyConstraintTestAlg::m_AlignResults_gamma
private

Definition at line 41 of file SurveyConstraintTestAlg.h.

◆ m_AlignResults_Identifier_BarrelEC

NTuple::Item<long> SurveyConstraintTestAlg::m_AlignResults_Identifier_BarrelEC
private

Definition at line 44 of file SurveyConstraintTestAlg.h.

◆ m_AlignResults_Identifier_Eta

NTuple::Item<long> SurveyConstraintTestAlg::m_AlignResults_Identifier_Eta
private

Definition at line 47 of file SurveyConstraintTestAlg.h.

◆ m_AlignResults_Identifier_ID

NTuple::Item<long> SurveyConstraintTestAlg::m_AlignResults_Identifier_ID
private

Definition at line 42 of file SurveyConstraintTestAlg.h.

◆ m_AlignResults_Identifier_LayerDisc

NTuple::Item<long> SurveyConstraintTestAlg::m_AlignResults_Identifier_LayerDisc
private

Definition at line 45 of file SurveyConstraintTestAlg.h.

◆ m_AlignResults_Identifier_Phi

NTuple::Item<long> SurveyConstraintTestAlg::m_AlignResults_Identifier_Phi
private

Definition at line 46 of file SurveyConstraintTestAlg.h.

◆ m_AlignResults_Identifier_SCT

NTuple::Item<long> SurveyConstraintTestAlg::m_AlignResults_Identifier_SCT
private

Definition at line 43 of file SurveyConstraintTestAlg.h.

◆ m_AlignResults_nModules

int SurveyConstraintTestAlg::m_AlignResults_nModules {}
private

Definition at line 35 of file SurveyConstraintTestAlg.h.

35{};

◆ m_AlignResults_x

NTuple::Item<double> SurveyConstraintTestAlg::m_AlignResults_x
private

Definition at line 36 of file SurveyConstraintTestAlg.h.

◆ m_AlignResults_y

NTuple::Item<double> SurveyConstraintTestAlg::m_AlignResults_y
private

Definition at line 37 of file SurveyConstraintTestAlg.h.

◆ m_AlignResults_z

NTuple::Item<double> SurveyConstraintTestAlg::m_AlignResults_z
private

Definition at line 38 of file SurveyConstraintTestAlg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_h_PixEC_Align

TH1* SurveyConstraintTestAlg::m_h_PixEC_Align[6] {}
private

Definition at line 33 of file SurveyConstraintTestAlg.h.

33{};

◆ m_h_PixEC_Align_Disk

TH1* SurveyConstraintTestAlg::m_h_PixEC_Align_Disk[6] {}
private

Definition at line 31 of file SurveyConstraintTestAlg.h.

31{};

◆ m_h_PixEC_Align_first

TH1* SurveyConstraintTestAlg::m_h_PixEC_Align_first[6] {}
private

Definition at line 32 of file SurveyConstraintTestAlg.h.

32{};

◆ m_NLoop

Gaudi::Property<int> SurveyConstraintTestAlg::m_NLoop {this, "NLoop", 1}
private

Definition at line 50 of file SurveyConstraintTestAlg.h.

50{this, "NLoop", 1};

◆ m_pixid

const PixelID* SurveyConstraintTestAlg::m_pixid {}
private

Definition at line 29 of file SurveyConstraintTestAlg.h.

29{};

◆ m_sctid

const SCT_ID* SurveyConstraintTestAlg::m_sctid {}
private

Definition at line 30 of file SurveyConstraintTestAlg.h.

30{};

◆ m_SurvConstr

ISurveyConstraint* SurveyConstraintTestAlg::m_SurvConstr {}
private

Definition at line 28 of file SurveyConstraintTestAlg.h.

28{};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 386 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: