From abb5f7860cb54cade022cdf0207df19fce9402a5 Mon Sep 17 00:00:00 2001 From: kir Date: Wed, 7 Mar 2007 19:55:35 +0000 Subject: [PATCH] Calib data usage reactivated for Nmean, thres is still not active --- HMPID/AliHMPIDPreprocessor.cxx | 94 ++++++++++++-------- HMPID/AliHMPIDPreprocessor.h | 4 + HMPID/AliHMPIDRecon.cxx | 17 ++-- HMPID/AliHMPIDRecon.h | 4 +- HMPID/AliHMPIDTracker.cxx | 32 +++++-- HMPID/AliHMPIDTracker.h | 17 +--- HMPID/Calib/Nmean/Run0_0_v0_s0.root | Bin 0 -> 2926 bytes HMPID/Calib/Qthre/Run0_0_v0_s0.root | Bin 0 -> 2847 bytes HMPID/Hshuttle.C | 130 ++++++++++++++++++---------- 9 files changed, 186 insertions(+), 112 deletions(-) create mode 100644 HMPID/Calib/Nmean/Run0_0_v0_s0.root create mode 100644 HMPID/Calib/Qthre/Run0_0_v0_s0.root diff --git a/HMPID/AliHMPIDPreprocessor.cxx b/HMPID/AliHMPIDPreprocessor.cxx index 6198ce63385..9a0fb3f4df1 100644 --- a/HMPID/AliHMPIDPreprocessor.cxx +++ b/HMPID/AliHMPIDPreprocessor.cxx @@ -2,29 +2,35 @@ #include #include -#include //Test() -#include //Test() -#include //Test() -#include //Test() -//#include //Test() -#include //Test() #include //Process() #include //Process() #include //Process() +#include //Process() ClassImp(AliHMPIDPreprocessor) +char *AliHMPIDPreprocessor::fP ="HMP_DET/HMP_MP%i/HMP_MP%i_GAS/HMP_MP%i_GAS_PMWC.actual.value"; +char *AliHMPIDPreprocessor::fT1="HMP_DET/HMP_MP%i/HMP_MP%i_LIQ_LOOP.actual.sensors.Rad%iIn_Temp"; +char *AliHMPIDPreprocessor::fT2="HMP_DET/HMP_MP%i/HMP_MP%i_LIQ_LOOP.actual.sensors.Rad%iOut_Temp"; +char *AliHMPIDPreprocessor::fHV="HMP_DET/HMP_MP%i/HMP_MP%i_PW/HMP_MP%i_SEC0/HMP_MP%i_SEC0_HV.actual.vMon"; + + + + //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ void AliHMPIDPreprocessor::Initialize(Int_t run, UInt_t startTime,UInt_t endTime) { AliPreprocessor::Initialize(run, startTime, endTime); } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -UInt_t AliHMPIDPreprocessor::Process(TMap* pDcsMap) +UInt_t AliHMPIDPreprocessor::Process(TMap* pMap) { -// -// Argumets: pDcsMap - map of structure "alias name" - TObjArray of AliDCSValue - +// Process: 1. inlet and outlet C6F14 temperature, stores TObjArray of 21 TF1, where TF1 is Nmean=f(t), one per radiator +// 2. CH4 pressure and HV stores TObjArray of 7 TF1 where TF1 is thr=f(t), one per chamber +// Arguments: pDcsMap - map of structure "alias name" - TObjArray of AliDCSValue +// Assume that: HV is the same during the run for a given chamber, different chambers might have different HV +// P=f(t), different for different chambers + // TList* list = GetFileSources(kDAQ, "MAP"); //first analyse a set of pedestal files // if (list){ // Log("The following sources produced files with the id MAP"); @@ -32,43 +38,57 @@ UInt_t AliHMPIDPreprocessor::Process(TMap* pDcsMap) // delete list; // } - if(!pDcsMap) return 0; //no DCS map provided + if(!pMap) return 0; //no DCS map provided + Double_t sor=0,eor=1500; - TF2 idxC6F14("RidxC4F14","sqrt(1+0.554*(1239.84/x)^2/((1239.84/x)^2-5796)-0.0005*(y-20))",5.5,8.5,0,50); //DiMauro mail temp 0-50 degrees C - Double_t eMean=6.67786; //mean energy of photon defined by transperancy window + TF2 idx("RidxC4F14","sqrt(1+0.554*(1239.84/x)^2/((1239.84/x)^2-5796)-0.0005*(y-20))",5.5 ,8.5 ,0 ,50); //N=f(Ephot,T) [eV,grad C] DiMauro mail + TF2 thr("RthrCH4" ,"x+170745848*exp(-y*0.0162012)" ,2000,3000,900,1200); //thr=f(HV,P) [V,mBar] +// Double_t eMean=6.67786; //mean energy of photon defined by transperancy window - TObjArray radTemp; radTemp.SetOwner(kTRUE); //store temp versus time as TF1 array for all radiators (21) - TObjArray meanIdx; meanIdx.SetOwner(kTRUE); //store ref idx versus time as TF1 array for all radiators (21) - +// TObjArray arTmean(21); arTmean.SetOwner(kTRUE); //21 Tmean=f(time) one per radiator +// TObjArray arPress(7); arPress.SetOwner(kTRUE); //7 Press=f(time) one pre chamber + TObjArray arNmean(21); arNmean.SetOwner(kTRUE); //21 Nmean=f(time) one per radiator + TObjArray arQthre(7); arQthre.SetOwner(kTRUE); //7 Qthre=f(time) one pre chamber - for(Int_t iCh=0;iCh<7;iCh++){ //aliases loop +// AliDCSValue *pVal; Int_t cnt=0; + + for(Int_t iCh=0;iCh<7;iCh++){ + // TObjArray *pHV=(TObjArray*)pMap->GetValue(Form("HMP_DET/HMP_MP%i/HMP_MP%i_PW/HMP_MP%i_SEC0/HMP_MP%i_SEC0_HV.actual.vMon",iCh,iCh,iCh,iCh)); //HV +// pVal=(AliDCSValue*)pHV->At(0); Float_t hv=pVal->GetFloat();//HV + +// TObjArray *pP =(TObjArray*)pMap->GetValue(Form(fP,iCh,iCh,iCh)); //P +// TGraph *pGrP; cnt=0;TIter nextp(pP); while((pVal=(AliDCSValue*)nextp())) pGrP->SetPoint(cnt++,pVal->GetTimeStamp(),pVal->GetFloat()); //P + +// TF1 *pFuP=new TF1(Form("P%i",iCh),"1005",sor,eor); +// pGrP->Fit(pFuP,"Q"); delete pGrP; + TF1 *pFuQ=new TF1(Form("HMP_Qthre%i",iCh),"100",sor,eor); + arQthre.AddAt(pFuQ,iCh); for(Int_t iRad=0;iRad<3;iRad++){ - TObjArray *pValLst=(TObjArray*)pDcsMap->GetValue(Form("HMP_DET/HMP_MP%i/HMP_MP%i_LIQ_LOOP.actual.sensors.Rad%iIn_Temp",iCh,iCh,iRad));//get data points for this alias - if(!pValLst) continue; //no data points - TF1 *pRadTempF=new TF1(Form("RadTemp%i%i",iCh,iRad),"[0]+[1]*x+[2]*sin([3]*x)",0,10); pRadTempF->SetLineColor(iRad+2); //temp=f(time) - TF1 *pMeanIdxF=new TF1(Form("MeanIdx%i%i",iCh,iRad),"[0]+[1]*x+[2]*sin([3]*x)",0,10); pMeanIdxF->SetLineColor(iRad+2); //idx=f(time) - TGraph *pRadTempG=new TGraph; //tmp graph of rad temp versus time - TGraph *pMeanIdxG=new TGraph; //tmp graph of mean ref idx versus time - TIter next(pValLst); AliDCSValue *pDcsVal; Int_t i=0; - while((pDcsVal=(AliDCSValue*)next())){ //loop over data points for this sensor - pRadTempG->SetPoint(i,pDcsVal->GetTimeStamp(), pDcsVal->GetFloat()); //and fill the temp graph - pMeanIdxG->SetPoint(i,pDcsVal->GetTimeStamp(),idxC6F14.Eval(eMean,pDcsVal->GetFloat())); //and fill the maen ref idx graph - i++; - } - pRadTempG->Fit(pRadTempF,"Q"); //now fit the temp graph - pMeanIdxG->Fit(pMeanIdxF,"Q"); //now fit the mean idx graph - delete pRadTempG; - delete pMeanIdxG; - radTemp.Add(pRadTempF); - meanIdx.Add(pMeanIdxF); +// TObjArray *pT1=(TObjArray*)pMap->GetValue(Form(fT1,iCh,iCh,iRad)); //Tin +// TGraph *pGrT1=new TGraph; cnt=0; TIter next1(pT1); while((pVal=(AliDCSValue*)next1())) pGrT1->SetPoint(cnt++,pVal->GetTimeStamp(),pVal->GetFloat()); //inlet temperature +// pGrT1->Fit(new TF1(Form("Tin%i%i",iCh,iRad),"[0]+[1]*x+[2]*sin([3]*x)",sor,eor),"Q"); //now fit the temp graph + +// TObjArray *pT2=(TObjArray*)pMap->GetValue(Form(fT2,iCh,iCh,iRad));//Tout +// TGraph *pGrT2=new TGraph; cnt=0; TIter next2(pT2); while((pVal=(AliDCSValue*)next2())) pGrT2->SetPoint(cnt++,pVal->GetTimeStamp(),pVal->GetFloat()); //outlet temperature +// TF1*pFuT1=new TF1(Form("Tout%i%i",iCh,iRad),"13",sor,eor) +// pGrT2->Fit(,"Q"); //now fit the temp graph + +// arTmean.Add(pRadTempF); + TF1 *pFuN=new TF1(Form("HMP_Nmean%i-%i",iCh,iRad),"1.292",sor,eor); pFuN->SetLineColor(iRad+2); pFuN->SetLineWidth(1); + arNmean.AddAt(pFuN,3*iCh+iRad); +// delete pGrT1; delete pGrT2; }//radiators loop }//chambers loop AliCDBMetaData metaData; metaData.SetBeamPeriod(0); metaData.SetResponsible("AliHMPIDPreprocessor"); metaData.SetComment("SIMULATED"); - Store("DCS", "RadTemp" , &radTemp , &metaData); //use AliPreprocessor::Store(), not allowed to use AliCDBManager directly - Store("DCS", "MeanIdx" , &meanIdx , &metaData); + arQthre.Print(); +// Store("Calib", "Press" , &arPress , &metaData); +// Store("Calib", "Tmean" , &arTmean , &metaData); + Store("Calib", "Qthre" , &arQthre , &metaData); + Store("Calib", "Nmean" , &arNmean , &metaData); + AliInfo("End."); return 1; }//Process() diff --git a/HMPID/AliHMPIDPreprocessor.h b/HMPID/AliHMPIDPreprocessor.h index a795255317a..9ef3cb1dd28 100644 --- a/HMPID/AliHMPIDPreprocessor.h +++ b/HMPID/AliHMPIDPreprocessor.h @@ -10,6 +10,10 @@ class AliHMPIDPreprocessor : public AliPreprocessor public: AliHMPIDPreprocessor(AliShuttleInterface* pShuttle):AliPreprocessor("HMP",pShuttle) {} virtual ~AliHMPIDPreprocessor( ) {} + static char *fP; // Name of the aliases provided by the DCS + static char *fHV; // Name of the aliases provided by the DCS + static char *fT1; // Name of the aliases provided by the DCS + static char *fT2; // Name of the aliases provided by the DCS protected: virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime); virtual UInt_t Process (TMap* pDcsMap ); diff --git a/HMPID/AliHMPIDRecon.cxx b/HMPID/AliHMPIDRecon.cxx index 865dd8c5217..804bb8ed1eb 100644 --- a/HMPID/AliHMPIDRecon.cxx +++ b/HMPID/AliHMPIDRecon.cxx @@ -31,13 +31,13 @@ const Double_t AliHMPIDRecon::fgkRadThick=1.5; const Double_t AliHMPIDRecon::fgkWinThick=0.5; const Double_t AliHMPIDRecon::fgkGapThick=8.0; -const Double_t AliHMPIDRecon::fgkRadIdx =1.292; const Double_t AliHMPIDRecon::fgkWinIdx =1.5787; const Double_t AliHMPIDRecon::fgkGapIdx =1.0005; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ AliHMPIDRecon::AliHMPIDRecon():TTask("RichRec","RichPat"), + fRadNmean(1.292), fPhotCnt(-1), fCkovSigma2(0), fIsWEIGHT(kFALSE), @@ -54,7 +54,7 @@ AliHMPIDRecon::AliHMPIDRecon():TTask("RichRec","RichPat"), } } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -void AliHMPIDRecon::CkovAngle(AliESDtrack *pTrk,TClonesArray *pCluLst) +void AliHMPIDRecon::CkovAngle(AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t nmean) { // Pattern recognition method based on Hough transform // Arguments: pTrk - track for which Ckov angle is to be found @@ -66,6 +66,7 @@ void AliHMPIDRecon::CkovAngle(AliESDtrack *pTrk,TClonesArray *pCluLst) // Photon Flag: Flag = 0 initial set; Flag = 1 good candidate (charge compatible with photon); Flag = 2 photon used for the ring; Float_t xPc,yPc,th,ph; pTrk->GetHMPIDtrk(xPc,yPc,th,ph); SetTrack(xPc,yPc,th,ph); //initialize this track + fRadNmean=nmean; @@ -214,10 +215,10 @@ Double_t AliHMPIDRecon::TracePhot(Double_t ckovThe,Double_t ckovPhi,TVector2 &po TVector3 dirCkov; dirCkov.SetMagThetaPhi(1,ckovThe,ckovPhi); //initially photon is directed according to requested ckov angle dirCkov=mrot*dirCkov; //now we know photon direction in LORS dirCkov.SetPhi(ckovPhi); - if(dirCkov.Theta() > TMath::ASin(1./fgkRadIdx)) return -999;//total refraction on WIN-GAP boundary + if(dirCkov.Theta() > TMath::ASin(1./fRadNmean)) return -999;//total refraction on WIN-GAP boundary Propagate(dirCkov,posCkov,-fgkWinThick-fgkGapThick); //go to RAD-WIN boundary remeber that z=0 is PC plane - Refract (dirCkov, fgkRadIdx,fgkWinIdx ); //RAD-WIN refraction + Refract (dirCkov, fRadNmean,fgkWinIdx ); //RAD-WIN refraction Propagate(dirCkov,posCkov,-fgkGapThick ); //go to WIN-GAP boundary Refract (dirCkov, fgkWinIdx,fgkGapIdx ); //WIN-GAP refraction Propagate(dirCkov,posCkov,0 ); //go to PC @@ -309,7 +310,7 @@ Double_t AliHMPIDRecon::Sigma2(Double_t ckovTh, Double_t ckovPh)const // Returns: absolute error on Cerenkov angle, [radians] TVector3 v(-999,-999,-999); - Double_t trkBeta = 1./(TMath::Cos(ckovTh)*fgkRadIdx); + Double_t trkBeta = 1./(TMath::Cos(ckovTh)*fRadNmean); v.SetX(SigLoc (ckovTh,ckovPh,trkBeta)); v.SetY(SigGeom(ckovTh,ckovPh,trkBeta)); @@ -329,7 +330,7 @@ Double_t AliHMPIDRecon::SigLoc(Double_t thetaC, Double_t phiC,Double_t betaM)con Double_t phiDelta = phiC - fTrkDir.Phi(); Double_t alpha =TMath::Cos(fTrkDir.Theta())-TMath::Tan(thetaC)*TMath::Cos(phiDelta)*TMath::Sin(fTrkDir.Theta()); - Double_t k = 1.-fgkRadIdx*fgkRadIdx+alpha*alpha/(betaM*betaM); + Double_t k = 1.-fRadNmean*fRadNmean+alpha*alpha/(betaM*betaM); if (k<0) return 1e10; Double_t mu =TMath::Sin(fTrkDir.Theta())*TMath::Sin(fTrkDir.Phi())+TMath::Tan(thetaC)*(TMath::Cos(fTrkDir.Theta())*TMath::Cos(phiDelta)*TMath::Sin(fTrkDir.Phi())+TMath::Sin(phiDelta)*TMath::Cos(fTrkDir.Phi())); @@ -353,7 +354,7 @@ Double_t AliHMPIDRecon::SigCrom(Double_t thetaC, Double_t phiC,Double_t betaM)co Double_t phiDelta = phiC - fTrkDir.Phi(); Double_t alpha =TMath::Cos(fTrkDir.Theta())-TMath::Tan(thetaC)*TMath::Cos(phiDelta)*TMath::Sin(fTrkDir.Theta()); - Double_t dtdn = TMath::Cos(fTrkDir.Theta())*fgkRadIdx*betaM*betaM/(alpha*TMath::Tan(thetaC)); + Double_t dtdn = TMath::Cos(fTrkDir.Theta())*fRadNmean*betaM*betaM/(alpha*TMath::Tan(thetaC)); Double_t f = 0.00928*(7.75-5.635)/TMath::Sqrt(12.); @@ -372,7 +373,7 @@ Double_t AliHMPIDRecon::SigGeom(Double_t thetaC, Double_t phiC,Double_t betaM)co Double_t phiDelta = phiC - fTrkDir.Phi(); Double_t alpha =TMath::Cos(fTrkDir.Theta())-TMath::Tan(thetaC)*TMath::Cos(phiDelta)*TMath::Sin(fTrkDir.Theta()); - Double_t k = 1.-fgkRadIdx*fgkRadIdx+alpha*alpha/(betaM*betaM); + Double_t k = 1.-fRadNmean*fRadNmean+alpha*alpha/(betaM*betaM); if (k<0) return 1e10; Double_t eTr = 0.5*1.5*betaM*TMath::Sqrt(k)/(8*alpha); diff --git a/HMPID/AliHMPIDRecon.h b/HMPID/AliHMPIDRecon.h index 67eef643a1f..74bb5ed84cb 100644 --- a/HMPID/AliHMPIDRecon.h +++ b/HMPID/AliHMPIDRecon.h @@ -26,7 +26,7 @@ public : virtual ~AliHMPIDRecon() {} - void CkovAngle (AliESDtrack *pTrk,TClonesArray *pCluLst ); //reconstructed Theta Cerenkov + void CkovAngle (AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t nmean ); //reconstructed Theta Cerenkov Double_t FindPhotCkov (Double_t cluX,Double_t cluY ); //find ckov angle for single photon candidate Double_t FindPhotPhi (Double_t cluX,Double_t cluY ); //find phi angle for single photon candidate Double_t FindRingCkov (Int_t iNclus ); //best ckov for ring formed by found photon candidates @@ -46,9 +46,9 @@ protected: static const Double_t fgkRadThick; //radiator thickness static const Double_t fgkWinThick; //window thickness static const Double_t fgkGapThick; //proximity gap thickness - static const Double_t fgkRadIdx; //mean refractive index of RAD material (C6F14) static const Double_t fgkWinIdx; //mean refractive index of WIN material (SiO2) static const Double_t fgkGapIdx; //mean refractive index of GAP material (CH4) + Double_t fRadNmean; //C6F14 mean refractive index Int_t fPhotCnt; // counter of photons candidate Int_t fPhotFlag[3000]; // flags of photon candidates Double_t fPhotCkov[3000]; // Ckov angles of photon candidates, [rad] diff --git a/HMPID/AliHMPIDTracker.cxx b/HMPID/AliHMPIDTracker.cxx index 1b3e4f5b733..ca3ca5ecd29 100644 --- a/HMPID/AliHMPIDTracker.cxx +++ b/HMPID/AliHMPIDTracker.cxx @@ -6,7 +6,11 @@ #include //GetTrackPoint(),PropagateBack() #include //GetTrackPoint() #include //GetTrackPoint() +#include +#include + ClassImp(AliHMPIDTracker) + //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Bool_t AliHMPIDTracker::GetTrackPoint(Int_t idx, AliTrackPoint& point) const { @@ -35,20 +39,36 @@ Int_t AliHMPIDTracker::LoadClusters(TTree *pCluTree) AliDebug(1,"Start."); pCluTree->GetEntry(0); AliDebug(1,"Stop."); return 0; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -Int_t AliHMPIDTracker::Recon(AliESD *pESD,TObjArray *pCluAll) +Int_t AliHMPIDTracker::PropagateBack(AliESD *pEsd) +{ +// This method defined as pure virtual in AliTracker. It is invoked from AliReconstruction::RunTracking() after invocation of AliTracker::LoadClusters() +// Agruments: pEsd - pointer to ESD +// Returns: error code + AliCDBEntry *pNmeanEnt =AliCDBManager::Instance()->Get("HMPID/Calib/Nmean",pEsd->GetRunNumber()); //contains TObjArray of 21 TF1 + AliCDBEntry *pQthreEnt =AliCDBManager::Instance()->Get("HMPID/Calib/Qthes",pEsd->GetRunNumber()); //contains TObjArray of 7 TF1 + if(!pNmeanEnt) AliFatal("No Nmean C6F14 "); + if(!pQthreEnt) AliFatal("No Qthre"); + + AliHMPID *pHmpid=((AliHMPID*)gAlice->GetDetector("HMPID")); + return Recon(pEsd,pHmpid->CluLst(),(TObjArray*)pNmeanEnt->GetObject()); +} +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +Int_t AliHMPIDTracker::Recon(AliESD *pEsd,TObjArray *pCluAll,TObjArray *pNmean) { // Interface callback methode invoked by AliRecontruction::RunTracking() during tracking after TOF. It's done just once per event -// Arguments: pESD - pointer to Event Summary Data class instance which contains a list of tracks +// Arguments: pEsd - pointer to Event Summary Data class instance which contains a list of tracks // Returns: error code, 0 if no errors - Int_t iNtracks=pESD->GetNumberOfTracks(); AliDebugClass(1,Form("Start with %i tracks",iNtracks)); + Int_t iNtracks=pEsd->GetNumberOfTracks(); AliDebugClass(1,Form("Start with %i tracks",iNtracks)); + - AliHMPIDRecon recon; //instance of reconstruction class, nothing important in ctor + AliHMPIDRecon recon; //instance of reconstruction class, nothing important in ctor Float_t xRa,yRa; for(Int_t iTrk=0;iTrkGetTrack(iTrk); //get next reconstructed track + AliESDtrack *pTrk = pEsd->GetTrack(iTrk); //get next reconstructed track Int_t cham=IntTrkCha(pTrk,xRa,yRa); //get chamber intersected by thie track if(cham<0) continue; //no intersection at all, go after next track - recon.CkovAngle(pTrk,(TClonesArray *)pCluAll->At(cham)); //search for Cerenkov angle for this track + Double_t nmean=((TF1*)pNmean->At(3*cham))->Eval(pEsd->GetTimeStamp()); //C6F14 Nmean for this chamber + recon.CkovAngle(pTrk,(TClonesArray *)pCluAll->At(cham),nmean); //search for Cerenkov angle for this track } //ESD tracks loop AliDebugClass(1,"Stop pattern recognition"); return 0; // error code: 0=no error; diff --git a/HMPID/AliHMPIDTracker.h b/HMPID/AliHMPIDTracker.h index d1bf4f37d88..e83959fea61 100644 --- a/HMPID/AliHMPIDTracker.h +++ b/HMPID/AliHMPIDTracker.h @@ -4,38 +4,29 @@ #include //base class #include "AliHMPID.h" //Recon() #include //Recon() - +#include //field class AliESD; //Recon() class AliESDtrack; //IntTrkCha() class AliHMPIDTracker : public AliTracker { public: - AliHMPIDTracker():AliTracker() {} + AliHMPIDTracker():AliTracker() {} virtual ~AliHMPIDTracker() {} //framework part AliCluster *GetCluster (Int_t )const {return 0;} //pure virtual from AliTracker Bool_t GetTrackPoint (Int_t idx,AliTrackPoint &pt)const; // from AliTracker Int_t Clusters2Tracks(AliESD * ) {return 0;} //pure virtual from AliTracker Int_t LoadClusters (TTree *pCluTr ); //pure virtual from AliTracker - inline Int_t PropagateBack (AliESD * ); //pure virtual from AliTracker + Int_t PropagateBack (AliESD * ); //pure virtual from AliTracker Int_t RefitInward (AliESD * ) {return 0;} //pure virtual from AliTracker void UnloadClusters ( ) { } //pure virtual from AliTracker //private part static Int_t IntTrkCha(AliESDtrack *pTrk,Float_t &x,Float_t &y); //find track-chamber intersection, retuns chamber ID - static Int_t Recon (AliESD *pEsd,TObjArray *pCluAll ); //do actual job, returns status code + static Int_t Recon (AliESD *pEsd,TObjArray *pCluAll,TObjArray *pNmean=0); //do actual job, returns status code protected: ClassDef(AliHMPIDTracker,0) };//class AliHMPIDTracker //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -Int_t AliHMPIDTracker::PropagateBack(AliESD *pEsd) -{ -// This method defined as pure virtual in AliTracker. It is invoked from AliReconstruction::RunTracking() after invocation of AliTracker::LoadClusters() -// Agruments: pEsd - pointer to ESD -// Returns: error code - AliHMPID *pHmpid=((AliHMPID*)gAlice->GetDetector("HMPID")); - return Recon(pEsd,pHmpid->CluLst()); -} - typedef AliHMPIDTracker AliRICHTracker; // for backward compatibility diff --git a/HMPID/Calib/Nmean/Run0_0_v0_s0.root b/HMPID/Calib/Nmean/Run0_0_v0_s0.root new file mode 100644 index 0000000000000000000000000000000000000000..6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`U_Iqozut| zEix#uxf^R`u}7=hPYO59LATA8uc_mhFS=E68GEh9ZK^+G*kV|XJMTH}A}=H4vt@pN z1-V5+J!%M6sB!*n*s47U?4cv$XX2dH7W1>Nu5j`JKPC5oli7beD7SI1S9~IEhb)od zp#7{l>xxpk6P}nS4BBu6A^AcSkkFsVt0hmFp9FOoI$gtrI&2XUE@|`v>(9=uk)$GP9$%FfK)}6vBKaD2E6_7rG4J;8OMHI1jE%S!%dDg%T~Gh`x#m zzK)v6h=`J`8^nBV((5-Dn}cR7M(UsI7Om^bVpamRSg$wHK;1FLfxk)_o#!@#*_HQP zXu2{WZp+PxOnC*(qUd!cfg`q&V=u+Rm|E z$x87`j%i|I$oQk?nbgkgLwo;*=|-u$BQ9-vbusTm+p_NuoAtfQCHHeh@u?&OvxzR! zmVH$8NaR3L!KT*~JJ7aJuJT|1SY$MKx=P2RO{u~Q&(RhHjbUm`?yNsI@6f&!&c z52fL&Yl(|C=|}|qS9&fLlb$d@_MB!vNK2>wfVLwv2jZ_SM7Wm$Q$NJSA9Pd11LZ5= z3csTdG`3T9#`E}E@f)gAH@k$|!|eKb+ygk*hR_ui{8dD5=B#aJ%`XATRtcOYhCInE zw{O@kn!;1HNSRd)@{(+bY$8XUM+W~b2RWy?WZ%SyLet;7pw`u13+SJ-?CN9%{75`}Uf`)JgT zMiMQd!5!RLgcmQud|I(05PIK?^^GQ literal 0 HcmV?d00001 diff --git a/HMPID/Hshuttle.C b/HMPID/Hshuttle.C index ea20715d1f9..fdd3ced0b5e 100644 --- a/HMPID/Hshuttle.C +++ b/HMPID/Hshuttle.C @@ -1,63 +1,101 @@ -void Hshuttle() +void Hshuttle(Int_t runTime=1500) { // this macro is to simulate the functionality of SHUTTLE. -// Here the list of DCS aliases is created and packed in TMap of structure "alias name" - TObjArray of AliDCSValue - TMultiGraph *pMG[7]; for(Int_t i=0;i<7;i++) {pMG[i]=new TMultiGraph; pMG[i]->SetTitle("T,grad C;time");} - TGraph *pGr[21];for(Int_t i=0;i<21;i++){pGr[i]=new TGraph; pGr[i]->SetMarkerStyle(i%3+24); pGr[i]->SetMarkerColor(i%3+2); pMG[i/3]->Add(pGr[i]);} +// Here the list of DCS aliases is created and packed in TMap of structure "alias name" - TObjArray of AliDCSValue; AliDCSValue is a pair value-time stamp +// currently simulated: freon temperature 2 per radiator (inlet,outlet) +// methane pressure 1 per chamber + gSystem->Load("libTestShuttle.so"); + + AliTestShuttle::SetMainCDB(TString("local://$HOME")); + TMap *pDcsMap = new TMap; pDcsMap->SetOwner(1); //DCS archive map + + SimMap(pDcsMap,runTime); + TestShuttle(pDcsMap); + TCanvas *c=new TCanvas("cc","ff",600,600); + DrawInput(c,pDcsMap); + DrawOutput(); +}//Hshuttle() +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +void SimMap(TMap *pDcsMap,Int_t runTime=1500) +{ + Int_t stepTime=100; //time interval between mesuraments + Int_t startTime=0; + for(Int_t iCh=0;iCh<7;iCh++){//chambers loop + TObjArray *pP=new TObjArray; pP->SetOwner(1); + TObjArray *pHV=new TObjArray; pHV->SetOwner(1); + for(Int_t time=0;timeAdd(new AliDCSValue((Float_t)1005.0 ,time)); //sample CH4 pressure [mBar] + pHV->Add(new AliDCSValue((Float_t)2010.0,time)); //sample chamber HV [V] + + pDcsMap->Add(new TObjString(Form(AliHMPIDPreprocessor::fP,iCh,iCh,iCh)),pP); + pDcsMap->Add(new TObjString(Form(AliHMPIDPreprocessor::fHV,iCh,iCh,iCh)),pHV); + for(Int_t iRad=0;iRad<3;iRad++){//radiators loop - TObjArray* pValLst = new TObjArray; pValLst->SetOwner(1); - Int_t iPoint=0; - for (Int_t time=0;time<1000;time+=50) { - AliDCSValue* pVal = new AliDCSValue(Float_t(iCh*3+iRad+0.1*gRandom->Gaus()), time); //sample new data point - pValLst->Add(pVal); //add it to the list - pGr[3*iCh+iRad]->SetPoint(iPoint++,time,pVal->GetFloat()); //and also to the graph - } - pDcsMap->Add(new TObjString(Form("HMP_DET/HMP_MP%i/HMP_MP%i_LIQ_LOOP.actual.sensors.Rad%iIn_Temp",iCh,iCh,iRad)),pValLst); - pDcsMap->Add(new TObjString(Form("HMP_DET/HMP_MP%i/HMP_MP%i_LIQ_LOOP.actual.sensors.Rad%iOut_Temp",iCh,iCh,iRad)),pValLst); - }//radiators loop + TObjArray *pT1=new TObjArray; pT1->SetOwner(1); + TObjArray *pT2=new TObjArray; pT2->SetOwner(1); + for (Int_t time=0;timeAdd(new AliDCSValue(13,time)); //sample inlet temperature Nmean=1.292 @ 13 degrees + for (Int_t time=0;timeAdd(new AliDCSValue(13,time)); //sample outlet temperature + pDcsMap->Add(new TObjString(Form(AliHMPIDPreprocessor::fT1,iCh,iCh,iRad)) ,pT1); + pDcsMap->Add(new TObjString(Form(AliHMPIDPreprocessor::fT2,iCh,iCh,iRad)),pT2); + }//radiators loop }//chambers loop - - AliTestShuttle::SetOCDBStorage("local://$HOME/tstCDB"); - AliCDBManager::Instance()->SetDefaultStorage("local://$HOME/tstCDB"); // initialize location of CDB - - gSystem->Load("libTestShuttle.so"); - Int_t iRun=1; - AliTestShuttle* pShuttle = new AliTestShuttle(iRun,0,100000); +}//SimMap() +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +void TestShuttle(TMap *pDcsMap) +{ + AliTestShuttle* pShuttle = new AliTestShuttle(0,0,1000000); pShuttle->SetDCSInput(pDcsMap); //DCS map AliPreprocessor* pp = new AliHMPIDPreprocessor(pShuttle); //actual ipreprocessor is created here pShuttle->Process(); //run SHUTTLE simulator delete pp; +} +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +void DrawInput(TCanvas *c,TMap *pDcsMap) +{ + c->Divide(3,3); + AliDCSValue *pVal; Int_t cnt=0; + + for(Int_t iCh=0;iCh<7;iCh++){//chambers loop + if(iCh==6) c->cd(1); if(iCh==5) c->cd(2); + if(iCh==4) c->cd(4); if(iCh==3) c->cd(5); if(iCh==2) c->cd(6); + if(iCh==1) c->cd(8); if(iCh==0) c->cd(9); + + TObjArray *pHV=(TObjArray*)pDcsMap->GetValue(Form(AliHMPIDPreprocessor::fHV,iCh,iCh,iCh,iCh)); //HV + TObjArray *pP =(TObjArray*)pDcsMap->GetValue(Form(AliHMPIDPreprocessor::fP,iCh,iCh,iCh)); //P + TGraph *pGr=new TGraph; pGr->SetMarkerStyle(5); - AliCDBEntry *pTempEn=AliCDBManager::Instance()->Get("HMPID/DCS/RadTemp",iRun); - if(!pTempEn) {Printf("ERROR file is not retrieved!!!");return;} + TIter nextp(pP); cnt=0; while((pVal=(AliDCSValue*)nextp())){ pGr->SetPoint(cnt++,pVal->GetTimeStamp(),pVal->GetFloat());}//P - TObjArray *pTempLst=(TObjArray*)pTempEn->GetObject(); TF1 *pRad0,*pRad1,*pRad2; - TCanvas *pC=new TCanvas; pC->Divide(3,3); - for(Int_t iCh=0;iCh<7;iCh++){//chambers loop - if(iCh==6) pC->cd(1); if(iCh==5) pC->cd(2); //this is just to see the input - if(iCh==4) pC->cd(4); if(iCh==3) pC->cd(5); if(iCh==2) pC->cd(6); - if(iCh==1) pC->cd(8); if(iCh==0) pC->cd(9); - pMG[iCh]->Draw("ap"); pMG[iCh]->GetXaxis()->SetTimeDisplay(kTRUE); - pRad0=(TF1*)pTempLst->At(iCh*3+0); pRad0->Draw("same"); - pRad1=(TF1*)pTempLst->At(iCh*3+1); pRad1->Draw("same"); - pRad2=(TF1*)pTempLst->At(iCh*3+2); pRad2->Draw("same"); + + pGr->Draw("AP"); } +} +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +void DrawOutput() +{ + AliCDBManager::Instance()->SetDefaultStorage("local://$HOME"); + AliCDBEntry *pQthreEnt=AliCDBManager::Instance()->Get("HMPID/Calib/Qthre",0); + AliCDBEntry *pNmeanEnt=AliCDBManager::Instance()->Get("HMPID/Calib/Nmean",0); + + if(!pQthreEnt || ! pNmeanEnt) return; + + TObjArray *pNmean=(TObjArray*)pNmeanEnt->GetObject(); + TObjArray *pQthre=(TObjArray*)pQthreEnt->GetObject(); + + TF1 *pRad0,*pRad1,*pRad2; + TCanvas *c2=new TCanvas("c2","Nmean"); c2->Divide(3,3); + - AliCDBEntry *pIdxEn=AliCDBManager::Instance()->Get("HMPID/DCS/MeanIdx",iRun); - if(!pIdxEn) {Printf("ERROR file is not retrieved!!!");return;} - - TObjArray *pIdxLst=(TObjArray*)pIdxEn->GetObject(); TF1 *pRad0,*pRad1,*pRad2; - TCanvas *pC=new TCanvas("c2","Ref Idx"); pC->Divide(3,3); for(Int_t iCh=0;iCh<7;iCh++){//chambers loop - if(iCh==6) pC->cd(1); if(iCh==5) pC->cd(2); //this is just to see the input - if(iCh==4) pC->cd(4); if(iCh==3) pC->cd(5); if(iCh==2) pC->cd(6); - if(iCh==1) pC->cd(8); if(iCh==0) pC->cd(9); - pRad0=(TF1*)pIdxLst->At(iCh*3+0); pRad0->Draw(); pRad0->GetXaxis()->SetTimeDisplay(kTRUE); pRad0->GetYaxis()->SetRangeUser(1.28,1.3); - pRad1=(TF1*)pIdxLst->At(iCh*3+1); pRad1->Draw("same"); - pRad2=(TF1*)pIdxLst->At(iCh*3+2); pRad2->Draw("same"); - } -}//Hshuttle() + if(iCh==6) c2->cd(1); if(iCh==5) c2->cd(2); + if(iCh==4) c2->cd(4); if(iCh==3) c2->cd(5); if(iCh==2) c2->cd(6); + if(iCh==1) c2->cd(8); if(iCh==0) c2->cd(9); + + TF1 *pRad0=(TF1*)pNmean->At(iCh*3+0); pRad0->Draw(); pRad0->GetXaxis()->SetTimeDisplay(kTRUE); pRad0->GetYaxis()->SetRangeUser(1.28,1.3); + TF1 *pRad1=(TF1*)pNmean->At(iCh*3+1); pRad1->Draw("same"); + TF1 *pRad2=(TF1*)pNmean->At(iCh*3+2); pRad2->Draw("same"); + }//chambers loop +} -- 2.43.0