]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- revert accidental part of previous commit,
authorjklein <jklein@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Mar 2012 18:40:50 +0000 (18:40 +0000)
committerjklein <jklein@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 28 Mar 2012 18:40:50 +0000 (18:40 +0000)
  premature (waiting for OCDB update)

TRD/AliTRDcalibDB.cxx
TRD/AliTRDcalibDB.h
TRD/AliTRDltuParam.cxx
TRD/AliTRDmcmSim.cxx
TRD/CMakelibTRDbase.pkg
TRD/Cal/AliTRDCalTrapConfig.cxx [deleted file]
TRD/Cal/AliTRDCalTrapConfig.h [deleted file]
TRD/TRDbaseLinkDef.h

index b8133ac8899d837a67ff221de1d8ff1b44165a13..1b229dfff967e133ef5c0ef83ed312b02d272dda 100644 (file)
@@ -37,8 +37,6 @@
 
 #include "AliTRDPIDReference.h"
 #include "AliTRDcalibDB.h"
-#include "AliTRDtrapConfig.h"
-#include "AliTRDtrapConfigHandler.h"
 #include "AliTRDCommonParam.h"
 
 #include "Cal/AliTRDCalROC.h"
@@ -111,7 +109,6 @@ AliTRDcalibDB::AliTRDcalibDB()
   ,fPRFpad(0)
   ,fPIDResponse(NULL)
   ,fOnlineGainTableID(0)
