]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Modifications to the plane efficiency algos: more flexible selection system (V. Altini)
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 17 Jun 2012 14:47:08 +0000 (14:47 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 17 Jun 2012 14:47:08 +0000 (14:47 +0000)
ITS/AliITSRecoParam.cxx
ITS/AliITSRecoParam.h
ITS/AliITStrackerMI.cxx

index 4c632eee4351e48e8be1acc5f01edda5d2d8e0f4..296e5e50abc261626eb6b705c1b6bcfbfaba05d2 100644 (file)
@@ -134,8 +134,17 @@ fMaxMissingClustersOutPlaneEff(5),
 fRequireClusterInOuterLayerPlaneEff(kFALSE),
 fRequireClusterInInnerLayerPlaneEff(kFALSE),
 fOnlyConstraintPlaneEff(kFALSE),
-fNSigXFromBoundaryPlaneEff(1.),
-fNSigZFromBoundaryPlaneEff(1.),
+fNSigXFromBoundaryPlaneEff(0.),
+fNSigZFromBoundaryPlaneEff(0.),
+fDistXFromBoundaryPlaneEff(0.),
+fDistZFromBoundaryPlaneEff(0.),
+fSwitchOnMaxDistNSigFrmBndPlaneEff(kFALSE),
+fSwitchOffStdSearchClusPlaneEff(kFALSE),
+fNSigXSearchClusterPlaneEff(0.),
+fNSigZSearchClusterPlaneEff(0.),
+fDistXSearchClusterPlaneEff(0.),
+fDistZSearchClusterPlaneEff(0.),
+fSwitchOnMaxDistNSigSrhClusPlaneEff(kFALSE),
 fDCACutPlaneEff(999.),
 fVertexChi2CutPlaneEff(999999999.),
 fImproveWithVertex(kFALSE),
@@ -926,4 +935,3 @@ Bool_t AliITSRecoParam::SetOptReco(TString r){
   }
   return isFine;
 } 
-
index 21e06409cad7260670ef8a1a78558f3b5f61f1f6..4b49ad215aaccd4d0d9d29e927f415604c0138d7 100644 (file)
@@ -265,10 +265,28 @@ class AliITSRecoParam : public AliDetectorRecoParam
   Bool_t GetRequireClusterInInnerLayerPlaneEff() const {return fRequireClusterInInnerLayerPlaneEff;}
   void   SetOnlyConstraintPlaneEff(Bool_t con=kFALSE) { fOnlyConstraintPlaneEff=con; }
   Bool_t GetOnlyConstraintPlaneEff() const { return fOnlyConstraintPlaneEff; }
-  void SetNSigXFromBoundaryPlaneEff(Double_t nsigx=1.) {fNSigXFromBoundaryPlaneEff=nsigx;}
+  void SetNSigXFromBoundaryPlaneEff(Double_t nsigx=0.) {if(nsigx<0.)fNSigXFromBoundaryPlaneEff=TMath::Abs(nsigx);else fNSigXFromBoundaryPlaneEff=nsigx;}
   Double_t GetNSigXFromBoundaryPlaneEff() const {return fNSigXFromBoundaryPlaneEff;}
-  void SetNSigZFromBoundaryPlaneEff(Double_t nsigz=1.) {fNSigZFromBoundaryPlaneEff=nsigz;}
+  void SetNSigZFromBoundaryPlaneEff(Double_t nsigz=0.) {if(nsigz<0.)fNSigZFromBoundaryPlaneEff=TMath::Abs(nsigz);else fNSigZFromBoundaryPlaneEff=nsigz;}
   Double_t GetNSigZFromBoundaryPlaneEff() const {return fNSigZFromBoundaryPlaneEff;}
