Changeset 238 in Idarraga


Ignore:
Timestamp:
Oct 7, 2011, 12:09:49 PM (13 years ago)
Author:
idarraga
Message:
 
Location:
mafalda
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • mafalda/MAFTools/MAFTools.cpp

    r224 r238  
    222222}
    223223
     224void FindDiscontinuity(blob b){
     225
     226        // get the content set x,y
     227        set< pair<Int_t, Int_t> > cs = b.GetContentSet();
     228        set< pair<Int_t, Int_t> >::iterator csItr = cs.begin();
     229
     230/*
     231        for( ; csItr != cs.end() ; csItr++){
     232                std::cout << (*csItr).first << ", " << (*csItr).second << " : "
     233                                <<
     234        }
     235*/
     236
     237}
     238
    224239}
    225240
  • mafalda/MAFTools/MAFTools.h

    r222 r238  
    5656  Bool_t BlobAtADistanceFromEdges(blob, vector<pair<Float_t, Float_t> >, Int_t, Int_t, Int_t, Int_t);
    5757
     58
     59  /* Dump contents of a blobl */
     60  void DumpBlobContents(blob);
     61
     62
    5863}
    5964
  • mafalda/ShallowAngleFEIX/ShallowAngleFEIX.cpp

    r235 r238  
    3333        //  Algorithm.  The branches registered through getMyTree() get registered
    3434        //  in that tree so you can fill them each time Execute() gets called.
     35
    3536        getMyTree()->Branch("distanceToCenter", &m_distanceToCenter);
    36         getMyTree()->Branch("clusterSize", &m_clusterSize, "clusterSize/I");
    3737        getMyTree()->Branch("mipLength", &m_mipLength);
    3838        getMyTree()->Branch("mipLength_X", &m_mipLength_X);
    3939        getMyTree()->Branch("totPerSegment", &m_totPerSegment);
    4040        getMyTree()->Branch("chargeWeights", &m_chargeWeights);
     41
     42        getMyTree()->Branch("clusterSize", &m_clusterSize, "clusterSize/I");
    4143        getMyTree()->Branch("clusterHeight", &m_clusterHeight, "clusterHeight/I");
     44        getMyTree()->Branch("mipThetaAngle", &m_mipThetaAngle, "mipThetaAngle/D");
     45
    4246
    4347        // A configuration value that can be tuned from the Viewer
     
    134138
    135139                        Log << MSG::INFO << "Mip angle = " <<  (*blobsItr).GetBlobProperties().rotAngle << endreq;
    136                         if( TMath::Abs( (*blobsItr).GetBlobProperties().rotAngle ) > TMath::Pi()/3.)
     140                        if( TMath::Abs( (*blobsItr).GetBlobProperties().rotAngle ) > TMath::Pi()/6.)
    137141                                continue;
     142
     143                        // store the angle in rads
     144                        m_mipThetaAngle = (*blobsItr).GetBlobProperties().rotAngle;
    138145
    139146                        // Find the limit pixels to add-up the charge per column.
     
    153160                        Log << MSG::INFO << "                            y:" << inity << " , " << endy << endreq;
    154161
     162                        // some infor about this blob after clustering
     163                        // get the content set x,y
     164                        set< pair<Int_t, Int_t> > cs = (*blobsItr).GetContentSet();
     165                        set< pair<Int_t, Int_t> >::iterator csItr = cs.begin();
     166                        Log << MSG::INFO << "Components (x,y : counts) " << endreq;
     167                        for( ; csItr != cs.end() ; csItr++) {
     168                                Log << MSG::INFO << "    " << (*csItr).first << ", " << (*csItr).second << " : "
     169                                                << GetMatrixElement(*csItr) << endreq;
     170                        }
     171
    155172                        m_clusterHeight = (*blobsItr).GetBlobProperties().width_y;
    156173
     
    204221                        GuessNumberOfDeltaRaysFromUnbalance(nDeltaR, nDeltaSoft);
    205222
     223                        // there might be more than 1 good mip in a frame
     224                        // Fill and clean up here
     225
     226                        // Fill the output tree of this algorithm
     227                        getMyTree()->Fill();
     228
     229                        // WARNING ! don't forget to clean up your variables for the next TTree::Fill call
     230                        m_distanceToCenter.clear();
     231                        m_totPerSegment.clear();
     232                        m_chargeWeights.clear();
     233                        m_mipLength.clear();
     234                        m_mipLength_X.clear();
     235                        m_mipThetaAngle = 0.;
    206236
    207237                }
    208238
    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();
    221239
    222240        }
  • mafalda/ShallowAngleFEIX/ShallowAngleFEIX.h

    r235 r238  
    5050  Double_t m_totalMIPsLength;
    5151  Int_t m_clusterHeight;
     52  Double_t m_mipThetaAngle;
    5253
    5354  vector<Int_t> m_totPerSegment; // Total TOT per segment/pixel
  • mafalda/ShallowAngleFEIX/configuration_algos_ShallowAngleFEIX.txt

    r235 r238  
    1111PRBasicSpecies nInnerPixels 2 int
    1212PRBasicSpecies longGammaMax 3 int
    13 PRBasicSpecies minNPixelsMip 6 int
     13PRBasicSpecies minNPixelsMip 5 int
    1414PRBasicSpecies maxNPixelsCurly 50 int
    1515ShallowAngleFEIX minNPixels 5 int
  • mafalda/ShallowAngleFEIX/runAngle.C

    r236 r238  
    2020
    2121
    22   GetTree("/storage1/idarraga/Testbeam_September_CERN_2011/KEK_20V_200V_4deg/MAFOutput/MAFOutput_MPXNtuple_USBPIXI4_20.root",
    23           "ShallowAngleFEIX", "DUT0", 1.0);
     22  GetTree("/home/idarraga/storage/61548/slice1/MAFOutput_MPXNtuple_USBPIXI4_22.root",
     23          "ShallowAngleFEIX", "Lub4", 1.0);
    2424
    25   GetTree("/storage1/idarraga/Testbeam_September_CERN_2011/KEK_20V_200V_4deg/MAFOutput/MAFOutput_MPXNtuple_USBPIXI4_21.root",
    26           "ShallowAngleFEIX", "DUT2", 1.0);
     25  //GetTree("/storage1/idarraga/Testbeam_September_CERN_2011/KEK_20V_200V_4deg/MAFOutput/MAFOutput_MPXNtuple_USBPIXI4_21.root",
     26//  "ShallowAngleFEIX", "DUT2", 1.0);
    2727
    28   GetTree("/storage1/idarraga/Testbeam_September_CERN_2011/KEK_20V_200V_4deg/MAFOutput/MAFOutput_MPXNtuple_USBPIXI4_22.root",
    29           "ShallowAngleFEIX", "DUT3", 1.0);
     28  //GetTree("/storage1/idarraga/Testbeam_September_CERN_2011/KEK_20V_200V_4deg/MAFOutput/MAFOutput_MPXNtuple_USBPIXI4_22.root",
     29  //      "ShallowAngleFEIX", "DUT3", 1.0);
    3030
    3131  /*
  • mafalda/ShallowAngleFEIX/runNewAlgo.C

    r237 r238  
    55//#define __NDIV          8
    66//#define __THICKNESS 0.320 // [mm]  KEK FE-I3
    7 #define __THICKNESS 0.150 // [mm]    KEK FE-I4 run 50734 to 50744
     7//#define __THICKNESS 0.150 // [mm]    KEK FE-I4 run 50734 to 50744
     8#define __THICKNESS 0.250 // [mm]    Lub4 run 61548
    89
    910#define __CHARGE  10
     
    1617        TChain * T1 = new TChain("ShallowAngleFEIX");
    1718
    18         T1->Add("/home/idarraga/analysis/mafalda/MAFOutput_MPXNtuple_AllPix_det_200_shallowAngle_Planar.root");
     19        T1->Add("/home/idarraga/analysis/mafalda/MAFOutput_MPXNtuple_USBPIXI4_23.root");
     20        TString titleT = "3D SCC87";
     21
     22        //T1->Add("/home/idarraga/storage/61548/slice1/MAFOutput_MPXNtuple_USBPIXI4_22.root");
     23        //TString titleT = "Lub4 n-5e15, eta2.5";
     24
    1925        //T1->Add("/storage1/idarraga/Testbeam_July_CERN_2011/KEK_100V_4deg/MAFOutput/MAFOutput_MPXNtuple_USBPIXI4_21_100V.root");
    20         TString titleT = "KEK FE-I4 ~4deg Planar";
    2126        //T1->Add("/home/idarraga/analysis/mafalda/MAFOutput_MPXNtuple_USBPIX_10_dep.root");
    2227        //T->Add("/home/idarraga/analysis/mafalda/MAFOutput_KEK_run050620.root");
     
    2530
    2631        Int_t plotType = __CHARGE;
    27         Int_t ndiv = 10;
    28         Int_t fulldiv = 10;
     32        Int_t ndiv = 7;
     33        Int_t fulldiv = 7;
    2934        Int_t rangeYMax = 14;
    3035
     
    5055        lt2->DrawLatex(0.06, 1, "MAFalda, idarraga@cern.ch");
    5156
     57        return;
     58
    5259        /////////////////////////////////////////////////////////////////////////////////////
    5360
     
    104111
    105112        int partitionCntr = 0;
    106         for (indx = __NDIV-1 ; indx >= 0 ; indx--) {
     113        for (int indx = __NDIV-1 ; indx >= 0 ; indx--) {
    107114        //for (indx = 0 ; indx < __NDIV ; indx++) {
    108115
     
    122129                cout << "word --> " << wordDraw << endl;
    123130                c1->cd(indx+1);
    124                 TString cutS = "clusterHeight < 3 && ";
    125                 cutS += "clusterSize == ";
     131                TString cutS = "clusterHeight < 3 ";
     132                cutS += " && clusterSize == ";
    126133                cutS += __NDIV;
     134                cutS += " && mipThetaAngle < 0.17"; // ~10 deg
    127135                TCut cutC = cutS;
    128136                T->Draw(wordDraw, cutC);
     
    173181
    174182
     183        /*
    175184        if ( __NDIV == 6 ) {
    176185                Qp.push_back(0.);
     
    179188                errDepth.push_back(partition/2.);
    180189        }
     190        */
    181191
    182192        TCanvas * c2 = new TCanvas();
Note: See TracChangeset for help on using the changeset viewer.