}
//_____________________________________________________________________
-void AliTRDCalibChamberStatus::ProcessTrack(AliTRDtrackV1 * trdTrack)
+void AliTRDCalibChamberStatus::ProcessTrack(const AliTRDtrackV1 * trdTrack)
{
//
// Track Processing to get half chamber status
Double_t rphi = 0.5;
if(iMcm > 3) rphi = 1.5;
- Double_t val[4] = {sm,layer,stac,rphi};
+ Double_t val[4] = {static_cast<Double_t>(sm),static_cast<Double_t>(layer),static_cast<Double_t>(stac),static_cast<Double_t>(rphi)};
if(fHnSparseI->GetBinContent((const Int_t*)val)<2147483646) fHnSparseI->Fill(&val[0]);
}
Double_t rphi = 0.5;
if(iMcm > 3) rphi = 1.5;
- Double_t val[4] = {sm,layer,stac,rphi};
+ Double_t val[4] = {static_cast<Double_t>(sm),static_cast<Double_t>(layer),static_cast<Double_t>(stac),static_cast<Double_t>(rphi)};
fHnSparseI->Fill(&val[0]);
notEmpty = kTRUE;
// Debug //
if(fDebugLevel > 0) {
Int_t detector = AliTRDgeometry::GetDetector(layer,stac,sm);
- Double_t valu[3] = {nevents_physics,detector,rphi};
+ Double_t valu[3] = {static_cast<Double_t>(nevents_physics),static_cast<Double_t>(detector),rphi};
fHnSparseEvtDet->Fill(&valu[0]);
}
// Debug //
for (Int_t icol=0; icol<geo.GetColMax(ipl); icol++){
Int_t side = 0;
if(icol > 72) side = 1;
- Double_t val[4] = {ism,ipl,istack,side};
+ Double_t val[4] = {static_cast<Double_t>(ism),static_cast<Double_t>(ipl),static_cast<Double_t>(istack),static_cast<Double_t>(side)};
fHnSparseI->Fill(&val[0]);
}
}
}
//_____________________________________________________________________
-void AliTRDCalibChamberStatus::AnalyseHisto(Int_t limit) /*FOLD00*/
+void AliTRDCalibChamberStatus::AnalyseHisto(Int_t limit, Double_t chamberlimit) /*FOLD00*/
{
//
// Create the AliTRDCalChamberStatus according to the fHnSparseI
if(fCalChamberStatus) delete fCalChamberStatus;
fCalChamberStatus = new AliTRDCalChamberStatus();
+ //printf("test0\n");
+
// Check if enough events/tracklets per halfchamber to say something
Double_t mean=0.0; //number of tracklets per HCS
Int_t coord2[4];
//if(fHnSparseI->GetBinContent(bin,coord2)==0.0) printf(" bin shouldnt be empty!!\n");
mean+=fHnSparseI->GetBinContent(bin,coord2);
}
- mean/=fHnSparseI->GetNbins();
- //printf(" mean tracklets per halfchamber %f \n",mean);
+ if(fHnSparseI->GetNbins() > 0.0) mean/=fHnSparseI->GetNbins();
+ //printf(" mean tracklets per halfchamber %.3e \n",mean);
if((fCounterEventNotEmpty < limit) && (mean < limit)) {
// Say all good
for (Int_t idet=0; idet<540; idet++) {
return;
}
+ //printf("test1\n");
+
// set all chambers to NoData
for (Int_t idet=0; idet<540; idet++) {
fCalChamberStatus->SetStatus(idet,AliTRDCalChamberStatus::kNoData);
for(Int_t bin = 0; bin < fHnSparseI->GetNbins(); bin++) {
Double_t content = fHnSparseI->GetBinContent(bin,coord);
- // layer, stack, sector
+
+ // layer, stack, sector
Int_t detector = AliTRDgeometry::GetDetector(coord[1]-1,coord[2]-1,coord[0]-1);
- //
- //printf("Number of entries for detector %d: %f\n",detector,content);
+
+ if(content<chamberlimit*mean) {
+ //printf("Number of entries for detector %03d-%s: %.3e -> %.3f \n",detector,(coord[3]-1==0?"A":"B"),content,content/mean);
+ continue;
+ }
//
// Check which halfchamber side corresponds to the bin number (0=A, 1=B)
// Change the status accordingly
}
//_____________________________________________________________________
-void AliTRDCalibChamberStatus::CheckEORStatus(AliTRDCalDCSv2 *calDCS) /*FOLD00*/
+void AliTRDCalibChamberStatus::CheckEORStatus(const AliTRDCalDCSv2 *calDCS) /*FOLD00*/
{
//
// Correct the AliTRDCalChamberStatus according to the AliTRDCalDCSv2
((fCalChamberStatus->GetStatus(det) == 4) && (stateB==0 || stateB==1)) )
{
//printf(" Different half chamber status in DCS and DATA!!\n");
- Double_t val[4] = {sm,lay,stac,1};
+ Double_t val[4] = {static_cast<Double_t>(sm),static_cast<Double_t>(lay),static_cast<Double_t>(stac),1};
fHnSparseDebug->Fill(&val[0]);
// Fill MCM status map
for(Int_t ii = 0; ii < 8; ii++) { //ROB loop
for(Int_t i = 0; i < 18; i++) { //MCM loop
- Double_t valss[6] = {sm,lay,stac,ii,i
- ,calDCSFEEEOR->GetMCMGlobalState(ii,i)};
+ Double_t valss[6] = {static_cast<Double_t>(sm),static_cast<Double_t>(lay),static_cast<Double_t>(stac),static_cast<Double_t>(ii),static_cast<Double_t>(i)
+ ,static_cast<Double_t>(calDCSFEEEOR->GetMCMGlobalState(ii,i))};
fHnSparseMCM->Fill(&valss[0]);
}
//---------------------------------------
// Change the status according to DCS
//---------------------------------------
- Int_t StatusData = fCalChamberStatus->GetStatus(det);
- switch(StatusData)
+ Int_t statusData = fCalChamberStatus->GetStatus(det);
+ switch(statusData)
{
case 1:
if(stateA==0 && stateB==0) fCalChamberStatus->SetStatus(det,2); // completely masked from DCS
}
//_____________________________________________________________________________________
-void AliTRDCalibChamberStatus::Add(AliTRDCalibChamberStatus *calibChamberStatus) /*FOLD00*/
+void AliTRDCalibChamberStatus::Add(const AliTRDCalibChamberStatus *calibChamberStatus) /*FOLD00*/
{
//
// Add the THnSparseI of this calibChamberStatus
}
//_____________________________________________________________________
-TH2F *AliTRDCalibChamberStatus::MakeHisto2DSmPlEORStatus(AliTRDCalDCSv2 *calDCS, Int_t sm, Int_t pl) /*FOLD00*/
+TH2F *AliTRDCalibChamberStatus::MakeHisto2DSmPlEORStatus(const AliTRDCalDCSv2 *calDCS, Int_t sm, Int_t pl) /*FOLD00*/
{
//
// Plot globale state of the HalfChamberMerger (HCM)