]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDseedV1.cxx
Major commit related to steering of the reco parameters: AliDAQ and trigger classes...
[u/mrichter/AliRoot.git] / TRD / AliTRDseedV1.cxx
index 04af0f3a5c4244704c5cf9eaba16dcdee6930f1a..6ab0fec10d4e0298fa12be818b385fecad65f170 100644 (file)
@@ -221,7 +221,7 @@ void AliTRDseedV1::CookdEdx(Int_t nslices)
                nclusters[slice]++;
        } // End of loop over clusters
 
-       if(AliTRDReconstructor::RecoParam()->GetPIDMethod() == 0){
+       if(AliTRDReconstructor::GetRecoParam()->GetPIDMethod() == AliTRDrecoParam::kLQPID){
        // calculate mean charge per slice (only LQ PID)
                for(int is=0; is<nslices; is++){ 
            if(nclusters[is]) fdEdx[is] /= nclusters[is];
@@ -256,20 +256,26 @@ Double_t* AliTRDseedV1::GetProbability()
     return 0x0;
   }
 
+  const AliTRDrecoParam *rec = AliTRDReconstructor::GetRecoParam();
+  if (!rec) {
+    AliError("No TRD reco param.");
+    return 0x0;
+  }
+
   // Retrieve the CDB container class with the parametric detector response
-  const AliTRDCalPID *pd = calibration->GetPIDObject(AliTRDReconstructor::RecoParam()->GetPIDMethod());
+  const AliTRDCalPID *pd = calibration->GetPIDObject(rec->GetPIDMethod());
   if (!pd) {
     AliError("No access to AliTRDCalPID object");
     return 0x0;
   }
-       //AliInfo(Form("Method[%d] : %s", AliTRDReconstructor::RecoParam()->GetPIDMethod(), pd->IsA()->GetName()));
+       //AliInfo(Form("Method[%d] : %s", AliTRDReconstructor::GetRecoParam()->GetPIDMethod(), pd->IsA()->GetName()));
 
        // calculate tracklet length TO DO
   Float_t length = (AliTRDgeometry::AmThick() + AliTRDgeometry::DrThick());
   /// TMath::Sqrt((1.0 - fSnp[iPlane]*fSnp[iPlane]) / (1.0 + fTgl[iPlane]*fTgl[iPlane]));
   
   //calculate dE/dx
-  CookdEdx(AliTRDReconstructor::RecoParam()->GetNdEdxSlices());
+  CookdEdx(rec->GetNdEdxSlices());
   
   // Sets the a priori probabilities
   for(int ispec=0; ispec<AliPID::kSPECIES; ispec++) {
@@ -349,13 +355,13 @@ Bool_t    AliTRDseedV1::AttachClustersIter(AliTRDtrackingChamber *chamber, Float_t
        // debug level 7
        //
        
-       if(!AliTRDReconstructor::RecoParam()){
+       if(!AliTRDReconstructor::GetRecoParam()){
                AliError("Seed can not be used without a valid RecoParam.");
                return kFALSE;
        }
 
        AliTRDchamberTimeBin *layer = 0x0;
-       if(AliTRDReconstructor::StreamLevel()>=7 && c){
+       if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel()>=7 && c){
                TClonesArray clusters("AliTRDcluster", 24);
                clusters.SetOwner(kTRUE);
                AliTRDcluster *cc = 0x0;
@@ -383,7 +389,7 @@ Bool_t      AliTRDseedV1::AttachClustersIter(AliTRDtrackingChamber *chamber, Float_t
        }
 
        Float_t  tquality;
-       Double_t kroady = AliTRDReconstructor::RecoParam()->GetRoad1y();
+       Double_t kroady = AliTRDReconstructor::GetRecoParam()->GetRoad1y();
        Double_t kroadz = fPadLength * .5 + 1.;
        
        // initialize configuration parameters
@@ -423,7 +429,7 @@ Bool_t      AliTRDseedV1::AttachClustersIter(AliTRDtrackingChamber *chamber, Float_t
                        fZ[iTime]        = cl->GetZ();
                        ncl++;
                }
-       if(AliTRDReconstructor::StreamLevel()>=7) AliInfo(Form("iter = %d ncl [%d] = %d", iter, fPlane, ncl));
+       if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel()>=7) AliInfo(Form("iter = %d ncl [%d] = %d", iter, fPlane, ncl));
                
                if(ncl>1){      
                        // calculate length of the time bin (calibration aware)
@@ -464,7 +470,7 @@ Bool_t      AliTRDseedV1::AttachClustersIter(AliTRDtrackingChamber *chamber, Float_t
                        
                        AliTRDseed::Update();
                }
-       if(AliTRDReconstructor::StreamLevel()>=7) AliInfo(Form("iter = %d nclFit [%d] = %d", iter, fPlane, fN2));
+       if(AliTRDReconstructor::GetRecoParam()->GetStreamLevel()>=7) AliInfo(Form("iter = %d nclFit [%d] = %d", iter, fPlane, fN2));
                
                if(IsOK()){
                        tquality = GetQuality(kZcorr);
@@ -500,7 +506,7 @@ Bool_t      AliTRDseedV1::AttachClusters(AliTRDtrackingChamber *chamber
   // 6. fit tracklet
   //   
 
-       if(!AliTRDReconstructor::RecoParam()){
+       if(!AliTRDReconstructor::GetRecoParam()){
                AliError("Seed can not be used without a valid RecoParam.");
                return kFALSE;
        }
@@ -508,7 +514,7 @@ Bool_t      AliTRDseedV1::AttachClusters(AliTRDtrackingChamber *chamber
        const Int_t kClusterCandidates = 2 * knTimebins;
        
        //define roads
-       Double_t kroady = AliTRDReconstructor::RecoParam()->GetRoad1y();
+       Double_t kroady = AliTRDReconstructor::GetRecoParam()->GetRoad1y();
        Double_t kroadz = fPadLength * 1.5 + 1.;
        // correction to y for the tilting angle
        Float_t zcorr = kZcorr ? fTilt * (fZProb - fZref[0]) : 0.;
@@ -600,7 +606,7 @@ Bool_t      AliTRDseedV1::AttachClusters(AliTRDtrackingChamber *chamber
        }
        
        // number of minimum numbers of clusters expected for the tracklet
-       Int_t kClmin = Int_t(AliTRDReconstructor::RecoParam()->GetFindableClusters()*AliTRDtrackerV1::GetNTimeBins());
+       Int_t kClmin = Int_t(AliTRDReconstructor::GetRecoParam()->GetFindableClusters()*AliTRDtrackerV1::GetNTimeBins());
   if (fN2 < kClmin){
                AliWarning(Form("Not enough clusters to fit the tracklet %d [%d].", fN2, kClmin));
     fN2 = 0;