3232
3333double computeEfficiencyPerChamber (THnF* hnf, int iAxis, int iCh, double binLimits[2 ]);
3434double computeEfficiencyPerChamber (THnF* hnf, const int iAxis[3 ], int iCh, double binLimits[3 ][2 ]);
35- double computeStationEfficiency (double effPerChamber[4 ], int iStation);
36- double computeTotalEfficiency (double effPerStation[5 ]);
35+ double computeStationEfficiency (double const effPerChamber[4 ], int iStation);
36+ double computeTotalEfficiency (double const effPerStation[5 ]);
3737
3838void getBinLimits (THnF* hnf, int nBins, int iAxis, std::vector<double >& limits);
3939void setHistoMinPt (THnF* hnf, int iAxis, float minPt);
@@ -102,15 +102,13 @@ void evalMchTrackingEfficiency(const char* inFile = "AnalysisResults.root", cons
102102 // as well as the one per station
103103 // the total integrated value is stored in both histos as last quantity for reference
104104 TH1F * hEffIntegratedChamber = new TH1F (" hEffIntegratedChamber" , " integrated efficiency per chamber; ;Efficiency" , kChamber + 1 , -0.5 , kChamber + 0.5 );
105- const char * hChNames[kChamber + 1 ];
106105 for (int i = 0 ; i < kChamber ; i++) {
107106 hEffIntegratedChamber->GetXaxis ()->SetBinLabel (i + 1 , Form (" Chamber %d" , i));
108107 }
109108 hEffIntegratedChamber->GetXaxis ()->SetBinLabel (kChamber + 1 , " Total" );
110109
111110 // Define histogram for integrated efficiency per station
112111 TH1F * hEffIntegratedStation = new TH1F (" hEffIntegratedStation" , " integrated efficiency per station; ;Efficiency" , kStation , -0.5 , kStation + 0.5 );
113- const char * hStNames[kStation ];
114112 for (int i = 0 ; i < 3 ; i++) {
115113 hEffIntegratedStation->GetXaxis ()->SetBinLabel (i + 1 , Form (" Station %d" , i));
116114 }
@@ -384,7 +382,7 @@ double computeEfficiencyPerChamber(THnF* hnf, const int iAxis[3], int iCh, doubl
384382// Compute the efficiency per station
385383// Stations 1, 2, 3: Eff = 1 - ( 1 - E(i) ) * ( 1 - (E(j) )
386384// Stations 4 & 5 together: Eff = product(i=6...9) E(i) + sum(i=6...9) [ ( 1 - E(i) )* product(j=6...9, i!=i) E(j) ]
387- double computeStationEfficiency (double effPerChamber[4 ], int iStation)
385+ double computeStationEfficiency (double const effPerChamber[4 ], int iStation)
388386{
389387 double effSt = 0 .;
390388 if (iStation < 3 ) { // Calculation for Station 1, 2, 3
@@ -409,7 +407,7 @@ double computeStationEfficiency(double effPerChamber[4], int iStation)
409407}
410408
411409// Total efficiency corresponds to the product of the efficiency per station
412- double computeTotalEfficiency (double effPerStation[5 ])
410+ double computeTotalEfficiency (double const effPerStation[5 ])
413411{
414412 double effTot = 1 .;
415413 for (int i = 0 ; i < 4 ; i++) {
0 commit comments