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

#include <SurveyConstraintTestAlg.h>

Inheritance diagram for SurveyConstraintTestAlg:
Collaboration diagram for SurveyConstraintTestAlg:

Public Member Functions

 SurveyConstraintTestAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize () override
virtual StatusCode execute () override
virtual StatusCode finalize () override
StatusCode BookHist ()
void CreateMisAlignNtuple ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
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

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< StoreGateSvcStoreGateSvc_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

ISurveyConstraintm_SurvConstr
const PixelIDm_pixid
const SCT_IDm_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
int m_NLoop
DataObjIDColl m_extendedExtraObjects
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< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ SurveyConstraintTestAlg()

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

Definition at line 23 of file SurveyConstraintTestAlg.cxx.

23 :
24AthAlgorithm(name, pSvcLocator),
26 m_pixid{},
27 m_sctid{},
32 m_NLoop(1){
33
34// Part 2: Properties go here
35 declareProperty("NLoop" , m_NLoop);
36
37
38}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

Member Function Documentation

◆ BookHist()

StatusCode SurveyConstraintTestAlg::BookHist ( )

Definition at line 277 of file SurveyConstraintTestAlg.cxx.

277 {
278 ServiceHandle<ITHistSvc> histSvc ("THistSvc", "SurveyConstraintTestAlg");
279 ATH_CHECK( histSvc.retrieve() );
280
281 auto book = [&] (TH1*& h,
282 const char* name,
283 const char* title,
284 int nbins,
285 float xlo,
286 float xhi)
287 {
288 h = new TH1F (name, title, nbins, xlo, xhi);
289 const static std::string prefix = "/stat/MisAlign/";
290 return histSvc->regHist (prefix + name, h);
291 };
292
293 ATH_CHECK( book (m_h_PixEC_Align_Disk[0], "Misalignment Disk X [mu]", "Misalignment Disk X [mu]",100, -50.,50.) );
294 ATH_CHECK( book (m_h_PixEC_Align_Disk[1], "Misalignment Disk Y [mu]", "Misalignment Disk Y [mu]",100, -100.,100.) );
295 ATH_CHECK( book (m_h_PixEC_Align_Disk[2], "Misalignment Disk Z [mu]", "Misalignment Disk Z [mu]",100, -200.,200.) );
296 ATH_CHECK( book (m_h_PixEC_Align_Disk[3], "Misalignment Disk PhiX [mrad]", "Misalignment Disk PhiX [mrad]",100, -2.,2.) );
297 ATH_CHECK( book (m_h_PixEC_Align_Disk[4], "Misalignment Disk PhiY [mrad]", "Misalignment Disk PhiY [mrad]",100, -5.,5.) );
298 ATH_CHECK( book (m_h_PixEC_Align_Disk[5], "Misalignment Disk PhiZ [mrad]", "Misalignment Disk PhiZ [mrad]",100, -2.,2.) );
299
300 ATH_CHECK( book (m_h_PixEC_Align_first[0], "Misalignment first X [mu]", "Misalignment first X [mu]",100, -50.,50.) );
301 ATH_CHECK( book (m_h_PixEC_Align_first[1], "Misalignment first Y [mu]", "Misalignment first Y [mu]",100, -100.,100.) );
302 ATH_CHECK( book (m_h_PixEC_Align_first[2], "Misalignment first Z [mu]", "Misalignment first Z [mu]",100, -200.,200.) );
303 ATH_CHECK( book (m_h_PixEC_Align_first[3], "Misalignment first PhiX [mrad]", "Misalignment first PhiX [mrad]",100, -2.,2.) );
304 ATH_CHECK( book (m_h_PixEC_Align_first[4], "Misalignment first PhiY [mrad]", "Misalignment first PhiY [mrad]",100, -5.,5.) );
305 ATH_CHECK( book (m_h_PixEC_Align_first[5], "Misalignment first PhiZ [mrad]", "Misalignment first PhiZ [mrad]",100, -2.,2.) );
306
307 ATH_CHECK( book (m_h_PixEC_Align[0], "Misalignment X [mu]", "Misalignment X [mu]",100, -50.,50.) );
308 ATH_CHECK( book (m_h_PixEC_Align[1], "Misalignment Y [mu]", "Misalignment Y [mu]",100, -100.,100.) );
309 ATH_CHECK( book (m_h_PixEC_Align[2], "Misalignment Z [mu]", "Misalignment Z [mu]",100, -200.,200.) );
310 ATH_CHECK( book (m_h_PixEC_Align[3], "Misalignment PhiX [mrad]", "Misalignment PhiX [mrad]",100, -2.,2.) );
311 ATH_CHECK( book (m_h_PixEC_Align[4], "Misalignment PhiY [mrad]", "Misalignment PhiY [mrad]",100, -5.,5.) );
312 ATH_CHECK( book (m_h_PixEC_Align[5], "Misalignment PhiZ [mrad]", "Misalignment PhiZ [mrad]",100, -2.,2.) );
313
314 return StatusCode::SUCCESS;
315}
#define ATH_CHECK
Evaluate an expression and check for errors.
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)

