10 void initialize(
const std::map< std::string , float >& coeffmap,
11 const std::map< unsigned int, float >& afterglowmap);
18 const std::map< unsigned int, float >& afterglowmap){
27 std::map< std::string , float >::const_iterator coeffIt=m_coeffmap.find(
"C1");
28 if(coeffIt!=m_coeffmap.end()){
32 avglumi=c1*luminonorm/
nBXs;
35 if(m_afterglowmap.size()!=0){
36 std::map< unsigned int, float >::const_iterator afterglowit=--m_afterglowmap.end();
37 if(nBXs>=afterglowit->first){
38 Afterglow=afterglowit->second;
40 afterglowit=m_afterglowmap.upper_bound(nBXs);
42 Afterglow=afterglowit->second;
46 coeffIt=m_coeffmap.find(
"DRIFT");
47 if(coeffIt!=m_coeffmap.end()){
48 driftterm=1.0+coeffIt->second*
intglumi;
51 coeffIt=m_coeffmap.find(
"A0");
52 if(coeffIt!=m_coeffmap.end()){
56 coeffIt=m_coeffmap.find(
"A1");
57 if(coeffIt!=m_coeffmap.end()){
61 coeffIt=m_coeffmap.find(
"A2");
62 if(coeffIt!=m_coeffmap.end()){
65 result=a0*Afterglow/(1.+a1*avglumi+a2*avglumi*avglumi)*driftterm;
std::map< unsigned int, float > m_afterglowmap
std::map< std::string, float > m_coeffmap
void initialize(const std::map< std::string, float > &coeffmap, const std::map< unsigned int, float > &afterglowmap)
#define DEFINE_EDM_PLUGIN(factory, type, name)
virtual float getCorrection(float luminonorm, float intglumi, unsigned int nBXs) const override