CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
EnergyResolutionVsLumi Class Reference

#include <EnergyResolutionVsLumi.h>

Classes

struct  DegradationAtEta
 

Public Member Functions

double calcampDropPhotoDetector (double eta)
 
double calcampDropTotal (double eta)
 
double calcampDropTransparency (double eta)
 
double calcLightCollectionEfficiencyWeighted (DetId id, double z)
 
double calcLightCollectionEfficiencyWeighted2 (double eta, double z, double mu_ind=-1.0)
 
double calcmuEM (double eta)
 
double calcmuHD (double eta)
 
double calcmuTot (double eta)
 
void calcmuTot ()
 
double calcnoiseADC (double eta)
 
double calcnoiseIncreaseADC (double eta)
 
double calcresolutitonConstantTerm (double eta)
 
DegradationAtEta CalculateDegradation (double eta)
 
 EnergyResolutionVsLumi ()
 
 EnergyResolutionVsLumi (double lumi, double instlumi)
 
double getmuTot (double eta, int ix, int iy)
 
double Resolution (double eta, double ene)
 
void setInstLumi (double x)
 
void setLumi (double x)
 
void setLumies (double x, double y)
 
virtual ~EnergyResolutionVsLumi ()
 

Private Attributes

double m_instlumi
 
double m_lumi
 
double mu_eta [10085]
 
double vpt_eta [10085]
 

Detailed Description

Definition at line 18 of file EnergyResolutionVsLumi.h.

Constructor & Destructor Documentation

EnergyResolutionVsLumi::EnergyResolutionVsLumi ( )

Definition at line 9 of file EnergyResolutionVsLumi.cc.

References m_instlumi, and m_lumi.

EnergyResolutionVsLumi::EnergyResolutionVsLumi ( double  lumi,
double  instlumi 
)
inline
EnergyResolutionVsLumi::~EnergyResolutionVsLumi ( )
virtual

Definition at line 15 of file EnergyResolutionVsLumi.cc.

Referenced by EnergyResolutionVsLumi().

16 {
17 }

Member Function Documentation

double EnergyResolutionVsLumi::calcampDropPhotoDetector ( double  eta)

Definition at line 159 of file EnergyResolutionVsLumi.cc.

References EvolutionECAL::AgingVPT(), muonGEMDigis_cfi::instLumi, m_instlumi, m_lumi, and mps_fire::result.

Referenced by calcampDropTotal(), calcLightCollectionEfficiencyWeighted2(), calcmuTot(), and setLumies().

160 {
161  double instLumi = m_instlumi;
162  double totLumi = m_lumi;
163  EvolutionECAL model;
164  double result = model.AgingVPT(instLumi, totLumi, eta);
165  return result;
166 }
double AgingVPT(double instLumi, double integralLumi, double eta)
double EnergyResolutionVsLumi::calcampDropTotal ( double  eta)

Definition at line 168 of file EnergyResolutionVsLumi.cc.

References calcampDropPhotoDetector(), calcampDropTransparency(), and mps_fire::result.

Referenced by EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios(), and setLumies().

169 {
170  double tra= this->calcampDropTransparency(eta);
171  double pho= this->calcampDropPhotoDetector(eta);
172  double result = tra*pho;
173  return result;
174 }
double calcampDropPhotoDetector(double eta)
double calcampDropTransparency(double eta)
double EnergyResolutionVsLumi::calcampDropTransparency ( double  eta)

Definition at line 150 of file EnergyResolutionVsLumi.cc.

References calcmuEM(), calcmuHD(), EvolutionECAL::DegradationMeanEM50GeV(), and mps_fire::result.

Referenced by calcampDropTotal(), and setLumies().

151 {
152  double muEM=this->calcmuEM(eta);
153  double muHD=this->calcmuHD(eta);
154  EvolutionECAL model;
155  double result = model.DegradationMeanEM50GeV(muEM+muHD);
156  return result;
157 }
double DegradationMeanEM50GeV(double mu)
double EnergyResolutionVsLumi::calcLightCollectionEfficiencyWeighted ( DetId  id,
double  z 
)

Definition at line 100 of file EnergyResolutionVsLumi.cc.

References funct::abs(), EcalBarrel, EcalEndcap, EBDetId::ieta(), EEDetId::ix(), EEDetId::IX_MAX, EEDetId::iy(), EvolutionECAL::LightCollectionEfficiencyWeighted(), EBDetId::MAX_IETA, mu_eta, mps_fire::result, findQualityFiles::v, vpt_eta, and z.

