From: cvetan Date: Thu, 31 May 2007 10:50:03 +0000 (+0000) Subject: The AliDCSSensor classes were recently upgraded to include start and end time entries... X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=49dfd67aa88e7184d97e80178ee27cec4a3a5b59;ds=sidebyside The AliDCSSensor classes were recently upgraded to include start and end time entries for each sensor (to avoid accidental extrapolations which would produce completely misleading values) (H��vard). --- diff --git a/HMPID/AliHMPIDDigit.h b/HMPID/AliHMPIDDigit.h index 2acee30cb35..5d1397c770d 100644 --- a/HMPID/AliHMPIDDigit.h +++ b/HMPID/AliHMPIDDigit.h @@ -9,6 +9,8 @@ //. #include //base class +#include +#include #include "TMath.h" //Mathieson() #include //Raw() @@ -55,7 +57,7 @@ public: Int_t Pc ( )const{return A2P(fPad);} //PC position number Float_t Q ( )const{return fQ;} //charge, [QDC] inline void Raw (UInt_t &w32,Int_t &ddl,Int_t &r,Int_t &d,Int_t &a)const; //digit->(w32,ddl,r,d,a) - inline void Raw (UInt_t w32,Int_t ddl ); //(w32,ddl)->digit + inline Bool_t Raw (UInt_t w32,Int_t ddl,AliRawReader *pRR); //(w32,ddl)->digit inline void Raw (Int_t ddl,Int_t r,Int_t d,Int_t a); //raw->abs pad number inline Bool_t Set (Int_t c,Int_t p,Int_t x,Int_t y,Int_t tid=0); //manual creation void SetQ (Float_t q ) {fQ=q;} //manual creation @@ -72,6 +74,9 @@ public: static Float_t SizePadX ( ) {return 0.8;} //pad size x, [cm] static Float_t SizePadY ( ) {return 0.84;} //pad size y, [cm] inline static void Lors2Pad(Float_t x,Float_t y,Int_t &pc,Int_t &px,Int_t &py); //(x,y)->(pc,px,py) + enum EHMPIDRawError { + kInvalidRawDataWord = 1 + }; protected: //AliDigit has fTracks[3] static Int_t fgSigmas; //n. sigma to cut on charge static const Float_t fgkMinPcX[6]; //limits PC @@ -155,7 +160,7 @@ void AliHMPIDDigit::Raw(UInt_t &w32,Int_t &ddl,Int_t &r,Int_t &d,Int_t &a)const AliBitPacking::PackWord( r ,w32,22,26); // Row number bits (22..26) counts (1..24) } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -void AliHMPIDDigit::Raw(UInt_t w32,Int_t ddl) +Bool_t AliHMPIDDigit::Raw(UInt_t w32,Int_t ddl, AliRawReader *pRR) { // Converts a given raw data word to a digit // Arguments: w32 - 32 bits raw data word @@ -165,8 +170,14 @@ void AliHMPIDDigit::Raw(UInt_t w32,Int_t ddl) Int_t d = AliBitPacking::UnpackWord(w32,18,21); assert(1<=d&&d<=10); // 3322 2222 2222 1111 1111 1000 0000 0000 DILOGIC number (1..10) Int_t a = AliBitPacking::UnpackWord(w32,12,17); assert(0<=a&&a<=47); // 1098 7654 3210 9876 5432 1098 7654 3210 DILOGIC address (0..47) Int_t q = AliBitPacking::UnpackWord(w32, 0,11); assert(0<=q&&q<=4095); // 0000 0rrr rrdd ddaa aaaa qqqq qqqq qqqq Qdc (0..4095) + if (r<1 || r>24 || d<1 || d>10 || a<0 || a>47 || q<0 || q>4095) { + AliWarning(Form("Invalid raw data word %x",w32)); + pRR->AddMajorErrorLog(kInvalidRawDataWord,Form("w=%x",w32)); + return kFALSE; + } Raw(ddl,r,d,a); fQ=q; + return kTRUE; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ void AliHMPIDDigit::Raw(Int_t ddl,Int_t r,Int_t d,Int_t a) diff --git a/HMPID/AliHMPIDReconstructor.cxx b/HMPID/AliHMPIDReconstructor.cxx index 2d717d82d83..5d99f16a569 100644 --- a/HMPID/AliHMPIDReconstructor.cxx +++ b/HMPID/AliHMPIDReconstructor.cxx @@ -191,7 +191,7 @@ void AliHMPIDReconstructor::Reconstruct(AliRunLoader *pAL,AliRawReader* pRR)cons UInt_t w32=0; while(pRR->ReadNextInt(w32)){//raw records loop (in selected DDL files) UInt_t ddl=pRR->GetDDLID(); //returns 0,1,2 ... 13 - dig.Raw(w32,ddl); + dig.Raw(w32,ddl,pRR); AliDebug(1,Form("Ch=%i DDL=%i raw=0x%x digit=(%3i,%3i,%3i,%3i) Q=%5.2f",iCh,ddl,w32,dig.Ch(),dig.Pc(),dig.PadPcX(),dig.PadPcY(),dig.Q())); if(!IsDigSurvive(&dig)) continue; //sigma cut test new((*((TClonesArray*)digLst.At(iCh)))[iDigCnt[iCh]++]) AliHMPIDDigit(dig); //add this digit to the tmp list @@ -222,9 +222,9 @@ void AliHMPIDReconstructor::ConvertDigits(AliRawReader *pRR,TTree *pDigTree)cons pRR->Select("HMPID",2*iCh,2*iCh+1);//select only DDL files for the current chamber Int_t iDigCnt=0; UInt_t w32=0; - while(pRR->ReadNextInt(w32)){//raw records loop (in selected DDL files) + while(pRR->ReadNextInt(w32)){//raw records loop (in selected DDL files) UInt_t ddl=pRR->GetDDLID(); //returns 0,1,2 ... 13 - dig.Raw(w32,ddl); + if (!dig.Raw(w32,ddl,pRR)) continue; AliDebug(1,Form("Ch=%i DDL=%i raw=0x%x digit=(%3i,%3i,%3i,%3i) Q=%5.2f",iCh,ddl,w32,dig.Ch(),dig.Pc(),dig.PadPcX(),dig.PadPcY(),dig.Q())); if(!IsDigSurvive(&dig)) continue; //sigma cut test new((*((TClonesArray*)fDig->At(iCh)))[iDigCnt++]) AliHMPIDDigit(dig); //add this digit to the tmp list diff --git a/HMPID/AliHMPIDv1.cxx b/HMPID/AliHMPIDv1.cxx index b3c36b90c47..b22f83529ea 100644 --- a/HMPID/AliHMPIDv1.cxx +++ b/HMPID/AliHMPIDv1.cxx @@ -461,7 +461,7 @@ Bool_t AliHMPIDv1::Raw2SDigits(AliRawReader *pRR) UInt_t w32=0; while(pRR->ReadNextInt(w32)){//raw records loop (in selected DDL files) UInt_t ddl=pRR->GetDDLID(); //returns 0,1,2 ... 13 - sdi.Raw(ddl,w32); + if (!sdi.Raw(ddl,w32,pRR)) continue; new((*pSdiLst)[iSdiCnt++]) AliHMPIDDigit(sdi); //add this digit to the tmp list }//raw records loop GetLoader()->TreeS()->Fill(); GetLoader()->WriteSDigits("OVERWRITE");//write out sdigits diff --git a/HMPID/AliHMPIDv2.cxx b/HMPID/AliHMPIDv2.cxx index e0db5771edb..72a999aaf2c 100644 --- a/HMPID/AliHMPIDv2.cxx +++ b/HMPID/AliHMPIDv2.cxx @@ -570,7 +570,7 @@ Bool_t AliHMPIDv2::Raw2SDigits(AliRawReader *pRR) UInt_t w32=0; while(pRR->ReadNextInt(w32)){//raw records loop (in selected DDL files) UInt_t ddl=pRR->GetDDLID(); //returns 0,1,2 ... 13 - sdi.Raw(ddl,w32); + if (!sdi.Raw(ddl,w32,pRR)) continue; new((*pSdiLst)[iSdiCnt++]) AliHMPIDDigit(sdi); //add this digit to the tmp list }//raw records loop GetLoader()->TreeS()->Fill(); GetLoader()->WriteSDigits("OVERWRITE");//write out sdigits diff --git a/STEER/AliReconstruction.cxx b/STEER/AliReconstruction.cxx index 25d1e9cf167..3327a2c48f3 100644 --- a/STEER/AliReconstruction.cxx +++ b/STEER/AliReconstruction.cxx @@ -1153,7 +1153,7 @@ Bool_t AliReconstruction::RunTracking(AliESD*& esd) // run tracking if (fTracker[iDet]->PropagateBack(esd) != 0) { AliError(Form("%s backward propagation failed", fgkDetectorName[iDet])); - return kFALSE; + // return kFALSE; } if (fCheckPointLevel > 1) { WriteESD(esd, Form("%s.back", fgkDetectorName[iDet])); @@ -1185,7 +1185,7 @@ Bool_t AliReconstruction::RunTracking(AliESD*& esd) // run tracking if (fTracker[iDet]->RefitInward(esd) != 0) { AliError(Form("%s inward refit failed", fgkDetectorName[iDet])); - return kFALSE; + // return kFALSE; } if (fCheckPointLevel > 1) { WriteESD(esd, Form("%s.refit", fgkDetectorName[iDet])); diff --git a/TPC/AliTPCSensorPressure.cxx b/TPC/AliTPCSensorPressure.cxx index ae2f6bbbc43..f9739cc0508 100644 --- a/TPC/AliTPCSensorPressure.cxx +++ b/TPC/AliTPCSensorPressure.cxx @@ -72,15 +72,9 @@ AliTPCSensorPressure& AliTPCSensorPressure::operator=(const AliTPCSensorPressure return *this; } -TClonesArray * AliTPCSensorPressure::ReadList(const char *fname) { - Int_t firstSensor, lastSensor; - return ReadListInd(fname,firstSensor,lastSensor); -} -TClonesArray * AliTPCSensorPressure::ReadListInd(const char *fname, - Int_t& firstSensor, - Int_t& lastSensor) { +TClonesArray * AliTPCSensorPressure::ReadList(const char *fname) { // // read values from ascii file // @@ -109,8 +103,8 @@ TClonesArray * AliTPCSensorPressure::ReadListInd(const char *fname, //tree->SetBranchAddress("Y",&y); //tree->SetBranchAddress("Z",&z); - firstSensor = (Int_t)tree->GetMinimum("ECha"); - lastSensor = (Int_t)tree->GetMaximum("ECha"); + // firstSensor = (Int_t)tree->GetMinimum("ECha"); + // lastSensor = (Int_t)tree->GetMaximum("ECha"); TClonesArray * array = new TClonesArray("AliTPCSensorPressure",nentries); diff --git a/TPC/AliTPCSensorPressure.h b/TPC/AliTPCSensorPressure.h index a6900e6bd62..919f185df12 100644 --- a/TPC/AliTPCSensorPressure.h +++ b/TPC/AliTPCSensorPressure.h @@ -48,8 +48,6 @@ public: static TClonesArray * ReadList(const char *fname); - static TClonesArray * ReadListInd(const char *fname, - Int_t& firstSensor, Int_t& lastSensor); protected: Int_t fType; // Position of sensors on fieldcage diff --git a/TPC/AliTPCSensorPressureArray.cxx b/TPC/AliTPCSensorPressureArray.cxx index d5c7e73bbbe..85e0983c908 100644 --- a/TPC/AliTPCSensorPressureArray.cxx +++ b/TPC/AliTPCSensorPressureArray.cxx @@ -61,7 +61,7 @@ AliTPCSensorPressureArray::AliTPCSensorPressureArray(UInt_t startTime, UInt_t en TString filename(expPath); filename.Append('/'); filename.Append(kFname); - fSensors = AliTPCSensorPressure::ReadListInd(filename.Data(),fFirstSensor,fLastSensor); + fSensors = AliTPCSensorPressure::ReadList(filename.Data()); fStartTime = TTimeStamp(startTime); fEndTime = TTimeStamp(endTime); delete expPath; @@ -75,7 +75,7 @@ AliTPCSensorPressureArray::AliTPCSensorPressureArray(const char *fname) : // // AliTPCSensorPressureArray constructor // - fSensors = AliTPCSensorPressure::ReadListInd(fname,fFirstSensor,fLastSensor); + fSensors = AliTPCSensorPressure::ReadList(fname); fSensors->BypassStreamer(kFALSE); } @@ -126,7 +126,7 @@ void AliTPCSensorPressureArray::ReadSensors(const char *fname) // // Read list of temperature sensors from text file // - fSensors = AliTPCSensorPressure::ReadListInd(fname,fFirstSensor,fLastSensor); + fSensors = AliTPCSensorPressure::ReadList(fname); } //_____________________________________________________________________________ void AliTPCSensorPressureArray::SetGraph(TMap *map) diff --git a/TPC/AliTPCSensorTemp.cxx b/TPC/AliTPCSensorTemp.cxx index a2074ed7ce5..66ef6413877 100644 --- a/TPC/AliTPCSensorTemp.cxx +++ b/TPC/AliTPCSensorTemp.cxx @@ -33,93 +33,95 @@ */ // -#include + #include "AliTPCSensorTemp.h" ClassImp(AliTPCSensorTemp) const Float_t kASideX[18][5]={ - { 99.6, 117.7, 161.2, 187.3, 213.5}, - { 87.6, 103.7, 142.6, 165.6, 188.6}, - { 65.0, 77.3, 106.8, 123.8, 140.9}, - { 34.6, 41.5, 58.1, 67.2, 76.3}, - { 0, 0.7, 2.4, 2.4, 2.4}, - {-34.6, -40.2, -53.6, -62.7, -71.7}, - {-65.0, -76.2, -103.1, -120.2, -137.2}, - {-87.6, -103.1, -140.2, -163.2, -186.2}, - {-99.6, -117.5, -160.4, -186.5, -212.6}, - {-99.6, -117.7, -161.2, -187.3, -213.5}, - {-87.6, -103.7, -142.6, -165.6, -188.6}, - {-65.0, -77.3, -106.8, -123.8, -140.9}, - {-34.6, -41.5, -58.1, -67.2, -76.3}, - { 0, -0.7, -2.4, -2.4, -2.4}, - { 34.6, 40.2, 53.6, 62.7, 71.7}, - { 65.0, 76.2, 103.1, 120.2, 137.2}, - { 87.6, 103.1, 140.2, 163.2, 186.2}, - { 99.6, 117.5, 160.4, 186.5, 212.6}}; + { 99.56, 117.59, 160.82, 186.92, 213.11}, + { 87.56, 103.4, 141.42, 164.37, 187.41}, + { 64.99, 76.75, 104.97, 122.00, 139.1}, + { 34.58, 40.84, 55.85, 64.92, 74.01}, + { 0, 0, 0, 0, 0}, + {-34.58, -40.84, -55.85, -64.92, -74.01}, + {-64.99, -76.75, -104.97, -122.0, -139.1}, + {-87.56, -103.4, -141.42, -164.37, -187.41}, + {-99.56, -117.59, -160.82, -186.92, -213.11}, + {-99.56, -117.59, -160.82, -186.92, -213.11}, + {-87.56, -103.4, -141.42, -164.37, -187.41}, + {-64.99, -76.75, -104.97, -122, -139.1}, + {-34.58, -40.84, -55.85, -64.92, -74.01}, + { 0, 0, 0, 0, 0}, + { 34.58, 40.84, 55.85, 64.92, 74.01}, + { 64.99, 76.75, 104.97, 122, 139.1}, + { 87.56, 103.4, 141.42, 164.37, 187.41}, + { 99.56, 117.59, 160.82, 186.92, 213.11}}; const Float_t kASideY[18][5]={ - { 17.6, 20.1, 26.0, 30.6, 35.2}, - { 50.6, 59.1, 79.5, 92.8, 106.1}, - { 77.4, 91.0, 123.5, 143.9, 164.2}, - { 95.0, 112.0, 152.6, 177.5, 202.5}, + { 17.56, 20.73, 28.36, 32.96, 37.58}, + { 50.55, 59.7, 81.65, 94.9, 108.2}, + { 77.45, 91.47, 125.1, 145.4, 165.77}, + { 95.0, 112.3, 153.45, 178.35, 203.35}, {101.1, 119.4, 163.3, 189.8, 216.4}, - { 95.0, 112.4, 154.2, 179.2, 204.1}, - { 77.4, 91.9, 126.6, 146.9, 167.3}, - { 50.6, 60.3, 83.7, 97.0, 110.3}, - { 17.6, 21.4, 30.7, 35.3, 39.9}, - {-17.6, -20.1, -26.0, -30.6, -35.2}, - {-50.6, -59.1, -79.5, -92.8, -106.1}, - {-77.4, -91.0, -123.5, -143.9, -164.2}, - {-95.0, -112.0, -152.6, -177.5, -202.5}, - {-101.1, -119.4, -163.3, -189.8, -216.4}, - {-95.0, -112.4, -154.2, -179.2, -204.1}, - {-77.4, -91.9, -126.6, -146.9, -167.3}, - {-50.6, -60.3, -83.7, -97.0, -110.3}, - {-17.6, -21.4, -30.7, -35.3, -39.9}}; + { 95.0, 112.2, 153.45, 178.35, 203.35}, + { 77.45, 91.47, 125.1, 145.4, 165.77}, + { 50.55, 59.7, 81.65, 94.9, 108.2}, + { 17.56, 20.73, 28.36, 32.96, 37.58}, + {-17.56, -20.73, -28.36, -32.96, -37.58}, + {-50.55, -59.7, -81.65, -94.9, -108.2}, + {-77.45, -91.47, -125.1, -145.4, -165.77}, + {-95.0, -112.2, -153.45, -178.35, -203.35}, + {-101.1, -119.4, -163.3, -189.8, -216.4}, + {-95.0, -112.2, -153.45, -178.35, -203.35}, + {-77.45, -91.47, -125.1, -145.4, -165.77}, + {-50.55, -59.7, -81.65, -94.9, -108.2}, + {-17.56, -20.73, -28.36, -32.96, -37.58}}; const Float_t kCSideX[18][5]={ - { 99.6, 117.5, 160.4, 186.5, 212.6}, - { 87.6, 103.1, 140.2, 163.2, 186.2}, - { 65.0, 76.2, 103.1, 120.2, 137.2}, - { 34.6, 40.2, 53.6, 62.7, 71.7}, - { 0, -0.7, -2.4, -2.4, -2.4}, - {-34.6, -41.5, -58.1, -67.2, -76.3}, - {-65.0, -77.3, -106.8, -123.8, -140.9}, - {-87.6, -103.7, -142.6, -165.6, -188.6}, - {-99.6, -117.7, -161.2, -187.3, -213.5}, - {-99.6, -117.5, -160.4, -186.5, -212.6}, - {-87.6, -103.1, -140.2, -163.2, -186.2}, - {-65.0, -76.2, -103.1, -120.2, -137.2}, - {-34.6, -40.2, -53.6, -62.7, -71.7}, - { 0, 0.7, 2.4, 2.4, 2.4}, - { 34.6, 41.5, 58.1, 67.2, 76.3}, - { 65.0, 77.3, 106.8, 123.8, 140.9}, - { 87.6, 103.7, 142.6, 165.6, 188.6}, - { 99.6, 117.7, 161.2, 187.3, 213.5}}; + { 99.56, 117.59, 160.82, 186.92, 213.11}, + { 87.56, 103.4, 141.42, 164.37, 187.41}, + { 64.99, 76.75, 104.97, 122, 139.1}, + { 34.58, 40.84, 55.85, 64.92, 74.01}, + { 0, 0, 0, 0, 0}, + {-34.58, -40.84, -55.85, -64.92, -74.01}, + {-64.99, -76.75, -104.97, -122, -139.1}, + {-87.56, -103.4, -141.42, -164.37, -187.41}, + {-99.56, -117.59, -160.82, -186.92, -213.11}, + {-99.56, -117.59, -160.82, -186.92, -213.11}, + {-87.56, -103.4, -141.42, -164.37, -187.41}, + {-64.99, -76.75, -104.97, -122, -139.1}, + {-34.58, -40.84, -55.85, -64.92, -74.01}, + { 0, 0, 0, 0, 0}, + { 34.58, 40.84, 55.85, 64.92, 74.01}, + { 64.99, 76.75, 104.97, 122, 139.1}, + { 87.56, 103.4, 141.42, 164.37, 187.41}, + { 99.56, 117.59, 160.82, 186.92, 213.11}}; const Float_t kCSideY[18][5]={ - { 17.6, 21.4, 30.7, 35.3, 39.9}, - { 50.6, 60.3, 83.7, 97.0, 110.3}, - { 77.4, 91.9, 126.6, 146.9, 167.3}, - { 95.0, 112.4, 154.2, 179.2, 204.1}, + { 17.56, 20.73, 28.36, 32.96, 37.58}, + { 50.55, 59.7, 81.65, 94.9, 108.2}, + { 77.45, 91.47, 125.1, 145.4, 165.77}, + { 95.0, 112.2, 153.54, 178.35, 203.35}, {101.1, 119.4, 163.3, 189.8, 216.4}, - { 95.0, 112.0, 152.6, 177.5, 202.5}, - { 77.4, 91.0, 123.5, 143.9, 164.2}, - { 50.6, 59.1, 79.5, 92.8, 106.1}, - { 17.6, 20.1, 26.0, 30.6, 35.2}, - {-17.6, -21.4, -30.7, -35.3, -39.9}, - {-50.6, -60.3, -83.7, -97.0, -110.3}, - {-77.4, -91.9, -126.6, -146.9, -167.3}, - {-95.0, -112.4, -154.2, -179.2, -204.1}, + { 95.0, 112.2, 153.45, 178.35, 203.35}, + { 77.45, 91.47, 125.1, 145.4, 165.77}, + { 50.55, 59.7, 81.65, 94.9, 108.2}, + { 17.56, 20.73, 28.36, 32.96, 37.58}, + {-17.56, -20.73, -28.36, -32.96, -37.58}, + {-50.55, -59.7, -81.56, -94.9, -108.2}, + {-77.45, -91.47, -125.1, -145.4, -165.77}, + {-95.0, -112.2, -153.45, -178.35, -203.35}, {-101.1, -119.4, -163.3, -189.8, -216.4}, - {-95.0, -112.0, -152.6, -177.5, -202.5}, - {-77.4, -91.0, -123.5, -143.9, -164.2}, - {-50.6, -59.1, -79.5, -92.8, -106.1}, - {-17.6, -20.1, -26.0, -30.6, -35.2}}; + {-95.0, -112.2, -153.45, -178.35, -203.35}, + {-77.45, -91.47, -125.1, -145.4, -165.77}, + {-50.55, -59.7, -81.65, -94.9, -108.2}, + {-17.56, -20.73, -28.36, -32.96, -37.58}}; const Float_t kIFCrad[5] = {67.2, 64.4, 60.7, 64.4, 67.2}; +const Float_t kTSrad[4] = {67.2, 61.5, 67.2, 61.5}; +const Float_t kTSz[4] = {240.0, 90.0, 240.0, 90.0}; AliTPCSensorTemp::AliTPCSensorTemp(): AliDCSSensor(), @@ -155,15 +157,9 @@ AliTPCSensorTemp& AliTPCSensorTemp::operator=(const AliTPCSensorTemp& source){ return *this; } -TClonesArray * AliTPCSensorTemp::ReadList(const char *fname) { - Int_t firstSensor, lastSensor; - return ReadListInd(fname,firstSensor,lastSensor); -} -TClonesArray * AliTPCSensorTemp::ReadListInd(const char *fname, - Int_t& firstSensor, - Int_t& lastSensor) { +TClonesArray * AliTPCSensorTemp::ReadList(const char *fname) { // // read values from ascii file // @@ -192,8 +188,8 @@ TClonesArray * AliTPCSensorTemp::ReadListInd(const char *fname, //tree->SetBranchAddress("Y",&y); //tree->SetBranchAddress("Z",&z); - firstSensor = (Int_t)tree->GetMinimum("ECha"); - lastSensor = (Int_t)tree->GetMaximum("ECha"); + // firstSensor = (Int_t)tree->GetMinimum("ECha"); + // lastSensor = (Int_t)tree->GetMaximum("ECha"); TClonesArray * array = new TClonesArray("AliTPCSensorTemp",nentries); @@ -226,10 +222,20 @@ TClonesArray * AliTPCSensorTemp::ReadListInd(const char *fname, if ((temp->GetType()==1) || (temp->GetType()==4)){ temp->SetX(TMath::Cos((2*sector+1)*0.1745)*278); } - if ((temp->GetType()==2) || (temp->GetType()==3)){ - temp->SetX(TMath::Cos((2*sector+1)*0.1745)*kIFCrad[num]); + if (temp->GetType()==2) { + temp->SetX(TMath::Cos((2*sector+1)*0.1745)*60.7); + } + if (temp->GetType()==3) { + if (num==0) { + temp->SetX(TMath::Cos((2*sector+1)*0.1745)*87.5); + } else { + temp->SetX(TMath::Cos((2*sector+1)*0.1745)*241.8); + } + } + if (temp->GetType()==5){ + temp->SetX(TMath::Cos(sector*0.524+(num+1)*0.131)*kTSrad[num]); } - if ((temp->GetType()==5) || (temp->GetType()==6)){ + if (temp->GetType()==6){ temp->SetX(0); } @@ -245,37 +251,76 @@ TClonesArray * AliTPCSensorTemp::ReadListInd(const char *fname, if ((temp->GetType()==1) || (temp->GetType()==4)){ temp->SetY(TMath::Sin((2*sector+1)*0.1745)*278); } - if ((temp->GetType()==2) || (temp->GetType()==3)){ - temp->SetY(TMath::Sin((2*sector+1)*0.1745)*kIFCrad[num]); + if (temp->GetType()==2){ + temp->SetY(TMath::Sin((2*sector+1)*0.1745)*60.7); + } + if (temp->GetType()==3) { + if (num==0) { + temp->SetY(TMath::Sin((2*sector+1)*0.1745)*87.5); + } else { + temp->SetY(TMath::Sin((2*sector+1)*0.1745)*241.8); + } + } + + if (temp->GetType()==5){ + temp->SetY(TMath::Sin(sector*0.524+(num+1)*0.131)*kTSrad[num]); } - if ((temp->GetType()==5) || (temp->GetType()==6)){ + + if (temp->GetType()==6){ temp->SetY(0); } + //temp->SetZ(z); - if ((temp->GetType()==0 || temp->GetType()==3 || temp->GetType()==4 || temp->GetType()==5 || temp->GetType()==6) && temp->GetSide()==0) { - temp->SetZ(250); + if ((temp->GetType()==0 || + temp->GetType()==4 || temp->GetType()==6) && + temp->GetSide()==0) { + temp->SetZ(250); + } + if ((temp->GetType()==0 || temp->GetType()==4 || + temp->GetType()==6) && temp->GetSide()==1){ + temp->SetZ(-250); + } + if(temp->GetType()==2 && temp->GetSide()==0) { + temp->SetZ(52.4); + } + if(temp->GetType()==2 && temp->GetSide()==1) { + temp->SetZ(-52.4); + } + + if(temp->GetType()==3 && temp->GetSide()==0) { + temp->SetZ(247); } - if ((temp->GetType()==0 || temp->GetType()==3 || temp->GetType()==4 || temp->GetType()==5 || temp->GetType()==6) && temp->GetSide()==1){ - temp->SetZ(-250); + if(temp->GetType()==3 && temp->GetSide()==1) { + temp->SetZ(-247); } - if((temp->GetType()==1 || temp->GetType()==2) && (num==0)) { + + if((temp->GetType()==1 ) && (num==0)) { temp->SetZ(240); } - if((temp->GetType()==1 || temp->GetType()==2) && (num==1)) { + if((temp->GetType()==1 ) && (num==1)) { temp->SetZ(168.4); } - if((temp->GetType()==1 || temp->GetType()==2) && (num==2)) { + if((temp->GetType()==1 ) && (num==2)) { temp->SetZ(51); } - if((temp->GetType()==1 || temp->GetType()==2) && (num==3)) { + if((temp->GetType()==1 ) && (num==3)) { temp->SetZ(-51); } - if((temp->GetType()==1 || temp->GetType()==2) && (num==4)) { + if((temp->GetType()==1 ) && (num==4)) { temp->SetZ(-168.4); } - if((temp->GetType()==1 || temp->GetType()==2) && (num==5)) { + if((temp->GetType()==1 ) && (num==5)) { temp->SetZ(-240); } + + if(temp->GetType()==5 && temp->GetSide()==0) { + temp->SetZ(kTSz[num]); + } + if(temp->GetType()==5 && temp->GetSide()==1) { + temp->SetZ(-kTSz[num]); + } + + } delete tree; return array; diff --git a/TPC/AliTPCSensorTemp.h b/TPC/AliTPCSensorTemp.h index e5e973e331e..49913077432 100644 --- a/TPC/AliTPCSensorTemp.h +++ b/TPC/AliTPCSensorTemp.h @@ -48,8 +48,6 @@ public: static TClonesArray * ReadList(const char *fname); - static TClonesArray * ReadListInd(const char *fname, - Int_t& firstSensor, Int_t& lastSensor); protected: Int_t fType; // Position of sensors on fieldcage diff --git a/TPC/AliTPCSensorTempArray.cxx b/TPC/AliTPCSensorTempArray.cxx index 52e4e37066a..9fd451faa9a 100644 --- a/TPC/AliTPCSensorTempArray.cxx +++ b/TPC/AliTPCSensorTempArray.cxx @@ -61,7 +61,7 @@ AliTPCSensorTempArray::AliTPCSensorTempArray(UInt_t startTime, UInt_t endTime, TString filename(expPath); filename.Append('/'); filename.Append(kFname); - fSensors = AliTPCSensorTemp::ReadListInd(filename.Data(),fFirstSensor,fLastSensor); + fSensors = AliTPCSensorTemp::ReadList(filename.Data()); fStartTime = TTimeStamp(startTime); fEndTime = TTimeStamp(endTime); delete expPath; @@ -75,7 +75,7 @@ AliTPCSensorTempArray::AliTPCSensorTempArray(const char *fname) : // // AliTPCSensorTempArray constructor // - fSensors = AliTPCSensorTemp::ReadListInd(fname,fFirstSensor,fLastSensor); + fSensors = AliTPCSensorTemp::ReadList(fname); fSensors->BypassStreamer(kFALSE); } @@ -126,7 +126,7 @@ void AliTPCSensorTempArray::ReadSensors(const char *fname) // // Read list of temperature sensors from text file // - fSensors = AliTPCSensorTemp::ReadListInd(fname,fFirstSensor,fLastSensor); + fSensors = AliTPCSensorTemp::ReadList(fname); } //_____________________________________________________________________________ void AliTPCSensorTempArray::SetGraph(TMap *map) @@ -174,10 +174,12 @@ AliTPCSensorTemp* AliTPCSensorTempArray::GetSensor(Int_t type, Int_t side, Int_t return 0; } //_____________________________________________________________________________ + AliTPCSensorTemp* AliTPCSensorTempArray::GetSensor(Int_t IdDCS){ return dynamic_cast(AliDCSSensorArray::GetSensor(IdDCS)); } //_____________________________________________________________________________ + AliTPCSensorTemp* AliTPCSensorTempArray::GetSensor(Double_t x, Double_t y, Double_t z){ return dynamic_cast(AliDCSSensorArray::GetSensor(x,y,z)); }