#include <TCollection.h>
#include <TIterator.h>
+#include <TTimeStamp.h>
#include "AliTPCComposedCorrection.h"
}
++in;
}
+ if (in==1) printf(" Info: The correction compound is empty: No corrections set\n");
delete i;
}
+void AliTPCComposedCorrection::Init() {
+ //
+ // Initialization funtion (not used at the moment)
+ //
+
+ TIterator *i=fCorrections->MakeIterator();
+ AliTPCCorrection *c;
+ while (0!=(c=dynamic_cast<AliTPCCorrection*>(i->Next())))
+ c->Init();
+ delete i;
+
+}
+
+void AliTPCComposedCorrection::Update(const TTimeStamp &timeStamp) {
+ //
+ // Update function
+ //
+
+ TIterator *i=fCorrections->MakeIterator();
+ AliTPCCorrection *c;
+ while (0!=(c=dynamic_cast<AliTPCCorrection*>(i->Next())))
+ c->Update(timeStamp);
+ delete i;
+
+}
+
+
+
void AliTPCComposedCorrection::SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
//
// Gives the possibility to set the OmegaTau plus Tensor corrections T1 and T2 (effective omega Tau)
virtual void Print(Option_t* option="") const;
+ // initialization and update functions
+ virtual void Init();
+ virtual void Update(const TTimeStamp &timeStamp);
+
+
private:
TCollection *fCorrections; // The corrections this one is composed of.
CompositionType fMode; // The way to apply the corrections (see general class documentation)
#include <TMath.h>
#include <TROOT.h>
#include <TTreeStream.h>
+#include <TTimeStamp.h>
#include "AliExternalTrackParam.h"
#include "AliTrackPointArray.h"
//
}
+void AliTPCCorrection::Update(const TTimeStamp &/*timeStamp*/) {
+ //
+ // Update function
+ //
+}
+
void AliTPCCorrection::Print(Option_t* /*option*/) const {
//
// Print function to check which correction classes are used
#include <TNamed.h>
class TH2F;
+class TTimeStamp;
class TCollection;
class TTreeSRedirector;
class AliExternalTrackParam;
void DistortPoint (const Float_t x[],const Short_t roc,Float_t xp[]);
virtual void GetDistortion(const Float_t x[],const Short_t roc,Float_t dx[]);
- // initialization
+ // initialization and update functions
virtual void Init();
+ virtual void Update(const TTimeStamp &timeStamp);
// convenience functions
virtual void Print(Option_t* option="") const;
//
}
+void AliTPCExBBShape::Init() {
+ //
+ // Initialization funtion (not used at the moment)
+ //
+
+ // Set default parameters
+ // FIXME: Ask the database for these entries
+
+
+ AliMagF * mag = new AliMagF("mag","mag"); // from database (GRP?)
+ SetBField(mag);
+
+ Double_t vdrift = 2.6; // [cm/us] // From dataBase: to be updated: per second (ideally)
+ Double_t bzField = -0.5; // [Tesla] // From dataBase: to be updated: per run
+
+ Double_t ezField = 400; // [V/cm] // to be updated: never (hopefully)
+ Double_t wt = -10.0 * (bzField*10) * vdrift / ezField ;
+
+ // Correction Terms for effective omegaTau; obtained by a laser calibration run
+ Double_t t1 = 0.9; // ideally from database
+ Double_t t2 = 1.5; // ideally from database
+
+ SetOmegaTauT1T2(wt,t1,t2);
+
+
+}
+
+void AliTPCExBBShape::Update(const TTimeStamp &/*timeStamp*/) {
+ //
+ // Update function
+ //
+
+ Double_t vdrift = 2.6; // [cm/us] // From dataBase: to be updated: per second (ideally)
+ Double_t bzField = -0.5; // [Tesla] // From dataBase: to be updated: per run
+
+ Double_t ezField = 400; // [V/cm] // to be updated: never (hopefully)
+ Double_t wt = -10.0 * (bzField*10) * vdrift / ezField ;
+
+ // Correction Terms for effective omegaTau; obtained by a laser calibration run
+ Double_t t1 = 0.9; // ideally from database
+ Double_t t2 = 1.5; // ideally from database
+
+ SetOmegaTauT1T2(wt,t1,t2);
+
+
+}
+
+
+
void AliTPCExBBShape::GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]) {
//
// Calculates the space point corrections of the B field inperfections (B field shape)
AliTPCExBBShape();
virtual ~AliTPCExBBShape();
+ // initialization and update functions
+ virtual void Init();
+ virtual void Update(const TTimeStamp &timeStamp);
+
// common setters and getters for ExB
virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
const Float_t wt1=t1*omegaTau;
//
}
+void AliTPCExBTwist::Init() {
+ //
+ // Initialization funtion (not used at the moment)
+ //
+
+ // Set default parameters
+ // FIXME: Ask the database for these entries
+
+ Double_t vdrift = 2.6; // [cm/us] // From dataBase: to be updated: per second (ideally)
+ Double_t bzField = -0.5; // [Tesla] // From dataBase: to be updated: per run
+
+ Double_t ezField = 400; // [V/cm] // to be updated: never (hopefully)
+ Double_t wt = -10.0 * (bzField*10) * vdrift / ezField ;
+
+ // Correction Terms for effective omegaTau; obtained by a laser calibration run
+ Double_t t1 = 0.9; // ideally from database
+ Double_t t2 = 1.5; // ideally from database
+
+ SetOmegaTauT1T2(wt,t1,t2);
+
+ SetXTwist(0.0);// ideally from the database
+ SetYTwist(0.0);// ideally from the database
+}
+
+void AliTPCExBTwist::Update(const TTimeStamp &/*timeStamp*/) {
+ //
+ // Update function
+ //
+
+ Double_t vdrift = 2.6; // [cm/us] // From dataBase: to be updated: per second (ideally)
+ Double_t bzField = -0.5; // [Tesla] // From dataBase: to be updated: per run
+
+ Double_t ezField = 400; // [V/cm] // to be updated: never (hopefully)
+ Double_t wt = -10.0 * (bzField*10) * vdrift / ezField ;
+
+ // Correction Terms for effective omegaTau; obtained by a laser calibration run
+ Double_t t1 = 0.9; // ideally from database
+ Double_t t2 = 1.5; // ideally from database
+
+ SetOmegaTauT1T2(wt,t1,t2);
+}
+
+
+
void AliTPCExBTwist::GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]) {
//
// Calculates the correction of a mismatch between the E and B field axis
AliTPCExBTwist();
virtual ~AliTPCExBTwist();
+ // initialization and update functions
+ virtual void Init();
+ virtual void Update(const TTimeStamp &timeStamp);
+
+
// common setters and getters for ExB
virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
const Float_t wt1=t1*omegaTau;
//
}
+void AliTPCGGVoltError::Init() {
+ //
+ // Initialization funtion (not used at the moment)
+ //
+
+ // Set default parameters
+ // FIXME: Ask the database for these entries
+
+ Double_t vdrift = 2.6; // [cm/us] // From dataBase: to be updated: per second (ideally)
+ Double_t bzField = -0.5; // [Tesla] // From dataBase: to be updated: per run
+
+ Double_t ezField = 400; // [V/cm] // to be updated: never (hopefully)
+ Double_t wt = -10.0 * (bzField*10) * vdrift / ezField ;
+
+ // Correction Terms for effective omegaTau; obtained by a laser calibration run
+ Double_t t1 = 0.9; // ideally from database
+ Double_t t2 = 1.5; // ideally from database
+
+ SetOmegaTauT1T2(wt,t1,t2);
+
+ SetDeltaVGGA(0.0);// ideally from the database
+ SetDeltaVGGC(0.0);// ideally from the database
+}
+
+void AliTPCGGVoltError::Update(const TTimeStamp &/*timeStamp*/) {
+ //
+ // Update function
+ //
+
+ Double_t vdrift = 2.6; // [cm/us] // From dataBase: to be updated: per second (ideally)
+ Double_t bzField = -0.5; // [Tesla] // From dataBase: to be updated: per run
+
+ Double_t ezField = 400; // [V/cm] // to be updated: never (hopefully)
+ Double_t wt = -10.0 * (bzField*10) * vdrift / ezField ;
+
+ // Correction Terms for effective omegaTau; obtained by a laser calibration run
+ Double_t t1 = 0.9; // ideally from database
+ Double_t t2 = 1.5; // ideally from database
+
+ SetOmegaTauT1T2(wt,t1,t2);
+}
+
+
+
void AliTPCGGVoltError::GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]) {
//
AliTPCGGVoltError();
virtual ~AliTPCGGVoltError();
+ // initialization and update functions
+ virtual void Init();
+ virtual void Update(const TTimeStamp &timeStamp);
+
// common setters and getters for ExB
virtual void SetOmegaTauT1T2(Float_t omegaTau,Float_t t1,Float_t t2) {
const Double_t wt0=t2*omegaTau;
#include <TString.h>
#include "AliTPCInverseCorrection.h"
+#include <TTimeStamp.h>
+
AliTPCInverseCorrection::AliTPCInverseCorrection()
: fCorrection(0) {
//
}
+
+void AliTPCInverseCorrection::Init() {
+ //
+ // Initialization funtion (not used at the moment)
+ //
+ if (fCorrection) fCorrection->Init();
+
+}
+
+void AliTPCInverseCorrection::Update(const TTimeStamp &timeStamp) {
+ //
+ // Update function
+ //
+ if (fCorrection) fCorrection->Update(timeStamp);
+
+}
+
void AliTPCInverseCorrection::GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]) {
//
// This is just calling the CalculateInverseCorrection of the wrapped
#include "AliTPCCorrection.h"
+
class AliTPCInverseCorrection : public AliTPCCorrection {
public:
AliTPCInverseCorrection();
AliTPCCorrection* GetCorrection() const {return fCorrection;}
virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
virtual void GetDistortion(const Float_t x[],const Short_t roc,Float_t dx[]);
+
+ // initialization and update functions
+ virtual void Init();
+ virtual void Update(const TTimeStamp &timeStamp);
+
+
private:
AliTPCCorrection *fCorrection; // The correction to be inverted.
for (Int_t i=0;i<ntracks;++i) {
AliESDtrack *track = event->GetTrack(i);
- AliESDfriendTrack *friendTrack = ESDfriend->GetTrack(i);
-
+ AliESDfriendTrack *friendTrack = (AliESDfriendTrack*) ESDfriend->GetTrack(i);
+ if (!friendTrack) continue;
+ track->SetFriendTrack(friendTrack);
const AliExternalTrackParam * trackIn = track->GetInnerParam();
const AliExternalTrackParam * trackOut = track->GetOuterParam();
AliExternalTrackParam * tpcOut = (AliExternalTrackParam *)friendTrack->GetTPCOut();
if ((seed=dynamic_cast<AliTPCseed*>(calibObject))) break;
}
if (!seed) continue;
- RefitTrack(track, seed,event->GetMagneticField());
+ RefitTrack(track, seed, event->GetMagneticField());
(*tpcOut)=*(track->GetOuterParam());
}
return;
//
// 0 - Setup transform object
//
+ AliESDfriendTrack *friendTrack = (AliESDfriendTrack *)track->GetFriendTrack();
+
AliTPCTransform *transform = AliTPCcalibDB::Instance()->GetTransform() ;
AliTPCParam *param = AliTPCcalibDB::Instance()->GetParameters();
transform->SetCurrentRun(fRun);
// And now do refit
//
AliExternalTrackParam * trackInOld = (AliExternalTrackParam*)track->GetInnerParam();
- AliExternalTrackParam * trackOutOld = (AliExternalTrackParam*)track->GetOuterParam();
-
+ AliExternalTrackParam * trackOuter = (AliExternalTrackParam*)track->GetOuterParam();
+ AliExternalTrackParam * trackOutOld = (AliExternalTrackParam *)friendTrack->GetTPCOut();
+
AliExternalTrackParam trackIn = *trackOutOld;
trackIn.ResetCovariance(kResetCov);
(*trackInOld) = trackIn;
(*trackOutOld) = trackOut;
+ (*trackOuter) = trackOut;
AliExternalTrackParam *t = &trackIn;
track->Set(t->GetX(),t->GetAlpha(),t->GetParameter(),t->GetCovariance());
seed->Set(t->GetX(),t->GetAlpha(),t->GetParameter(),t->GetCovariance());