Skip to content

Commit

Permalink
ATO-138, ATO-18 - dEdx calibration description - code to enable visua…
Browse files Browse the repository at this point in the history
…lization of intermediate results
  • Loading branch information
miranov25 committed Jan 28, 2015
1 parent 28898b1 commit bcb60f2
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 10 deletions.
5 changes: 4 additions & 1 deletion TPC/TPCrec/AliTPCReconstructor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,16 @@
#include "AliTPCcalibDB.h"
#include "AliTracker.h"
#include "AliMagF.h"
#include "TTreeStream.h"

ClassImp(AliTPCReconstructor)


Int_t AliTPCReconstructor::fgStreamLevel = 0; // stream (debug) level
Int_t AliTPCReconstructor::fgStreamLevel = 0; // stream (debug) level
AliTPCAltroEmulator * AliTPCReconstructor::fAltroEmulator=0; // ALTRO emulator
TTreeSRedirector * AliTPCReconstructor::fgDebugStreamer=0; // NOTE - AliTPCReconstructor is not an owner of the streamer


AliTPCReconstructor::AliTPCReconstructor():
AliReconstructor(),
fClusterer(NULL),
Expand Down
7 changes: 5 additions & 2 deletions TPC/TPCrec/AliTPCReconstructor.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class AliTPCclusterer;
class AliTPCtracker;
class AliTPCAltroEmulator;
class TObjArray;
class TTreeSRedirector;

