@@ -47,7 +47,6 @@ Response::Response(Station station)
4747 mChargeCorr = ResponseParam::Instance ().chargeCorrelation ;
4848 mChargeThreshold = ResponseParam::Instance ().chargeThreshold ;
4949}
50-
5150// _____________________________________________________________________
5251float Response::etocharge (float edepos) const
5352{
@@ -90,29 +89,66 @@ uint32_t Response::nSamples(float charge) const
9089 return std::round (std::pow (charge / signalParam[1 ], 1 . / signalParam[2 ]) + signalParam[0 ]);
9190}
9291// _____________________________________________________________________
92+ float Response::inclandbfield (float thetawire, float betagamma, float bx) const
93+ {
94+ float yAngleEffect = 0 ;
95+ // auxiliary variables for b-field and inclination angle effect
96+ float eLossParticleElossMip = 0.0 ;
97+ float sigmaEffect10degrees = 0.0 ;
98+ float sigmaEffectThetadegrees = 0.0 ;
99+
100+ if (isAngleEffect ()) {
101+ if (!isMagnetEffect ()) {
102+ thetawire = abs (thetawire);
103+ if ((betagamma > 3.2 ) && (thetawire * TMath::RadToDeg () <= 15 .)) {
104+ betagamma = log (betagamma); // check if ln or log10
105+ eLossParticleElossMip = eLossRatio (betagamma);
106+ sigmaEffect10degrees = angleEffect10 (eLossParticleElossMip);
107+ sigmaEffectThetadegrees = sigmaEffect10degrees / angleEffectNorma (thetawire * TMath::RadToDeg ());
108+ if (o2::mch::Station () == o2::mch::Station::Type1) {
109+ sigmaEffectThetadegrees /= 1.09833 + 0.017 * (thetawire * TMath::RadToDeg ());
110+ }
111+ yAngleEffect = 0.0001 * gRandom ->Gaus (0 , sigmaEffectThetadegrees); // error due to the angle effect in cm
112+ }
113+ } else {
114+ if ((betagamma > 3.2 ) && (abs (thetawire * TMath::RadToDeg ()) <= 15 .)) {
115+ betagamma = log (betagamma);
116+ eLossParticleElossMip = eLossRatio (betagamma);
117+ sigmaEffect10degrees = angleEffect10 (eLossParticleElossMip);
118+ sigmaEffectThetadegrees = sigmaEffect10degrees / magAngleEffectNorma (thetawire * TMath::RadToDeg (), bx / 10 .); // check b-field unit in aliroot and O2
119+ if (o2::mch::Station () == o2::mch::Station::Type1) {
120+ sigmaEffectThetadegrees /= 1.09833 + 0.017 * (thetawire * TMath::RadToDeg ());
121+ }
122+ yAngleEffect = 0.0001 * gRandom ->Gaus (0 , sigmaEffectThetadegrees);
123+ }
124+ }
125+ }
126+ return yAngleEffect;
127+ }
128+ // _____________________________________________________________________
93129float Response::eLossRatio (float logbetagamma) const
94130{
95131 // Ratio of particle mean eloss with respect MIP's Khalil Boudjemline, sep 2003, PhD.Thesis and Particle Data Book
96132 // / copied from aliroot AliMUONv1.cxx
97133 float eLossRatioParam[5 ] = {1.02138 , -9.54149e-02 , +7.83433e-02 , -9.98208e-03 , +3.83279e-04 };
98- return eLossRatioParam[0 ] + eLossRatioParam[1 ] * logbetagamma + eLossRatioParam[2 ] * std::pow ( logbetagamma, 2 ) + eLossRatioParam[3 ] * std::pow ( logbetagamma, 3 ) + eLossRatioParam[4 ] * std::pow ( logbetagamma, 4 ) ;
134+ return eLossRatioParam[0 ] + eLossRatioParam[1 ] * logbetagamma + eLossRatioParam[2 ] * logbetagamma * logbetagamma + eLossRatioParam[3 ] * logbetagamma * logbetagamma * logbetagamma + eLossRatioParam[4 ] * logbetagamma * logbetagamma * logbetagamma * logbetagamma ;
99135}
100136// _____________________________________________________________________
101137float Response::angleEffect10 (float elossratio) const
102138{
103139 // / Angle effect in tracking chambers at theta =10 degres as a function of ElossRatio (Khalil BOUDJEMLINE sep 2003 Ph.D Thesis) (in micrometers)
104140 // / copied from aliroot AliMUONv1.cxx
105141 float angleEffectParam[3 ] = {1.90691e+02 , -6.62258e+01 , 1.28247e+01 };
106- return angleEffectParam[0 ] + angleEffectParam[1 ] * elossratio + angleEffectParam[2 ] * std::pow ( elossratio, 2 ) ;
142+ return angleEffectParam[0 ] + angleEffectParam[1 ] * elossratio + angleEffectParam[2 ] * elossratio * elossratio ;
107143}
108144// _____________________________________________________________________
109- float Response::angleEffectNorma (float elossratio ) const
145+ float Response::angleEffectNorma (float angle ) const
110146{
111147 // / Angle effect: Normalisation form theta=10 degres to theta between 0 and 10 (Khalil BOUDJEMLINE sep 2003 Ph.D Thesis)
112148 // / Angle with respect to the wires assuming that chambers are perpendicular to the z axis.
113149 // / copied from aliroot AliMUONv1.cxx
114150 float angleEffectParam[4 ] = {4.148 , -6.809e-01 , 5.151e-02 , -1.490e-03 };
115- return angleEffectParam[0 ] + angleEffectParam[1 ] * elossratio + angleEffectParam[2 ] * std::pow (elossratio, 2 ) + angleEffectParam[3 ] * std::pow (elossratio, 3 ) ;
151+ return angleEffectParam[0 ] + angleEffectParam[1 ] * angle + angleEffectParam[2 ] * angle * angle + angleEffectParam[3 ] * angle * angle * angle ;
116152}
117153// _____________________________________________________________________
118154float Response::magAngleEffectNorma (float angle, float bfield) const
@@ -122,5 +158,5 @@ float Response::magAngleEffectNorma(float angle, float bfield) const
122158 // / copied from aliroot AliMUONv1.cxx
123159 float angleEffectParam[7 ] = {8.6995 , 25.4022 , 13.8822 , 2.4717 , 1.1551 , -0.0624 , 0.0012 };
124160 float aux = std::abs (angle - angleEffectParam[0 ] * bfield);
125- return 121.24 / ((angleEffectParam[1 ] + angleEffectParam[2 ] * std::abs (bfield)) + angleEffectParam[3 ] * aux + angleEffectParam[4 ] * std::pow ( aux, 2 ) + angleEffectParam[5 ] * std::pow ( aux, 3 ) + angleEffectParam[6 ] * std::pow ( aux, 4 ) );
161+ return 121.24 / ((angleEffectParam[1 ] + angleEffectParam[2 ] * std::abs (bfield)) + angleEffectParam[3 ] * aux + angleEffectParam[4 ] * aux * aux + angleEffectParam[5 ] * aux * aux * aux + angleEffectParam[6 ] * aux * aux * aux * aux );
126162}
0 commit comments