+  void SetDistXFromBoundaryPlaneEff(Double_t distx=0.) {if(distx<0.)fDistXFromBoundaryPlaneEff=TMath::Abs(distx);else fDistXFromBoundaryPlaneEff=distx;}
+  Double_t GetDistXFromBoundaryPlaneEff() const {return fDistXFromBoundaryPlaneEff;}
+  void SetDistZFromBoundaryPlaneEff(Double_t distz=0.) {if(distz<0.)fDistZFromBoundaryPlaneEff=TMath::Abs(distz);else fDistZFromBoundaryPlaneEff=distz;}
+  Double_t GetDistZFromBoundaryPlaneEff() const {return fDistZFromBoundaryPlaneEff;}
+  void SetSwitchOnMaxDistNSigFrmBndPlaneEff(Bool_t flagbnd=kFALSE) {fSwitchOnMaxDistNSigFrmBndPlaneEff=flagbnd;}
+  Bool_t GetSwitchOnMaxDistNSigFrmBndPlaneEff() const {return fSwitchOnMaxDistNSigFrmBndPlaneEff;}
+  void SetSwitchOffStdSearchClusPlaneEff(Bool_t flagstdclus=kFALSE) {fSwitchOffStdSearchClusPlaneEff=flagstdclus;}
+  Bool_t GetSwitchOffStdSearchClusPlaneEff() const {return fSwitchOffStdSearchClusPlaneEff;}
+  void SetNSigXSearchClusterPlaneEff(Double_t nsigclx=0.) {if(nsigclx<0.)fNSigXSearchClusterPlaneEff=TMath::Abs(nsigclx);else fNSigXSearchClusterPlaneEff=nsigclx;}
+  Double_t GetNSigXSearchClusterPlaneEff() const {return fNSigXSearchClusterPlaneEff;}
+  void SetNSigZSearchClusterPlaneEff(Double_t nsigclz=0.) {if(nsigclz<0.)fNSigZSearchClusterPlaneEff=TMath::Abs(nsigclz);else fNSigZSearchClusterPlaneEff=nsigclz;}
+  Double_t GetNSigZSearchClusterPlaneEff() const {return fNSigZSearchClusterPlaneEff;}
+  void SetDistXSearchClusterPlaneEff(Double_t distclx=0.) {if(distclx<0.)fDistXSearchClusterPlaneEff=TMath::Abs(distclx);else fDistXSearchClusterPlaneEff=distclx;}
+  Double_t GetDistXSearchClusterPlaneEff() const {return fDistXSearchClusterPlaneEff;}
+  void SetDistZSearchClusterPlaneEff(Double_t distclz=0.) {if(distclz<0.)fDistZSearchClusterPlaneEff=TMath::Abs(distclz);else fDistZSearchClusterPlaneEff=distclz;}
+  Double_t GetDistZSearchClusterPlaneEff() const {return fDistZSearchClusterPlaneEff;}
+  void SetSwitchOnMaxDistNSigSrhClusPlaneEff(Bool_t flagbndcl=kFALSE) {fSwitchOnMaxDistNSigSrhClusPlaneEff=flagbndcl;}
+  Bool_t GetSwitchOnMaxDistNSigSrhClusPlaneEff() const {return fSwitchOnMaxDistNSigSrhClusPlaneEff;}
   void SetDCACutPlaneEff(Double_t dcacpe=999.) {fDCACutPlaneEff=dcacpe;}
   Double_t GetDCACutPlaneEff() const {return fDCACutPlaneEff;}
   void SetVertexChi2CutPlaneEff(Double_t vtxchipe=999999999.) {fVertexChi2CutPlaneEff=vtxchipe;}
@@ -642,6 +660,15 @@ class AliITSRecoParam : public AliDetectorRecoParam
   Bool_t fOnlyConstraintPlaneEff;  // if kTRUE, use only constrained tracks at primary vertex for Plane Eff.
   Double_t fNSigXFromBoundaryPlaneEff;  // accept one track for PlaneEff if distance from border (in loc x or z)
   Double_t fNSigZFromBoundaryPlaneEff;  // is greater than fNSigXFromBoundaryPlaneEff * Track_precision
+  Double_t fDistXFromBoundaryPlaneEff;  // accept one track for PlaneEff if distance from border (in loc x or z)
+  Double_t fDistZFromBoundaryPlaneEff;  // is greater than fDistXFromBoundaryPlaneEff centimeters 
+  Bool_t fSwitchOnMaxDistNSigFrmBndPlaneEff; //if kTRUE,use max(fDistXFromBoundaryPlaneEff,fNSigXFromBoundaryPlaneEff) to accept tracks
+  Bool_t fSwitchOffStdSearchClusPlaneEff; //if kTRUE,use fNSigXSearchClusterPlaneEff and fDistXSearchClusterPlaneEff
+  Double_t fNSigXSearchClusterPlaneEff;  //  cluster search in distance from track impact point (in loc x or z)
+  Double_t fNSigZSearchClusterPlaneEff;  // less than fNSigXSearchClusterPlaneEff * Track_precision
+  Double_t fDistXSearchClusterPlaneEff;  // cluster found in distance from track impact point (in loc x or z)
+  Double_t fDistZSearchClusterPlaneEff;  // is greater than fDistXSearchClusterPlaneEff centimeters
+  Bool_t fSwitchOnMaxDistNSigSrhClusPlaneEff; //if kTRUE,use max(fDistXSearchClusterPlaneEff,fNSigXSearchClusterPlaneEff) to accept tracks
   Double_t fDCACutPlaneEff;  // this set the cut on DCA in rphi plane when evaluating PlaneEff(SPD0)
   Double_t fVertexChi2CutPlaneEff; // and also with a cut on the chi2
 
