Skip to content

Commit

Permalink
Fix in Lorentz angle simulation & correction in SPD
Browse files Browse the repository at this point in the history
Both simulation and correction of Lorentz shift in SPD was not accounting for
1) collected holes move against sensor local Y axis
2) SPD2 has its Z axis opposite to lab Z axis, hence in local frame the Bz is inverted
As a result, both simulated and corrected Lorentz shift on SPD1 had its sign flipped. The effect
in MC is 0 (since error was in both), for raw data the effect should be ~ -/+7 micron bias of
<DCA> @ vertex for B+/B- respectively, leading to ~15 micron split of <DCA> bias between
2 polarities
  • Loading branch information
shahor02 committed Feb 6, 2017
1 parent 9b3cc2e commit 6851728
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
5 changes: 4 additions & 1 deletion ITS/ITSbase/AliITSClusterFinderV2SPD.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ Int_t AliITSClusterFinderV2SPD::ClustersSPD(AliBin* bins, TClonesArray* digits,T
}
else {
Float_t magField = field->SolenoidField();
tanLorentzAngle=repa->GetTanLorentzAngleHolesSPD() * magField / defaultField ;
// in B+ holes move clockwise, hence - sign.
tanLorentzAngle = -repa->GetTanLorentzAngleHolesSPD() * magField / defaultField ;
// if module local Z is inverted wrt lab Z, it will see opposite B in its frame
if (mT2L->GetRotationMatrix()[8]<0) tanLorentzAngle = -tanLorentzAngle;
}
}
//
Expand Down
23 changes: 15 additions & 8 deletions ITS/ITSsim/AliITSsimulationSPD.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <TGeoGlobalMagField.h>
#include <TH1.h>
#include <TString.h>
#include <TGeoMatrix.h>
#include "AliITS.h"
#include "AliITSdigitSPD.h"
#include "AliITShit.h"
Expand All @@ -29,6 +30,7 @@
#include "AliITSCalibrationSPD.h"
#include "AliITSsegmentationSPD.h"
#include "AliITSsimulationSPD.h"
#include "AliITSgeomTGeo.h"
#include "AliLog.h"
#include "AliRun.h"
#include "AliMagF.h"
Expand Down Expand Up @@ -160,8 +162,9 @@ Bool_t AliITSsimulationSPD::SetTanLorAngle(Double_t WeightHole) {
AliMagF* fld = (AliMagF*)TGeoGlobalMagField::Instance()->GetField();
if (!fld) AliFatal("The field is not initialized");
Double_t bz = fld->SolenoidField();
fTanLorAng = TMath::Tan(WeightHole*simpar->LorentzAngleHole(bz) +
WeightEle*simpar->LorentzAngleElectron(bz));
// RS: "-" sign to account for the fact that e.g. holes move against local Y axis
fTanLorAng = -TMath::Tan(WeightHole*simpar->LorentzAngleHole(bz) +
WeightEle*simpar->LorentzAngleElectron(bz));
return kTRUE;
}
//______________________________________________________________________
Expand Down Expand Up @@ -407,7 +410,9 @@ void AliITSsimulationSPD::HitToSDigit(AliITSmodule *mod){
Double_t hitTimeMax = hitWin[1]*(Double_t)fStrobeLenght*kBunchLenght + (Double_t)fStrobePhase;
Double_t foTimeMin = foWin[0]*(Double_t)fStrobeLenght*kBunchLenght + (Double_t)fStrobePhase;
Double_t foTimeMax = foWin[1]*(Double_t)fStrobeLenght*kBunchLenght + (Double_t)fStrobePhase;

// if module local Z is inverted wrt lab Z, it will see opposite B in its frame
double tanLorAngMod = AliITSgeomTGeo::GetMatrix(fModule)->GetRotationMatrix()[8]>0 ? fTanLorAng:-fTanLorAng;

for(h=0;h<nhits;h++){
if(AliDebugLevel()>0) {
AliDebug(1,Form("Hits, %d", h));
Expand Down Expand Up @@ -441,7 +446,7 @@ void AliITSsimulationSPD::HitToSDigit(AliITSmodule *mod){
sig = simpar->SigmaDiffusion1D(TMath::Abs(thick + y));
sigx=sig;
sigz=sig*fda;
if (fLorentz) ld=(y+thick)*fTanLorAng;
if (fLorentz) ld=(y+thick)*tanLorAngMod;
SpreadChargeAsym(x,z,ix,iz,el,sigx,sigz,ld,idtrack,h);
} // end for t
} else { // st == 0.0 deposit it at this point
Expand All @@ -454,7 +459,7 @@ void AliITSsimulationSPD::HitToSDigit(AliITSmodule *mod){
sig = simpar->SigmaDiffusion1D(TMath::Abs(thick + y));
sigx=sig;
sigz=sig*fda;
if (fLorentz) ld=(y+thick)*fTanLorAng;
if (fLorentz) ld=(y+thick)*tanLorAngMod;
SpreadChargeAsym(x,z,ix,iz,el,sigx,sigz,ld,idtrack,h);
} // end if st>0.0

Expand Down Expand Up @@ -562,7 +567,9 @@ void AliITSsimulationSPD::HitToSDigitFast(AliITSmodule *mod){
Double_t hitTimeMax = hitWin[1]*(Double_t)fStrobeLenght*kBunchLenght + (Double_t)fStrobePhase;
Double_t foTimeMin = foWin[0]*(Double_t)fStrobeLenght*kBunchLenght + (Double_t)fStrobePhase;
Double_t foTimeMax = foWin[1]*(Double_t)fStrobeLenght*kBunchLenght + (Double_t)fStrobePhase;

// if module local Z is inverted wrt lab Z, it will see opposite B in its frame
double tanLorAngMod = AliITSgeomTGeo::GetMatrix(fModule)->GetRotationMatrix()[8]>0 ? fTanLorAng:-fTanLorAng;

for(h=0;h<nhits;h++){
if(AliDebugLevel()>0) {
AliDebug(1,Form("Hits, %d", h));
Expand Down Expand Up @@ -595,7 +602,7 @@ void AliITSsimulationSPD::HitToSDigitFast(AliITSmodule *mod){
sig = simpar->SigmaDiffusion1D(TMath::Abs(thick + y));
sigx=sig;
sigz=sig*fda;
if (fLorentz) ld=(y+thick)*fTanLorAng;
if (fLorentz) ld=(y+thick)*tanLorAngMod;
SpreadChargeAsym(x,z,ix,iz,el,sigx,sigz,ld,idtrack,h);
// cout << "sigx sigz " << sigx << " " << sigz << endl; // dom
} // end for i // End Integrate over t
Expand All @@ -610,7 +617,7 @@ void AliITSsimulationSPD::HitToSDigitFast(AliITSmodule *mod){
sig = simpar->SigmaDiffusion1D(TMath::Abs(thick + y));
sigx=sig;
sigz=sig*fda;
if (fLorentz) ld=(y+thick)*fTanLorAng;
if (fLorentz) ld=(y+thick)*tanLorAngMod;
SpreadChargeAsym(x,z,ix,iz,el,sigx,sigz,ld,idtrack,h);
} // end if st>0.0

Expand Down

0 comments on commit 6851728

Please sign in to comment.