Referenced by ECalSD::curve_LY(), and setLumies().

101 {
102 
103  double v=1.0;
104  double muTot=0;
105  if(id.subdetId()==EcalBarrel) {
106  EBDetId ebId(id);
107  int ieta= std::abs(ebId.ieta());
108  muTot= mu_eta[ieta];
109 
110  } else if(id.subdetId()==EcalEndcap){
111  EEDetId eeId(id);
112  int ix= eeId.ix();
113  int iy= eeId.iy();
114 
115  muTot= mu_eta[EBDetId::MAX_IETA+ix+iy*(EEDetId::IX_MAX)];
117  } else {
118  muTot=0;
119  }
120  double zcor=z;
121  EvolutionECAL model;
122  if(z<0.02 ) { zcor=0.02; }
123  else if(z>0.98) { zcor=0.98; }
124 
125  double result=model.LightCollectionEfficiencyWeighted( zcor , muTot)*v;
126 
127  return result;
128 }
double LightCollectionEfficiencyWeighted(double z, double mu_ind)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const int IX_MAX
Definition: EEDetId.h:302
static const int MAX_IETA
Definition: EBDetId.h:143
double EnergyResolutionVsLumi::calcLightCollectionEfficiencyWeighted2 ( double  eta,
double  z,
double  mu_ind = -1.0 
)

Definition at line 130 of file EnergyResolutionVsLumi.cc.

References calcampDropPhotoDetector(), calcmuTot(), EvolutionECAL::LightCollectionEfficiencyWeighted(), mps_fire::result, and findQualityFiles::v.

Referenced by setLumies().

131 {
132  if(mu_ind<0) mu_ind=this->calcmuTot(eta);
133  double v= this->calcampDropPhotoDetector(eta);
134  EvolutionECAL model;
135  double result=model.LightCollectionEfficiencyWeighted( z , mu_ind)*v;
136  return result;
137 }
double LightCollectionEfficiencyWeighted(double z, double mu_ind)
double calcampDropPhotoDetector(double eta)
double EnergyResolutionVsLumi::calcmuEM ( double  eta)
double EnergyResolutionVsLumi::calcmuHD ( double  eta)

Definition at line 60 of file EnergyResolutionVsLumi.cc.

References EvolutionECAL::InducedAbsorptionHadronic(), m_lumi, and mps_fire::result.

Referenced by calcampDropTransparency(), calcresolutitonConstantTerm(), and setLumies().

61 {
62  double totLumi = m_lumi;
63  EvolutionECAL model;
64  double result = model.InducedAbsorptionHadronic(totLumi, eta);
65  return result;
66 }
double InducedAbsorptionHadronic(double lumi, double eta)
double EnergyResolutionVsLumi::calcmuTot ( double  eta)

Definition at line 139 of file EnergyResolutionVsLumi.cc.

References EvolutionECAL::InducedAbsorptionEM(), EvolutionECAL::InducedAbsorptionHadronic(), muonGEMDigis_cfi::instLumi, m_instlumi, m_lumi, and mps_fire::result.

140 {
141  double totLumi = m_lumi;
142  double instLumi = m_instlumi;
143  EvolutionECAL model;
144  double muEM = model.InducedAbsorptionEM(instLumi, eta);
145  double muH = model.InducedAbsorptionHadronic(totLumi, eta);
146  double result=muEM+muH;
147  return result;
148 }
double InducedAbsorptionHadronic(double lumi, double eta)
double InducedAbsorptionEM(double lumi, double eta)
void EnergyResolutionVsLumi::calcmuTot ( )

Definition at line 68 of file EnergyResolutionVsLumi.cc.

References funct::abs(), EBDetId::approxEta(), calcampDropPhotoDetector(), PVValHelper::eta, EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, cmsBatch::log, EBDetId::MAX_IETA, mu_eta, alignCSCRings::r, mathSSE::sqrt(), funct::tan(), findQualityFiles::v, EEDetId::validDetId(), and vpt_eta.

Referenced by calcLightCollectionEfficiencyWeighted2(), EnergyResolutionVsLumi(), and setLumies().

