From: ivana Date: Wed, 4 Jul 2007 14:25:37 +0000 (+0000) Subject: - Coding conventions X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=8b1cdc260699895ab16a1cb5c1d6eab207c962b2;hp=6ebccce6b6231499ef368d3869aa10b3e5b1f465;p=u%2Fmrichter%2FAliRoot.git - Coding conventions - Display method for calculated trigger chamber efficiency map (Diego) --- diff --git a/MUON/AliMUONTracker.cxx b/MUON/AliMUONTracker.cxx index 53438051cab..0570f9467eb 100644 --- a/MUON/AliMUONTracker.cxx +++ b/MUON/AliMUONTracker.cxx @@ -182,8 +182,6 @@ Int_t AliMUONTracker::Clusters2Tracks(TTree& tracksTree, AliESD* esd) if( trackStore && triggerTrackStore && fTriggerStore && fTrigChamberEff){ fTrigChamberEff->EventChamberEff(*fTriggerStore,*triggerTrackStore,*trackStore); - fTrigChamberEff->WriteEfficiencyMap("."); - fTrigChamberEff->WriteEfficiencyMapTxt("."); } FillESD(*trackStore,esd); diff --git a/MUON/AliMUONTriggerChamberEff.cxx b/MUON/AliMUONTriggerChamberEff.cxx index 67cf08b4123..1d13d9301b5 100644 --- a/MUON/AliMUONTriggerChamberEff.cxx +++ b/MUON/AliMUONTriggerChamberEff.cxx @@ -46,6 +46,12 @@ #include "AliMpDEIterator.h" #include "AliMpPlaneType.h" #include "AliMpDEManager.h" +#include "AliMpConstants.h" + +#include "AliMpDDLStore.h" +#include "AliMpDDL.h" +#include "AliMpTriggerCrate.h" +#include "AliMpLocalBoard.h" #include "AliLog.h" @@ -58,12 +64,18 @@ #include #include +#include +#include +#include +#include +#include + +#include /// \cond CLASSIMP ClassImp(AliMUONTriggerChamberEff) /// \endcond - //_____________________________________________________________________________ AliMUONTriggerChamberEff::AliMUONTriggerChamberEff() : TObject(), @@ -75,7 +87,9 @@ AliMUONTriggerChamberEff::AliMUONTriggerChamberEff() fDebugLevel(0), fkMaxDistance(99999.) { -/// Standard constructor +/// Default constructor + + CheckConstants(); ResetArrays(); } @@ -94,6 +108,8 @@ AliMUONTriggerChamberEff::AliMUONTriggerChamberEff(const AliMUONGeometryTransfor fkMaxDistance(99999.) { /// Standard constructor + + CheckConstants(); ResetArrays(); } @@ -117,23 +133,17 @@ AliMUONTriggerChamberEff::AliMUONTriggerChamberEff(const AliMUONTriggerChamberEf fPrintInfo(other.fPrintInfo), fWriteOnESD(other.fWriteOnESD), fDebugLevel(other.fDebugLevel), - fkMaxDistance(other.fkMaxDistance) + fkMaxDistance(other.fkMaxDistance), + fTrigger44(other.fTrigger44), + fTrigger34(other.fTrigger34) { -/// copy constructor +/// Copy constructor - for(Int_t ch=0; chIsNull()) continue; - TArrayS xyPattern[2]; + TArrayS xyPattern[fgkNcathodes]; locTrg->GetXPattern(xyPattern[0]); locTrg->GetYPattern(xyPattern[1]); @@ -231,9 +255,8 @@ void AliMUONTriggerChamberEff::InfoDigit(AliMUONVDigitStore& digitStore) //_____________________________________________________________________________ Int_t AliMUONTriggerChamberEff::MatchingPad(AliMUONVDigitStore& digitStore, Int_t &detElemId, - Float_t coor[2], Bool_t isMatch[fgkNcathodes], - Int_t nboard[fgkNcathodes][4], - Float_t zRealMatch[fgkNchambers], Float_t y11) + Float_t coor[2], Bool_t isMatch[2], + TArrayI nboard[2], TArrayF &zRealMatch, Float_t y11) { // /// Check slat and board number of digit matching track @@ -306,7 +329,7 @@ Int_t AliMUONTriggerChamberEff::MatchingPad(AliMUONVDigitStore& digitStore, Int_ AliMpIntPair location = pad.GetLocation(loc); nboard[cathode][loc] = location.GetFirst(); } - for(Int_t loc=pad.GetNofLocations(); loc<4; loc++){ + for(Int_t loc=pad.GetNofLocations(); loc(next()) ) ) { - for(Int_t cath=0; cath=1) printf("\tTrack %p (%f, %f) don't match tracker track: rejected!\n",(void *)recTrigTrack,recTrigTrack->GetX11(),recTrigTrack->GetY11()); + continue; } + + digitPerTrack.Reset(); for(Int_t ch=0; ch=1) printf("\tTrack %p (%f, %f) don't match tracker track: rejected!\n",recTrigTrack,recTrigTrack->GetX11(),recTrigTrack->GetY11()); - continue; - } - Float_t x11 = recTrigTrack->GetX11();// x position (info from non-bending plane) Float_t y11 = recTrigTrack->GetY11();// y position (info from bending plane) Float_t thetaX = recTrigTrack->GetThetax(); Float_t thetaY = recTrigTrack->GetThetay(); - if(fDebugLevel>=3) printf("\tTrack = %p\npos from track: (x,y) = (%f, %f), (thetaX, thetaY) = (%f, %f)\n",recTrigTrack,x11,y11,thetaX*rad2deg,thetaY*rad2deg); - - for(Int_t ch=0; ch=3) printf("\tTrack = %p\npos from track: (x,y) = (%f, %f), (thetaX, thetaY) = (%f, %f)\n",(void *)recTrigTrack,x11,y11,thetaX*rad2deg,thetaY*rad2deg); for(Int_t ch=0; ch Event not clear => Reject track if(triggeredDigits[1][currCh]<-100){ isClearEvent = kFALSE; - if(fDebugLevel>=1) printf("Warning: track = %p (%i) matches many pads. Rejected!\n",recTrigTrack, detElemIdFromTrack); + if(fDebugLevel>=1) printf("Warning: track = %p (%i) matches many pads. Rejected!\n",(void *)recTrigTrack, detElemIdFromTrack); break; } @@ -619,9 +652,9 @@ void AliMUONTriggerChamberEff::EventChamberEff(const AliMUONVTriggerStore& trigg match[currCh][cath] = (matchPad[cath] && !isDiffLocBoard); if(!match[currCh][cath]) continue; digitPerTrack[cath]++; - trigScheme[currCh][cath]++; - slatThatTriggered[currCh][cath] = detElemIdFromTrack; - for(Int_t loc=0; loc<4; loc++){ + trigScheme[cath][currCh]++; + slatThatTriggered[cath][currCh] = detElemIdFromTrack; + for(Int_t loc=0; loc=1)printf("Trigger44[%i] = %i\n",cath,fTrigger44[cath]); if(goodForSlatEff){ for(Int_t ch=0; ch=1)printf("Slat that triggered = %i\n",slatThatTriggered[ch][cath]); + Int_t chCath = fgkNchambers*cath + ch; + fHitPerSlat[chCath][firstSlat]++; + if(fDebugLevel>=1)printf("Slat that triggered = %i\n",slatThatTriggered[cath][ch]); if(goodForBoardEff && firstBoard>0){ - fHitPerBoard[ch][cath][firstBoard-1]++; + fHitPerBoard[chCath][firstBoard-1]++; if(fDebugLevel>=1)printf("Board that triggered = %i\n",firstBoard); } - else if(fDebugLevel>=1) printf("Track = %p: Particle crossed different boards: rejected!\n",recTrigTrack); + else if(fDebugLevel>=1) printf("Track = %p: Particle crossed different boards: rejected!\n",(void *)recTrigTrack); } } - else if(fDebugLevel>=1) printf("Track = %p: Particle crossed different slats: rejected!\n",recTrigTrack); - //cout<<"fTrigger44["<0){ Int_t ineffCh = ineffDetElId/100-11; - fTrigger34[ineffCh][cath]++; - if(fDebugLevel>=1) printf("Trigger34[%i][%i] = %i\n",ineffCh,cath,fTrigger34[ineffCh][cath]); + Int_t chCath = fgkNchambers*cath + ineffCh; + fTrigger34[chCath]++; + if(fDebugLevel>=1) printf("Trigger34[%i] = %i\n",chCath,fTrigger34[chCath]); if(goodForSlatEff){ if(fDebugLevel>=1) printf("Slat non efficient = %i\n",ineffDetElId); - fInefficientSlat[ineffCh][cath][ineffSlat]++; + fInefficientSlat[chCath][ineffSlat]++; if(goodForBoardEff && firstBoard>0){ if(fDebugLevel>=1) printf("Board non efficient = %i\n",firstBoard); - fInefficientBoard[ineffCh][cath][firstBoard-1]++; + fInefficientBoard[chCath][firstBoard-1]++; } - else if(fDebugLevel>=1) printf("Track = %p: Particle crossed different boards: rejected!\n",recTrigTrack); + else if(fDebugLevel>=1) printf("Track = %p: Particle crossed different boards: rejected!\n",(void *)recTrigTrack); } - else if(fDebugLevel>=1) printf("Track = %p: Particle crossed different slats: rejected!\n",recTrigTrack); - //cout<<"fTrigger34["<=1) - printf("\n\tTrack = %p: \nDouble Count Track: Track rejected!\n",recTrigTrack); + printf("\n\tTrack = %p: \nDouble Count Track: Track rejected!\n",(void *)recTrigTrack); } } // end trigger tracks loop @@ -742,67 +775,66 @@ void AliMUONTriggerChamberEff::WriteEfficiencyMap(const char* outputDir) TFile *outputHistoFile = new TFile(outFileName,"RECREATE"); TDirectory *dir = gDirectory; - enum {kSlatIn11, kSlatIn12, kSlatIn13, kSlatIn14, kChamberEff}; char *yAxisTitle = "trigger efficiency (a.u.)"; char *xAxisTitle = "chamber"; - TH1F *histo[fgkNcathodes][fgkNchambers+1]; - TH1F *histoBoard[fgkNcathodes][fgkNchambers]; + const Int_t kNumOfBoards = AliMpConstants::NofLocalBoards(); + + TH1F *histoChamber[fgkNcathodes]; + TH1F *histoSlat[8]; + TH1F *histoBoard[8]; // ADDED for check - enum {allChEff, chNonEff, numOfHistoTypes}; - char *histoTypeName[numOfHistoTypes] = {"CountInCh", "NonCountInCh"}; - char *histoTypeTitle[numOfHistoTypes] = {"counted", "non counted"}; - TH1F *histoCheckSlat[fgkNcathodes][fgkNchambers][numOfHistoTypes]; - TH1F *histoCheckBoard[fgkNcathodes][fgkNchambers][numOfHistoTypes]; + enum {kAllChEff, kChNonEff, kNumOfHistoTypes}; + char *histoTypeName[kNumOfHistoTypes] = {"CountInCh", "NonCountInCh"}; + char *histoTypeTitle[kNumOfHistoTypes] = {"counted", "non counted"}; + TH1F *histoCheckSlat[8][kNumOfHistoTypes]; + TH1F *histoCheckBoard[8][kNumOfHistoTypes]; // end ADDED for check char histoName[40]; char histoTitle[90]; for(Int_t cath=0; cathSetXTitle(xAxisTitle); - histo[cath][ch]->SetYTitle(yAxisTitle); - histo[cath][ch]->GetXaxis()->SetNdivisions(fgkNchambers); - } - else { - sprintf(histoName, "%sSlatEffChamber%i", cathCode[cath], 11+ch); - sprintf(histoTitle, "Chamber %i: slat efficiency %s", 11+ch, cathCode[cath]); - histo[cath][ch] = new TH1F(histoName, histoTitle, fgkNslats, 0-0.5, fgkNslats-0.5); - histo[cath][ch]->SetXTitle("slat"); - histo[cath][ch]->SetYTitle(yAxisTitle); - histo[cath][ch]->GetXaxis()->SetNdivisions(fgkNslats); + sprintf(histoName, "%sChamberEff", cathCode[cath]); + sprintf(histoTitle, "Chamber efficiency %s", cathCode[cath]); + histoChamber[cath] = new TH1F(histoName, histoTitle, fgkNchambers, 11-0.5, 15-0.5); + histoChamber[cath]->SetXTitle(xAxisTitle); + histoChamber[cath]->SetYTitle(yAxisTitle); + histoChamber[cath]->GetXaxis()->SetNdivisions(fgkNchambers); + for(Int_t ch=0; chSetXTitle("slat"); + histoSlat[chCath]->SetYTitle(yAxisTitle); + histoSlat[chCath]->GetXaxis()->SetNdivisions(fgkNslats); - sprintf(histoName, "%sBoardEffChamber%i", cathCode[cath], 11+ch); - sprintf(histoTitle, "Chamber %i: board efficiency %s", 11+ch, cathCode[cath]); - histoBoard[cath][ch] = new TH1F(histoName, histoTitle, fgkNboards, 1-0.5, fgkNboards+1.-0.5); - histoBoard[cath][ch]->SetXTitle("boards"); - histoBoard[cath][ch]->SetYTitle(yAxisTitle); - histoBoard[cath][ch]->GetXaxis()->SetNdivisions(fgkNboards); - - // ADDED for check - for(Int_t hType=0; hTypeSetXTitle("slat"); - histoCheckSlat[cath][ch][hType]->SetYTitle(yAxisTitle); - histoCheckSlat[cath][ch][hType]->GetXaxis()->SetNdivisions(fgkNslats); - - sprintf(histoName, "%sBoard%s%i", cathCode[cath], histoTypeName[hType], 11+ch); - sprintf(histoTitle, "Chamber %i: board %s %s", 11+ch, histoTypeTitle[hType], cathCode[cath]); - histoCheckBoard[cath][ch][hType] = new TH1F(histoName, histoTitle, fgkNboards, 1-0.5, fgkNboards+1.-0.5); - histoCheckBoard[cath][ch][hType]->SetXTitle("boards"); - histoCheckBoard[cath][ch][hType]->SetYTitle(yAxisTitle); - histoCheckBoard[cath][ch][hType]->GetXaxis()->SetNdivisions(fgkNboards); - } - // end ADDED for check + sprintf(histoName, "%sBoardEffChamber%i", cathCode[cath], 11+ch); + sprintf(histoTitle, "Chamber %i: board efficiency %s", 11+ch, cathCode[cath]); + histoBoard[chCath] = new TH1F(histoName, histoTitle, kNumOfBoards, 1-0.5, kNumOfBoards+1.-0.5); + histoBoard[chCath]->SetXTitle("boards"); + histoBoard[chCath]->SetYTitle(yAxisTitle); + histoBoard[chCath]->GetXaxis()->SetNdivisions(kNumOfBoards); + + // ADDED for check + for(Int_t hType=0; hTypeSetXTitle("slat"); + histoCheckSlat[chCath][hType]->SetYTitle(yAxisTitle); + histoCheckSlat[chCath][hType]->GetXaxis()->SetNdivisions(fgkNslats); + + sprintf(histoName, "%sBoard%s%i", cathCode[cath], histoTypeName[hType], 11+ch); + sprintf(histoTitle, "Chamber %i: board %s %s", 11+ch, histoTypeTitle[hType], cathCode[cath]); + histoCheckBoard[chCath][hType] = new TH1F(histoName, histoTitle, kNumOfBoards, 1-0.5, kNumOfBoards+1.-0.5); + histoCheckBoard[chCath][hType]->SetXTitle("boards"); + histoCheckBoard[chCath][hType]->SetYTitle(yAxisTitle); + histoCheckBoard[chCath][hType]->GetXaxis()->SetNdivisions(kNumOfBoards); } + // end ADDED for check } } @@ -811,30 +843,31 @@ void AliMUONTriggerChamberEff::WriteEfficiencyMap(const char* outputDir) for(Int_t cath=0; cathFindBin(slat); - histo[cath][ch]->SetBinContent(bin, efficiency); - histo[cath][ch]->SetBinError(bin, efficiencyError); + CalculateEfficiency(fHitPerSlat[chCath][slat], fHitPerSlat[chCath][slat]+fInefficientSlat[chCath][slat], efficiency, efficiencyError, kFALSE); + bin = histoSlat[chCath]->FindBin(slat); + histoSlat[chCath]->SetBinContent(bin, efficiency); + histoSlat[chCath]->SetBinError(bin, efficiencyError); // ADDED for check - histoCheckSlat[cath][ch][allChEff]->SetBinContent(bin, fHitPerSlat[ch][cath][slat]); - histoCheckSlat[cath][ch][chNonEff]->SetBinContent(bin, fInefficientSlat[ch][cath][slat]); + histoCheckSlat[chCath][kAllChEff]->SetBinContent(bin, fHitPerSlat[chCath][slat]); + histoCheckSlat[chCath][kChNonEff]->SetBinContent(bin, fInefficientSlat[chCath][slat]); } - CalculateEfficiency(fTrigger44[cath], fTrigger34[ch][cath]+fTrigger44[cath], efficiency, efficiencyError, kFALSE); - bin = histo[cath][ch]->FindBin(11+ch); - histo[cath][kChamberEff]->SetBinContent(bin, efficiency); - histo[cath][kChamberEff]->SetBinError(bin, efficiencyError); + CalculateEfficiency(fTrigger44[cath], fTrigger34[chCath]+fTrigger44[cath], efficiency, efficiencyError, kFALSE); + bin = histoChamber[cath]->FindBin(11+ch); + histoChamber[cath]->SetBinContent(bin, efficiency); + histoChamber[cath]->SetBinError(bin, efficiencyError); - for(Int_t board=0; boardFindBin(board+1); - histoBoard[cath][ch]->SetBinContent(bin, efficiency); - histoBoard[cath][ch]->SetBinError(bin, efficiencyError); + for(Int_t board=0; boardFindBin(board+1); + histoBoard[chCath]->SetBinContent(bin, efficiency); + histoBoard[chCath]->SetBinError(bin, efficiencyError); // ADDED for check - histoCheckBoard[cath][ch][allChEff]->SetBinContent(bin, fHitPerBoard[ch][cath][board]); - histoCheckBoard[cath][ch][chNonEff]->SetBinContent(bin, fInefficientBoard[ch][cath][board]); + histoCheckBoard[chCath][kAllChEff]->SetBinContent(bin, fHitPerBoard[chCath][board]); + histoCheckBoard[chCath][kChNonEff]->SetBinContent(bin, fInefficientBoard[chCath][board]); } } } @@ -872,14 +905,15 @@ void AliMUONTriggerChamberEff::WriteEfficiencyMapTxt(const char* outputDir) outFile << "00"; for(Int_t cath=0; cathcd(); } + + +//_____________________________________________________________________________ +void AliMUONTriggerChamberEff::DisplayEfficiency(Bool_t perSlat) +{ + // + /// Display calculated efficiency. + // + + const Int_t kNumOfBoards = AliMpConstants::NofLocalBoards(); + + Int_t side, col, line, nbx, slat; + Float_t xCenter, yCenter, zCenter, xWidth, yWidth; + Int_t x1, y1, x2, y2, board=0; + char name[8], text[200]; + + gStyle->SetPalette(1); + + TString boardName[234]; + + // instanciate the elec. mapping class + AliMpDDLStore* ddlStore = AliMpDDLStore::Instance(); + + // loop over the trigger DDL (Right: 20, Left: 21) + for (Int_t iDDL = 20; iDDL <= 21; ++iDDL) { + + // get ddl object + AliMpDDL* ddl = ddlStore->GetDDL(iDDL); + + Int_t nCrate = ddl->GetNofTriggerCrates(); + + // loop over the number of crate in DDL + for (Int_t index = 0; index < nCrate; ++index) { + + // get crate object + AliMpTriggerCrate* crate = ddlStore->GetTriggerCrate(iDDL, index); + + Int_t nLocal = crate->GetNofLocalBoards(); + + for (Int_t iLocal = 0; iLocal < nLocal; ++iLocal) { + + // get local board Id from crate object + board = crate->GetLocalBoardId(iLocal); + if(board>kNumOfBoards || board<=0) continue; + + AliMpLocalBoard* localBoard = ddlStore->GetLocalBoard(board); + boardName[board-1] = localBoard->GetName(); + } + } + } + + char *cathCode[fgkNcathodes] = {"bendPlane", "nonBendPlane"}; + + Float_t boardsX = 257.00; // cm + Float_t boardsY = 307.00; // cm + + TH2F *histo[8]; + TPaveLabel *boardLabel[8][234]; + + char histoName[40]; + char histoTitle[90]; + + Float_t efficiency, efficiencyError; + + for(Int_t cath=0; cathSetXTitle("X (cm)"); + histo[chCath]->SetYTitle("Y (cm)"); + } + } + + TString mapspath = gSystem->Getenv("ALICE_ROOT"); + mapspath.Append("/MUON/data"); + + sprintf(text,"%s/guimapp11.txt",mapspath.Data()); + FILE *fmap = fopen(text,"r"); + + for (Int_t ib = 0; ib < kNumOfBoards; ib++) { + fscanf(fmap,"%d %d %d %d %f %f %f %f %f %s \n",&side,&col,&line,&nbx,&xCenter,&yCenter,&xWidth,&yWidth,&zCenter,&name[0]); + + slat = (line-5)%fgkNslats; + for(Int_t iBoard=0; iBoardGetXaxis()->FindBin(xCenter-xWidth/2.)+1; + y1 = histo[chCath]->GetYaxis()->FindBin(yCenter-yWidth/2.)+1; + x2 = histo[chCath]->GetXaxis()->FindBin(xCenter+xWidth/2.)-1; + y2 = histo[chCath]->GetYaxis()->FindBin(yCenter+yWidth/2.)-1; + + boardLabel[chCath][board] = new TPaveLabel(xCenter-xWidth/2., yCenter-yWidth/2., xCenter+xWidth/2., yCenter+yWidth/2., Form("%3d",board+1)); + boardLabel[chCath][board]->SetFillStyle(0); + boardLabel[chCath][board]->SetBorderSize(0); + + if(!perSlat){ + CalculateEfficiency(fHitPerBoard[chCath][board], fHitPerBoard[chCath][board]+fInefficientBoard[chCath][board], efficiency, efficiencyError, kFALSE); + } + else{ + CalculateEfficiency(fHitPerSlat[chCath][slat], fHitPerSlat[chCath][slat]+fInefficientSlat[chCath][slat], efficiency, efficiencyError, kFALSE); + } + + for(Int_t binX=x1; binX<=x2; binX++){ + for(Int_t binY=y1; binY<=y2; binY++){ + histo[chCath]->SetBinContent(binX, binY, efficiency); + histo[chCath]->SetBinError(binX, binY, efficiencyError); + } + } + } + } + + TCanvas *can[8]; + for(Int_t chCath=0; chCathGetName()); + sprintf(histoTitle, "%s", histo[chCath]->GetTitle()); + can[chCath] = new TCanvas(histoName, histoTitle, 100+10*chCath, 10*chCath, 700, 700); + can[chCath]->SetRightMargin(0.14); + can[chCath]->SetLeftMargin(0.12); + histo[chCath]->GetZaxis()->SetRangeUser(0.,1.); + histo[chCath]->GetYaxis()->SetTitleOffset(1.4); + histo[chCath]->SetStats(kFALSE); + histo[chCath]->Draw("COLZ"); + for (Int_t board = 0; board < kNumOfBoards; board++) { + boardLabel[chCath][board]->Draw("same"); + } + } +} + +//_____________________________________________________________________________ +void AliMUONTriggerChamberEff::CheckConstants() const +{ +/// Check consistence of redefined constants + + assert(fgkNcathodes == AliMpConstants::NofCathodes()); + assert(fgkNchambers == AliMpConstants::NofTriggerChambers()); + assert(fgkNplanes == AliMpConstants::NofTriggerChambers() * fgkNcathodes); +} diff --git a/MUON/AliMUONTriggerChamberEff.h b/MUON/AliMUONTriggerChamberEff.h index 7eecba633be..dc1864c9ca6 100644 --- a/MUON/AliMUONTriggerChamberEff.h +++ b/MUON/AliMUONTriggerChamberEff.h @@ -11,6 +11,8 @@ #include #include +#include +#include class AliMUONGeometryTransformer; class AliMUONDigitMaker; @@ -19,7 +21,6 @@ class AliMUONVDigitStore; class AliMUONVTriggerStore; class AliMUONVTriggerTrackStore; class AliMUONVTrackStore; -class TClonesArray; class AliMUONTriggerChamberEff : public TObject { @@ -31,8 +32,8 @@ public: virtual ~AliMUONTriggerChamberEff(); - AliMUONTriggerChamberEff(const AliMUONTriggerChamberEff& other); - AliMUONTriggerChamberEff& operator=(const AliMUONTriggerChamberEff& other); + AliMUONTriggerChamberEff(const AliMUONTriggerChamberEff& other); // copy constructor + AliMUONTriggerChamberEff& operator=(const AliMUONTriggerChamberEff& other); // assignment operator /// Set Reproduce trigger response void SetReproduceTrigResponse(Bool_t reproduceTrigRes=kFALSE) @@ -49,41 +50,13 @@ public: const AliMUONVTrackStore& trackStore); void WriteEfficiencyMap(const char* outputDir); void WriteEfficiencyMapTxt(const char* outputDir); + void DisplayEfficiency(Bool_t perSlat=kFALSE); - -private: - /* - /// Not implemented - AliMUONTriggerChamberEff(const AliMUONTriggerChamberEff& other); - /// Not implemented - AliMUONTriggerChamberEff& operator=(const AliMUONTriggerChamberEff& other); - */ - - static const Int_t fgkNchambers=4; ///< Number of trigger chambers - static const Int_t fgkNcathodes=2; ///< Number of cathodes per chamber - static const Int_t fgkNslats=18; ///< Number of slats per chamber - static const Int_t fgkNboards=234; ///< Number of trigger boards per chamber - Int_t fTrigger34[fgkNchambers][fgkNcathodes]; ///< Array counting # of times chamber was inefficient - Int_t fTrigger44[fgkNcathodes]; ///< Array counting # of times all chambers were efficient - Int_t fInefficientSlat[fgkNchambers][fgkNcathodes][fgkNslats]; ///< Array counting # of times slats were inefficient - Int_t fHitPerSlat[fgkNchambers][fgkNcathodes][fgkNslats]; ///< Array counting # of times slats were efficient - Int_t fInefficientBoard[fgkNchambers][fgkNcathodes][fgkNboards]; ///< Array counting # of times boards were inefficient - Int_t fHitPerBoard[fgkNchambers][fgkNcathodes][fgkNboards]; ///< Array counting # of times boards were efficient - - const AliMUONGeometryTransformer* fTransformer; //!< geometry transformer - const AliMUONDigitMaker* fDigitMaker; //!< pointer to digit maker - Bool_t fReproduceTrigResponse; //!< Reproduce trigger response - Bool_t fPrintInfo; //!< Print informations on event - Int_t fWriteOnESD; //!< flag to write on ESD - Int_t fDebugLevel; //!< Debug level - const Float_t fkMaxDistance; //!< Maximum distance for reference - - protected: Int_t MatchingPad(AliMUONVDigitStore& digitStore, Int_t &detElemId, Float_t coor[2], - Bool_t isMatch[fgkNcathodes], Int_t nboard[fgkNcathodes][4], - Float_t zRealMatch[fgkNchambers], Float_t y11); + Bool_t isMatch[2], TArrayI nboard[2], + TArrayF &zRealMatch, Float_t y11); Float_t PadMatchTrack(Float_t xPad, Float_t yPad, Float_t dpx, Float_t dpy, Float_t xTrackAtPad, Float_t yTrackAtPad, Int_t chamber); void InfoDigit(AliMUONVDigitStore& digitStore); @@ -99,6 +72,31 @@ protected: const AliMUONVTrackStore& trackStore); void SaveInESDFile(); - ClassDef(AliMUONTriggerChamberEff,1) // Trigger chamber efficiency + +private: + void CheckConstants() const; + + const AliMUONGeometryTransformer* fTransformer; //!< geometry transformer + const AliMUONDigitMaker* fDigitMaker; //!< pointer to digit maker + Bool_t fReproduceTrigResponse; //!< Reproduce trigger response + Bool_t fPrintInfo; //!< Print informations on event + Int_t fWriteOnESD; //!< flag to write on ESD + Int_t fDebugLevel; //!< Debug level + const Float_t fkMaxDistance; //!< Maximum distance for reference + + static const Int_t fgkNcathodes=2; ///