◆ CreateMisAlignNtuple()

void SurveyConstraintTestAlg::CreateMisAlignNtuple ( )

Definition at line 66 of file SurveyConstraintTestAlg.cxx.

66 {
68 // initialize AlignResults NTuple
69
70 NTupleFilePtr file1(ntupleSvc(), "/NTUPLES/FILE1");
71
72 NTuplePtr nt(ntupleSvc(), "/NTUPLES/FILE1/InitialAlignment");
73 if ( !nt ) { // Check if already booked
74 nt = ntupleSvc()->book("/NTUPLES/FILE1/InitialAlignment", CLID_ColumnWiseTuple, "InitialAlignment");
75 if ( nt ) {
76 ATH_MSG_INFO( "InitialAlignment ntuple booked." );
77
78 sc = nt->addItem("x" , m_AlignResults_x);
79 sc = nt->addItem("y" , m_AlignResults_y);
80 sc = nt->addItem("z" , m_AlignResults_z);
81 sc = nt->addItem("alpha" , m_AlignResults_alpha);
82 sc = nt->addItem("beta" , m_AlignResults_beta);
83 sc = nt->addItem("gamma" , m_AlignResults_gamma);
84 sc = nt->addItem("ID" , m_AlignResults_Identifier_ID);
85 sc = nt->addItem("PixelSCT" , m_AlignResults_Identifier_SCT);
86 sc = nt->addItem("BarrelEC" , m_AlignResults_Identifier_BarrelEC);
87 sc = nt->addItem("LayerDisc" , m_AlignResults_Identifier_LayerDisc);
88 sc = nt->addItem("Phi" , m_AlignResults_Identifier_Phi);
89 sc = nt->addItem("Eta" , m_AlignResults_Identifier_Eta);
90
91 } else { // did not manage to book the N tuple....
92 ATH_MSG_ERROR( "Failed to book InitialAlignment ntuple." );
93 }
94 }
95
97 int SCT,barrel_ec,layer_disk,phi,eta;
98 std::map<Identifier, SurveyConstraintModule*, std::less<Identifier> > ModuleMap;
99 m_SurvConstr -> MMap(ModuleMap);
100 std::map<Identifier, SurveyConstraintModule*, std::less<Identifier> >::iterator it;
101 for (it = ModuleMap.begin(); it != ModuleMap.end(); ++it) {
102 const Identifier& ModuleID = (it->second)->moduleID();
103 SurveyConstraintModule* mut = ModuleMap[ModuleID];
104 if(mut->isPixel()){
105 SCT = 1;
106 barrel_ec = m_pixid->barrel_ec(ModuleID);
107 layer_disk = m_pixid->layer_disk(ModuleID);
108 phi = m_pixid->phi_module(ModuleID);
109 eta = m_pixid->eta_module(ModuleID);
110 } else {
111 if (m_sctid->side(ModuleID) != 0) continue;
112 SCT = 2;
113 barrel_ec = m_sctid->barrel_ec(ModuleID);
114 layer_disk = m_sctid->layer_disk(ModuleID);
115 phi = m_sctid->phi_module(ModuleID);
116 eta = m_sctid->eta_module(ModuleID);
117 }
118 Amg::VectorX Misalign = mut->DOCA_Vector();
119 m_AlignResults_x = Misalign[0];
120 m_AlignResults_y = Misalign[1];
121 m_AlignResults_z = Misalign[2];
122 m_AlignResults_alpha = Misalign[3];
123 m_AlignResults_beta = Misalign[4];
124 m_AlignResults_gamma = Misalign[5];
131
133
134 // Write out AlignResults ntuple
135 sc = ntupleSvc()->writeRecord("NTUPLES/FILE1/InitialAlignment");
136 if (sc.isFailure()) {
137 ATH_MSG_ERROR( "Could not write InitialAlignment ntuple." );
138 }
139
140 } // end of module loop
141 }
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< 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 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< 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< 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< 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 ( )
overridevirtual