@@ -771,7 +798,9 @@ class AliITSRecoParam : public AliDetectorRecoParam
   AliITSRecoParam(const AliITSRecoParam & param);
   AliITSRecoParam & operator=(const AliITSRecoParam &param);
 
-  ClassDef(AliITSRecoParam,52) // ITS reco parameters
+  ClassDef(AliITSRecoParam,53) // ITS reco parameters
 };
 
 #endif
+
+
index 25372ed07453c453257a150707298702692388fb..59ddfa12f2a4bfad7ae79c9dda5fddaf71fd7acd 100644 (file)
@@ -4976,9 +4976,20 @@ if(index[lay]>=0)nclout++;
   //
   Double_t nsigx=AliITSReconstructor::GetRecoParam()->GetNSigXFromBoundaryPlaneEff();
   Double_t nsigz=AliITSReconstructor::GetRecoParam()->GetNSigZFromBoundaryPlaneEff();
-  Double_t dx=nsigx*TMath::Sqrt(tmp.GetSigmaY2());  // those are precisions in the tracking reference system
-  Double_t dz=nsigz*TMath::Sqrt(tmp.GetSigmaZ2());  // Use it also for the module reference system, as it is
-                                                    // done for RecPoints
+  Double_t distx=AliITSReconstructor::GetRecoParam()->GetDistXFromBoundaryPlaneEff();
+  Double_t distz=AliITSReconstructor::GetRecoParam()->GetDistZFromBoundaryPlaneEff();
+  Double_t dx=nsigx*TMath::Sqrt(tmp.GetSigmaY2()) + distx;
+  // those are precisions in the tracking reference system
+  Double_t dz=nsigz*TMath::Sqrt(tmp.GetSigmaZ2()) + distz;
+  // Use it also for the module reference system, as it is done for RecPoints
+
+  if(AliITSReconstructor::GetRecoParam()->GetSwitchOnMaxDistNSigFrmBndPlaneEff()){
+   if(nsigx*TMath::Sqrt(tmp.GetSigmaY2())<=distx) dx -= nsigx*TMath::Sqrt(tmp.GetSigmaY2());
+   else dx -= distx;
+
+   if(nsigz*TMath::Sqrt(tmp.GetSigmaZ2())<=distz) dz -= nsigz*TMath::Sqrt(tmp.GetSigmaZ2());
+   else dz -= distz;
+  }
 
   // exclude tracks at boundary between detectors
   //Double_t boundaryWidth=AliITSRecoParam::GetBoundaryWidthPlaneEff();
@@ -5090,9 +5101,32 @@ void AliITStrackerMI::UseTrackForPlaneEff(const AliITStrackMI* track, Int_t ilay
     msz *= AliITSReconstructor::GetRecoParam()->GetNSigma2RoadZNonC();
     msy *= AliITSReconstructor::GetRecoParam()->GetNSigma2RoadYNonC();
   }
+
+  if(AliITSReconstructor::GetRecoParam()->GetSwitchOffStdSearchClusPlaneEff()){
+     Double_t nsigx=AliITSReconstructor::GetRecoParam()->GetNSigXSearchClusterPlaneEff();
+     Double_t nsigz=AliITSReconstructor::GetRecoParam()->GetNSigZSearchClusterPlaneEff();
+     Double_t distx=AliITSReconstructor::GetRecoParam()->GetDistXSearchClusterPlaneEff();
+     Double_t distz=AliITSReconstructor::GetRecoParam()->GetDistZSearchClusterPlaneEff();
+     msy = nsigx*TMath::Sqrt(tmp.GetSigmaY2()) + distx;
+     msz = nsigz*TMath::Sqrt(tmp.GetSigmaZ2()) + distz;
+
+  if(AliITSReconstructor::GetRecoParam()->GetSwitchOnMaxDistNSigSrhClusPlaneEff()){
+     if(nsigx*TMath::Sqrt(tmp.GetSigmaY2())<=distx) msy -= nsigx*TMath::Sqrt(tmp.GetSigmaY2());
+     else msy -= distx;
+
+     if(nsigz*TMath::Sqrt(tmp.GetSigmaZ2())<=distz) msz -= nsigz*TMath::Sqrt(tmp.GetSigmaZ2());
+     else msz -= distz;
+  }
+
+  msy *= msy;
+  msz *= msz;
+
+  }
+
+  if(msz==0 || msy==0){AliWarning("UseTrackForPlaneEff: null search frame"); return;}
+    
   msz = 1./msz; // 1/RoadZ^2
   msy = 1./msy; // 1/RoadY^2
-//
 
   const AliITSRecPoint *cl=0; Int_t clidx=-1, ci=-1;
   Int_t idetc=-1;
@@ -5299,4 +5333,3 @@ Int_t AliITStrackerMI::AliITSlayer::FindClusterForLabel(Int_t label, Int_t *stor
   }
   return nfound;
 }
-