Changeset 235 in Idarraga


Ignore:
Timestamp:
Sep 20, 2011, 1:42:11 PM (13 years ago)
Author:
idarraga
Message:
 
Location:
mafalda/ShallowAngleFEIX
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • mafalda/ShallowAngleFEIX/ShallowAngleFEIX.cpp

    r222 r235  
    3636        getMyTree()->Branch("clusterSize", &m_clusterSize, "clusterSize/I");
    3737        getMyTree()->Branch("mipLength", &m_mipLength);
     38        getMyTree()->Branch("mipLength_X", &m_mipLength_X);
    3839        getMyTree()->Branch("totPerSegment", &m_totPerSegment);
    3940        getMyTree()->Branch("chargeWeights", &m_chargeWeights);
     
    116117                                        limitPixels[__TAIL_INDX].second * m_pixSizeY);
    117118                        m_mipLength.push_back( totalLength ); // mm
     119                        m_mipLength_X.push_back( TMath::Abs ( limitPixels[__HEAD_INDX].first * m_pixSizeX
     120                                        - limitPixels[__TAIL_INDX].first * m_pixSizeX ) );
    118121                        m_totalMIPsLength += totalLength;
    119122                        Log << MSG::DEBUG << "Integrated mips length = " << m_totalMIPsLength << " [mm]" << endreq;
     
    204207                }
    205208
    206                 // other clusters != MIP
     209                // there might be more than 1 good mip in a frame
     210                // Fill and clean up here
     211
     212                // Fill the output tree of this algorithm
     213                getMyTree()->Fill();
     214
     215                // WARNING ! don't forget to clean up your variables for the next TTree::Fill call
     216                m_distanceToCenter.clear();
     217                m_totPerSegment.clear();
     218                m_chargeWeights.clear();
     219                m_mipLength.clear();
     220                m_mipLength_X.clear();
    207221
    208222        }
    209223
    210         // Fill the output tree of this algorithm
    211         getMyTree()->Fill();
    212 
    213         // WARNING ! don't forget to clean up your variables for the next TTree::Fill call
    214         m_distanceToCenter.clear();
    215         m_totPerSegment.clear();
    216         m_chargeWeights.clear();
    217224
    218225}
  • mafalda/ShallowAngleFEIX/ShallowAngleFEIX.h

    r219 r235  
    4747  Int_t m_clusterSize;
    4848  vector<Float_t> m_mipLength;
     49  vector<Float_t> m_mipLength_X;
    4950  Double_t m_totalMIPsLength;
    5051  Int_t m_clusterHeight;
  • mafalda/ShallowAngleFEIX/configuration_algos_ShallowAngleFEIX.txt

    r219 r235  
    1 FEI3Mips minMipLength 2 float
    2 FEI3Mips pixelSizeX 0.4 float
    3 FEI3Mips pixelSizeY 0.05 float
    4 FEI3Mips dRayBalSearch 1.2 float
    51PRBasicSpecies circleToEllipseMin 1.4 float
    62PRBasicSpecies circleToEllipseMax 5 float
    73PRBasicSpecies mindistanceToLine 15 float
    84PRBasicSpecies fractionOfPixelsAtMindistance 0.8 float
     5ShallowAngleFEIX pixelSizeX 0.25 float
     6ShallowAngleFEIX pixelSizeY 0.05 float
     7ShallowAngleFEIX dRayBalSearch 1.4 float
    98BlobsFinder border 0 int
    109BlobsFinder discontinuity 0 int
    1110BlobsFinder lvl1cut -1 int
    12 FEI3Mips minNPixels 10 int
    13 FEI3Mips nDivisions 6 int
    14 FEI3Mips distanceCutHot 3 int
    15 FEI3Mips distancePerpHot 3 int
    16 FEI3Mips guardDistanceX 1 int
    17 FEI3Mips guardDistanceY 5 int
    1811PRBasicSpecies nInnerPixels 2 int
    1912PRBasicSpecies longGammaMax 3 int
    2013PRBasicSpecies minNPixelsMip 6 int
    2114PRBasicSpecies maxNPixelsCurly 50 int
     15ShallowAngleFEIX minNPixels 5 int
     16ShallowAngleFEIX minXWidth 6 int
     17ShallowAngleFEIX guardDistanceX 1 int
     18ShallowAngleFEIX guardDistanceY 5 int
  • mafalda/ShallowAngleFEIX/runNewAlgo.C

    r219 r235  
    44
    55//#define __NDIV          8
    6 #define __THICKNESS 0.320 // [mm]
     6//#define __THICKNESS 0.320 // [mm]  KEK FE-I3
     7#define __THICKNESS 0.150 // [mm]    KEK FE-I4 run 50734 to 50744
     8
     9#define __CHARGE  10
     10#define __ENTRIES 20
    711
    812void runNewAlgo(){
     
    1014        gROOT->ProcessLine(".x ~/styles/AtlasStyle.C");
    1115
    12 
    1316        TChain * T1 = new TChain("ShallowAngleFEIX");
    14         T1->Add("/home/idarraga/analysis/mafalda/MAFOutput_MPXNtuple_USBPIX_10_dep.root");
     17        T1->Add("/storage1/idarraga/Testbeam_July_CERN_2011/KEK_100V_4deg/MAFOutput/MAFOutput_MPXNtuple_USBPIXI4_20_100V.root");
     18        TString titleT = "KEK FE-I4 ~4deg DUT3";
     19        //T1->Add("/home/idarraga/analysis/mafalda/MAFOutput_MPXNtuple_USBPIX_10_dep.root");
    1520        //T->Add("/home/idarraga/analysis/mafalda/MAFOutput_KEK_run050620.root");
    1621        //T->Add("/home/idarraga/analysis/mafalda/MAFOutput_KEK_run050621.root");
    1722        //T->Add("/home/idarraga/analysis/mafalda/MAFOutput_KEK_run050622.root");
    1823
     24        Int_t plotType = __CHARGE;
     25        Int_t ndiv = 10;
     26        Int_t fulldiv = 10;
     27        Int_t rangeYMax = 14;
     28
    1929        TCanvas * c10 = new TCanvas();
    2030
    21         TGraphErrors * g1 = GetGraph(T1, "dep", 7, 7);
     31        TGraphErrors * g1 = GetGraph(T1, "V100V", ndiv, fulldiv, plotType);
    2232        c10->cd();
    2333        g1->Draw("A*");
    2434        g1->GetXaxis()->SetTitle("depth [mm]");
    25         g1->GetYaxis()->SetTitle("mean charge [TOT]");
    26         g1->GetYaxis()->SetRangeUser(0., 20);
    27         g1->SetMarkerStyle(22);
     35        g1->GetYaxis()->SetTitle("Q [TOT]");
     36        g1->GetYaxis()->SetRangeUser(0., rangeYMax);
     37        g1->SetMarkerStyle(26);
     38        g1->SetMarkerSize(2.0);
    2839        g1->SetMarkerColor(kBlue);
    2940
     41        TLatex * lt1 = new TLatex();
     42        lt1->DrawLatex(0.050, 9, "backside");
     43        lt1->DrawLatex(0.050, 13, "frontside");
     44        lt1->DrawLatex(0.06, 4, titleT);
     45
     46        TLatex * lt2 = new TLatex();
     47        lt2->SetTextSize(0.03);
     48        lt2->DrawLatex(0.06, 1, "MAFalda, idarraga@cern.ch");
     49
     50        /////////////////////////////////////////////////////////////////////////////////////
    3051
    3152        TChain * T2 = new TChain("ShallowAngleFEIX");
    32         T2->Add("/home/idarraga/analysis/mafalda/MAFOutput_MPXNtuple_USBPIX_10_f.root");
    33 
    34         TGraphErrors * g2 = GetGraph(T2, "udep", 6, 7);
     53        T2->Add("/storage1/idarraga/Testbeam_July_CERN_2011/KEK_15V_4deg/MAFOutput/MAFOutput_MPXNtuple_USBPIXI4_21_15V.root");
     54
     55        TGraphErrors * g2 = GetGraph(T2, "15V", 9, fulldiv, plotType);
    3556        // fix last point
    3657        c10->cd();
     
    3960        g2->SetMarkerColor(kRed);
    4061
    41 
    42 
     62        /////////////////////////////////////////////////////////////////////////////////////
     63
     64        TChain * T3 = new TChain("ShallowAngleFEIX");
     65        T3->Add("/storage1/idarraga/Testbeam_July_CERN_2011/KEK_7V_4deg/MAFOutput/MAFOutput_MPXNtuple_USBPIXI4_21_7V.root");
     66
     67        TGraphErrors * g3 = GetGraph(T3, "7V", 9, fulldiv, plotType);
     68        // fix last point
     69        c10->cd();
     70        g3->Draw("*");
     71        g3->SetMarkerStyle(20);
     72        g3->SetMarkerColor(kGreen);
     73
     74        /////////////////////////////////////////////////////////////////////////////////////
    4375        TLegend * l1 = new TLegend(0.5, 0.7, 0.9, 0.9);
    44         l1->AddEntry(g1, "fully depleted", "P");
    45         l1->AddEntry(g2, "under depleted", "P");
     76        l1->AddEntry(g1, "100V run50734", "P");
     77        l1->AddEntry(g2, "15V run50739", "P");
     78        l1->AddEntry(g3, "7V run50743", "P");
    4679        l1->Draw();
     80        l1->SetBorderSize(1);
     81        l1->SetFillColor(kWhite);
    4782
    4883
    4984}
    5085
    51 TGraphErrors * GetGraph(TChain * T, TString sufx, Int_t __NDIV, Int_t fullDiv){
     86TGraphErrors * GetGraph(TChain * T, TString sufx, Int_t __NDIV, Int_t fullDiv, Int_t graphType){
    5287
    5388        gROOT->ProcessLine(".x ~/styles/AtlasStyle.C");
     
    6095        cout << "Entries = " << T->GetEntries() << endl;
    6196
    62         TCanvas * c1 = new TCanvas("c_"+sufx);
     97        TCanvas * c1 = new TCanvas("c_"+sufx, "c_"+sufx);
    6398        c1->Divide(__NDIV/2  + 1 , 2);
    6499
     
    67102        vector<double> Qp;
    68103        vector<double> errQp;
     104
     105        vector<double> entriesV;
     106
    69107        double maxQp = 0;
    70108
     
    75113
    76114        int partitionCntr = 0;
    77         for (indx = __NDIV-1 ; indx >= 0 ; indx--) {
     115        //for (indx = __NDIV-1 ; indx >= 0 ; indx--) {
     116        for (indx = 0 ; indx < __NDIV ; indx++) {
    78117
    79118                wordDraw = "totPerSegment[";
     
    83122                wordDraw += "_";
    84123                wordDraw += indx;
    85                 wordDraw += "(100, 0, 100)";
     124                wordDraw += "(20, 0, 20)";
    86125
    87126                histo = "h_";
     
    92131                cout << "word --> " << wordDraw << endl;
    93132                c1->cd(indx+1);
    94                 T->Draw(wordDraw, "clusterHeight <= 3");
     133                TString cutS = "clusterHeight < 3 && ";
     134                cutS += "clusterSize == ";
     135                cutS += __NDIV;
     136                TCut cutC = cutS;
     137                T->Draw(wordDraw, cutC);
    95138                //"nDeltaRaySoft == 0 && nDeltaRayExplicit == 0");
    96139                //T->Draw(wordDraw, "nDeltaRayExplicit == 0");
    97140                TH1F * h = gROOT->FindObject(histo);
    98                 h->GetXaxis()->SetTitle("mean charge [TOT]");
     141                h->GetXaxis()->SetTitle("TOT");
     142                h->GetXaxis()->SetTitleSize(0.15);
     143                h->GetXaxis()->SetTitleOffset(0.5);
     144                h->GetXaxis()->SetLabelSize(0.06);
     145
    99146
    100147                double meanQp = h->GetMean();
     
    109156                a += indx; a += "]=";
    110157                a +     = TString::Format("%.1f", meanQp);
    111                 Tl->DrawLatex(meanQp*1.2, h->GetMaximum()/2., a);
     158                Tl->DrawLatex(meanQp, h->GetMaximum()*0.9, a);
    112159
    113160                TLatex * Tb = new TLatex;
    114161                Tb->SetTextAlign(12);
    115                 Tb->SetTextSize(0.1);
     162                Tb->SetTextSize(0.15);
    116163                Int_t nentries = h->GetEntries();
    117164                cout << "entries in histo = " << nentries << endl;
    118                 TString b1 = "entries: ";
     165                TString b1 = "ent ";
     166                entriesV.push_back( nentries );
    119167                b1 +    = TString::Format("%d", nentries);
    120                 Tb->DrawLatex(meanQp*1.2, h->GetMaximum()/3., b1);
     168                Tb->DrawLatex(meanQp*0.5, h->GetMaximum()/3., b1);
    121169
    122170                // for final plot
     
    144192        c2->cd();
    145193
    146         TGraphErrors * g = new TGraphErrors((int)Qp.size(), &depth[0], &Qp[0], &errDepth[0], &errQp[0]);
     194        TGraphErrors * g;
     195        if(graphType == __CHARGE){
     196                g = new TGraphErrors((int)Qp.size(), &depth[0], &Qp[0], &errDepth[0], &errQp[0]);
     197        }
     198        else if(graphType == __ENTRIES){
     199                g = new TGraphErrors((int)Qp.size(), &depth[0], &entriesV[0], 0x0, 0x0);
     200        }
     201
    147202
    148203        return g;
Note: See TracChangeset for help on using the changeset viewer.