Definition at line 145 of file SurveyConstraintTestAlg.cxx.

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

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< 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 & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode SurveyConstraintTestAlg::finalize ( )
overridevirtual

Definition at line 264 of file SurveyConstraintTestAlg.cxx.

264 {
265
266 // Part 1: Get the messaging service, print where you are
267 ATH_MSG_INFO( "finalize()" );
268
269 ATH_MSG_INFO( "mm = " << CLHEP::mm
270 << ", mrad = " << CLHEP::mrad
271 << ", micrometer = " << CLHEP::micrometer
272 << ", deg = " << CLHEP::deg);
273
274 return StatusCode::SUCCESS;
275}

◆ initialize()

StatusCode SurveyConstraintTestAlg::initialize ( )
overridevirtual

Definition at line 42 of file SurveyConstraintTestAlg.cxx.

42 {
43
44 // Part 1: Get the messaging service, print where you are
45 ATH_MSG_DEBUG( "initialize()" );
46
47 // Get The ToolSvc
48 SmartIF<IToolSvc> toolSvc{Gaudi::svcLocator()->service("ToolSvc")};
49 ATH_CHECK(toolSvc.isValid());
50
51 // Get SurveyConstraint from ToolService
52 ATH_CHECK( toolSvc->retrieveTool("SurveyConstraint",m_SurvConstr));
53
54 // get ID helpers from detector store (relying on GeoModel to put them)
57 ATH_MSG_DEBUG( "got ID helpers from detector store (relying on GeoModel to put them)" );
58
59 // book histograms
62
63return StatusCode::SUCCESS;
64}
const ServiceHandle< StoreGateSvc > & detStore() const
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< 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.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< 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< 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< Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

StatusCode AthAlgorithm::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< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

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

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< 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< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

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.

◆ 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< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_h_PixEC_Align

TH1* SurveyConstraintTestAlg::m_h_PixEC_Align[6]
private

Definition at line 33 of file SurveyConstraintTestAlg.h.

◆ m_h_PixEC_Align_Disk

TH1* SurveyConstraintTestAlg::m_h_PixEC_Align_Disk[6]
private

Definition at line 31 of file SurveyConstraintTestAlg.h.

◆ m_h_PixEC_Align_first

TH1* SurveyConstraintTestAlg::m_h_PixEC_Align_first[6]
private

Definition at line 32 of file SurveyConstraintTestAlg.h.

◆ m_NLoop

int SurveyConstraintTestAlg::m_NLoop
private

Definition at line 50 of file SurveyConstraintTestAlg.h.

◆ m_pixid

const PixelID* SurveyConstraintTestAlg::m_pixid
private

Definition at line 29 of file SurveyConstraintTestAlg.h.

◆ m_sctid

const SCT_ID* SurveyConstraintTestAlg::m_sctid
private

Definition at line 30 of file SurveyConstraintTestAlg.h.

◆ m_SurvConstr

ISurveyConstraint* SurveyConstraintTestAlg::m_SurvConstr
private

Definition at line 28 of file SurveyConstraintTestAlg.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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