Skip to content

Commit

Permalink
Possibility to disable CheckInvariant in AliITStrackerMI from the Ali…
Browse files Browse the repository at this point in the history
…ITSReconstructor
  • Loading branch information
shahor02 committed Oct 30, 2015
1 parent 1b584de commit 10eb030
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ITS/ITSbase/AliITSReconstructor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@

ClassImp(AliITSReconstructor)


Bool_t AliITSReconstructor::fgkCheckInvariant = kTRUE;

//___________________________________________________________________________
AliITSReconstructor::AliITSReconstructor() : AliReconstructor(),
fDetTypeRec(0)
Expand Down
5 changes: 5 additions & 0 deletions ITS/ITSbase/AliITSReconstructor.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,18 @@ class AliITSReconstructor: public AliReconstructor {

static const AliITSRecoParam* GetRecoParam() { return dynamic_cast<const AliITSRecoParam*>(AliReconstructor::GetRecoParam(0)); }

static void SetCheckInvariant(Bool_t v) {fgkCheckInvariant = v;}
static Bool_t GetCheckInvariant() {return fgkCheckInvariant;}

private:
AliITSReconstructor(const AliITSReconstructor &); //Not implemented
AliITSReconstructor& operator=(const AliITSReconstructor &); //Not implemented

//data
AliITSDetTypeRec *fDetTypeRec; // reconstructor

static Bool_t fgkCheckInvariant; // allow or forbid AliITStrackV2::CheckInvariant

ClassDef(AliITSReconstructor, 6) // class for the ITS reconstruction
};

Expand Down
1 change: 1 addition & 0 deletions ITS/ITSbase/AliITStrackV2.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class AliITStrackV2 : public AliKalmanTrack {
~AliITStrackV2(){fESDtrack=0;}

void SetCheckInvariant(Bool_t check=kTRUE) {fCheckInvariant=check;}
Bool_t GetCheckInvariant() const {return fCheckInvariant;}
Bool_t CorrectForMeanMaterial(Double_t xOverX0, Double_t xTimesRho,
Bool_t anglecorr=kFALSE) {
return AliExternalTrackParam::CorrectForMeanMaterial(xOverX0,xTimesRho,GetMass(),anglecorr);
Expand Down
16 changes: 13 additions & 3 deletions ITS/ITSbase/AliITStrackerMI.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ Int_t AliITStrackerMI::Clusters2Tracks(AliESDEvent *event) {
TObjArray itsTracks(15000);
fOriginal.Clear();
fEsd = event; // store pointer to the esd

Bool_t checkInv = AliITSReconstructor::GetCheckInvariant(); // off in the special reco mode w/o invariant check
// temporary (for cosmics)
if(event->GetVertex()) {
TString title = event->GetVertex()->GetTitle();
Expand All @@ -577,6 +577,7 @@ Int_t AliITStrackerMI::Clusters2Tracks(AliESDEvent *event) {
if (esd->GetStatus()&AliESDtrack::kITSin) continue;
if (esd->GetKinkIndex(0)>0) continue; //kink daughter
AliITStrackMI *t = new AliITStrackMI(*esd);
t->SetCheckInvariant(checkInv);
t->GetDZ(GetX(),GetY(),GetZ(),t->GetDP()); //I.B.
Double_t vdist = TMath::Sqrt(t->GetD(0)*t->GetD(0)+t->GetD(1)*t->GetD(1));

Expand Down Expand Up @@ -707,13 +708,15 @@ Int_t AliITStrackerMI::PropagateBack(AliESDEvent *event) {
double bz0 = GetBz();
const double kWatchStep=10.; // for larger steps watch arc vs segment difference
//
Bool_t checkInv = AliITSReconstructor::GetCheckInvariant(); // off in the special reco mode w/o invariant check
Int_t ntrk=0;
for (Int_t i=0; i<nentr; i++) {
AliESDtrack *esd=event->GetTrack(i);

// Start time integral and add distance from current position to vertex
if (esd->GetStatus()&AliESDtrack::kITSout) continue;
AliITStrackMI t(*esd);
t.SetCheckInvariant(checkInv);
Double_t xyzTrk[3]={0},xyzVtx[3]={GetX(),GetY(),GetZ()};
t.GetXYZ(xyzTrk);
Double_t dst2 = 0.;
Expand Down Expand Up @@ -790,6 +793,8 @@ Int_t AliITStrackerMI::RefitInward(AliESDEvent *event) {
for (UInt_t i=0; i<AliITSPlaneEffSPD::kNModule*AliITSPlaneEffSPD::kNChip; i++) fSPDChipIntPlaneEff[i]=kFALSE;
}

Bool_t checkInv = AliITSReconstructor::GetCheckInvariant(); // off in the special reco mode w/o invariant check

Int_t ntrk=0;
for (Int_t i=0; i<nentr; i++) {
AliESDtrack *esd=event->GetTrack(i);
Expand All @@ -800,6 +805,7 @@ Int_t AliITStrackerMI::RefitInward(AliESDEvent *event) {
if ((esd->GetStatus()&AliESDtrack::kTPCrefit)==0) continue;

AliITStrackMI *t = new AliITStrackMI(*esd);
t->SetCheckInvariant(checkInv);

t->SetExpQ(TMath::Max(0.8*t->GetESDtrack()->GetTPCsignal(),30.));
if (!CorrectForTPCtoITSDeadZoneMaterial(t)) {
Expand Down Expand Up @@ -2564,7 +2570,11 @@ Bool_t AliITStrackerMI::RefitAt(Double_t xx,AliITStrackMI *track,

const AliITSdetector &det=layer.GetDetector(idet);
// only for ITS-SA tracks refit
if (ilayer>1 && fTrackingPhase.Contains("RefitInward") && !(track->GetStatus()&AliESDtrack::kTPCin)) track->SetCheckInvariant(kFALSE);
Bool_t saveCheckInv = kTRUE;
if (ilayer>1 && fTrackingPhase.Contains("RefitInward") && !(track->GetStatus()&AliESDtrack::kTPCin)) {
saveCheckInv = track->GetCheckInvariant();
track->SetCheckInvariant(kFALSE);
}
//
if (!track->Propagate(det.GetPhi(),det.GetR())) return kFALSE;

Expand Down Expand Up @@ -2659,7 +2669,7 @@ Bool_t AliITStrackerMI::RefitAt(Double_t xx,AliITStrackMI *track,
// cross material
// add time if going outward
if(!CorrectForLayerMaterial(track,ilayer,oldGlobXYZ,dir)) return kFALSE;
track->SetCheckInvariant(kTRUE);
track->SetCheckInvariant(saveCheckInv);
} // end loop on layers

if (!track->PropagateTo(xx,0.,0.)) return kFALSE;
Expand Down

0 comments on commit 10eb030

Please sign in to comment.