@@ -30,7 +30,7 @@ using namespace o2::gpu;
3030
3131#include " utils/qconfigrtc.h"
3232
33- void GPUParam::SetDefaults (float solenoidBz)
33+ void GPUParam::SetDefaults (float solenoidBz, bool assumeConstantBz )
3434{
3535 memset ((void *)this , 0 , sizeof (*this ));
3636 new (&rec) GPUSettingsRec;
@@ -83,8 +83,7 @@ void GPUParam::SetDefaults(float solenoidBz)
8383 }
8484#endif
8585
86- par.dAlpha = 0 .349066f ;
87- UpdateBzOnly (solenoidBz);
86+ UpdateBzOnly (solenoidBz, assumeConstantBz);
8887 par.dodEdx = 0 ;
8988
9089 constexpr float plusZmin = 0.0529937 ;
@@ -102,36 +101,30 @@ void GPUParam::SetDefaults(float solenoidBz)
102101 if (tmp >= GPUCA_NSECTORS / 4 ) {
103102 tmp -= GPUCA_NSECTORS / 2 ;
104103 }
105- SectorParam[i].Alpha = 0 .174533f + par. dAlpha * tmp;
104+ SectorParam[i].Alpha = 0 .174533f + dAlpha * tmp;
106105 SectorParam[i].CosAlpha = CAMath::Cos (SectorParam[i].Alpha );
107106 SectorParam[i].SinAlpha = CAMath::Sin (SectorParam[i].Alpha );
108- SectorParam[i].AngleMin = SectorParam[i].Alpha - par. dAlpha / 2 .f ;
109- SectorParam[i].AngleMax = SectorParam[i].Alpha + par. dAlpha / 2 .f ;
107+ SectorParam[i].AngleMin = SectorParam[i].Alpha - dAlpha / 2 .f ;
108+ SectorParam[i].AngleMax = SectorParam[i].Alpha + dAlpha / 2 .f ;
110109 }
111110
112- par.assumeConstantBz = false ;
113- par.toyMCEventsFlag = false ;
114111 par.continuousTracking = false ;
115112 continuousMaxTimeBin = 0 ;
116113 tpcCutTimeBin = 0 ;
117- par.debugLevel = 0 ;
118114 par.earlyTpcTransform = false ;
119115}
120116
121117void GPUParam::UpdateSettings (const GPUSettingsGRP* g, const GPUSettingsProcessing* p, const GPURecoStepConfiguration* w, const GPUSettingsRecDynamic* d)
122118{
123119 if (g) {
124- UpdateBzOnly (g->solenoidBzNominalGPU );
125- par.assumeConstantBz = g->constBz ;
126- par.toyMCEventsFlag = g->homemadeEvents ;
120+ UpdateBzOnly (g->solenoidBzNominalGPU , g->constBz );
127121 par.continuousTracking = g->grpContinuousMaxTimeBin != 0 ;
128122 continuousMaxTimeBin = g->grpContinuousMaxTimeBin == -1 ? GPUSettings::TPC_MAX_TF_TIME_BIN : g->grpContinuousMaxTimeBin ;
129123 tpcCutTimeBin = g->tpcCutTimeBin ;
130124 }
131125 par.earlyTpcTransform = rec.tpc .forceEarlyTransform == -1 ? (!par.continuousTracking ) : rec.tpc .forceEarlyTransform ;
132126 qptB5Scaler = CAMath::Abs (bzkG) > 0 .1f ? CAMath::Abs (bzkG) / 5 .006680f : 1 .f ; // Repeat here, since passing in g is optional
133127 if (p) {
134- par.debugLevel = p->debugLevel ;
135128 UpdateRun3ClusterErrors (p->param .tpcErrorParamY , p->param .tpcErrorParamZ );
136129 }
137130 if (w) {
@@ -145,12 +138,12 @@ void GPUParam::UpdateSettings(const GPUSettingsGRP* g, const GPUSettingsProcessi
145138 }
146139}
147140
148- void GPUParam::UpdateBzOnly (float newSolenoidBz)
141+ void GPUParam::UpdateBzOnly (float newSolenoidBz, bool assumeConstantBz )
149142{
150143 bzkG = newSolenoidBz;
151144 bzCLight = bzkG * o2::gpu::gpu_common_constants::kCLight ;
152145 polynomialField.Reset ();
153- if (par. assumeConstantBz ) {
146+ if (assumeConstantBz) {
154147 GPUTPCGMPolynomialFieldManager::GetPolynomialField (GPUTPCGMPolynomialFieldManager::kUniform , bzkG, polynomialField);
155148 } else {
156149 GPUTPCGMPolynomialFieldManager::GetPolynomialField (bzkG, polynomialField);
@@ -160,7 +153,7 @@ void GPUParam::UpdateBzOnly(float newSolenoidBz)
160153
161154void GPUParam::SetDefaults (const GPUSettingsGRP* g, const GPUSettingsRec* r, const GPUSettingsProcessing* p, const GPURecoStepConfiguration* w)
162155{
163- SetDefaults (g->solenoidBzNominalGPU );
156+ SetDefaults (g->solenoidBzNominalGPU , g-> constBz );
164157 if (r) {
165158 rec = *r;
166159 if (rec.fitPropagateBzOnly == -1 ) {
0 commit comments