68  {
69 
70  for(int iEta=1; iEta<=EBDetId::MAX_IETA ;++iEta) {
71  if(iEta==0) continue;
72 
73  double eta=EBDetId::approxEta(EBDetId(iEta,1));
74  eta = std::abs(eta);
75  double r= calcmuTot(eta);
76 
77  mu_eta[iEta]=r;
78  vpt_eta[iEta]=1.0;
79 
80  }
81 
82  for(int iX=EEDetId::IX_MIN; iX<=EEDetId::IX_MAX ;++iX) {
83  for(int iY=EEDetId::IY_MIN; iY<=EEDetId::IY_MAX; ++iY) {
84  if (EEDetId::validDetId(iX,iY,1))
85  {
86  EEDetId eedetidpos(iX,iY,1);
87  double eta= -log(tan(0.5*atan(sqrt((iX-50.0)*(iX-50.0)+(iY-50.0)*(iY-50.0))*2.98/328.)));
88  eta = std::abs(eta);
89  double r=calcmuTot(eta);
90  double v=calcampDropPhotoDetector(eta);
91 
94  //std::cout<<"eta/mu/vpt"<<eta<<"/"<<r<<"/"<<v<<std::endl;
95  }
96  }
97  }
98 }
float approxEta() const
Definition: EBDetId.h:106
double calcampDropPhotoDetector(double eta)
static const int IX_MIN
Definition: EEDetId.h:294
static const int IY_MIN
Definition: EEDetId.h:298
T sqrt(T t)
Definition: SSEVec.h:18
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
static const int IX_MAX
Definition: EEDetId.h:302
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
static const int MAX_IETA
Definition: EBDetId.h:143
static const int IY_MAX
Definition: EEDetId.h:306
double EnergyResolutionVsLumi::calcnoiseADC ( double  eta)

Definition at line 185 of file EnergyResolutionVsLumi.cc.

References funct::abs(), m_lumi, EvolutionECAL::NoiseFactorFE(), and mps_fire::result.

Referenced by setLumies().

186 {
187  double totLumi = m_lumi;
188  double Nadc = 1.1;
189  double result =1.0;
190  EvolutionECAL model;
191  if(std::abs(eta)<1.497){
192  Nadc = 1.1;
193  result = model.NoiseFactorFE(totLumi, eta)*Nadc;
194  }else{
195  Nadc = 2.0;
196  result=Nadc;
197  // endcaps no increase in ADC
198  }
199  return result;
200 
201 }
double NoiseFactorFE(double lumi, double eta)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double EnergyResolutionVsLumi::calcnoiseIncreaseADC ( double  eta)

Definition at line 176 of file EnergyResolutionVsLumi.cc.

References m_lumi, EvolutionECAL::NoiseFactorFE(), and mps_fire::result.

Referenced by EcalTrivialConditionRetriever::produceEcalPedestals(), and setLumies().

177 {
178  double totLumi = m_lumi;
179  EvolutionECAL model;
180  double result = model.NoiseFactorFE(totLumi, eta);
181  return result;
182  // noise increase in ADC
183 }
double NoiseFactorFE(double lumi, double eta)
double EnergyResolutionVsLumi::calcresolutitonConstantTerm ( double  eta)

Definition at line 203 of file EnergyResolutionVsLumi.cc.

References calcmuEM(), calcmuHD(), EvolutionECAL::ResolutionConstantTermEM50GeV(), and mps_fire::result.

Referenced by EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration(), and setLumies().

204 {
205  double muEM=this->calcmuEM(eta);
206  double muHD=this->calcmuHD(eta);
207  EvolutionECAL model;
208  double result = model.ResolutionConstantTermEM50GeV(muEM+muHD);
209  return result;
210 }
double ResolutionConstantTermEM50GeV(double mu)
EnergyResolutionVsLumi::DegradationAtEta EnergyResolutionVsLumi::CalculateDegradation ( double  eta)

Definition at line 19 of file EnergyResolutionVsLumi.cc.

References EvolutionECAL::AgingVPT(), EnergyResolutionVsLumi::DegradationAtEta::ampDropPhotoDetector, EnergyResolutionVsLumi::DegradationAtEta::ampDropTotal, EnergyResolutionVsLumi::DegradationAtEta::ampDropTransparency, EvolutionECAL::DegradationMeanEM50GeV(), EnergyResolutionVsLumi::DegradationAtEta::eta, PVValHelper::eta, EvolutionECAL::InducedAbsorptionEM(), EvolutionECAL::InducedAbsorptionHadronic(), muonGEMDigis_cfi::instLumi, m_instlumi, m_lumi, EnergyResolutionVsLumi::DegradationAtEta::muEM, EnergyResolutionVsLumi::DegradationAtEta::muHD, EvolutionECAL::NoiseFactorFE(), EnergyResolutionVsLumi::DegradationAtEta::noiseIncreaseADC, EvolutionECAL::ResolutionConstantTermEM50GeV(), EnergyResolutionVsLumi::DegradationAtEta::resolutitonConstantTerm, and mps_fire::result.

