54 ATH_MSG_ERROR(
"Only \"Unknown\", \"SingleGroup\", \"SubDetector\", \"FeedThrough\", \"ExtendedFeedThrough\", \"ExtendedSubDetector\" and \"SuperCells\" are allowed" ) ;
55 return StatusCode::FAILURE ;
61 sc =
detStore()->retrieve(ll,
"LArOnline_SuperCellID");
63 msg(MSG::ERROR) <<
"Could not get LArOnlineID helper !" <<
endmsg;
64 return StatusCode::FAILURE;
74 msg(MSG::ERROR) <<
"Could not get LArOnlineID helper !" <<
endmsg;
75 return StatusCode::FAILURE;
85 return StatusCode::SUCCESS;
90 return StatusCode::SUCCESS;
101 if (
sc.isFailure()) {
120 return StatusCode::SUCCESS;
128 if (
sc.isFailure()) {
134 std::unique_ptr<LArOFCComplete> larOFCComplete=std::make_unique<LArOFCComplete>();
136 sc = larOFCComplete->initialize();
137 if (
sc.isFailure() ) {
138 ATH_MSG_ERROR(
"Could not initialize LArOFCComplete data object - exit!" ) ;
158 for(; it!=it_e;++it){
161 const int nPhases=ofc.OFC_aSize();
173 if (p>0 && p<nPhases) phase=p;
175 ATH_MSG_DEBUG(
"OFC picking, gain=" << gain <<
", channel " <<
m_onlineID->channel_name(
id) <<
", phase=" << phase);
180 if ( vOFC_a.size() == 0 || vOFC_b.size() == 0 ) {
183 }
else if ( vOFC_a.size() != vOFC_b.size() ) {
184 ATH_MSG_WARNING(
"OFC a (" << vOFC_a.size() <<
") and b (" << vOFC_b.size() <<
") are not the same size for channel "
188 std::vector<std::vector<float> > OFC_a;
190 std::vector<std::vector<float> > OFC_b;
194 std::transform(OFC_b[0].begin(), OFC_b[0].end(), OFC_b[0].begin(),
195 std::bind(std::multiplies<float>(), std::placeholders::_1, ofW->
getW(
id)));
198 std::transform(OFC_b[0].begin(), OFC_b[0].end(), OFC_b[0].begin(),
199 std::bind(std::multiplies<float>(), std::placeholders::_1, 1.5));
202 larOFCComplete->set(
id,(
int)gain,OFC_a,OFC_b,timeOffset,25.);
210 if (
sc.isFailure()) {
215 if (
sc.isFailure()) {
219 return StatusCode::SUCCESS;
230 if (
sc.isFailure()) {
235 std::unique_ptr<LArShapeComplete> larShapeComplete=std::make_unique<LArShapeComplete>();
237 sc = larShapeComplete->initialize();
238 if (
sc.isFailure() ) {
239 ATH_MSG_ERROR(
"Could not initialize LArShapeComplete data object - exit!" ) ;
248 for(; it!=it_e;++it){
262 if (p>0 && p<nPhases) phase=p;
270 if ( vShape.size() == 0 || vShapeDer.size() == 0 ) {
272 }
else if ( vShape.size() != vShapeDer.size() ) {
273 ATH_MSG_WARNING(
"Shape a (" << vShape.size() <<
") and b (" << vShapeDer.size() <<
") are not the same size for channel"
277 std::vector<std::vector<float> > shapeDer;
278 std::vector<std::vector<float> > shapeAmpl;
279 shapeAmpl.push_back(vShape.
asVector());
280 shapeDer.push_back(vShapeDer.
asVector());
281 larShapeComplete->set(
id,(
int)gain,shapeAmpl,shapeDer,timeOffset,25.);
289 if (
sc.isFailure()) {
294 if (
sc.isFailure()) {
295 ATH_MSG_ERROR(
"Failed to sym-link LArShapeComplete object" );
299 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
LArVectorProxy OFCRef_t
This class defines the interface for accessing Optimal Filtering coefficients for each channel provid...
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
ILArShape::ShapeRef_t shapeDer(size_t tbin) const
ILArShape::ShapeRef_t shape(size_t tbin) const
float timeOffset() const
Return the time offset for this channel.
This is a non-template implementation base class for LArConditionsContainer.
GroupingType
Grouping type.
ConditionsMap::const_iterator ConstConditionsMapIterator
Subset::ConstReference ConstReference
ConstConditionsMapIterator begin(unsigned int gain) const
get iterator for all channels for a gain
ConstConditionsMapIterator end(unsigned int gain) const
end of all channels for this gain
This class implements the ILArOFC interface.
const float & getW(const HWIdentifier &chid) const
std::string m_keyShape_new
const LArOFCBinComplete * m_inputPhase
SG::ReadCondHandleKey< LArOFCweightSC > m_ofcWKey
LArOFPhasePicker(const std::string &name, ISvcLocator *pSvcLocator)
std::string m_groupingName
const LArOnlineID_Base * m_onlineID
Helper for the Liquid Argon Calorimeter cell identifiers.
This class implements the ILArShape interface.
std::vector< value_type > asVector() const
Convert back to a vector.
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string