Changeset 235 in Idarraga
- Timestamp:
- Sep 20, 2011, 1:42:11 PM (13 years ago)
- Location:
- mafalda/ShallowAngleFEIX
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
mafalda/ShallowAngleFEIX/ShallowAngleFEIX.cpp
r222 r235 36 36 getMyTree()->Branch("clusterSize", &m_clusterSize, "clusterSize/I"); 37 37 getMyTree()->Branch("mipLength", &m_mipLength); 38 getMyTree()->Branch("mipLength_X", &m_mipLength_X); 38 39 getMyTree()->Branch("totPerSegment", &m_totPerSegment); 39 40 getMyTree()->Branch("chargeWeights", &m_chargeWeights); … … 116 117 limitPixels[__TAIL_INDX].second * m_pixSizeY); 117 118 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 ) ); 118 121 m_totalMIPsLength += totalLength; 119 122 Log << MSG::DEBUG << "Integrated mips length = " << m_totalMIPsLength << " [mm]" << endreq; … … 204 207 } 205 208 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(); 207 221 208 222 } 209 223 210 // Fill the output tree of this algorithm211 getMyTree()->Fill();212 213 // WARNING ! don't forget to clean up your variables for the next TTree::Fill call214 m_distanceToCenter.clear();215 m_totPerSegment.clear();216 m_chargeWeights.clear();217 224 218 225 } -
mafalda/ShallowAngleFEIX/ShallowAngleFEIX.h
r219 r235 47 47 Int_t m_clusterSize; 48 48 vector<Float_t> m_mipLength; 49 vector<Float_t> m_mipLength_X; 49 50 Double_t m_totalMIPsLength; 50 51 Int_t m_clusterHeight; -
mafalda/ShallowAngleFEIX/configuration_algos_ShallowAngleFEIX.txt
r219 r235 1 FEI3Mips minMipLength 2 float2 FEI3Mips pixelSizeX 0.4 float3 FEI3Mips pixelSizeY 0.05 float4 FEI3Mips dRayBalSearch 1.2 float5 1 PRBasicSpecies circleToEllipseMin 1.4 float 6 2 PRBasicSpecies circleToEllipseMax 5 float 7 3 PRBasicSpecies mindistanceToLine 15 float 8 4 PRBasicSpecies fractionOfPixelsAtMindistance 0.8 float 5 ShallowAngleFEIX pixelSizeX 0.25 float 6 ShallowAngleFEIX pixelSizeY 0.05 float 7 ShallowAngleFEIX dRayBalSearch 1.4 float 9 8 BlobsFinder border 0 int 10 9 BlobsFinder discontinuity 0 int 11 10 BlobsFinder lvl1cut -1 int 12 FEI3Mips minNPixels 10 int13 FEI3Mips nDivisions 6 int14 FEI3Mips distanceCutHot 3 int15 FEI3Mips distancePerpHot 3 int16 FEI3Mips guardDistanceX 1 int17 FEI3Mips guardDistanceY 5 int18 11 PRBasicSpecies nInnerPixels 2 int 19 12 PRBasicSpecies longGammaMax 3 int 20 13 PRBasicSpecies minNPixelsMip 6 int 21 14 PRBasicSpecies maxNPixelsCurly 50 int 15 ShallowAngleFEIX minNPixels 5 int 16 ShallowAngleFEIX minXWidth 6 int 17 ShallowAngleFEIX guardDistanceX 1 int 18 ShallowAngleFEIX guardDistanceY 5 int -
mafalda/ShallowAngleFEIX/runNewAlgo.C
r219 r235 4 4 5 5 //#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 7 11 8 12 void runNewAlgo(){ … … 10 14 gROOT->ProcessLine(".x ~/styles/AtlasStyle.C"); 11 15 12 13 16 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"); 15 20 //T->Add("/home/idarraga/analysis/mafalda/MAFOutput_KEK_run050620.root"); 16 21 //T->Add("/home/idarraga/analysis/mafalda/MAFOutput_KEK_run050621.root"); 17 22 //T->Add("/home/idarraga/analysis/mafalda/MAFOutput_KEK_run050622.root"); 18 23 24 Int_t plotType = __CHARGE; 25 Int_t ndiv = 10; 26 Int_t fulldiv = 10; 27 Int_t rangeYMax = 14; 28 19 29 TCanvas * c10 = new TCanvas(); 20 30 21 TGraphErrors * g1 = GetGraph(T1, " dep", 7, 7);31 TGraphErrors * g1 = GetGraph(T1, "V100V", ndiv, fulldiv, plotType); 22 32 c10->cd(); 23 33 g1->Draw("A*"); 24 34 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); 28 39 g1->SetMarkerColor(kBlue); 29 40 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 ///////////////////////////////////////////////////////////////////////////////////// 30 51 31 52 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); 35 56 // fix last point 36 57 c10->cd(); … … 39 60 g2->SetMarkerColor(kRed); 40 61 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 ///////////////////////////////////////////////////////////////////////////////////// 43 75 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"); 46 79 l1->Draw(); 80 l1->SetBorderSize(1); 81 l1->SetFillColor(kWhite); 47 82 48 83 49 84 } 50 85 51 TGraphErrors * GetGraph(TChain * T, TString sufx, Int_t __NDIV, Int_t fullDiv ){86 TGraphErrors * GetGraph(TChain * T, TString sufx, Int_t __NDIV, Int_t fullDiv, Int_t graphType){ 52 87 53 88 gROOT->ProcessLine(".x ~/styles/AtlasStyle.C"); … … 60 95 cout << "Entries = " << T->GetEntries() << endl; 61 96 62 TCanvas * c1 = new TCanvas("c_"+sufx );97 TCanvas * c1 = new TCanvas("c_"+sufx, "c_"+sufx); 63 98 c1->Divide(__NDIV/2 + 1 , 2); 64 99 … … 67 102 vector<double> Qp; 68 103 vector<double> errQp; 104 105 vector<double> entriesV; 106 69 107 double maxQp = 0; 70 108 … … 75 113 76 114 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++) { 78 117 79 118 wordDraw = "totPerSegment["; … … 83 122 wordDraw += "_"; 84 123 wordDraw += indx; 85 wordDraw += "( 100, 0, 100)";124 wordDraw += "(20, 0, 20)"; 86 125 87 126 histo = "h_"; … … 92 131 cout << "word --> " << wordDraw << endl; 93 132 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); 95 138 //"nDeltaRaySoft == 0 && nDeltaRayExplicit == 0"); 96 139 //T->Draw(wordDraw, "nDeltaRayExplicit == 0"); 97 140 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 99 146 100 147 double meanQp = h->GetMean(); … … 109 156 a += indx; a += "]="; 110 157 a + = TString::Format("%.1f", meanQp); 111 Tl->DrawLatex(meanQp *1.2, h->GetMaximum()/2., a);158 Tl->DrawLatex(meanQp, h->GetMaximum()*0.9, a); 112 159 113 160 TLatex * Tb = new TLatex; 114 161 Tb->SetTextAlign(12); 115 Tb->SetTextSize(0.1 );162 Tb->SetTextSize(0.15); 116 163 Int_t nentries = h->GetEntries(); 117 164 cout << "entries in histo = " << nentries << endl; 118 TString b1 = "entries: "; 165 TString b1 = "ent "; 166 entriesV.push_back( nentries ); 119 167 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); 121 169 122 170 // for final plot … … 144 192 c2->cd(); 145 193 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 147 202 148 203 return g;
Note: See TracChangeset
for help on using the changeset viewer.