diff --git a/macro/beamtime/mcbm2020/pl_all_DigiDTFD.C b/macro/beamtime/mcbm2020/pl_all_DigiDTFD.C
index 6308096c414757bf22c893562e5d360a487bafa2..f348a6e23f4066c58ba7af79dac1339dcd83fa4c 100644
--- a/macro/beamtime/mcbm2020/pl_all_DigiDTFD.C
+++ b/macro/beamtime/mcbm2020/pl_all_DigiDTFD.C
@@ -1,4 +1,9 @@
-void pl_all_DigiDTFD( Int_t iOpt = 0, Int_t iNDet = 2, Double_t dDTthr = 2.) {
+void pl_all_DigiDTFD( Int_t iOpt = 0, Double_t dYmax = 0., Int_t iNDet = 2) {
+	Int_t iOpt1 = iOpt%10;
+	Int_t iOpt2 = (iOpt - iOpt1)/10 % 10;
+	Int_t iOpt3 = (iOpt - iOpt2*10 - iOpt1)/100 % 10;
+	Int_t iOpt4 = (iOpt - iOpt3*100 - iOpt2*10 - iOpt1)/1000 % 10;
+
   //  TCanvas *can = new TCanvas("can22","can22");
   //  can->Divide(2,2);
   TCanvas* can = new TCanvas("can", "can", 48, 55, 900, 900);
@@ -6,7 +11,21 @@ void pl_all_DigiDTFD( Int_t iOpt = 0, Int_t iNDet = 2, Double_t dDTthr = 2.) {
   //can->Divide(4,4,0.01,0.01);
   //  can->Divide(2,3,0.01,0.01);
   //can->Divide(5, 7, 0.01, 0.01);
-  can->Divide(5, 4, 0.01, 0.01);
+  switch ( iOpt3 ) {
+    case 0:
+	  can->Divide(5, 7, 0.01, 0.01);
+	  break;
+    case 1:
+	  can->Divide(5, 4, 0.01, 0.01);
+	  break;
+    case 3:
+	  can->Divide(1, 4, 0.01, 0.01);
+	  break;
+    case 4:
+	  can->Divide(1, 1, 0.01, 0.01);
+	  break;
+  }
+
   Float_t lsize = 0.07;
 
   gPad->SetFillColor(0);
@@ -23,7 +42,7 @@ void pl_all_DigiDTFD( Int_t iOpt = 0, Int_t iNDet = 2, Double_t dDTthr = 2.) {
   TString hnameT;
 
   const Int_t iType[6]   = {0, 5, 9, 7, 6, 8};
-  const Int_t iSmNum[6]  = {3, 1, 1, 1, 1, 1};
+  const Int_t iSmNum[6]  = {5, 1, 1, 1, 1, 1};
   const Int_t iRpcNum[6] = {5, 1, 2, 1, 2, 8};
 
   Double_t dTime = 0.;
@@ -34,15 +53,31 @@ void pl_all_DigiDTFD( Int_t iOpt = 0, Int_t iNDet = 2, Double_t dDTthr = 2.) {
   Int_t jRp     = 0;
 
   // if (h!=NULL) h->Delete();
+  Int_t iCol=1;
 
   for (Int_t iCh = 0; iCh < iNDet; iCh++) {
     for (Int_t iSm = 0; iSm < iSmNum[iCh]; iSm++) {
-      for (Int_t iRpc = 0; iRpc < iRpcNum[iCh]; iRpc++) {
+      if (iOpt3==1) {
         can->cd(iCanv + 1);
         iCanv++;
         gROOT->cd();
+        iCol=1;
+      } else {
+    	if(iOpt3==4 ){
+    		iCol=1;
+    	  if (iCh != iOpt4 ) continue;
+    	}
+      }
+      for (Int_t iRpc = 0; iRpc < iRpcNum[iCh]; iRpc++) {
+      	if (iOpt3==0) {
+            can->cd(iCanv + 1);
+            iCanv++;
+            gROOT->cd();
+            iCol=4;
+      	}
+
         TString hname ="";
-        switch (iOpt%10) {
+        switch (iOpt1) {
           case 0:
             hname=Form("cl_SmT%01d_sm%03d_rpc%03d_DigiDTFD", iType[iCh], iSm, iRpc);
 	        break;
@@ -53,24 +88,41 @@ void pl_all_DigiDTFD( Int_t iOpt = 0, Int_t iNDet = 2, Double_t dDTthr = 2.) {
 	    
           default:;
         }
-
+        iCol++;
+        if (iCol==5) iCol++;
         h2 = (TH2*) gROOT->FindObjectAny(hname);
         TH1D* hx;
         TH1D* hy;
+        TH1* hp;
         if (h2 != NULL) {
-	      Int_t iOpt2=(iOpt-iOpt%10)/10;
 	      switch(iOpt2) {
 	        case 0:
               h2->Draw("colz");
               gPad->SetLogz();
 	        break;
 	        case 1:
-	          h2->ProjectionY()->Draw();
+	          hp=(TH1*)h2->ProjectionY();
+	          hp->SetLineColor(iCol);
+	          switch (iOpt3) {
+	          	case 0:
+	          		hp->Draw();
+	          		break;
+	          	case 1:
+	          	case 4:
+	          		if (iRpc==0) {
+	          			if(dYmax>0.) hp->SetMaximum(dYmax);
+		          		hp->Draw();
+	          		}
+	          		else
+		          		hp->Draw("same");
+	          }
+	          cout << "plot " << hp->GetName() << " into canv " << iCanv << " with col " << iCol << endl;
 	          //gPad->SetLogy();
 	          break;
 
 	        case 2:
-	          h2->ProfileX("_pfx",1,20)->Draw();
+	          h2->SetMarkerSize(5);
+	          h2->ProfileX()->Draw();
 	          //gPad->SetLogz();
 	          break;