gSystem->Load("libTPCcalib");
TFile fcalib("CalibObjectsTrain2.root");
AliTPCcalibLaser * laser = ( AliTPCcalibLaser *)fcalib->Get("laserTPC");
- laser->DumpMeanInfo(-0,0)
+ laser->DumpMeanInfo(run)
TFile fmean("laserMean.root")
//
// laser track clasification;
gSystem->AddIncludePath("-I$ALICE_ROOT/TPC/macros");
gROOT->LoadMacro("$ALICE_ROOT/TPC/macros/AliXRDPROOFtoolkit.cxx+")
AliXRDPROOFtoolkit tool;
- AliXRDPROOFtoolkit::FilterList("laser.txt","* driftvN",1)
+ AliXRDPROOFtoolkit::FilterList("laserDebug.list","* driftvN",1)
TChain * chainDrift = tool.MakeChainRandom("laser.txt.Good","driftv",0,50);
chainDrift->Lookup();
- TChain * chainDriftN = tool.MakeChainRandom("laser.txt.Good","driftvN",0,300);
+ TChain * chainDriftN = tool.MakeChainRandom("laserDebug.list.Good","driftvN",0,300);
chainDriftN->Lookup();
#include "TTimeStamp.h"
#include "AliDCSSensorArray.h"
#include "AliDCSSensor.h"
+#include "AliGRPObject.h"
using namespace std;
//
// Loop over tracks and call Process function
//
- Int_t kMinTracks=20;
+ const Int_t kMinTracks=20;
+ const Int_t kMinClusters=40;
fESD = event;
if (!fESD) {
for (Int_t j=0;(calibObject=friendTrack->GetCalibObject(j));++j)
if ((seed=dynamic_cast<AliTPCseed*>(calibObject)))
break;
- if (track&&seed) {
+ if (track&&seed&&track->GetTPCNcls()>kMinClusters && seed->GetNumberOfClusters() >kMinClusters) {
//filter CE tracks
Int_t id = FindMirror(track,seed);
if (id>=0) counter++;
fNtracks=counter;
if (counter<kMinTracks) return;
- FitDriftV();
+ //FitDriftV();
FitDriftV(0.3);
if (!fFullCalib) return;
static Bool_t init=kFALSE;
}
}
- if (fdriftAC.GetNpoints()>minFraction*knLaser){
+ if (fdriftAC.GetNpoints()>minFraction*knLaser &&npointsA>0.5*minFraction*knLaser&&npointsC>0.5*minFraction*knLaser){
fdriftAC.Eval();
npointsAC= fdriftAC.GetNpoints();
chi2AC = fdriftAC.GetChisquare()/fdriftAC.GetNpoints();
if (ltrp->GetSide()==0){
if ((*fFitAside)[1]>0. || fUseFixedDriftV) {
// ignore global y dependence for now
- Double_t zcorrected = 0;
+ zcorrected = 0;
if(!fUseFixedDriftV)
zcorrected = (zcl + (*fFitAside)[0] -
(1.0-(*fFitAside)[1])*250.0)/(*fFitAside)[1];
-void AliTPCcalibLaser::DumpMeanInfo(Float_t bfield, Int_t run){
+void AliTPCcalibLaser::DumpMeanInfo(Int_t run){
//
// Dump information about laser beams
// isOK variable indicates usability of the beam
const Float_t krmsCut1=0.16;
const Float_t kmultiCut=2;
const Float_t kcutP0=0.002;
+ AliMagF* magF= dynamic_cast<AliMagF*> (TGeoGlobalMagField::Instance()->GetField());
+ Double_t xyz[3]={90,0,10};
+ Double_t bxyz[3]={90,0,10};
//
AliTPCcalibLaser *laser = this;
TTreeSRedirector *pcstream = new TTreeSRedirector("laserMean.root");
TF1 fg("fg","gaus");
-
+ AliTPCParam * tpcparam = 0;
// start set up for absolute residuals analysis
- //AliTPCcalibDB* calib=AliTPCcalibDB::Instance();
- // AliTPCParam * tpcparam = calib->GetParameters();
- AliTPCParam * tpcparam = 0;
+ //
+ AliTPCcalibDB* calib=AliTPCcalibDB::Instance();
+ tpcparam = calib->GetParameters();
if (!tpcparam) tpcparam = new AliTPCParamSR;
tpcparam->Update();
+ AliGRPObject *grp = AliTPCcalibDB::GetGRP(run);
+ Float_t current=0;
+ Float_t bfield = 0, bz=0;
+
+ if (grp){
+ Float_t polarity = (grp->GetL3Polarity()>0) ? -1.:1;
+ current = grp->GetL3Current((AliGRPObject::Stats)0);
+ bfield = polarity*5*current/30000.;
+ bz = polarity*5*current/30000.;
+ printf("Run%d\tL3 current%f\tBz\t%f\n",run,current,bz);
+ }
+
SetBeamParameters(fBeamOffsetYOuter, fBeamSlopeYOuter, fBeamSectorOuter,0);
SetBeamParameters(fBeamOffsetYInner, fBeamSlopeYInner, fBeamSectorInner,1);
TLinearFitter lfabsyInner(2);
AliTPCLaserTrack::LoadTracks();
ltrp =(AliTPCLaserTrack*)AliTPCLaserTrack::GetTracks()->UncheckedAt(id);
}
+ ltrp->UpdatePoints();
pcstream->GetFile()->cd();
if (hisphi) hisphi->Write();
if (hisphiP) hisphiP->Write();
TVectorD vecEz(159); //error z
TVectorD vecPhi(159); // local tangent
TVectorD vecPhiR(159); // local tangent
+ // magnetic field integrals
+ TVectorD vecIBR(159); // radial
+ TVectorD vecIBRPhi(159); // r-phi
+ TVectorD vecIBZ(159); // z
+ //
+ for (Int_t irow=0;irow<159;irow++){
+ vecIBR[irow]=0;
+ vecIBRPhi[irow]=0;
+ vecIBZ[irow]=0;
+ Double_t gx=(*(ltrp->fVecGX))[irow];
+ Double_t gy=(*(ltrp->fVecGY))[irow];
+ xyz[2]=(*(ltrp->fVecGZ))[irow];
+ xyz[0]=TMath::Sqrt(gx*gx+gy*gy);
+ xyz[1]=TMath::ATan2(gy,gx);
+ if (magF){
+ magF->GetTPCIntCyl(xyz,bxyz);
+ vecIBR[irow]=bxyz[0];
+ vecIBRPhi[irow]=bxyz[1];
+ vecIBZ[irow]=bxyz[2];
+ }
+ }
+
lfabsyInner.ClearPoints();
lfabszInner.ClearPoints();
TMath::Max(zprof->GetBinError(bin), 0.001));
}
}
-
+ // global position
+
}
delete yprof; delete zprof;
"SecOut="<<secOuter<< // outer sector
"lasTanPhiLocIn="<<lasTanPhiLocIn<< // laser tan phi in local frame (inner)
"lasTanPhiLocOut="<<lasTanPhiLocOut<<// laser tan phi in local frame (outer)
+ "ibr.="<<&vecIBR<< // radial filed integral
+ "ibrphi.="<<&vecIBRPhi<< // r=phifiled integral
+ "ibz.="<<&vecIBZ<< // radial filed integral
"X.="<<&vecX<< // local x
"Y.="<<&vecY<< // local y
"R.="<<&vecR<< // radius