43 ATH_MSG_ERROR(
"Only \"Unknown\", \"SingleGroup\", \"SubDetector\", \"FeedThrough\", \"ExtendedFeedThrough\", \"ExtendedSubDetector\" and \"SuperCells\" are allowed" ) ;
44 return StatusCode::FAILURE ;
47 return StatusCode::SUCCESS;
52 return StatusCode::SUCCESS;
76 std::unique_ptr<LArShapeComplete> larShapeCompleteCorr=std::make_unique<LArShapeComplete>();
79 if (
sc.isFailure() ) {
80 ATH_MSG_ERROR(
"Could not initialize LArShapeComplete data object - exit!" ) ;
93 const int nPhases=shape.shapeSize();
102 const float timeOffset=shape.timeOffset();
104 bool doShapeCorr=
true;
105 if ( vShape.size() == 0 || vShapeDer.size() == 0 ) {
106 ATH_MSG_WARNING(
"Shape not found for gain "<<
gain <<
" channel 0x" << std::hex <<
id.get_compact() << std::dec );
109 if ( vShape.size() != vShapeDer.size() ) {
110 ATH_MSG_WARNING(
"Shape (" << vShape.size() <<
") derivative (" << vShapeDer.size() <<
") don't have the same size for channel 0x"
111 << std::hex <<
id.get_compact() << std::dec );
115 std::vector<float> theShape;
116 std::vector<float> theShapeDer;
120 if ( vShapeResidual.size() == 0 || vShapeResidualDer.size() == 0 ) {
122 <<
" channel 0x" << std::hex <<
id.get_compact() << std::dec
123 <<
". Will not be applied!" );
126 if ( vShapeResidual.size() != vShapeResidualDer.size() ) {
127 ATH_MSG_ERROR(
"Shape residual (" << vShapeResidual.size() <<
") and its derivative (" << vShapeResidualDer.size()
128 <<
") don't have the same size for channel 0x"
129 << std::hex <<
id.get_compact() << std::dec
130 <<
". Will be not applied!" );
135 if ( vShape.size() > vShapeResidual.size() ) {
136 ATH_MSG_WARNING(
"Shape residual size does not match the shape size for channel 0x"
137 << std::hex <<
id.get_compact() << std::dec
138 <<
". Will be not corrected!" );
143 for (
unsigned k=0;
k<vShape.size();
k++) {
144 theShape.push_back( vShape[
k] + vShapeResidual[
k] );
145 theShapeDer.push_back( vShapeDer[
k] + vShapeResidualDer[
k] );
146 ATH_MSG_VERBOSE(
"Shape channel= " <<
id.get_compact() <<
": " <<
k <<
"\t" << vShape[
k] <<
"\t" << vShapeDer[
k]);
147 ATH_MSG_VERBOSE(
"Shape residual channel= " <<
id.get_compact() <<
": " <<
k <<
"\t" << vShapeResidual[
k] <<
"\t" << vShapeResidualDer[
k]);
151 for (
unsigned k=0;
k<vShape.size();
k++) {
152 theShape.push_back( vShape[
k] );
153 theShapeDer.push_back( vShapeDer[
k] );
157 std::vector<std::vector<float> > shapeAmpl;
158 shapeAmpl.push_back(theShape);
159 std::vector<std::vector<float> > shapeDer;
160 shapeDer.push_back(theShapeDer);
161 larShapeCompleteCorr->
set(
id,(
int)
gain,shapeAmpl,shapeDer,timeOffset,25.);
169 if (
sc.isFailure()) {
176 if (
sc.isFailure()) {
177 ATH_MSG_ERROR(
"Failed to sym-link LArShapeComplete object" );
183 return StatusCode::SUCCESS;