From: masera Date: Wed, 25 Jun 2008 17:01:54 +0000 (+0000) Subject: new histograms with tracking precison and cluster error (G. Bruno) X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=2802d754c8329b85157c5866e52e0d17577761a0;p=u%2Fmrichter%2FAliRoot.git new histograms with tracking precison and cluster error (G. Bruno) --- diff --git a/ITS/AliITSPlaneEffSSD.cxx b/ITS/AliITSPlaneEffSSD.cxx index 4d5cb010ffa..7baf7acf80b 100644 --- a/ITS/AliITSPlaneEffSSD.cxx +++ b/ITS/AliITSPlaneEffSSD.cxx @@ -22,7 +22,7 @@ // /////////////////////////////////////////////////////////////////////////// -/* $Id:$ */ +/* $Id$ */ #include #include @@ -44,7 +44,11 @@ AliITSPlaneEffSSD::AliITSPlaneEffSSD(): fHisResX(0), fHisResZ(0), fHisResXZ(0), - fHisClusterSize(0){ + fHisClusterSize(0), + fHisTrackErrX(0), + fHisTrackErrZ(0), + fHisClusErrX(0), + fHisClusErrZ(0){ for (UInt_t i=0; iCopy(*fHisResZ[i]); s.fHisResXZ[i]->Copy(*fHisResXZ[i]); s.fHisClusterSize[i]->Copy(*fHisClusterSize[i]); + s.fHisTrackErrX[i]->Copy(*fHisTrackErrX[i]); + s.fHisTrackErrZ[i]->Copy(*fHisTrackErrZ[i]); + s.fHisClusErrX[i]->Copy(*fHisTrackErrZ[i]); + s.fHisClusErrZ[i]->Copy(*fHisClusErrZ[i]); } } } @@ -111,6 +123,10 @@ AliITSPlaneEffSSD& AliITSPlaneEffSSD::operator+=(const AliITSPlaneEffSSD &add){ fHisResZ[i]->Add(add.fHisResZ[i]); fHisResXZ[i]->Add(add.fHisResXZ[i]); fHisClusterSize[i]->Add(add.fHisClusterSize[i]); + fHisTrackErrX[i]->Add(add.fHisTrackErrX[i]); + fHisTrackErrZ[i]->Add(add.fHisTrackErrZ[i]); + fHisClusErrX[i]->Add(add.fHisTrackErrZ[i]); + fHisClusErrZ[i]->Add(add.fHisClusErrZ[i]); } } return *this; @@ -151,11 +167,19 @@ void AliITSPlaneEffSSD::CopyHistos(AliITSPlaneEffSSD &target) const { target.fHisResZ=new TH1F*[kNHisto]; target.fHisResXZ=new TH2F*[kNHisto]; target.fHisClusterSize=new TH2I*[kNHisto]; + target.fHisTrackErrX=new TH1F*[kNHisto]; + target.fHisTrackErrZ=new TH1F*[kNHisto]; + target.fHisClusErrX=new TH1F*[kNHisto]; + target.fHisClusErrZ=new TH1F*[kNHisto]; for(Int_t i=0; iSetName(aux.Data()); fHisClusterSize[nhist]->SetTitle(aux.Data()); + aux=histnameTrackErrX; + aux+=nhist; + fHisTrackErrX[nhist]=new TH1F("histname","histname",200,0.,0.08); // 0-800 micron; 1 bin=4 micron + fHisTrackErrX[nhist]->SetName(aux.Data()); + fHisTrackErrX[nhist]->SetTitle(aux.Data()); + + aux=histnameTrackErrZ; + aux+=nhist; + fHisTrackErrZ[nhist]=new TH1F("histname","histname",200,0.,0.32); // 0-3200 micron; 1 bin=16 micron + fHisTrackErrZ[nhist]->SetName(aux.Data()); + fHisTrackErrZ[nhist]->SetTitle(aux.Data()); + + aux=histnameClusErrX; + aux+=nhist; + fHisClusErrX[nhist]=new TH1F("histname","histname",200,0.,0.08); // 0-800 micron; 1 bin=4 micron + fHisClusErrX[nhist]->SetName(aux.Data()); + fHisClusErrX[nhist]->SetTitle(aux.Data()); + + aux=histnameClusErrZ; + aux+=nhist; + fHisClusErrZ[nhist]=new TH1F("histname","histname",200,0.,0.16); // 0-1600 micron; 1 bin=8 micron + fHisClusErrZ[nhist]->SetName(aux.Data()); + fHisClusErrZ[nhist]->SetTitle(aux.Data()); + } return; } @@ -454,6 +509,22 @@ void AliITSPlaneEffSSD::DeleteHistos() { for (Int_t i=0; iFill(resx,resz); fHisClusterSize[id]->Fill((Double_t)csize[0],(Double_t)csize[1]); } + fHisTrackErrX[id]->Fill(tr[2]); + fHisTrackErrZ[id]->Fill(tr[3]); + fHisClusErrX[id]->Fill(clu[2]); + fHisClusErrZ[id]->Fill(clu[3]); return kTRUE; } //__________________________________________________________ @@ -508,22 +583,36 @@ Bool_t AliITSPlaneEffSSD::WriteHistosToFile(TString filename, Option_t* option) TH1F *histZ,*histX; TH2F *histXZ; TH2I *histClusterType; + TH1F *histTrErrZ,*histTrErrX; + TH1F *histClErrZ,*histClErrX; histZ=new TH1F(); histX=new TH1F(); histXZ=new TH2F(); histClusterType=new TH2I(); + histTrErrX=new TH1F(); + histTrErrZ=new TH1F(); + histClErrX=new TH1F(); + histClErrZ=new TH1F(); SSDTree->Branch("histX","TH1F",&histX,128000,0); SSDTree->Branch("histZ","TH1F",&histZ,128000,0); SSDTree->Branch("histXZ","TH2F",&histXZ,128000,0); SSDTree->Branch("histClusterType","TH2I",&histClusterType,128000,0); + SSDTree->Branch("histTrErrX","TH1F",&histTrErrX,128000,0); + SSDTree->Branch("histTrErrZ","TH1F",&histTrErrZ,128000,0); + SSDTree->Branch("histClErrX","TH1F",&histClErrX,128000,0); + SSDTree->Branch("histClErrZ","TH1F",&histClErrZ,128000,0); for(Int_t j=0;jFill(); } @@ -560,6 +649,10 @@ Bool_t AliITSPlaneEffSSD::ReadHistosFromFile(TString filename) { TBranch *histZ = (TBranch*) tree->GetBranch("histZ"); TBranch *histXZ = (TBranch*) tree->GetBranch("histXZ"); TBranch *histClusterType = (TBranch*) tree->GetBranch("histClusterType"); + TBranch *histTrErrX = (TBranch*) tree->GetBranch("histTrErrX"); + TBranch *histTrErrZ = (TBranch*) tree->GetBranch("histTrErrZ"); + TBranch *histClErrX = (TBranch*) tree->GetBranch("histClErrX"); + TBranch *histClErrZ = (TBranch*) tree->GetBranch("histClErrZ"); gROOT->cd(); @@ -603,6 +696,46 @@ Bool_t AliITSPlaneEffSSD::ReadHistosFromFile(TString filename) { fHisClusterSize[j]->Add(h2i); } + nevent = (Int_t)histTrErrX->GetEntries(); + if(nevent!=kNHisto) + {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;} + histTrErrX->SetAddress(&h); + for(Int_t j=0;jGetEntry(j); + fHisTrackErrX[j]->Add(h); + } + + nevent = (Int_t)histTrErrZ->GetEntries(); + if(nevent!=kNHisto) + {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;} + histTrErrZ->SetAddress(&h); + for(Int_t j=0;jGetEntry(j); + fHisTrackErrZ[j]->Add(h); + } + + nevent = (Int_t)histClErrX->GetEntries(); + if(nevent!=kNHisto) + {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;} + histClErrX->SetAddress(&h); + for(Int_t j=0;jGetEntry(j); + fHisClusErrX[j]->Add(h); + } + + nevent = (Int_t)histClErrZ->GetEntries(); + if(nevent!=kNHisto) + {AliWarning("ReadHistosFromFile: trying to read too many or too few histos!"); return kFALSE;} + histClErrZ->SetAddress(&h); + for(Int_t j=0;jGetEntry(j); + fHisClusErrZ[j]->Add(h); + } + delete h; h=0; delete h2; h2=0; delete h2i; h2i=0; @@ -612,4 +745,3 @@ Bool_t AliITSPlaneEffSSD::ReadHistosFromFile(TString filename) { } return kTRUE; } - diff --git a/ITS/AliITSPlaneEffSSD.h b/ITS/AliITSPlaneEffSSD.h index 37d74332122..7f7470c2f5d 100644 --- a/ITS/AliITSPlaneEffSSD.h +++ b/ITS/AliITSPlaneEffSSD.h @@ -15,7 +15,7 @@ // Origin: Giuseppe.Bruno@ba.infn.it // /////////////////////////////////////////// -/* $Id:$ */ +/* $Id$ */ class AliITSPlaneEffSSD : public AliITSPlaneEff { public: @@ -97,8 +97,12 @@ class AliITSPlaneEffSSD : public AliITSPlaneEff { TH1F **fHisResZ; //! histos with residual distribution (track-cluster) along local Z TH2F **fHisResXZ; //! 2-d histos with residual distribution (track-cluster) along local X and Z TH2I **fHisClusterSize; //! histos with cluster-size distribution + TH1F **fHisTrackErrX; //! histos with track prediction error on Local X + TH1F **fHisTrackErrZ; //! histos with track prediction error on Local Z + TH1F **fHisClusErrX; //! histos with Local_X cluster error + TH1F **fHisClusErrZ; //! histos with Local_Z cluster error // - ClassDef(AliITSPlaneEffSSD,2) // SSD Plane Efficiency class + ClassDef(AliITSPlaneEffSSD,3) // SSD Plane Efficiency class }; // inline UInt_t AliITSPlaneEffSSD::Nblock() const {return kNModule;} @@ -127,4 +131,3 @@ inline Int_t AliITSPlaneEffSSD::GetTried(const UInt_t key) const { } // #endif -