From 340693af02629437849c7bf822eb08112d7ba650 Mon Sep 17 00:00:00 2001 From: hristov Date: Wed, 5 Apr 2006 08:35:38 +0000 Subject: [PATCH] Coding conventions (S.Arcelli, C.Zampolli) --- TOF/AliTOFAlignment.cxx | 57 +++++++----- TOF/AliTOFCal.cxx | 9 ++ TOF/AliTOFCalPadZ.cxx | 6 ++ TOF/AliTOFCalPlateA.cxx | 10 +++ TOF/AliTOFCalPlateB.cxx | 10 +++ TOF/AliTOFCalPlateC.cxx | 10 +++ TOF/AliTOFCalSector.cxx | 11 ++- TOF/AliTOFCalStrip.cxx | 11 ++- TOF/AliTOFClusterFinder.cxx | 64 ++++++------- TOF/AliTOFClusterFinder.h | 3 + TOF/AliTOFDigitizer.cxx | 39 ++++---- TOF/AliTOFDigitizer.h | 6 +- TOF/AliTOFGeometry.cxx | 5 +- TOF/AliTOFGeometry.h | 22 ++--- TOF/AliTOFGeometryV4.h | 20 ++--- TOF/AliTOFGeometryV5.h | 18 ++-- TOF/AliTOFSDigitizer.cxx | 4 +- TOF/AliTOFcalib.cxx | 173 +++++++++++++++++++++--------------- TOF/AliTOFcalib.h | 15 +--- TOF/AliTOFcalibESD.cxx | 30 ++++--- TOF/AliTOFcalibESD.h | 24 ++--- 21 files changed, 332 insertions(+), 215 deletions(-) diff --git a/TOF/AliTOFAlignment.cxx b/TOF/AliTOFAlignment.cxx index e0390ec953e..167d95916e4 100644 --- a/TOF/AliTOFAlignment.cxx +++ b/TOF/AliTOFAlignment.cxx @@ -12,6 +12,9 @@ * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * $Log$ +Revision 1.3 2006/03/31 13:49:07 arcelli +Removing some junk printout + Revision 1.2 2006/03/31 11:26:30 arcelli changing CDB Ids according to standard convention @@ -56,19 +59,20 @@ AliTOFAlignment::AliTOFAlignment(const AliTOFAlignment &t):TTask("AliTOFAlignmen } //_____________________________________________________________________________ -void AliTOFAlignment::Smear( Float_t *tr, Float_t *rot){ - +void AliTOFAlignment::Smear( Float_t *tr, Float_t *rot) +{ + //Introduce Random Offset/Tilts fTOFAlignObjArray = new TObjArray(kMaxAlignObj); Float_t dx, dy, dz; // shifts Float_t dpsi, dtheta, dphi; // angular displacements TRandom *rnd = new TRandom(1567); TString path; - const char *SM71="/ALIC_1/B077_1/B071_"; //1-13 + const char *sSM71="/ALIC_1/B077_1/B071_"; //1-13 const char *sm71="/BTO1_1"; - const char *SM74="/ALIC_1/B077_1/B074_"; //1-2 + const char *sSM74="/ALIC_1/B077_1/B074_"; //1-2 const char *sm74="/BTO2_1"; - const char *SM75="/ALIC_1/B077_1/B075_"; //1-3 + const char *sSM75="/ALIC_1/B077_1/B075_"; //1-3 const char *sm75="/BTO3_1"; @@ -88,7 +92,7 @@ void AliTOFAlignment::Smear( Float_t *tr, Float_t *rot){ dtheta = rot[1]/nSM71; dphi = rot[2]/nSM71; - path = SM71; + path = sSM71; path += i; path += sm71; AliAlignObjAngles *o =new AliAlignObjAngles(path, dvoluid, dx, dy, dz, dpsi, dtheta, dphi); @@ -104,7 +108,7 @@ void AliTOFAlignment::Smear( Float_t *tr, Float_t *rot){ dtheta = rot[1]/nSM74; dphi = rot[2]/nSM74; - path = SM74; + path = sSM74; path += i; path += sm74; AliAlignObjAngles *o =new AliAlignObjAngles(path, dvoluid, dx, dy, dz, dpsi, dtheta, dphi); @@ -120,7 +124,7 @@ void AliTOFAlignment::Smear( Float_t *tr, Float_t *rot){ dtheta = rot[1]/nSM75; dphi = rot[2]/nSM75; - path = SM75; + path = sSM75; path += i; path += sm75; AliAlignObjAngles *o =new AliAlignObjAngles(path, dvoluid, dx, dy, dz, dpsi, dtheta, dphi); @@ -132,17 +136,19 @@ void AliTOFAlignment::Smear( Float_t *tr, Float_t *rot){ } //_____________________________________________________________________________ -void AliTOFAlignment::Align( Float_t *tr, Float_t *rot){ +void AliTOFAlignment::Align( Float_t *tr, Float_t *rot) +{ + //Introduce Offset/Tilts fTOFAlignObjArray = new TObjArray(kMaxAlignObj); Float_t dx, dy, dz; // shifts Float_t dpsi, dtheta, dphi; // angular displacements TString path; - const char *SM71="/ALIC_1/B077_1/B071_"; //1-13 + const char *sSM71="/ALIC_1/B077_1/B071_"; //1-13 const char *sm71="/BTO1_1"; - const char *SM74="/ALIC_1/B077_1/B074_"; //1-2 + const char *sSM74="/ALIC_1/B077_1/B074_"; //1-2 const char *sm74="/BTO2_1"; - const char *SM75="/ALIC_1/B077_1/B075_"; //1-3 + const char *sSM75="/ALIC_1/B077_1/B075_"; //1-3 const char *sm75="/BTO3_1"; @@ -162,7 +168,7 @@ void AliTOFAlignment::Align( Float_t *tr, Float_t *rot){ dtheta = rot[1]/nSM71; dphi = rot[2]/nSM71; - path = SM71; + path = sSM71; path += i; path += sm71; AliAlignObjAngles *o =new AliAlignObjAngles(path, dvoluid, dx, dy, dz, dpsi, dtheta, dphi); @@ -178,7 +184,7 @@ void AliTOFAlignment::Align( Float_t *tr, Float_t *rot){ dtheta = rot[1]/nSM74; dphi = rot[2]/nSM74; - path = SM74; + path = sSM74; path += i; path += sm74; AliAlignObjAngles *o =new AliAlignObjAngles(path, dvoluid, dx, dy, dz, dpsi, dtheta, dphi); @@ -194,7 +200,7 @@ void AliTOFAlignment::Align( Float_t *tr, Float_t *rot){ dtheta = rot[1]/nSM75; dphi = rot[2]/nSM75; - path = SM75; + path = sSM75; path += i; path += sm75; AliAlignObjAngles *o =new AliAlignObjAngles(path, dvoluid, dx, dy, dz, dpsi, dtheta, dphi); @@ -204,7 +210,9 @@ void AliTOFAlignment::Align( Float_t *tr, Float_t *rot){ AliInfo(Form("Number of Alignable Volumes: %d",fNTOFAlignObj)); } //_____________________________________________________________________________ -void AliTOFAlignment::WriteParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun){ +void AliTOFAlignment::WriteParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun) +{ + //Write Align Par on CDB AliCDBManager *man = AliCDBManager::Instance(); if(!man->IsDefaultStorageSet())man->SetDefaultStorage("local://$ALICE_ROOT"); Char_t *sel1 = "AlignPar" ; @@ -217,7 +225,9 @@ void AliTOFAlignment::WriteParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun){ man->Put(fTOFAlignObjArray,idTOFAlign,mdTOFAlign); } //_____________________________________________________________________________ -void AliTOFAlignment::ReadParFromCDB(Char_t *sel, Int_t nrun){ +void AliTOFAlignment::ReadParFromCDB(Char_t *sel, Int_t nrun) +{ + //Read Align Par from CDB AliCDBManager *man = AliCDBManager::Instance(); if(!man->IsDefaultStorageSet())man->SetDefaultStorage("local://$ALICE_ROOT"); Char_t *sel1 = "AlignPar" ; @@ -230,7 +240,9 @@ void AliTOFAlignment::ReadParFromCDB(Char_t *sel, Int_t nrun){ } //_____________________________________________________________________________ -void AliTOFAlignment::WriteSimParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun){ +void AliTOFAlignment::WriteSimParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun) +{ + //Write Sim Align Par on CDB AliCDBManager *man = AliCDBManager::Instance(); if(!man->IsDefaultStorageSet())man->SetDefaultStorage("local://$ALICE_ROOT"); Char_t *sel1 = "AlignSimPar" ; @@ -244,6 +256,7 @@ void AliTOFAlignment::WriteSimParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun){ } //_____________________________________________________________________________ void AliTOFAlignment::ReadSimParFromCDB(Char_t *sel, Int_t nrun){ + //Read Sim Align Par from CDB AliCDBManager *man = AliCDBManager::Instance(); if(!man->IsDefaultStorageSet())man->SetDefaultStorage("local://$ALICE_ROOT"); Char_t *sel1 = "AlignSimPar" ; @@ -256,7 +269,9 @@ void AliTOFAlignment::ReadSimParFromCDB(Char_t *sel, Int_t nrun){ } //_____________________________________________________________________________ -void AliTOFAlignment::WriteOnCDBforDC(){ +void AliTOFAlignment::WriteOnCDBforDC() +{ + //Write Align Par on CDB for DC06 AliCDBManager *man = AliCDBManager::Instance(); if(!man->IsDefaultStorageSet())man->SetDefaultStorage("local://$ALICE_ROOT"); AliCDBId idTOFAlign("TOF/Align/Data",0,0); @@ -267,7 +282,9 @@ void AliTOFAlignment::WriteOnCDBforDC(){ man->Put(fTOFAlignObjArray,idTOFAlign,mdTOFAlign); } //_____________________________________________________________________________ -void AliTOFAlignment::ReadFromCDBforDC(){ +void AliTOFAlignment::ReadFromCDBforDC() +{ + //Read Sim Align Par from CDB for DC06 AliCDBManager *man = AliCDBManager::Instance(); if(!man->IsDefaultStorageSet())man->SetDefaultStorage("local://$ALICE_ROOT"); AliCDBEntry *entry = man->Get("TOF/Align/Data",0); diff --git a/TOF/AliTOFCal.cxx b/TOF/AliTOFCal.cxx index b28aa13abf9..8e89579dd95 100644 --- a/TOF/AliTOFCal.cxx +++ b/TOF/AliTOFCal.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2006/03/28 14:56:48 arcelli +updates to handle new V5 geometry & some re-arrangements + Revision 1.2 2006/02/13 17:22:26 arcelli just Fixing Log info @@ -47,6 +50,7 @@ ClassImp(AliTOFCal) //________________________________________________________________ AliTOFCal::AliTOFCal():TObject(){ + //main ctor fGeom = 0x0; fNSector = 0; fNPlate = 0; @@ -62,6 +66,7 @@ AliTOFCal::AliTOFCal():TObject(){ //________________________________________________________________ AliTOFCal::AliTOFCal(AliTOFGeometry *geom):TObject(){ + //ctor with geom fGeom = geom; fNSector = fGeom->NSectors(); fNPlate = fGeom->NPlates(); @@ -79,6 +84,7 @@ AliTOFCal::AliTOFCal(AliTOFGeometry *geom):TObject(){ AliTOFCal::AliTOFCal(const AliTOFCal& cal): TObject(cal) { + //copy ctor fNSector = cal.fNSector; fNPlate = cal.fNPlate; fNStripA = cal.fNStripA; @@ -95,6 +101,7 @@ AliTOFCal::AliTOFCal(const AliTOFCal& cal): //____________________________________________________________________________ AliTOFCal::~AliTOFCal() { + //dtor gROOT->GetListOfBrowsables()->Remove(this); delete [] fPads; } @@ -102,6 +109,7 @@ AliTOFCal::~AliTOFCal() void AliTOFCal::Browse(TBrowser *b) { + //add cal obj to list of browsables char name[10]; for(Int_t i=0; iNpadX(); @@ -66,6 +70,7 @@ AliTOFCalPadZ::AliTOFCalPadZ(AliTOFGeometry *geom){ AliTOFCalPadZ::AliTOFCalPadZ(AliTOFGeometry *geom,AliTOFChannel *ch): fCh(ch) { + //ctor with TOF geometry and cal channel fGeom = geom; fNpadX = fGeom->NpadX(); } @@ -79,6 +84,7 @@ AliTOFCalPadZ::~AliTOFCalPadZ() void AliTOFCalPadZ::Browse(TBrowser *b) { + //Add cal object to browsable list if(fGeom==0x0){ AliInfo("V5 TOF Geometry is taken as the default"); AliTOFGeometry *geom = new AliTOFGeometryV5(); diff --git a/TOF/AliTOFCalPlateA.cxx b/TOF/AliTOFCalPlateA.cxx index b0b5d5f7be1..3bdfdb4ab37 100644 --- a/TOF/AliTOFCalPlateA.cxx +++ b/TOF/AliTOFCalPlateA.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2006/03/28 14:57:40 arcelli +updates to handle new V5 geometry & some re-arrangements + Revision 1.2 2006/02/13 17:22:26 arcelli just Fixing Log info @@ -45,6 +48,7 @@ ClassImp(AliTOFCalPlateA) //________________________________________________________________ AliTOFCalPlateA::AliTOFCalPlateA(){ + //main ctor fCh = 0; fGeom= 0x0; fNStripA = 0; @@ -55,6 +59,7 @@ AliTOFCalPlateA::AliTOFCalPlateA(){ AliTOFCalPlateA::AliTOFCalPlateA(AliTOFChannel *ch) : fCh(ch) { + //ctor with channel fGeom= 0x0; fNStripA = 0; fNpadZ = 0; @@ -63,6 +68,7 @@ AliTOFCalPlateA::AliTOFCalPlateA(AliTOFChannel *ch) : fCh(ch) //________________________________________________________________ AliTOFCalPlateA::AliTOFCalPlateA(AliTOFGeometry *geom){ + //ctor with geom fCh = 0; fGeom = geom; fNStripA = fGeom->NStripA(); @@ -73,6 +79,7 @@ AliTOFCalPlateA::AliTOFCalPlateA(AliTOFGeometry *geom){ AliTOFCalPlateA::AliTOFCalPlateA(AliTOFGeometry *geom, AliTOFChannel *ch): fCh(ch) { + //ctor with geom and channel fGeom = geom; fNStripA = fGeom->NStripA(); fNpadZ = fGeom->NpadZ(); @@ -82,6 +89,7 @@ AliTOFCalPlateA::AliTOFCalPlateA(AliTOFGeometry *geom, AliTOFChannel *ch): fCh(c AliTOFCalPlateA::~AliTOFCalPlateA() { + //dtor delete[] fCh; } @@ -90,6 +98,7 @@ AliTOFCalPlateA::~AliTOFCalPlateA() AliTOFCalPlateA::AliTOFCalPlateA(const AliTOFCalPlateA& pl): TObject(pl) { + //copy ctor fCh = pl.fCh; fNStripA = pl.fNStripA; fNpadZ = pl.fNpadZ; @@ -100,6 +109,7 @@ AliTOFCalPlateA::AliTOFCalPlateA(const AliTOFCalPlateA& pl): //________________________________________________________________ void AliTOFCalPlateA::Browse(TBrowser *b){ + //add cal obj to list of browsables if(fGeom==0x0){ AliTOFGeometry *geom = new AliTOFGeometryV5(); diff --git a/TOF/AliTOFCalPlateB.cxx b/TOF/AliTOFCalPlateB.cxx index f309a7adc8b..7bda20c0480 100644 --- a/TOF/AliTOFCalPlateB.cxx +++ b/TOF/AliTOFCalPlateB.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2006/03/28 14:57:48 arcelli +updates to handle new V5 geometry & some re-arrangements + Revision 1.2 2006/02/13 17:22:26 arcelli just Fixing Log info @@ -45,6 +48,7 @@ ClassImp(AliTOFCalPlateB) //________________________________________________________________ AliTOFCalPlateB::AliTOFCalPlateB(){ + //main ctor fCh = 0; fGeom= 0x0; fNStripB = 0; @@ -55,6 +59,7 @@ AliTOFCalPlateB::AliTOFCalPlateB(){ AliTOFCalPlateB::AliTOFCalPlateB(AliTOFChannel *ch) : fCh(ch) { + //ctor with channel fGeom= 0x0; fNStripB = 0; fNpadZ = 0; @@ -63,6 +68,7 @@ AliTOFCalPlateB::AliTOFCalPlateB(AliTOFChannel *ch) : fCh(ch) //________________________________________________________________ AliTOFCalPlateB::AliTOFCalPlateB(AliTOFGeometry *geom){ + //ctor with geom fCh = 0; fGeom = geom; fNStripB = fGeom->NStripB(); @@ -73,6 +79,7 @@ AliTOFCalPlateB::AliTOFCalPlateB(AliTOFGeometry *geom){ AliTOFCalPlateB::AliTOFCalPlateB(AliTOFGeometry *geom, AliTOFChannel *ch): fCh(ch) { + //ctor with channel and geom fGeom = geom; fNStripB = fGeom->NStripB(); fNpadZ = fGeom->NpadZ(); @@ -83,6 +90,7 @@ AliTOFCalPlateB::AliTOFCalPlateB(AliTOFGeometry *geom, AliTOFChannel *ch): fCh(c AliTOFCalPlateB::~AliTOFCalPlateB() { + //dtor delete[] fCh; } @@ -91,6 +99,7 @@ AliTOFCalPlateB::~AliTOFCalPlateB() AliTOFCalPlateB::AliTOFCalPlateB(const AliTOFCalPlateB& pl): TObject(pl) { + //copy ctor fCh = pl.fCh; fNStripB = pl.fNStripB; fNpadZ = pl.fNpadZ; @@ -101,6 +110,7 @@ AliTOFCalPlateB::AliTOFCalPlateB(const AliTOFCalPlateB& pl): //________________________________________________________________ void AliTOFCalPlateB::Browse(TBrowser *b){ + //add cal obj to list of browsables if(fGeom==0x0){ AliTOFGeometry *geom = new AliTOFGeometryV5(); diff --git a/TOF/AliTOFCalPlateC.cxx b/TOF/AliTOFCalPlateC.cxx index 2541619edce..7f6eaf6069c 100644 --- a/TOF/AliTOFCalPlateC.cxx +++ b/TOF/AliTOFCalPlateC.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2006/03/28 14:57:56 arcelli +updates to handle new V5 geometry & some re-arrangements + Revision 1.2 2006/02/13 17:22:26 arcelli just Fixing Log info @@ -45,6 +48,7 @@ ClassImp(AliTOFCalPlateC) //________________________________________________________________ AliTOFCalPlateC::AliTOFCalPlateC(){ + //main ctor fCh = 0; fGeom= 0x0; fNStripC = 0; @@ -55,6 +59,7 @@ AliTOFCalPlateC::AliTOFCalPlateC(){ AliTOFCalPlateC::AliTOFCalPlateC(AliTOFChannel *ch) : fCh(ch) { + //ctor with channel fGeom= 0x0; fNStripC = 0; fNpadZ = 0; @@ -63,6 +68,7 @@ AliTOFCalPlateC::AliTOFCalPlateC(AliTOFChannel *ch) : fCh(ch) //________________________________________________________________ AliTOFCalPlateC::AliTOFCalPlateC(AliTOFGeometry *geom){ + //ctor with geom fCh = 0; fGeom = geom; fNStripC = fGeom->NStripC(); @@ -73,6 +79,7 @@ AliTOFCalPlateC::AliTOFCalPlateC(AliTOFGeometry *geom){ AliTOFCalPlateC::AliTOFCalPlateC(AliTOFGeometry *geom, AliTOFChannel *ch): fCh(ch) { + //ctor with channel and geom fGeom = geom; fNStripC = fGeom->NStripC(); fNpadZ = fGeom->NpadZ(); @@ -83,6 +90,7 @@ AliTOFCalPlateC::AliTOFCalPlateC(AliTOFGeometry *geom, AliTOFChannel *ch): fCh(c AliTOFCalPlateC::~AliTOFCalPlateC() { + //dtor delete[] fCh; } @@ -91,6 +99,7 @@ AliTOFCalPlateC::~AliTOFCalPlateC() AliTOFCalPlateC::AliTOFCalPlateC(const AliTOFCalPlateC& pl): TObject(pl) { + //copy ctor fCh = pl.fCh; fNStripC = pl.fNStripC; fNpadZ = pl.fNpadZ; @@ -101,6 +110,7 @@ AliTOFCalPlateC::AliTOFCalPlateC(const AliTOFCalPlateC& pl): //________________________________________________________________ void AliTOFCalPlateC::Browse(TBrowser *b){ + //add cal obj to list of browsables if(fGeom==0x0){ AliTOFGeometry *geom = new AliTOFGeometryV5(); diff --git a/TOF/AliTOFCalSector.cxx b/TOF/AliTOFCalSector.cxx index b3c5050e0cf..9771fea22e6 100644 --- a/TOF/AliTOFCalSector.cxx +++ b/TOF/AliTOFCalSector.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2006/03/28 14:58:16 arcelli +updates to handle new V5 geometry & some re-arrangements + Revision 1.2 2006/02/13 16:53:00 decaro just Fixing Log info @@ -49,6 +52,7 @@ ClassImp(AliTOFCalSector) //________________________________________________________________ AliTOFCalSector::AliTOFCalSector(){ + //main ctor fCh = 0; fGeom=0x0; fNPlate=0; @@ -65,6 +69,7 @@ AliTOFCalSector::AliTOFCalSector(){ AliTOFCalSector::AliTOFCalSector(AliTOFChannel *ch): fCh(ch) { + //ctor with channel fGeom=0x0; fNPlate=0; fNStripA=0; @@ -77,6 +82,7 @@ AliTOFCalSector::AliTOFCalSector(AliTOFChannel *ch): //________________________________________________________________ AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom){ + //ctor with geom fCh = 0; fGeom= geom; fNPlate = fGeom->NPlates(); @@ -93,6 +99,7 @@ AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom){ AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom,AliTOFChannel *ch): fCh(ch) { + // ctor with channel and geom fGeom= geom; fNPlate = fGeom->NPlates(); fNStripA = fGeom->NStripA(); @@ -107,6 +114,7 @@ AliTOFCalSector::AliTOFCalSector(AliTOFGeometry *geom,AliTOFChannel *ch): AliTOFCalSector::AliTOFCalSector(const AliTOFCalSector& sec): TObject(sec) { + //copy ctor fCh = sec.fCh; fNPlate = sec.fNPlate; fNStripA = sec.fNStripA; @@ -120,6 +128,7 @@ AliTOFCalSector::AliTOFCalSector(const AliTOFCalSector& sec): AliTOFCalSector::~AliTOFCalSector() { + //dtor gROOT->GetListOfBrowsables()->Remove(this); delete[] fCh; } @@ -127,7 +136,7 @@ AliTOFCalSector::~AliTOFCalSector() //________________________________________________________________ void AliTOFCalSector::Browse(TBrowser *b){ - + //add cal obj to list of browsables if(fGeom==0x0){ AliTOFGeometry *geom= new AliTOFGeometryV5(); AliInfo("V5 TOF Geometry is taken as the default"); diff --git a/TOF/AliTOFCalStrip.cxx b/TOF/AliTOFCalStrip.cxx index f7a40d62741..4807bd21e47 100644 --- a/TOF/AliTOFCalStrip.cxx +++ b/TOF/AliTOFCalStrip.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2006/03/28 14:58:08 arcelli +updates to handle new V5 geometry & some re-arrangements + Revision 1.2 2006/02/13 17:22:26 arcelli just Fixing Log info @@ -45,6 +48,7 @@ ClassImp(AliTOFCalStrip) //________________________________________________________________ AliTOFCalStrip::AliTOFCalStrip(){ + //main ctor fCh = 0; fGeom= 0x0; fNpadZ = 0; @@ -55,6 +59,7 @@ AliTOFCalStrip::AliTOFCalStrip(){ AliTOFCalStrip::AliTOFCalStrip(AliTOFChannel *ch): fCh(ch) { + // ctor with channel fGeom= 0x0; fNpadZ = 0; fNpadX = 0; @@ -62,6 +67,7 @@ AliTOFCalStrip::AliTOFCalStrip(AliTOFChannel *ch): //________________________________________________________________ AliTOFCalStrip::AliTOFCalStrip(AliTOFGeometry *geom){ + //ctor with geom fCh = 0; fGeom = geom; fNpadZ = fGeom->NpadZ(); @@ -72,6 +78,7 @@ AliTOFCalStrip::AliTOFCalStrip(AliTOFGeometry *geom){ AliTOFCalStrip::AliTOFCalStrip(AliTOFGeometry *geom,AliTOFChannel *ch): fCh(ch) { + //ctor with channel and geom fGeom = geom; fNpadZ = fGeom->NpadZ(); fNpadX = fGeom->NpadX(); @@ -80,6 +87,7 @@ AliTOFCalStrip::AliTOFCalStrip(AliTOFGeometry *geom,AliTOFChannel *ch): AliTOFCalStrip::~AliTOFCalStrip() { + //dtor delete[] fCh; } @@ -88,6 +96,7 @@ AliTOFCalStrip::~AliTOFCalStrip() AliTOFCalStrip::AliTOFCalStrip(const AliTOFCalStrip& strip): TObject(strip) { + //copy ctor fCh = strip.fCh; fNpadZ = strip.fNpadZ; fNpadX = strip.fNpadX; @@ -96,7 +105,7 @@ AliTOFCalStrip::AliTOFCalStrip(const AliTOFCalStrip& strip): //________________________________________________________________ void AliTOFCalStrip::Browse(TBrowser *b){ - + //add obj to list of browsables if(fGeom==0x0){ AliTOFGeometry *geom = new AliTOFGeometryV5(); AliInfo("V5 TOF Geometry is taken as the default"); diff --git a/TOF/AliTOFClusterFinder.cxx b/TOF/AliTOFClusterFinder.cxx index c842b632cde..f40af02b585 100644 --- a/TOF/AliTOFClusterFinder.cxx +++ b/TOF/AliTOFClusterFinder.cxx @@ -181,8 +181,8 @@ void AliTOFClusterFinder::Digits2RecPoints(Int_t iEvent) Int_t dig[5]; Float_t g[3]; Double_t h[5]; - Float_t ToT; - Double_t TdcND; + Float_t tToT; + Double_t tTdcND; for (ii=0; iiUncheckedAt(ii); dig[0]=d->GetSector(); @@ -199,10 +199,10 @@ void AliTOFClusterFinder::Digits2RecPoints(Int_t iEvent) h[2] = g[2]; h[3] = d->GetTdc(); h[4] = d->GetAdc(); - ToT = d->GetToT(); - TdcND = d->GetTdcND(); + tToT = d->GetToT(); + tTdcND = d->GetTdcND(); - AliTOFcluster *tofCluster = new AliTOFcluster(h,d->GetTracks(),dig,ii,ToT, TdcND); + AliTOFcluster *tofCluster = new AliTOFcluster(h,d->GetTracks(),dig,ii,tToT, tTdcND); InsertCluster(tofCluster); } @@ -241,8 +241,8 @@ void AliTOFClusterFinder::Digits2RecPoints(AliRawReader *rawReader, Int_t detectorIndex[5]; Float_t position[3]; Double_t cylindricalPosition[5]; - Float_t ToT; - Double_t TdcND; + Float_t tToT; + Double_t tTdcND; for (indexDDL = 0; indexDDL < kDDL; indexDDL++) { @@ -267,11 +267,11 @@ void AliTOFClusterFinder::Digits2RecPoints(AliRawReader *rawReader, cylindricalPosition[2] = position[2]; cylindricalPosition[3] = tofInput.GetTofBin(); cylindricalPosition[4] = tofInput.GetADCbin(); - ToT = tofInput.GetADCbin(); - TdcND = -1.; + tToT = tofInput.GetADCbin(); + tTdcND = -1.; AliTOFcluster *tofCluster = new AliTOFcluster(cylindricalPosition, detectorIndex); - tofCluster->SetToT(ToT); - tofCluster->SetTDCND(TdcND); + tofCluster->SetToT(tToT); + tofCluster->SetTDCND(tTdcND); InsertCluster(tofCluster); } // while loop @@ -318,8 +318,8 @@ void AliTOFClusterFinder::Digits2RecPoints(Int_t iEvent, AliRawReader *rawReader Int_t detectorIndex[5]; Float_t position[3]; Double_t cylindricalPosition[5]; - Float_t ToT; - Double_t TdcND; + Float_t tToT; + Double_t tTdcND; for (indexDDL = 0; indexDDL < kDDL; indexDDL++) { @@ -344,12 +344,12 @@ void AliTOFClusterFinder::Digits2RecPoints(Int_t iEvent, AliRawReader *rawReader cylindricalPosition[2] = (Double_t)position[2]; cylindricalPosition[3] = (Double_t)tofInput.GetTofBin(); cylindricalPosition[4] = (Double_t)tofInput.GetADCbin(); - ToT = tofInput.GetADCbin(); - TdcND = -1.; + tToT = tofInput.GetADCbin(); + tTdcND = -1.; AliTOFcluster *tofCluster = new AliTOFcluster(cylindricalPosition, detectorIndex); - tofCluster->SetToT(ToT); - tofCluster->SetTDCND(TdcND); + tofCluster->SetToT(tToT); + tofCluster->SetTDCND(tTdcND); InsertCluster(tofCluster); } // while loop @@ -504,8 +504,8 @@ void AliTOFClusterFinder::FillRecPoint() Double_t cylindricalPosition[5]; Int_t trackLabels[3]; Int_t digitIndex = -1; - Float_t ToT; - Double_t TdcND; + Float_t tToT; + Double_t tTdcND; TClonesArray &lRecPoints = *fRecPoints; @@ -519,10 +519,10 @@ void AliTOFClusterFinder::FillRecPoint() cylindricalPosition[2] = fTofClusters[ii]->GetZ(); cylindricalPosition[3] = fTofClusters[ii]->GetTDC(); cylindricalPosition[4] = fTofClusters[ii]->GetADC(); - ToT = fTofClusters[ii]->GetToT(); - TdcND = fTofClusters[ii]->GetTDCND(); + tToT = fTofClusters[ii]->GetToT(); + tTdcND = fTofClusters[ii]->GetTDCND(); - new(lRecPoints[ii]) AliTOFcluster(cylindricalPosition, trackLabels, detectorIndex, digitIndex, ToT, TdcND); + new(lRecPoints[ii]) AliTOFcluster(cylindricalPosition, trackLabels, detectorIndex, digitIndex, tToT, tTdcND); //AliInfo(Form("%3i %3i %f %f %f %f %f %2i %2i %2i %1i %2i",ii,digitIndex, cylindricalPosition[2],cylindricalPosition[0],cylindricalPosition[1],cylindricalPosition[3],cylindricalPosition[4],detectorIndex[0],detectorIndex[1],detectorIndex[2],detectorIndex[3],detectorIndex[4])); @@ -543,12 +543,12 @@ void AliTOFClusterFinder::CalibrateRecPoint() Int_t detectorIndex[5]; Int_t digitIndex = -1; - Float_t ToT; - Float_t TdcCorr; + Float_t tToT; + Float_t tdcCorr; AliInfo(" Calibrating TOF Clusters: ") AliTOFcalib *calib = new AliTOFcalib(fTOFGeometry); calib->ReadParFromCDB("TOF/Calib",0); - AliTOFCal *TOFCalArray = calib->GetTOFCalArray(); + AliTOFCal *calTOFArray = calib->GetTOFCalArray(); for (ii=0; iiGetIndex(); @@ -556,16 +556,16 @@ void AliTOFClusterFinder::CalibrateRecPoint() Int_t index = calib->GetIndex(detectorIndex); - AliTOFChannel * CalChannel = TOFCalArray->GetChannel(index); + AliTOFChannel * calChannel = calTOFArray->GetChannel(index); Float_t par[6]; for (Int_t j = 0; j<6; j++){ - par[j]=CalChannel->GetSlewPar(j); + par[j]=calChannel->GetSlewPar(j); } - ToT = fTofClusters[ii]->GetToT(); - Float_t TimeCorr=par[0]+par[1]*ToT+par[2]*ToT*ToT+par[3]*ToT*ToT*ToT+par[4]*ToT*ToT*ToT*ToT+par[5]*ToT*ToT*ToT*ToT*ToT; - TdcCorr=(fTofClusters[ii]->GetTDC()*AliTOFGeometry::TdcBinWidth()+32)*1.E-3-TimeCorr; - TdcCorr=(TdcCorr*1E3-32)/AliTOFGeometry::TdcBinWidth(); - fTofClusters[ii]->SetTDC(TdcCorr); + tToT = fTofClusters[ii]->GetToT(); + Float_t timeCorr=par[0]+par[1]*tToT+par[2]*tToT*tToT+par[3]*tToT*tToT*tToT+par[4]*tToT*tToT*tToT*tToT+par[5]*tToT*tToT*tToT*tToT*tToT; + tdcCorr=(fTofClusters[ii]->GetTDC()*AliTOFGeometry::TdcBinWidth()+32)*1.E-3-timeCorr; + tdcCorr=(tdcCorr*1E3-32)/AliTOFGeometry::TdcBinWidth(); + fTofClusters[ii]->SetTDC(tdcCorr); } // loop on clusters diff --git a/TOF/AliTOFClusterFinder.h b/TOF/AliTOFClusterFinder.h index 0091be2acd7..6c2714eb47e 100644 --- a/TOF/AliTOFClusterFinder.h +++ b/TOF/AliTOFClusterFinder.h @@ -2,6 +2,9 @@ #define ALITOFCLUSTERFINDER_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ +// AliTOFClusterFinder Class +// Task: Transform digits/raw data to TOF Clusters, to fill TOF RecPoints +// and feed TOF tracking #include "AliRawReader.h" diff --git a/TOF/AliTOFDigitizer.cxx b/TOF/AliTOFDigitizer.cxx index c8014a0bb5d..0f505e99eab 100644 --- a/TOF/AliTOFDigitizer.cxx +++ b/TOF/AliTOFDigitizer.cxx @@ -72,6 +72,7 @@ ClassImp(AliTOFDigitizer) AliTOFDigitizer::AliTOFDigitizer(AliRunDigitizer* manager) :AliDigitizer(manager) { + //ctor with RunDigitizer fDigits=0; fSDigitsArray=0; fhitMap=0; @@ -376,7 +377,7 @@ void AliTOFDigitizer::CollectSDigit(AliTOFSDigit * sdigit) } //_____________________________________________________________________________ -void AliTOFDigitizer::InitDecalibration( AliTOFcalib *calib){ +void AliTOFDigitizer::InitDecalibration( AliTOFcalib *calib) const { calib->ReadSimParFromCDB("TOF/Calib", 0); } //--------------------------------------------------------------------- @@ -388,10 +389,10 @@ void AliTOFDigitizer::DecalibrateTOFSignal( AliTOFcalib *calib){ AliInfo(Form("Size of AliTOFCal = %i",cal->NPads())); for (Int_t ipad = 0 ; ipadNPads(); ipad++){ - AliTOFChannel *CalChannel = cal->GetChannel(ipad); + AliTOFChannel *calChannel = cal->GetChannel(ipad); Float_t par[6]; for (Int_t j = 0; j<6; j++){ - par[j]=CalChannel->GetSlewPar(j); + par[j]=calChannel->GetSlewPar(j); } } @@ -400,26 +401,26 @@ void AliTOFDigitizer::DecalibrateTOFSignal( AliTOFcalib *calib){ TH1F * hToT= calib->GetTOFSimToT(); Int_t nbins = hToT->GetNbinsX(); - Float_t Delta = hToT->GetBinWidth(1); - Float_t maxch = hToT->GetBinLowEdge(nbins)+Delta; + Float_t delta = hToT->GetBinWidth(1); + Float_t maxch = hToT->GetBinLowEdge(nbins)+delta; Float_t minch = hToT->GetBinLowEdge(1); Float_t max=0,min=0; //maximum and minimum value of the distribution Int_t maxbin=0,minbin=0; //maximum and minimum bin of the distribution for (Int_t ii=nbins; ii>0; ii--){ if (hToT->GetBinContent(ii)!= 0) { - max = maxch - (nbins-ii-1)*Delta; + max = maxch - (nbins-ii-1)*delta; maxbin = ii; break;} } for (Int_t j=1; jGetBinContent(j)!= 0) { - min = minch + (j-1)*Delta; + min = minch + (j-1)*delta; minbin = j; break;} } - Float_t MaxToT=max; - Float_t MinToT=min; - Float_t MaxToTDistr=hToT->GetMaximum(); + Float_t maxToT=max; + Float_t minToT=min; + Float_t maxToTDistr=hToT->GetMaximum(); // Loop on TOF Digits @@ -439,30 +440,30 @@ void AliTOFDigitizer::DecalibrateTOFSignal( AliTOFcalib *calib){ if(hToT->GetEntries()>0){ Float_t trix = 0; Float_t triy = 0; - Float_t SimToT = 0; - while (SimToT <= triy){ + Float_t simToT = 0; + while (simToT <= triy){ trix = gRandom->Rndm(i); triy = gRandom->Rndm(i); - trix = (MaxToT-MinToT)*trix + MinToT; - triy = MaxToTDistr*triy; + trix = (maxToT-minToT)*trix + minToT; + triy = maxToTDistr*triy; Int_t binx=hToT->FindBin(trix); - SimToT=hToT->GetBinContent(binx); + simToT=hToT->GetBinContent(binx); } // Setting realistic ToT signal (only for Miscalibrated Data) dig->SetToT(trix); } Int_t index = calib->GetIndex(detId); - AliTOFChannel *CalChannel = cal->GetChannel(index); + AliTOFChannel *calChannel = cal->GetChannel(index); Float_t par[6]; for (Int_t j = 0; j<6; j++){ - par[j]=CalChannel->GetSlewPar(j); + par[j]=calChannel->GetSlewPar(j); if(par[j]!=0)dbEntry=kTRUE; } - Float_t ToT= dig->GetToT(); + Float_t tToT= dig->GetToT(); dig->SetTdcND(dig->GetTdc()); Float_t tdc = ((dig->GetTdc())*AliTOFGeometry::TdcBinWidth()+32)*1.E-3; //tof signal in ns - Float_t timeoffset=par[0] + ToT*par[1] +ToT*ToT*par[2] +ToT*ToT*ToT*par[3] +ToT*ToT*ToT*ToT*par[4] +ToT*ToT*ToT*ToT*ToT*par[5]; + Float_t timeoffset=par[0] + tToT*par[1] +tToT*tToT*par[2] +tToT*tToT*tToT*par[3] +tToT*tToT*tToT*tToT*par[4] +tToT*tToT*tToT*tToT*tToT*par[5]; Float_t timeSlewed = tdc + timeoffset; // Setting Decalibrated Time signal dig->SetTdc((timeSlewed*1E3-32)/AliTOFGeometry::TdcBinWidth()); diff --git a/TOF/AliTOFDigitizer.h b/TOF/AliTOFDigitizer.h index 750e68456ad..092203bb74e 100644 --- a/TOF/AliTOFDigitizer.h +++ b/TOF/AliTOFDigitizer.h @@ -32,14 +32,14 @@ class AliTOFDigitizer : public AliDigitizer { // Do the main work void Exec(Option_t* option=0) ; TClonesArray* SDigits() const {return fSDigitsArray;} - void ReadSDigit(Int_t); + void ReadSDigit(Int_t inputFile); void CreateDigits(); - void InitDecalibration(AliTOFcalib *calib); + void InitDecalibration(AliTOFcalib *calib) const; void DecalibrateTOFSignal(AliTOFcalib *calib); private: void CollectSDigit(AliTOFSDigit * sdigit) ; - Int_t PutNoise(Int_t /*charge*/){return 0;}; // not yet implemented + Int_t PutNoise(Int_t /*charge*/)const {return 0;}; // not yet implemented // due to the low noise expected level AliTOFGeometry *fGeom; // AliTOFgeometry pointer TClonesArray *fDigits; //! array with digits diff --git a/TOF/AliTOFGeometry.cxx b/TOF/AliTOFGeometry.cxx index 0f5a04f9955..51fba2ff924 100644 --- a/TOF/AliTOFGeometry.cxx +++ b/TOF/AliTOFGeometry.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.13 2006/03/12 14:37:54 arcelli + Changes for TOF Reconstruction using TGeo + Revision 1.12 2006/02/28 10:38:00 decaro AliTOFGeometry::fAngles, AliTOFGeometry::fHeights, AliTOFGeometry::fDistances arrays: dimension definition in the right location @@ -104,7 +107,7 @@ AliTOFGeometry::AliTOFGeometry() // AliTOFGeometry default constructor // - kNStripC = 20; // number of strips in C type module + kNStripC = 19; // number of strips in C type module kZlenA = 106.0; // length (cm) of the A module kZlenB = 141.0; // length (cm) of the B module kZlenC = 177.5; // length (cm) of the C module diff --git a/TOF/AliTOFGeometry.h b/TOF/AliTOFGeometry.h index 51c12e802ef..02f19c0bafc 100644 --- a/TOF/AliTOFGeometry.h +++ b/TOF/AliTOFGeometry.h @@ -23,22 +23,22 @@ class AliTOFGeometry: public TObject{ static Int_t NStripA() { return kNStripA;}; static Int_t NStripB() { return kNStripB;}; - virtual Int_t NStripC() { return kNStripC;}; + virtual Int_t NStripC() const { return kNStripC;}; static Int_t NMaxNstrip() { return kMaxNstrip;}; static Int_t NpadX() { return kNpadX;}; static Int_t NpadZ() { return kNpadZ;}; static Int_t NpadXStrip() { return kNpadX*kNpadZ;}; static Int_t NSectors() { return kNSectors;}; static Int_t NPlates() { return kNPlates;}; - virtual Int_t NPadXSector() { return (kNStripA + 2*kNStripB + + virtual Int_t NPadXSector() const { return (kNStripA + 2*kNStripB + 2*kNStripC)*kNpadX*kNpadZ;}; - virtual Float_t RinTOF() { return fgkxTOF;}; - virtual Float_t Rmin() { return fgkRmin;}; - virtual Float_t Rmax() { return fgkRmax;}; + virtual Float_t RinTOF() const { return fgkxTOF;}; + virtual Float_t Rmin() const { return fgkRmin;}; + virtual Float_t Rmax() const { return fgkRmax;}; - static Float_t XPad() { return fgkXPad;}; - static Float_t ZPad() { return fgkZPad;}; + static Float_t XPad() { return fgkXPad;}; + static Float_t ZPad() { return fgkZPad;}; static Float_t StripLength() { return fgkStripLength;}; @@ -51,10 +51,10 @@ class AliTOFGeometry: public TObject{ static Int_t NCh() { return kNCh;}; static Int_t NPadXTRM() { return kNCh*kNTdc;}; - virtual Float_t ZlenA() { return kZlenA;}; - virtual Float_t ZlenB() { return kZlenB;}; - virtual Float_t ZlenC() { return kZlenC;}; - virtual Float_t MaxhZtof() { return kMaxhZtof;}; + virtual Float_t ZlenA() const { return kZlenA;}; + virtual Float_t ZlenB() const { return kZlenB;}; + virtual Float_t ZlenC() const { return kZlenC;}; + virtual Float_t MaxhZtof() const { return kMaxhZtof;}; static Float_t SigmaForTail1() { return fgkSigmaForTail1;}; static Float_t SigmaForTail2() { return fgkSigmaForTail2;}; diff --git a/TOF/AliTOFGeometryV4.h b/TOF/AliTOFGeometryV4.h index 778177f7dec..348b8721b4a 100644 --- a/TOF/AliTOFGeometryV4.h +++ b/TOF/AliTOFGeometryV4.h @@ -26,7 +26,7 @@ class AliTOFGeometryV4: public AliTOFGeometry { Bool_t IsInsideThePadPar(Int_t *det, Float_t *pos); Float_t DistanceToPadPar(Int_t *det, Float_t *pos, Float_t *dist3d=0); void GetVolumePath(Int_t *ind, Char_t *path ); - Int_t GetPlate(Float_t *pos); + Int_t GetPlate(Float_t *pos) ; Int_t GetStrip(Float_t *pos); Int_t GetSector(Float_t *pos); Int_t GetPadX(Float_t *pos); @@ -41,18 +41,18 @@ class AliTOFGeometryV4: public AliTOFGeometry { Float_t GetMaxStripTheta(Int_t iPlate, Int_t iStrip); Float_t GetStripTheta(Int_t iPlate, Int_t iStrip); - Float_t NStirpC() { return kNStripC;}; - Int_t NPadXSector() { return (AliTOFGeometry::kNStripA + 2*AliTOFGeometry::kNStripB + + Int_t NStripC() const { return kNStripC;}; + Int_t NPadXSector() const { return (AliTOFGeometry::kNStripA + 2*AliTOFGeometry::kNStripB + 2*kNStripC)*AliTOFGeometry::kNpadX*AliTOFGeometry::kNpadZ;}; - Float_t RinTOF() { return fgkxTOF;}; - Float_t Rmin() { return fgkRmin;}; - Float_t Rmax() { return fgkRmax;}; + Float_t RinTOF() const { return fgkxTOF;}; + Float_t Rmin() const { return fgkRmin;}; + Float_t Rmax() const { return fgkRmax;}; - Float_t ZlenA() { return fgkZlenA;}; - Float_t ZlenB() { return fgkZlenB;}; - Float_t ZlenC() { return fgkZlenC;}; - Float_t MaxhZtof() { return fgkMaxhZtof;}; + Float_t ZlenA() const { return fgkZlenA;}; + Float_t ZlenB() const { return fgkZlenB;}; + Float_t ZlenC() const { return fgkZlenC;}; + Float_t MaxhZtof() const { return fgkMaxhZtof;}; static Float_t DeadBndX() { return fgkDeadBndX;}; static Float_t DeadBndZ() { return fgkDeadBndZ;}; diff --git a/TOF/AliTOFGeometryV5.h b/TOF/AliTOFGeometryV5.h index 06b2701b83d..25166d4b8d3 100644 --- a/TOF/AliTOFGeometryV5.h +++ b/TOF/AliTOFGeometryV5.h @@ -39,18 +39,18 @@ class AliTOFGeometryV5: public AliTOFGeometry { Float_t GetPadDy(Float_t *pos); Float_t GetPadDz(Float_t *pos); - Float_t NStirpC() { return kNStripC;}; - Int_t NPadXSector() { return (AliTOFGeometry::kNStripA + 2*AliTOFGeometry::kNStripB + + Int_t NStripC() const { return kNStripC;}; + Int_t NPadXSector() const { return (AliTOFGeometry::kNStripA + 2*AliTOFGeometry::kNStripB + 2*kNStripC)*AliTOFGeometry::kNpadX*AliTOFGeometry::kNpadZ;}; - Float_t RinTOF() { return fgkxTOF;}; - Float_t Rmin() { return fgkRmin;}; - Float_t Rmax() { return fgkRmax;}; + Float_t RinTOF() const { return fgkxTOF;}; + Float_t Rmin() const { return fgkRmin;}; + Float_t Rmax() const { return fgkRmax;}; - Float_t ZlenA() { return fgkZlenA;}; - Float_t ZlenB() { return fgkZlenB;}; - Float_t ZlenC() { return fgkZlenC;}; - Float_t MaxhZtof() { return fgkMaxhZtof;}; + Float_t ZlenA() const { return fgkZlenA;}; + Float_t ZlenB() const { return fgkZlenB;}; + Float_t ZlenC() const { return fgkZlenC;}; + Float_t MaxhZtof() const { return fgkMaxhZtof;}; void Translation(Float_t *xyz, Float_t translationVector[3]); void Rotation(Float_t *xyz, Double_t rotationAngles[6]); diff --git a/TOF/AliTOFSDigitizer.cxx b/TOF/AliTOFSDigitizer.cxx index 8fe8f30686a..8042d0333ca 100644 --- a/TOF/AliTOFSDigitizer.cxx +++ b/TOF/AliTOFSDigitizer.cxx @@ -77,6 +77,7 @@ ClassImp(AliTOFSDigitizer) //____________________________________________________________________________ AliTOFSDigitizer::AliTOFSDigitizer(const char* HeaderFile, Int_t evNumber1, Int_t nEvents):TTask("TOFSDigitizer","") { + //ctor, reading from input file ftail = 0; fSelectedSector=-1; // by default we sdigitize all sectors fSelectedPlate =-1; // by default we sdigitize all plates in all sectors @@ -215,7 +216,7 @@ Double_t TimeWithTail(Double_t* x, Double_t* par) //____________________________________________________________________________ void AliTOFSDigitizer::Exec(Option_t *verboseOption) { - + //execute TOF sdigitization if (strstr(verboseOption,"tim") || strstr(verboseOption,"all")) gBenchmark->Start("TOFSDigitizer"); @@ -490,6 +491,7 @@ void AliTOFSDigitizer::Print(Option_t* /*opt*/)const //__________________________________________________________________ void AliTOFSDigitizer::SelectSectorAndPlate(Int_t sector, Int_t plate) { + //Select sector and plate Bool_t isaWrongSelection=(sector < 0) || (sector >= AliTOFGeometry::NSectors()) || (plate < 0) || (plate >= AliTOFGeometry::NPlates()); if(isaWrongSelection){ AliError("You have selected an invalid value for sector or plate "); diff --git a/TOF/AliTOFcalib.cxx b/TOF/AliTOFcalib.cxx index de65d9503b6..4ea319202a3 100644 --- a/TOF/AliTOFcalib.cxx +++ b/TOF/AliTOFcalib.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.4 2006/03/31 11:26:46 arcelli + changing CDB Ids according to standard convention + Revision 1.3 2006/03/28 14:57:02 arcelli updates to handle new V5 geometry & some re-arrangements @@ -69,7 +72,7 @@ ClassImp(AliTOFcalib) const Int_t AliTOFcalib::fgkchannel = 5000; //_______________________________________________________________________ AliTOFcalib::AliTOFcalib():TTask("AliTOFcalib",""){ - + //TOF Calibration Class ctor fArrayToT = 0x0; fArrayTime = 0x0; fESDsel = 0x0; @@ -87,10 +90,12 @@ AliTOFcalib::AliTOFcalib():TTask("AliTOFcalib",""){ fTOFSimCal = new AliTOFCal(geom); fTOFCal->CreateArray(); fTOFSimCal->CreateArray(); + fTOFSimToT=0x0; delete geom; } //_______________________________________________________________________ AliTOFcalib::AliTOFcalib(AliTOFGeometry *geom):TTask("AliTOFcalib",""){ + //TOF Calibration Class ctor, taking the TOF geometry as input fArrayToT = 0x0; fArrayTime = 0x0; fESDsel = 0x0; @@ -106,11 +111,13 @@ AliTOFcalib::AliTOFcalib(AliTOFGeometry *geom):TTask("AliTOFcalib",""){ fTOFSimCal = new AliTOFCal(geom); fTOFCal->CreateArray(); fTOFSimCal->CreateArray(); + fTOFSimToT=0x0; } //____________________________________________________________________________ AliTOFcalib::AliTOFcalib(const AliTOFcalib & calib):TTask("AliTOFcalib","") { + //TOF Calibration Class copy ctor fNSector = calib.fNSector; fNPlate = calib.fNPlate; fNStripA = calib.fNStripA; @@ -123,12 +130,14 @@ AliTOFcalib::AliTOFcalib(const AliTOFcalib & calib):TTask("AliTOFcalib","") fArrayTime = calib.fArrayTime; fTOFCal=calib.fTOFCal; fTOFSimCal = calib.fTOFSimCal; + fTOFSimToT=calib.fTOFSimToT; } //____________________________________________________________________________ AliTOFcalib::~AliTOFcalib() { + //TOF Calibration Class dtor delete fArrayToT; delete fArrayTime; delete fTOFCal; @@ -137,11 +146,13 @@ AliTOFcalib::~AliTOFcalib() } //__________________________________________________________________________ -TF1* AliTOFcalib::SetFitFunctions(TH1F *histo){ +TF1* AliTOFcalib::SetFitFunctions(TH1F *histo) +{ + //Define Fit Functions for Slewing Correction TF1 * fpol[3]; - const Int_t nbins = histo->GetNbinsX(); - Float_t Delta = histo->GetBinWidth(1); //all the bins have the same width - Double_t max = histo->GetBinLowEdge(nbins)+Delta; + const Int_t knbins = histo->GetNbinsX(); + Float_t delta = histo->GetBinWidth(1); //all the bins have the same width + Double_t max = histo->GetBinLowEdge(knbins)+delta; max = 15; fpol[0]=new TF1("poly3","pol3",5,max); fpol[1]=new TF1("poly4","pol4",5,max); @@ -149,12 +160,12 @@ TF1* AliTOFcalib::SetFitFunctions(TH1F *histo){ char npoly[10]; Double_t chi[3]={1E6,1E6,1E6}; Int_t ndf[3]={-1,-1,-1}; - Double_t Nchi[3]={1E6,1E6,1E6}; + Double_t nchi[3]={1E6,1E6,1E6}; Double_t bestchi=1E6; TF1 * fGold=0x0; Int_t nonzero =0; Int_t numberOfpar =0; - for (Int_t j=0; jGetBinContent(j)!=0) { nonzero++; } @@ -181,9 +192,9 @@ TF1* AliTOFcalib::SetFitFunctions(TH1F *histo){ histo->Fit(npoly, "ERN", " ", 5.,14.); chi[ifun] = fpol[ifun]->GetChisquare(); ndf[ifun] = fpol[ifun]->GetNDF(); - Nchi[ifun] = (Double_t)chi[ifun]/ndf[ifun]; - if (Nchi[ifun]GetNpar(); } @@ -196,14 +207,15 @@ TF1* AliTOFcalib::SetFitFunctions(TH1F *histo){ void AliTOFcalib::SelectESD(AliESD *event) { - Float_t LowerMomBound=0.8; // [GeV/c] default value Pb-Pb - Float_t UpperMomBound=1.8 ; // [GeV/c] default value Pb-Pb + //track selection for Calibration + Float_t lowerMomBound=0.8; // [GeV/c] default value Pb-Pb + Float_t upperMomBound=1.8 ; // [GeV/c] default value Pb-Pb Int_t ntrk =0; Int_t ngoodtrkfinalToT = 0; ntrk=event->GetNumberOfTracks(); fESDsel = new TObjArray(ntrk); fESDsel->SetOwner(); - TObjArray UCdatatemp(ntrk); + TObjArray uCdatatemp(ntrk); Int_t ngoodtrk = 0; Int_t ngoodtrkfinal = 0; Float_t mintime =1E6; @@ -221,20 +233,20 @@ void AliTOFcalib::SelectESD(AliESD *event) time*=1.E-3; // tof given in nanoseconds if(time <= mintime)mintime=time; Double_t mom=t->GetP(); - if (!(mom<=UpperMomBound && mom>=LowerMomBound))continue; - UInt_t AssignedTOFcluster=t->GetTOFcluster();//index of the assigned TOF cluster, >0 ? - if(AssignedTOFcluster==0){ // not matched + if (!(mom<=upperMomBound && mom>=lowerMomBound))continue; + UInt_t assignedTOFcluster=t->GetTOFcluster();//index of the assigned TOF cluster, >0 ? + if(assignedTOFcluster==0){ // not matched continue; } AliTOFcalibESD *unc = new AliTOFcalibESD; unc->CopyFromAliESD(t); Double_t c1[15]; unc->GetExternalCovariance(c1); - UCdatatemp.Add(unc); + uCdatatemp.Add(unc); ngoodtrk++; } for (Int_t i = 0; i < ngoodtrk ; i ++){ - AliTOFcalibESD *unc = (AliTOFcalibESD*)UCdatatemp.At(i); + AliTOFcalibESD *unc = (AliTOFcalibESD*)uCdatatemp.At(i); if((unc->GetTOFsignal()-mintime*1.E3)<5.E3){ fESDsel->Add(unc); ngoodtrkfinal++; @@ -245,7 +257,9 @@ void AliTOFcalib::SelectESD(AliESD *event) } //_____________________________________________________________________________ -void AliTOFcalib::CombESDId(){ +void AliTOFcalib::CombESDId() +{ + //track PID for calibration Float_t t0offset=0; Float_t loffset=0; Int_t ntracksinset=6; @@ -259,8 +273,8 @@ void AliTOFcalib::CombESDId(){ Float_t sqMomError[6]={0.,0.,0.,0.,0.,0.}; Float_t sqTrackError[6]={0.,0.,0.,0.,0.,0.}; Float_t tracktoflen[6]={0.,0.,0.,0.,0.,0.}; - Float_t TimeResolution = 0.90e-10; // 90 ps by default - Float_t timeresolutioninns=TimeResolution*(1.e+9); // convert in [ns] + Float_t timeResolution = 0.90e-10; // 90 ps by default + Float_t timeresolutioninns=timeResolution*(1.e+9); // convert in [ns] Float_t timezero[6]={0.,0.,0.,0.,0.,0.}; Float_t weightedtimezero[6]={0.,0.,0.,0.,0.,0.}; Float_t besttimezero[6]={0.,0.,0.,0.,0.,0.}; @@ -294,7 +308,7 @@ void AliTOFcalib::CombESDId(){ momentum[j]=mom; } Float_t t0best=999.; - Float_t Et0best=999.; + Float_t et0best=999.; Float_t chisquarebest=999.; for (Int_t i1=0; i1<3;i1++) { beta[0]=momentum[0]/sqrt(massarray[i1]*massarray[i1]+momentum[0]*momentum[0]); @@ -318,7 +332,7 @@ void AliTOFcalib::CombESDId(){ Float_t sumAllweights=0.; Float_t meantzero=0.; - Float_t Emeantzero=0.; + Float_t emeantzero=0.; for (Int_t itz=0; itzGetEntries(); Int_t *number=new Int_t[fNChannels]; fArrayToT = new AliTOFArray(fNChannels); @@ -462,62 +477,64 @@ void AliTOFcalib::CalibrateESD(){ for (Int_t kk = 0; kk< nfpar; kk++){ par[kk]=fGold->GetParameter(kk); } - AliTOFChannel * CalChannel = fTOFCal->GetChannel(i); - CalChannel->SetSlewPar(par); + AliTOFChannel * calChannel = fTOFCal->GetChannel(i); + calChannel->SetSlewPar(par); } delete[] number; } //___________________________________________________________________________ -TH1F* AliTOFcalib::Profile(Int_t ich){ - const Int_t nbinToT = 650; +TH1F* AliTOFcalib::Profile(Int_t ich) +{ + //Prepare histograms for Slewing Correction + const Int_t knbinToT = 650; Int_t nbinTime = 400; Float_t minTime = -10.5; //ns Float_t maxTime = 10.5; //ns Float_t minToT = 7.5; //ns Float_t maxToT = 40.; //ns - Float_t DeltaToT = (maxToT-minToT)/nbinToT; - Double_t mTime[nbinToT+1],mToT[nbinToT+1],meanTime[nbinToT+1], meanTime2[nbinToT+1],ToT[nbinToT+1], ToT2[nbinToT+1],meanToT[nbinToT+1],meanToT2[nbinToT+1],Time[nbinToT+1],Time2[nbinToT+1],xlow[nbinToT+1],sigmaTime[nbinToT+1]; - Int_t n[nbinToT+1], nentrx[nbinToT+1]; - Double_t sigmaToT[nbinToT+1]; - for (Int_t i = 0; i < nbinToT+1 ; i++){ + Float_t deltaToT = (maxToT-minToT)/knbinToT; + Double_t mTime[knbinToT+1],mToT[knbinToT+1],meanTime[knbinToT+1], meanTime2[knbinToT+1],vToT[knbinToT+1], vToT2[knbinToT+1],meanToT[knbinToT+1],meanToT2[knbinToT+1],vTime[knbinToT+1],vTime2[knbinToT+1],xlow[knbinToT+1],sigmaTime[knbinToT+1]; + Int_t n[knbinToT+1], nentrx[knbinToT+1]; + Double_t sigmaToT[knbinToT+1]; + for (Int_t i = 0; i < knbinToT+1 ; i++){ mTime[i]=0; mToT[i]=0; n[i]=0; meanTime[i]=0; meanTime2[i]=0; - ToT[i]=0; - ToT2[i]=0; + vToT[i]=0; + vToT2[i]=0; meanToT[i]=0; meanToT2[i]=0; - Time[i]=0; - Time2[i]=0; + vTime[i]=0; + vTime2[i]=0; xlow[i]=0; sigmaTime[i]=0; sigmaToT[i]=0; n[i]=0; nentrx[i]=0; } - TH2F* hSlewing = new TH2F("hSlewing", "hSlewing", nbinToT, minToT, maxToT, nbinTime, minTime, maxTime); + TH2F* hSlewing = new TH2F("hSlewing", "hSlewing", knbinToT, minToT, maxToT, nbinTime, minTime, maxTime); TArrayF * parrToT = fArrayToT->GetArray(ich); TArrayF & refaToT = * parrToT; TArrayF * parrTime = fArrayTime->GetArray(ich); TArrayF & refaTime = * parrTime; for (Int_t j = 0; j < AliTOFcalib::fgkchannel; j++){ if (refaToT[j] == 0) continue; - Int_t nx = (Int_t)((refaToT[j]-minToT)/DeltaToT)+1; + Int_t nx = (Int_t)((refaToT[j]-minToT)/deltaToT)+1; if ((refaToT[j] != 0) && (refaTime[j] != 0)){ - Time[nx]+=refaTime[j]; - Time2[nx]+=(refaTime[j])*(refaTime[j]); - ToT[nx]+=refaToT[j]; - ToT2[nx]+=refaToT[j]*refaToT[j]; + vTime[nx]+=refaTime[j]; + vTime2[nx]+=(refaTime[j])*(refaTime[j]); + vToT[nx]+=refaToT[j]; + vToT2[nx]+=refaToT[j]*refaToT[j]; nentrx[nx]++; hSlewing->Fill(refaToT[j],refaTime[j]); } } Int_t nbinsToT=hSlewing->GetNbinsX(); - if (nbinsToT != nbinToT) { + if (nbinsToT != knbinToT) { AliError("Profile :: incompatible numbers of bins"); return 0x0; } @@ -530,10 +547,10 @@ TH1F* AliTOFcalib::Profile(Int_t ich){ if (n[usefulBins]==0 && i == nbinsToT) { break; } - meanTime[usefulBins]+=Time[i]; - meanTime2[usefulBins]+=Time2[i]; - meanToT[usefulBins]+=ToT[i]; - meanToT2[usefulBins]+=ToT2[i]; + meanTime[usefulBins]+=vTime[i]; + meanTime2[usefulBins]+=vTime2[i]; + meanToT[usefulBins]+=vToT[i]; + meanToT2[usefulBins]+=vToT2[i]; if (n[usefulBins]<20 && i!=nbinsToT) continue; mTime[usefulBins]=meanTime[usefulBins]/n[usefulBins]; mToT[usefulBins]=meanToT[usefulBins]/n[usefulBins]; @@ -555,7 +572,7 @@ TH1F* AliTOFcalib::Profile(Int_t ich){ } } for (Int_t i=0;iFill(mToT[i],mTime[i]); histo->SetBinError(binN,sigmaTime[i]); } @@ -563,12 +580,14 @@ TH1F* AliTOFcalib::Profile(Int_t ich){ } //_____________________________________________________________________________ -void AliTOFcalib::CorrectESDTime(){ +void AliTOFcalib::CorrectESDTime() +{ + //Calculate the corrected TOF time Int_t nelements = fESDsel->GetEntries(); for (Int_t i=0; i< nelements; i++) { AliTOFcalibESD *element=(AliTOFcalibESD*)fESDsel->At(i); Int_t index = element->GetTOFCalChannel(); - Float_t ToT = element->GetToT(); + Float_t tToT = element->GetToT(); //select the correspondent channel with its simulated ToT spectrum //summing up everything, index = 0 for all channels: Int_t ipid = element->GetCombID(); @@ -579,17 +598,18 @@ void AliTOFcalib::CorrectESDTime(){ else if (ipid == 1) etime = expTime[3]*1E-3; //ns else if (ipid == 2) etime = expTime[4]*1E-3; //ns Float_t par[6]; - AliTOFChannel * CalChannel = fTOFCal->GetChannel(index); + AliTOFChannel * calChannel = fTOFCal->GetChannel(index); for (Int_t j = 0; j<6; j++){ - par[j]=CalChannel->GetSlewPar(j); + par[j]=calChannel->GetSlewPar(j); } - Float_t TimeCorr=0; - TimeCorr= par[0]+par[1]*ToT+par[2]*ToT*ToT+par[3]*ToT*ToT*ToT+par[4]*ToT*ToT*ToT*ToT+par[5]*ToT*ToT*ToT*ToT*ToT; + Float_t timeCorr=0; + timeCorr= par[0]+par[1]*tToT+par[2]*tToT*tToT+par[3]*tToT*tToT*tToT+par[4]*tToT*tToT*tToT*tToT+par[5]*tToT*tToT*tToT*tToT*tToT; } } //_____________________________________________________________________________ void AliTOFcalib::CorrectESDTime(AliESD *event){ + //Calculate the corrected TOF time Int_t ntrk =0; ntrk=event->GetNumberOfTracks(); @@ -602,24 +622,26 @@ void AliTOFcalib::CorrectESDTime(AliESD *event){ if ((t->GetStatus()&AliESDtrack::kTIME)==0) { continue; } - UInt_t AssignedTOFcluster=t->GetTOFcluster();//index of the assigned TOF cluster, >0 ? - if(AssignedTOFcluster==0){ // not matched + UInt_t assignedTOFcluster=t->GetTOFcluster();//index of the assigned TOF cluster, >0 ? + if(assignedTOFcluster==0){ // not matched continue; } Int_t index = t->GetTOFCalChannel(); - AliTOFChannel * CalChannel = fTOFCal->GetChannel(index); + AliTOFChannel * calChannel = fTOFCal->GetChannel(index); Float_t par[6]; for (Int_t j = 0; j<6; j++){ - par[j]=CalChannel->GetSlewPar(j); + par[j]=calChannel->GetSlewPar(j); } - Float_t ToT = t->GetTOFsignalToT(); - Float_t TimeCorr =0; - TimeCorr=par[0]+par[1]*ToT+par[2]*ToT*ToT+par[3]*ToT*ToT*ToT+par[4]*ToT*ToT*ToT*ToT+par[5]*ToT*ToT*ToT*ToT*ToT; + Float_t tToT = t->GetTOFsignalToT(); + Float_t timeCorr =0; + timeCorr=par[0]+par[1]*tToT+par[2]*tToT*tToT+par[3]*tToT*tToT*tToT+par[4]*tToT*tToT*tToT*tToT+par[5]*tToT*tToT*tToT*tToT*tToT; } } //_____________________________________________________________________________ -void AliTOFcalib::WriteParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun){ +void AliTOFcalib::WriteParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun) +{ + //Write calibration parameters to the CDB AliCDBManager *man = AliCDBManager::Instance(); if(!man->IsDefaultStorageSet())man->SetDefaultStorage("local://$ALICE_ROOT"); Char_t *sel1 = "Par" ; @@ -633,6 +655,7 @@ void AliTOFcalib::WriteParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun){ //_____________________________________________________________________________ void AliTOFcalib::WriteParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun, AliTOFCal *cal){ + //Write calibration parameters to the CDB AliCDBManager *man = AliCDBManager::Instance(); if(!man->IsDefaultStorageSet())man->SetDefaultStorage("local://$ALICE_ROOT"); Char_t *sel1 = "Par" ; @@ -645,7 +668,9 @@ void AliTOFcalib::WriteParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun, AliTOFC } //_____________________________________________________________________________ -void AliTOFcalib::ReadParFromCDB(Char_t *sel, Int_t nrun){ +void AliTOFcalib::ReadParFromCDB(Char_t *sel, Int_t nrun) +{ + //Read calibration parameters from the CDB AliCDBManager *man = AliCDBManager::Instance(); if(!man->IsDefaultStorageSet())man->SetDefaultStorage("local://$ALICE_ROOT"); Char_t *sel1 = "Par" ; @@ -656,7 +681,9 @@ void AliTOFcalib::ReadParFromCDB(Char_t *sel, Int_t nrun){ fTOFCal = cal; } //_____________________________________________________________________________ -void AliTOFcalib::WriteSimParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun){ +void AliTOFcalib::WriteSimParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun) +{ + //Write Sim miscalibration parameters to the CDB //for the time being, only one spectrum is used @@ -679,8 +706,8 @@ void AliTOFcalib::WriteSimParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun){ } for(Int_t iTOFch=0; iTOFchNPads();iTOFch++){ - AliTOFChannel * CalChannel = fTOFSimCal->GetChannel(iTOFch); - CalChannel->SetSlewPar(par); + AliTOFChannel * calChannel = fTOFSimCal->GetChannel(iTOFch); + calChannel->SetSlewPar(par); } // Store them in the CDB @@ -702,8 +729,8 @@ void AliTOFcalib::WriteSimParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun){ //_____________________________________________________________________________ void AliTOFcalib::WriteSimParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun, AliTOFCal *cal, TH1F * histo){ + //Write Sim miscalibration parameters to the CDB - // Retrieve ToT Spectrum fTOFSimToT=histo; fTOFSimCal=cal; AliCDBManager *man = AliCDBManager::Instance(); @@ -721,7 +748,9 @@ void AliTOFcalib::WriteSimParOnCDB(Char_t *sel, Int_t minrun, Int_t maxrun, AliT man->Put(fTOFSimToT,id2,md); } //_____________________________________________________________________________ -void AliTOFcalib::ReadSimParFromCDB(Char_t *sel, Int_t nrun){ +void AliTOFcalib::ReadSimParFromCDB(Char_t *sel, Int_t nrun) +{ + //Read miscalibration parameters from the CDB AliCDBManager *man = AliCDBManager::Instance(); if(!man->IsDefaultStorageSet())man->SetDefaultStorage("local://$ALICE_ROOT"); AliCDBMetaData *md = new AliCDBMetaData(); @@ -740,7 +769,9 @@ void AliTOFcalib::ReadSimParFromCDB(Char_t *sel, Int_t nrun){ } //_____________________________________________________________________________ -Int_t AliTOFcalib::GetIndex(Int_t *detId){ +Int_t AliTOFcalib::GetIndex(Int_t *detId) +{ + //Retrieve calibration channel index Int_t isector = detId[0]; if (isector >= fNSector) AliError(Form("Wrong sector number in TOF (%d) !",isector)); diff --git a/TOF/AliTOFcalib.h b/TOF/AliTOFcalib.h index 9e943115534..7432eedefa6 100644 --- a/TOF/AliTOFcalib.h +++ b/TOF/AliTOFcalib.h @@ -61,17 +61,10 @@ public: } Int_t GetSize() const {return fSize;} void AddArray(Int_t pos, TArrayF * parr) { - if (pos>-1 && pos < fSize) - fArray[pos] = parr; - //else - //AliError("Index out of range"); - } - TArrayF * GetArray(Int_t pos) { - TArrayF * parr = 0x0; - if (pos>-1 && pos < fSize) - parr = fArray[pos]; - //else - //AliError("Index out of range"); + if (pos>-1 && pos < fSize)fArray[pos] = parr;} + TArrayF * GetArray(Int_t pos) const { + TArrayF * parr = 0x0; + if (pos>-1 && pos < fSize)parr = fArray[pos]; return parr; } virtual ~AliTOFArray() { diff --git a/TOF/AliTOFcalibESD.cxx b/TOF/AliTOFcalibESD.cxx index 61b57deb025..a6b4c9152d8 100644 --- a/TOF/AliTOFcalibESD.cxx +++ b/TOF/AliTOFcalibESD.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2006/03/28 14:57:13 arcelli +updates to handle new V5 geometry & some re-arrangements + Revision 1.2 2006/02/13 17:22:26 arcelli just Fixing Log info @@ -37,28 +40,28 @@ ClassImp(AliTOFcalibESD) //________________________________________________________________ AliTOFcalibESD::AliTOFcalibESD(): - fTOFCalChannel(-1), + fTOFCalCh(-1), fToT(0), fIntLen(0), fTOFtime(0), - fP(0), + fMo(0), fTOFsignalND(0) { - for (Int_t i=0;iGetP(); +void AliTOFcalibESD::CopyFromAliESD(const AliESDtrack* track){ + //copy ESD track info + fMo = track->GetP(); fTOFtime = track->GetTOFsignal(); fToT = track->GetTOFsignalToT(); - fTOFCalChannel = track->GetTOFCalChannel(); + fTOFCalCh = track->GetTOFCalChannel(); fIntLen = track->GetIntegratedLength(); Double_t exptime[10]; track->GetIntegratedTimes(exptime); for (Int_t i=0;iGetExternalCovariance(c); @@ -99,11 +102,12 @@ void AliTOFcalibESD::GetExternalCovariance(Double_t cov[15]) const { //______________________________________________________________________ void AliTOFcalibESD::GetIntegratedTimes(Double_t exp[AliPID::kSPECIES]) const { - for (Int_t i=0; iGetExternalCovariance(c1); Double_t c2[15]; diff --git a/TOF/AliTOFcalibESD.h b/TOF/AliTOFcalibESD.h index b0d758e88b3..624a7871d87 100644 --- a/TOF/AliTOFcalibESD.h +++ b/TOF/AliTOFcalibESD.h @@ -26,12 +26,12 @@ public: void GetExternalCovariance(Double_t cov[15]) const; void GetIntegratedTimes(Double_t exp[AliPID::kSPECIES]) const; Int_t GetCombID()const{return fCombID;} - Float_t GetP()const{return fP;} - Int_t GetTOFCalChannel() const {return fTOFCalChannel;} + Float_t GetP()const{return fMo;} + Int_t GetTOFCalChannel() const {return fTOFCalCh;} void SetToT(Float_t ToT) {fToT=ToT;} void SetTOFtime(Float_t TOFtime) {fTOFtime=TOFtime;} void SetTOFsignalND(Float_t TOFtimeND) {fTOFsignalND=TOFtimeND;} - void SetP(Double_t p) {fP=p;} + void SetP(Double_t p) {fMo=p;} void SetIntegratedTime(const Double_t *tracktime); void SetCombID(Int_t ID){fCombID = ID;} // 0->pi, 1->K, 2->p void SetTOFCalChannel(Int_t index){fTOFCalChannel=index;} @@ -39,15 +39,15 @@ public: Bool_t IsSortable() const {return kTRUE;} Int_t Compare(const TObject *uncobj) const; private: - Int_t fCombID; - Int_t fTOFCalChannel; - Float_t fToT; - Float_t fIntLen; - Float_t fTOFtime; - Double_t fP; - Float_t fTOFsignalND; - Double_t fTrackTime[AliPID::kSPECIES]; // TOFs estimated by the tracking - Double_t fExtCov[15]; + Int_t fCombID; //PID for calibration, this track + Int_t fTOFCalCh; //TOF cal Channel + Float_t fToT; //ToT signal + Float_t fIntLen; //track int. length + Float_t fTOFtime;//Time signal + Double_t fMo;//momentum + Float_t fTOFsignalND; //non-decalibrated time signal + Double_t fTrTime[AliPID::kSPECIES]; // TOFs estimated by the tracking + Double_t fExtCov[15];// external covariance matrix of the track ClassDef(AliTOFcalibESD,1); }; -- 2.43.0