-  ,fTrapConfig(0x0)
 {
   //
   // Default constructor
@@ -143,7 +140,6 @@ AliTRDcalibDB::AliTRDcalibDB(const AliTRDcalibDB &c)
   ,fPRFpad(0)
   ,fPIDResponse(NULL)
   ,fOnlineGainTableID(0)
-  ,fTrapConfig(0x0)
 {
   //
   // Copy constructor (not that it make any sense for a singleton...)
@@ -307,9 +303,6 @@ const TObject *AliTRDcalibDB::GetCachedCDBObject(Int_t id)
     case kIDFEE : 
       return CacheCDBEntry(kIDFEE               ,"TRD/Calib/FEE"); 
       break;
-    case kIDTrapConfig :
-      return CacheCDBEntry(kIDFEE               ,"TRD/Calib/TrapConfig"); 
-      break;
     case kIDDCS :
       return CacheCDBEntry(kIDDCS               ,"TRD/Calib/DCS");
       break;
@@ -1750,57 +1743,3 @@ Int_t AliTRDcalibDB::PadResponse(Double_t signal, Double_t dist
 }
 
 
-AliTRDtrapConfig* AliTRDcalibDB::GetTrapConfig()
-{
-  // return an existing TRAPconfig or load it from the OCDB
-  // in case of failure, a default TRAPconfig is created
-
-  if (fTrapConfig)
-    return fTrapConfig;
-  else {
-    // query the configuration to be used
-    TString configName;
-    this->GetGlobalConfiguration(configName);
-    TString configVersion;
-    this->GetGlobalConfigurationVersion(configVersion);
-
-    this->LoadTrapConfig(configName, configVersion);
-
-    // if we still don't have a valid TRAPconfig, create a default one
-    if (!fTrapConfig) {
-      AliWarning("Falling back to default configuration");
-      fTrapConfig = new AliTRDtrapConfig("default", "default TRAP configuration");
-      AliTRDtrapConfigHandler cfgHandler(fTrapConfig);
-      cfgHandler.Init();
-      cfgHandler.LoadConfig();
-    }
-
-    AliInfo(Form("using TRAPconfig \"%s\"", fTrapConfig->GetTitle()));
-
-    return fTrapConfig;
-  }
-}
-
-
-AliTRDtrapConfig* AliTRDcalibDB::LoadTrapConfig(const TString &name, const TString &version)
-{
-  // try to load the specified configuration from the OCDB
-  // if it fails, or it does not exist, return null
-
-  AliInfo(Form("looking for TRAPconfig \"%s.%s\"", name.Data(), version.Data()));
-
-  const AliTRDCalTrapConfig *caltrap = dynamic_cast<const AliTRDCalTrapConfig*> (GetCachedCDBObject(kIDTrapConfig));
-
-  if (caltrap) {
-    TString configName(name);
-    configName.Append(".");
-    configName.Append(version);
-    fTrapConfig = caltrap->Get(configName);
-  }
-  else {
-    fTrapConfig = 0x0;
-    AliError("No TRAPconfig entry found!");
-  }
-
-  return fTrapConfig;
-}
index 17246b3ebb7a3ec6e511649428521bdb31dbc4f9..debe5205b51ebb85fe22b61969296f6e23bbd48d 100644 (file)
@@ -23,9 +23,6 @@
 #include "AliTRDPIDResponse.h"
 #endif
 
-#include "AliTRDCalTrapConfig.h"
-#include "AliTRDtrapConfig.h"
-
 class TString;
 
 class AliCDBEntry;
@@ -122,9 +119,6 @@ class AliTRDcalibDB : public TObject {
   Int_t                               PadResponse(Double_t signal, Double_t dist
                                                 , Int_t layer, Double_t *pad) const;
 
-  AliTRDtrapConfig*                   GetTrapConfig();
-  AliTRDtrapConfig*                   LoadTrapConfig(const TString &name = "", const TString &version = "");
-
  protected:
 
   // For caching see also implentation of GetCachedCDBObject in the .cxx file
@@ -140,7 +134,6 @@ class AliTRDcalibDB : public TObject {
        , kIDNoisePad
        , kIDPRFWidth
        , kIDFEE
-       , kIDTrapConfig
        , kIDChamberPos
        , kIDStackPos
        , kIDSuperModulePos
@@ -182,8 +175,6 @@ class AliTRDcalibDB : public TObject {
   AliTRDPIDResponse    *fPIDResponse;               //  TRD PID Response function
 
   Int_t                 fOnlineGainTableID;         //  ID for online gain table 
-
-  AliTRDtrapConfig*     fTrapConfig;                //  TRAP configuration
   
  private:
 
index 4ab469801d139e8bf02f525cc26a10a05e9570a9..14194b518e9df0efc1e0a23c7eadc5f9096cf97b 100644 (file)
@@ -18,7 +18,7 @@ Float_t AliTRDltuParam::fgTiltingAngle[6] =
   {-2., 2., -2., 2., -2., 2.};
 Int_t   AliTRDltuParam::fgDyMax =  63;
 Int_t   AliTRDltuParam::fgDyMin = -64;
-Float_t AliTRDltuParam::fgBinDy = 140e-4;
+Float_t AliTRDltuParam::fgBinDy = 140e-6;
 Float_t AliTRDltuParam::fgWidthPad[6] =
   {0.635, 0.665, 0.695, 0.725, 0.755, 0.785};
 Float_t AliTRDltuParam::fgLengthInnerPadC1[6] =
@@ -77,54 +77,35 @@ void AliTRDltuParam::GetDyRange(Int_t det, Int_t rob, Int_t mcm, Int_t ch,
   dyMinInt = fgDyMin;
   dyMaxInt = fgDyMax;
 
-  // deflection cut is considered for |B| > 0.1 T only
   if (TMath::Abs(fMagField) < 0.1)
     return;
 
   Float_t e = 0.30;
 
-  Float_t maxDeflTemp = GetPerp(det, rob, mcm, ch)/2. * // Sekante/2 (cm)
-    (e * 1e-2 * TMath::Abs(fMagField) / fPtMin);   // 1/R (1/cm)
+  Float_t maxDeflTemp = GetPerp(det, rob, mcm, ch)/2. *         // Sekante/2
+    (e * TMath::Abs(fMagField) / fPtMin);   // 1/R
 
   Float_t maxDeflAngle = 0.;
 
-  Float_t phi = GetPhi(det, rob, mcm, ch);
-  if (maxDeflTemp < TMath::Cos(phi)) {
+  if (maxDeflTemp < 1.) {
     maxDeflAngle = TMath::ASin(maxDeflTemp);
 
     Float_t dyMin = ( fgDriftLength *
-                     TMath::Tan(phi - maxDeflAngle) );
+                     tan(GetPhi(det, rob, mcm, ch) - maxDeflAngle) );
 
     dyMinInt = Int_t(dyMin / fgBinDy);
-    // clipping to allowed range
     if (dyMinInt < fgDyMin)
       dyMinInt = fgDyMin;
-    else if (dyMinInt > fgDyMax)
-      dyMinInt = fgDyMax;
 
     Float_t dyMax = ( fgDriftLength *
-                     TMath::Tan(phi + maxDeflAngle) );
+                     TMath::Tan(GetPhi(det, rob, mcm, ch) + maxDeflAngle) );
 
     dyMaxInt = Int_t(dyMax / fgBinDy);
-    // clipping to allowed range
     if (dyMaxInt > fgDyMax)
       dyMaxInt = fgDyMax;
-    else if (dyMaxInt < fgDyMin)
-      dyMaxInt = fgDyMin;
   }
-  else if (maxDeflTemp < 0.) {
-    // this must not happen
-    printf("Inconsistent calculation of sin(alpha): %f\n", maxDeflTemp);
-  }
-  else {
-    // TRD is not reached at the given pt threshold
-    // max range
-  }
-
   if ((dyMaxInt - dyMinInt) <= 0) {
-    printf("strange dy range: [%i,%i], using max range now\n", dyMinInt, dyMaxInt);
-    dyMaxInt = fgDyMax;
-    dyMinInt = fgDyMin;
+    printf("strange dy range: [%i,%i]\n", dyMinInt, dyMaxInt);
   }
 }
 
index 89f1b4285101a313c89f0996a3d74d03c16d4c44..15354e08abe2b3ec5d9e607abdce2b085aaf4cf5 100644 (file)
@@ -42,7 +42,7 @@
 #include "AliLoader.h"
 
 #include "AliTRDfeeParam.h"
-#include "AliTRDcalibDB.h"
+#include "AliTRDtrapConfigHandler.h"
 #include "AliTRDtrapConfig.h"
 #include "AliTRDdigitsManager.h"
 #include "AliTRDarrayADC.h"
@@ -137,7 +137,7 @@ void AliTRDmcmSim::Init( Int_t det, Int_t robPos, Int_t mcmPos, Bool_t /* newEve
 
   if (!fInitialized) {
     fFeeParam      = AliTRDfeeParam::Instance();
-    fTrapConfig    = AliTRDcalibDB::Instance()->GetTrapConfig();
+    fTrapConfig    = AliTRDtrapConfigHandler::GetTrapConfig();
   }
 
   fDetector      = det;
index f50fb979364e4ed969fc0885401ef68d2806eaa8..0d2aaaf5656db3d83a81ed4c5869caf6fce1611f 100644 (file)
@@ -69,7 +69,6 @@ set ( SRCS
     Cal/AliTRDCalOnlineGainTableROC.cxx
     Cal/AliTRDCalOnlineGainTableMCM.cxx
     Cal/AliTRDCalOnlineGainTableROC.h
-    Cal/AliTRDCalTrapConfig.cxx
     AliTRDCalibraFit.cxx
     AliTRDCalibraMode.cxx
     AliTRDCalibraVector.cxx
diff --git a/TRD/Cal/AliTRDCalTrapConfig.cxx b/TRD/Cal/AliTRDCalTrapConfig.cxx
deleted file mode 100644 (file)
index 32c4ef1..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include "TString.h"
-
-#include "AliLog.h"
-#include "AliTRDCalTrapConfig.h"
-
-ClassImp(AliTRDCalTrapConfig)
-
-AliTRDCalTrapConfig::AliTRDCalTrapConfig() :
-  TObject(),
-  fConfigList()
-{
-  // ctor
-
-}
-
-AliTRDCalTrapConfig::~AliTRDCalTrapConfig()
-{
-  // dtor
-
-}
-
-AliTRDtrapConfig* AliTRDCalTrapConfig::Get(const TString &name) const
-{
-  return (AliTRDtrapConfig*) fConfigList.FindObject(name.Data());
-}
-
-void AliTRDCalTrapConfig::Print(Option_t * /* option */) const
-{
-  TIter config(&fConfigList);
-
-  while (AliTRDtrapConfig *cfg = (AliTRDtrapConfig*) config()) {
-    AliInfo(Form("found TRAPconfig: %s - %s", cfg->GetName(), cfg->GetTitle()));
-  }
-}
diff --git a/TRD/Cal/AliTRDCalTrapConfig.h b/TRD/Cal/AliTRDCalTrapConfig.h
deleted file mode 100644 (file)
index f1a4d5e..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * See cxx source for full Copyright notice                               */
-
-#ifndef ALITRDCALTRAPCONFIG
-#define ALITRDCALTRAPCONFIG
-
-#include "TObject.h"
-#include "TList.h"
-
-#include "AliTRDtrapConfig.h"
-
-class AliTRDCalTrapConfig : public TObject
-{
-public:
-  AliTRDCalTrapConfig();
-  ~AliTRDCalTrapConfig();
-
-  void Add(AliTRDtrapConfig *cfg) { fConfigList.Add(cfg); }
-
-  virtual void Print(Option_t *option = "") const;
-
-  AliTRDtrapConfig* Get(const TString &name) const;
-
-protected:
-  TList fConfigList;
-
-  ClassDef(AliTRDCalTrapConfig, 1);
-};
-
-#endif
index 604d9fc3efc4e65e005fe372b51d23d52e98608b..a167919a540ca42c8a1fd79b680748e09e3b9638 100644 (file)
@@ -54,7 +54,6 @@
 #pragma link C++ class  AliTRDCalOnlineGainTable+;
 #pragma link C++ class  AliTRDCalOnlineGainTableROC+;
 #pragma link C++ class  AliTRDCalOnlineGainTableMCM+;
-#pragma link C++ class  AliTRDCalTrapConfig+;
 
 #pragma link C++ class  AliTRDCalChamberStatus+;
 #pragma link C++ class  AliTRDCalPadStatus+;