class AliTPCReconstructor: public AliReconstructor {
public:
Expand Down Expand Up @@ -41,14 +42,16 @@ class AliTPCReconstructor: public AliReconstructor {
static void SetStreamLevel(Int_t level) { fgStreamLevel = level;}
static void SetAltroEmulator(AliTPCAltroEmulator *altro) { fAltroEmulator=altro;}
static AliTPCAltroEmulator * GetAltroEmulator() { return fAltroEmulator;}

static TTreeSRedirector *GetDebugStreamer(){return fgDebugStreamer;}
static TTreeSRedirector *SetDebugStreamer(TTreeSRedirector *debugStreamer){fgDebugStreamer=debugStreamer;}
void ParseOptions(AliTPCtracker* tracker) const;

private:
AliTPCReconstructor(const AliTPCReconstructor&); //Not implemented
AliTPCReconstructor& operator=(const AliTPCReconstructor&); //Not implemented
AliTPCParam* GetTPCParam() const;
static Int_t fgStreamLevel; // flag for streaming - for TPC reconstruction
static TTreeSRedirector *fgDebugStreamer; // pointer to the streamer
AliTPCclusterer* fClusterer; // TPC clusterer
static AliTPCAltroEmulator * fAltroEmulator; // ALTRO emulator

Expand Down
56 changes: 49 additions & 7 deletions TPC/TPCrec/AliTPCseed.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "TGraphErrors.h"
#include "AliTPCseed.h"
#include "AliTPCReconstructor.h"
#include "AliTPCtracker.h"
#include "AliTPCClusterParam.h"
#include "AliTPCCalPad.h"
#include "AliTPCCalROC.h"
Expand Down Expand Up @@ -1311,22 +1312,23 @@ Float_t AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I
zres0 *=parcl->GetQnormCorr(ipad, type,1);
Float_t effLength=parcl->GetQnormCorr(ipad, type,4)*0.5;
Float_t effDiff =(parcl->GetQnormCorr(ipad, type,2)+parcl->GetQnormCorr(ipad, type,3))*0.5;
Float_t corrThr=0;
Float_t corrThrMax=0;
//
if (type==1) {
corrPos = parcl->GetQnormCorr(ipad, type,5)*
parcl->QmaxCorrection(cluster->GetDetector(), cluster->GetRow(),cluster->GetPad(),
cluster->GetTimeBin(),ty,tz,yres0,zres0,effLength,effDiff);
corrThr = parcl->QmaxCorrection(cluster->GetDetector(), cluster->GetRow(),cluster->GetPad(),
cluster->GetTimeBin(),ty,tz,yres0,zres0,effLength,effDiff);
corrPos= parcl->GetQnormCorr(ipad, type,5)*corrThr;
Float_t drm = 0.5-TMath::Abs(cluster->GetZ()/250.);
corrPos*=(1+parcl->GetQnormCorr(ipad, type+2,0)*drm);
corrPos*=(1+parcl->GetQnormCorr(ipad, type+2,1)*ty*ty);
corrPos*=(1+parcl->GetQnormCorr(ipad, type+2,2)*tz*tz);
//
}
if (type==0) {
corrPos = parcl->GetQnormCorr(ipad, type,5)*
parcl->QtotCorrection(cluster->GetDetector(), cluster->GetRow(),cluster->GetPad(),
cluster->GetTimeBin(),ty,tz,yres0,zres0,cluster->GetQ(),2.5,effLength,effDiff);

corrThr = parcl->QtotCorrection(cluster->GetDetector(), cluster->GetRow(),cluster->GetPad(),
cluster->GetTimeBin(),ty,tz,yres0,zres0,cluster->GetQ(),2.5,effLength,effDiff);
corrPos=parcl->GetQnormCorr(ipad, type,5)*corrThr;
Float_t drm = 0.5-TMath::Abs(cluster->GetZ()/250.);
corrPos*=(1+parcl->GetQnormCorr(ipad, type+2,0)*drm);
corrPos*=(1+parcl->GetQnormCorr(ipad, type+2,1)*ty*ty);
Expand Down Expand Up @@ -1360,6 +1362,46 @@ Float_t AliTPCseed::CookdEdxAnalytical(Double_t low, Double_t up, Int_t type, I
//
Double_t correctionHVandPT = AliTPCcalibDB::Instance()->GetGainCorrectionHVandPT(time, runNumber,cluster->GetDetector(), 5 , recoParam->GetGainCorrectionHVandPTMode());
//
if ((AliTPCReconstructor::StreamLevel()&AliTPCtracker::kStreamSeeddEdx)){ // this part of the code is for the test purposes only
TTreeSRedirector *pcstream = AliTPCReconstructor:: GetDebugStreamer();
TVectorF vecDEDX(9,fDEDX);
TVectorF vecSDEDX(4,fSDEDX);
TVectorF vecRDEDX(4);
corrThrMax = parcl->QmaxCorrection(cluster->GetDetector(), cluster->GetRow(),cluster->GetPad(),
cluster->GetTimeBin(),ty,tz,yres0,zres0,effLength,effDiff);

for (Int_t i=0; i<4; i++) vecRDEDX[i]=(fNCDEDXInclThres[i]>0)?Float_t(fNCDEDX[i])/Float_t(fNCDEDXInclThres[i]):0;
if (pcstream){
(*pcstream)<<"dEdxCorrDump"<< // streamer to check dEdx correction calibration
//
"cl.="<<cluster<<
"ipad="<<ipad<<
"time="<<time<<
"runNumber="<<runNumber<<
"vecDEDX.="<<&vecDEDX<<
"vecSDEDX.="<<&vecSDEDX<<
"vecRDEDX.="<<&vecRDEDX<<
"ty="<<ty<<
"tz="<<tz<<
"yres0="<<yres0<<
"zres0="<<zres0<<
"qpt="<<fP[4]<<
"type="<<type<<
"effLength="<<effLength<<
"effDiff="<<effDiff<<
"corrThr="<<corrThr<<
"corrThrMax="<<corrThrMax<<
"gainGG="<<gainGG<<
"correctionHVandPT="<<correctionHVandPT<<
"gainPad="<<gainPad<<
"corrPos="<<corrPos<<
"gainEqualPadRegion="<<gainEqualPadRegion<<
"gainChamber="<<gainChamber<<
"corrDipAngle="<<corrDipAngle<<
"corrDipAngleAbs="<<corrDipAngleAbs<<
"\n";
}
}
amp[ncl]=charge;
amp[ncl]/=gainGG; // nominal gas gain
amp[ncl]/=correctionHVandPT; // correction for the HV and P/T - time dependent
Expand Down
1 change: 1 addition & 0 deletions TPC/TPCrec/AliTPCtracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ AliTracker(),

if (AliTPCReconstructor::StreamLevel()>0) {
fDebugStreamer = new TTreeSRedirector("TPCdebug.root","recreate");
AliTPCReconstructor::SetDebugStreamer(fDebugStreamer);
}
//
fSeedsPool = new TClonesArray("AliTPCseed",1000);
Expand Down
1 change: 1 addition & 0 deletions TPC/TPCrec/AliTPCtracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class AliTPCtracker : public AliTracker {
kStreamFindMultiMC =0x10000, // flag: stream MC infomation about the multiple find track (ONLY for MC data)
kStreamFindCurling =0x20000, // flag: stream track infroamtion in the FindCurling tracks method
kStreamFindKinks =0x40000, // flag: stream track infroamtion in the FindKinks method
kStreamSeeddEdx =0x80000 // flag: stream TPC dEdx intermediate information AliTPCseed::CookdEdxNorm (to check and validate methods used in calibration)
};
AliTPCtracker();
AliTPCtracker(const AliTPCParam *par);
Expand Down

0 comments on commit bcb60f2

Please sign in to comment.