Referenced by Resolution().

20 {
21  DegradationAtEta result;
22 
23  result.eta = eta;
24  double totLumi = m_lumi;
25  double instLumi = m_instlumi;
26 
27  EvolutionECAL model;
28 
29  // Index of induced absorption due to EM damages in PWO4
30  result.muEM = model.InducedAbsorptionEM(instLumi, eta);
31 
32  // Index of induced absorption due to hadron damages in PWO4
33  result.muHD = model.InducedAbsorptionHadronic(totLumi, eta);
34 
35  // Average degradation of amplitude due to transparency change
36  result.ampDropTransparency = model.DegradationMeanEM50GeV(result.muEM+result.muHD);
37 
38  // Average degradation of amplitude due to photo-detector aging
39  result.ampDropPhotoDetector = model.AgingVPT(instLumi, totLumi, eta);
40 
41  result.ampDropTotal = result.ampDropTransparency*result.ampDropPhotoDetector;
42 
43  // Noise increase in ADC counts due to photo-detector and front-end
44  result.noiseIncreaseADC = model.NoiseFactorFE(totLumi, eta);
45 
46  // Resolution degradation due to LY non-uniformity caused by transparency loss
47  result.resolutitonConstantTerm = model.ResolutionConstantTermEM50GeV(result.muEM+result.muHD);
48 
49  return result;
50 }
double NoiseFactorFE(double lumi, double eta)
double ResolutionConstantTermEM50GeV(double mu)
double DegradationMeanEM50GeV(double mu)
double InducedAbsorptionHadronic(double lumi, double eta)
double InducedAbsorptionEM(double lumi, double eta)
double AgingVPT(double instLumi, double integralLumi, double eta)
double EnergyResolutionVsLumi::getmuTot ( double  eta,
int  ix,
int  iy 
)

Referenced by setLumies().

double EnergyResolutionVsLumi::Resolution ( double  eta,
double  ene 
)

Definition at line 212 of file EnergyResolutionVsLumi.cc.

References EnergyResolutionVsLumi::DegradationAtEta::ampDropTotal, patCaloMETCorrections_cff::C, CalculateDegradation(), edmIntegrityCheck::d, N, EnergyResolutionVsLumi::DegradationAtEta::noiseIncreaseADC, EnergyResolutionVsLumi::DegradationAtEta::resolutitonConstantTerm, S(), and mathSSE::sqrt().

213 {
214  // Initial parameters for ECAL resolution
215  double S;
216  double Nadc;
217  double adc2GeV;
218  double C;
219  if(eta<1.497){
220  S = 0.028; // CMS note 2006/148 (EB test beam)
221  Nadc = 1.1;
222  adc2GeV = 0.039;
223  C = 0.003;
224  }else{
225  S = 0.052; // CMS DN 2009/002
226  Nadc = 2.0;
227  adc2GeV = 0.069;
228  C = 0.004;
229  }
230 
231  DegradationAtEta d = CalculateDegradation(eta);
232 
233  // adjust resolution parameters
234  S /= sqrt(d.ampDropTotal);
235  Nadc *= d.noiseIncreaseADC;
236  adc2GeV /= d.ampDropTotal;
237  double N = Nadc*adc2GeV*3.0; // 3x3 noise in GeV
238  C = sqrt(C*C + d.resolutitonConstantTerm*d.resolutitonConstantTerm);
239 
240  return sqrt(S*S/ene + N*N/ene/ene + C*C);
241 
242 }
T sqrt(T t)
Definition: SSEVec.h:18
#define N
Definition: blowfish.cc:9
DegradationAtEta CalculateDegradation(double eta)
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:99
void EnergyResolutionVsLumi::setInstLumi ( double  x)
inline
void EnergyResolutionVsLumi::setLumi ( double  x)
inline
void EnergyResolutionVsLumi::setLumies ( double  x,
double  y 
)
inline

Member Data Documentation

double EnergyResolutionVsLumi::m_instlumi
private
double EnergyResolutionVsLumi::m_lumi
private
double EnergyResolutionVsLumi::mu_eta[10085]
private

Definition at line 71 of file EnergyResolutionVsLumi.h.

Referenced by calcLightCollectionEfficiencyWeighted(), and calcmuTot().

double EnergyResolutionVsLumi::vpt_eta[10085]
private

Definition at line 72 of file EnergyResolutionVsLumi.h.

Referenced by calcLightCollectionEfficiencyWeighted(), and calcmuTot().