29#define MSG_DEBUG(log, x) \
30 do { if (log.level()<=MSG::DEBUG) { log << MSG::DEBUG << x << endmsg; } } while (0)
38 egDetailContainer_p2::const_iterator it = pers->begin();
40 for( ; it != pers->end(); ++it ){
42 const std::vector<float>& egParams = it->m_egDetailFloatParams;
43 const std::vector<unsigned int>& egEnum = it->m_egDetailEnumParams;
45 assert( egEnum.size() == egParams.size() );
47 if ( it->m_className ==
"EMShower" ) {
50 for (
unsigned int i=0; i< egEnum.size(); i++ ) {
55 msg << MSG::ERROR <<
"Read unknown parameter for " << it->m_className
56 <<
" Index " << egEnum[i] <<
endmsg;
63 else if ( it->m_className ==
"EMTrackMatch" ) {
66 for (
unsigned int i=0; i< egEnum.size(); i++ ) {
76 msg << MSG::ERROR <<
"Read unknown parameter for "
77 << it->m_className <<
" Index " << key <<
endmsg;
84 else if ( it->m_className ==
"EMConvert" ) {
87 for (
unsigned int i=0; i< egEnum.size(); i++ ) {
92 msg << MSG::ERROR <<
"Read unknown parameter for " << it->m_className
93 <<
" Index " << egEnum[i] <<
endmsg;
100 else if ( it->m_className ==
"EMBremFit" ) {
103 for (
unsigned int i=0; i< egEnum.size(); i++ ) {
108 msg << MSG::ERROR <<
"Read unknown parameter for " << it->m_className
109 <<
" Index " << egEnum[i] <<
endmsg;
115 else if ( it->m_className ==
"EMTrackFit" ) {
118 for (
unsigned int i=0; i< egEnum.size(); i++ ) {
123 msg << MSG::ERROR <<
"Read unknown parameter for " << it->m_className
124 <<
" Index " << egEnum[i] <<
endmsg;
131 else if ( it->m_className ==
"EMErrorDetail" ) {
134 for (
unsigned int i=0; i< egEnum.size(); i++ ) {
139 msg << MSG::ERROR <<
"Read unknown parameter for " << it->m_className
140 <<
" Index " << egEnum[i] <<
endmsg;
148 msg << MSG::ERROR <<
"Read unknown egDetail type: " << it->m_className <<
endmsg;
155 MSG_DEBUG(
msg,
"finished egDetailContainer perstoTrans");
163 for( ; it != trans->
end(); ++it ){
166 std::vector<float>& egParam =
detail.m_egDetailFloatParams;
167 std::vector<unsigned int>& egEnum =
detail.m_egDetailEnumParams;
182 !tmpEMErrorDetail ) {
183 msg << MSG::ERROR <<
"Unknown egDetail type will not write its data" <<
endmsg;
191 for (
unsigned int i=0; i<nbOfEgammaParams; i++ ) {
194 if (tmpParam > FLT_MAX) tmpParam = FLT_MAX;
195 if (tmpParam < - FLT_MAX) tmpParam = - FLT_MAX;
197 egParam.push_back(tmpParam);
201 else if ( tmpEMTrackMatch ) {
204 for (
unsigned int i=0; i<nbOfEgammaParams; i++ ) {
207 if (tmpParam > FLT_MAX) tmpParam = FLT_MAX;
208 if (tmpParam < - FLT_MAX) tmpParam = - FLT_MAX;
210 egParam.push_back(tmpParam);
214 else if ( tmpEMConvert ) {
217 for (
unsigned int i=0; i<nbOfEgammaParams; i++ ) {
220 if (tmpParam > FLT_MAX) tmpParam = FLT_MAX;
221 if (tmpParam < - FLT_MAX) tmpParam = - FLT_MAX;
223 egParam.push_back(tmpParam);
227 else if ( tmpEMBremFit ) {
230 for (
unsigned int i=0; i<nbOfEgammaParams; i++ ) {
233 if (tmpParam > FLT_MAX) tmpParam = FLT_MAX;
234 if (tmpParam < - FLT_MAX) tmpParam = - FLT_MAX;
236 egParam.push_back(tmpParam);
240 else if ( tmpEMTrackFit ) {
243 for (
unsigned int i=0; i<nbOfEgammaParams; i++ ) {
246 if (tmpParam > FLT_MAX) tmpParam = FLT_MAX;
247 if (tmpParam < - FLT_MAX) tmpParam = - FLT_MAX;
249 egParam.push_back(tmpParam);
253 else if ( tmpEMErrorDetail ) {
256 for (
unsigned int i=0; i<nbOfEgammaParams; i++ ) {
259 if (tmpParam > FLT_MAX) tmpParam = FLT_MAX;
260 if (tmpParam < - FLT_MAX) tmpParam = - FLT_MAX;
262 egParam.push_back(tmpParam);
267 pers->push_back(
detail );
#define MSG_DEBUG(log, x)
DataModel_detail::const_iterator< DataVector > const_iterator
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
void clear()
Erase all the elements in the collection.
EMBremFit is made by EMBremsstrahlungBuilder.
virtual bool hasParameter(egammaParameters::ParamDef) const
virtual const std::string & className() const
virtual double parameter(egammaParameters::ParamDef) const
void set_parameter(egammaParameters::ParamDef, double, bool overwrite=false)
general set method for parameters
EM convert property class data class.
virtual const std::string & className() const
void set_parameter(egammaParameters::ParamDef, double, bool overwrite=false)
general parameter setting
virtual double parameter(egammaParameters::ParamDef) const
general parameter retrieval
virtual bool hasParameter(egammaParameters::ParamDef) const
virtual const std::string & className() const
virtual double parameter(egammaParameters::ParamDef) const
virtual bool hasParameter(egammaParameters::ParamDef) const
void set_parameter(egammaParameters::ParamDef, double, bool overwrite=false)
general set method for parameters
EM shower property class data class.
virtual bool hasParameter(egammaParameters::ParamDef) const
virtual double parameter(egammaParameters::ParamDef) const
void set_parameter(egammaParameters::ParamDef, double, bool overwrite=false)
virtual const std::string & className() const
Contains the fit result with addtional brem information EMTrackFit is made by EMTrkRefitter.
virtual bool hasParameter(egammaParameters::ParamDef) const
void set_parameter(egammaParameters::ParamDef, double, bool overwrite=false)
general set method for parameters
virtual double parameter(egammaParameters::ParamDef) const
virtual const std::string & className() const
Track match property data class.
virtual double parameter(egammaParameters::ParamDef) const override
virtual const std::string & className() const override
interface methods
virtual bool hasParameter(egammaParameters::ParamDef) const override
void set_parameter(egammaParameters::ParamDef, double, bool overwrite=false)
virtual void transToPers(const egDetailContainer *transObj, egDetailContainer_p2 *persObj, MsgStream &msg)
virtual void persToTrans(const egDetailContainer_p2 *persObj, egDetailContainer *transObj, MsgStream &msg)
Container for detailed egamma information.
@ etaSampling1
eta position at sampling 1 for track extrapolated from the last hit.
@ EoverP
ratio of the cluster energy and the track momentum
@ EtaCorrMag
eta of the track extrapolated to the first sampling (NB : should be equivalent to etaSampling1
const double EgParamUndefined