1 #if !defined(__CINT__) || defined(__MAKECINT__)
12 #include "Riostream.h"
14 #include "AliITSgeomTGeo.h"
16 #include "AliRawReaderRoot.h"
17 #include "AliITSRawStreamSSD.h"
18 #include "AliCDBManager.h"
19 #include "AliCDBEntry.h"
24 //============================================================//
25 static const Int_t fgkNumOfChips = 6; //number of SSD chips per module per side
26 static const Int_t fgkNumOfLDCs = 8; //number of SSD LDCs
27 static const Int_t fgkNumOfDDLs = 16; //number of SSD DDLs
28 static const Int_t fgkSSDMODULES = 1698; //total number of SSD modules
29 static const Int_t fgkSSDLADDERSLAYER5 = 34; //ladders on layer 5
30 static const Int_t fgkSSDLADDERSLAYER6 = 38; //ladders on layer 6
31 static const Int_t fgkSSDMODULESPERLADDERLAYER5 = 22; //modules per ladder - layer 5
32 static const Int_t fgkSSDMODULESPERLADDERLAYER6 = 25; //modules per ladder - layer 6
33 static const Int_t fgkSSDMODULESLAYER5 = 748; //total number of SSD modules - layer5
34 static const Int_t fgkSSDMODULESLAYER6 = 950; //total number of SSD modules - layer6
35 static const Int_t fgkNumberOfPSideStrips = 768; //number of P-side strips
36 //============================================================//
39 void makeCM(const char* filename, Int_t nEvents, TList *list);
40 void checkCM(const char* filename);
42 //__________________________________________________________//
43 void readSSDCommonMode(const char* filename = "raw.root",
45 //Reads the CM pseudo-channels and produces the CM map for both layers
46 //and for p and n-side.
47 gStyle->SetPalette(1,0);
49 TList *list = initCM();
51 Printf("CM histograms: %d",list->GetEntries());
52 makeCM(filename,nEvents,list);
55 //__________________________________________________________//
57 //Initializes the histograms and returns the TList object
58 TList *list = new TList();
60 Int_t gLayer = 0,gLadder = 0, gModule = 0;
61 Int_t gHistCounter = 0;
63 TH1F *gHistSSDCMModule[2*fgkSSDMODULES][fgkNumOfChips];
64 for(Int_t iModule = 500; iModule < fgkSSDMODULES + 500; iModule++) {
65 AliITSgeomTGeo::GetModuleId(iModule,gLayer,gLadder,gModule);
66 for(Int_t iChip = 0; iChip < fgkNumOfChips; iChip++) {
67 gTitle = "SSD_CM_PSide_Layer"; gTitle += gLayer;
68 gTitle += "_Ladder"; gTitle += gLadder;
69 gTitle += "_Module"; gTitle += gModule;
70 gTitle += "_Chip"; gTitle += iChip+1;
71 gHistSSDCMModule[gHistCounter][iChip] = new TH1F(gTitle.Data(),
74 gHistSSDCMModule[gHistCounter][iChip]->GetXaxis()->SetTitle("CM");
75 list->Add(gHistSSDCMModule[gHistCounter][iChip]);
79 for(Int_t iModule = 500; iModule < fgkSSDMODULES + 500; iModule++) {
80 AliITSgeomTGeo::GetModuleId(iModule,gLayer,gLadder,gModule);
81 for(Int_t iChip = 0; iChip < fgkNumOfChips; iChip++) {
82 gTitle = "SSD_CM_NSide_Layer"; gTitle += gLayer;
83 gTitle += "_Ladder"; gTitle += gLadder;
84 gTitle += "_Module"; gTitle += gModule;
85 gTitle += "_Chip"; gTitle += iChip+1;
86 gHistSSDCMModule[gHistCounter][iChip] = new TH1F(gTitle.Data(),
89 gHistSSDCMModule[gHistCounter][iChip]->GetXaxis()->SetTitle("CM");
90 list->Add(gHistSSDCMModule[gHistCounter][iChip]);
98 //__________________________________________________________//
99 void makeCM(const char* filename, Int_t nEvents, TList *list) {
100 //Function to read the CM values
101 Int_t gStripNumber = 0;
102 Int_t gLayer = 0,gLadder = 0, gModule = 0;
104 //==================================================//
105 AliCDBManager *fCDBManager = AliCDBManager::Instance();
106 fCDBManager->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
107 Int_t runNumber = atoi(gSystem->Getenv("DATE_RUN_NUMBER"));
109 Printf("DATE_RUN_NUMBER not defined!!!\n");
111 fCDBManager->SetRun(runNumber);
112 AliCDBEntry *geomGRP = fCDBManager->Get("GRP/Geometry/Data");
113 if(!geomGRP) cout<<"GRP geometry not found!!!"<<endl;;
114 //==================================================//
116 //==================================================//
117 TH2F *fHistPSideMeanCMMapLayer5 = new TH2F("fHistPSideMeanCMMapLayer5",
118 "Layer 5 - P side;N_{module};N_{ladder}",
121 fHistPSideMeanCMMapLayer5->GetXaxis()->SetTitleColor(1);
122 fHistPSideMeanCMMapLayer5->GetZaxis()->SetRangeUser(0.,20.);
123 fHistPSideMeanCMMapLayer5->SetStats(kFALSE);
124 fHistPSideMeanCMMapLayer5->GetYaxis()->SetTitleOffset(1.8);
125 fHistPSideMeanCMMapLayer5->GetXaxis()->SetNdivisions(22);
126 fHistPSideMeanCMMapLayer5->GetYaxis()->SetNdivisions(34);
127 fHistPSideMeanCMMapLayer5->GetXaxis()->SetLabelSize(0.03);
128 fHistPSideMeanCMMapLayer5->GetYaxis()->SetLabelSize(0.03);
129 fHistPSideMeanCMMapLayer5->GetZaxis()->SetTitleOffset(1.6);
130 fHistPSideMeanCMMapLayer5->GetZaxis()->SetTitle("RMS(CM) (p-side)");
132 TH2F *fHistNSideMeanCMMapLayer5 = new TH2F("fHistNSideMeanCMMapLayer5",
133 "Layer 5 - N side;N_{module};N_{ladder}",
136 fHistNSideMeanCMMapLayer5->GetXaxis()->SetTitleColor(1);
137 fHistNSideMeanCMMapLayer5->GetZaxis()->SetRangeUser(0.,20.);
138 fHistNSideMeanCMMapLayer5->SetStats(kFALSE);
139 fHistNSideMeanCMMapLayer5->GetYaxis()->SetTitleOffset(1.8);
140 fHistNSideMeanCMMapLayer5->GetXaxis()->SetNdivisions(22);
141 fHistNSideMeanCMMapLayer5->GetYaxis()->SetNdivisions(34);
142 fHistNSideMeanCMMapLayer5->GetXaxis()->SetLabelSize(0.03);
143 fHistNSideMeanCMMapLayer5->GetYaxis()->SetLabelSize(0.03);
144 fHistNSideMeanCMMapLayer5->GetZaxis()->SetTitleOffset(1.6);
145 fHistNSideMeanCMMapLayer5->GetZaxis()->SetTitle("RMS(CM) (n-side)");
147 TH2F *fHistPSideMeanCMMapLayer6 = new TH2F("fHistPSideMeanCMMapLayer6",
148 "Layer 6 - P side;N_{module};N_{ladder}",
151 fHistPSideMeanCMMapLayer6->GetXaxis()->SetTitleColor(1);
152 fHistPSideMeanCMMapLayer6->GetZaxis()->SetRangeUser(0.,20.);
153 fHistPSideMeanCMMapLayer6->SetStats(kFALSE);
154 fHistPSideMeanCMMapLayer6->GetYaxis()->SetTitleOffset(1.8);
155 fHistPSideMeanCMMapLayer6->GetXaxis()->SetNdivisions(25);
156 fHistPSideMeanCMMapLayer6->GetYaxis()->SetNdivisions(38);
157 fHistPSideMeanCMMapLayer6->GetXaxis()->SetLabelSize(0.03);
158 fHistPSideMeanCMMapLayer6->GetYaxis()->SetLabelSize(0.03);
159 fHistPSideMeanCMMapLayer6->GetZaxis()->SetTitleOffset(1.6);
160 fHistPSideMeanCMMapLayer6->GetZaxis()->SetTitle("RMS(CM) (p-side)");
162 TH2F *fHistNSideMeanCMMapLayer6 = new TH2F("fHistNSideMeanCMMapLayer6",
163 "Layer 6 - N side;N_{module};N_{ladder}",
166 fHistNSideMeanCMMapLayer6->GetXaxis()->SetTitleColor(1);
167 fHistNSideMeanCMMapLayer6->GetZaxis()->SetRangeUser(0.,20.);
168 fHistNSideMeanCMMapLayer6->SetStats(kFALSE);
169 fHistNSideMeanCMMapLayer6->GetYaxis()->SetTitleOffset(1.8);
170 fHistNSideMeanCMMapLayer6->GetXaxis()->SetNdivisions(25);
171 fHistNSideMeanCMMapLayer6->GetYaxis()->SetNdivisions(38);
172 fHistNSideMeanCMMapLayer6->GetXaxis()->SetLabelSize(0.03);
173 fHistNSideMeanCMMapLayer6->GetYaxis()->SetLabelSize(0.03);
174 fHistNSideMeanCMMapLayer6->GetZaxis()->SetTitleOffset(1.6);
175 fHistNSideMeanCMMapLayer6->GetZaxis()->SetTitle("RMS(CM) (n-side)");
177 //____________________________________________________________//
178 TH2F *fHistPSideRMSCMMapLayer5 = new TH2F("fHistPSideRMSCMMapLayer5",
179 "Layer 5 - P side;N_{module};N_{ladder}",
182 fHistPSideRMSCMMapLayer5->GetXaxis()->SetTitleColor(1);
183 fHistPSideRMSCMMapLayer5->GetZaxis()->SetRangeUser(0.,20.);
184 fHistPSideRMSCMMapLayer5->SetStats(kFALSE);
185 fHistPSideRMSCMMapLayer5->GetYaxis()->SetTitleOffset(1.8);
186 fHistPSideRMSCMMapLayer5->GetXaxis()->SetNdivisions(22);
187 fHistPSideRMSCMMapLayer5->GetYaxis()->SetNdivisions(34);
188 fHistPSideRMSCMMapLayer5->GetXaxis()->SetLabelSize(0.03);
189 fHistPSideRMSCMMapLayer5->GetYaxis()->SetLabelSize(0.03);
190 fHistPSideRMSCMMapLayer5->GetZaxis()->SetTitleOffset(1.6);
191 fHistPSideRMSCMMapLayer5->GetZaxis()->SetTitle("RMS(CM) (p-side)");
193 TH2F *fHistNSideRMSCMMapLayer5 = new TH2F("fHistNSideRMSCMMapLayer5",
194 "Layer 5 - N side;N_{module};N_{ladder}",
197 fHistNSideRMSCMMapLayer5->GetXaxis()->SetTitleColor(1);
198 fHistNSideRMSCMMapLayer5->GetZaxis()->SetRangeUser(0.,20.);
199 fHistNSideRMSCMMapLayer5->SetStats(kFALSE);
200 fHistNSideRMSCMMapLayer5->GetYaxis()->SetTitleOffset(1.8);
201 fHistNSideRMSCMMapLayer5->GetXaxis()->SetNdivisions(22);
202 fHistNSideRMSCMMapLayer5->GetYaxis()->SetNdivisions(34);
203 fHistNSideRMSCMMapLayer5->GetXaxis()->SetLabelSize(0.03);
204 fHistNSideRMSCMMapLayer5->GetYaxis()->SetLabelSize(0.03);
205 fHistNSideRMSCMMapLayer5->GetZaxis()->SetTitleOffset(1.6);
206 fHistNSideRMSCMMapLayer5->GetZaxis()->SetTitle("RMS(CM) (n-side)");
208 TH2F *fHistPSideRMSCMMapLayer6 = new TH2F("fHistPSideRMSCMMapLayer6",
209 "Layer 6 - P side;N_{module};N_{ladder}",
212 fHistPSideRMSCMMapLayer6->GetXaxis()->SetTitleColor(1);
213 fHistPSideRMSCMMapLayer6->GetZaxis()->SetRangeUser(0.,20.);
214 fHistPSideRMSCMMapLayer6->SetStats(kFALSE);
215 fHistPSideRMSCMMapLayer6->GetYaxis()->SetTitleOffset(1.8);
216 fHistPSideRMSCMMapLayer6->GetXaxis()->SetNdivisions(25);
217 fHistPSideRMSCMMapLayer6->GetYaxis()->SetNdivisions(38);
218 fHistPSideRMSCMMapLayer6->GetXaxis()->SetLabelSize(0.03);
219 fHistPSideRMSCMMapLayer6->GetYaxis()->SetLabelSize(0.03);
220 fHistPSideRMSCMMapLayer6->GetZaxis()->SetTitleOffset(1.6);
221 fHistPSideRMSCMMapLayer6->GetZaxis()->SetTitle("RMS(CM) (p-side)");
223 TH2F *fHistNSideRMSCMMapLayer6 = new TH2F("fHistNSideRMSCMMapLayer6",
224 "Layer 6 - N side;N_{module};N_{ladder}",
227 fHistNSideRMSCMMapLayer6->GetXaxis()->SetTitleColor(1);
228 fHistNSideRMSCMMapLayer6->GetZaxis()->SetRangeUser(0.,20.);
229 fHistNSideRMSCMMapLayer6->SetStats(kFALSE);
230 fHistNSideRMSCMMapLayer6->GetYaxis()->SetTitleOffset(1.8);
231 fHistNSideRMSCMMapLayer6->GetXaxis()->SetNdivisions(25);
232 fHistNSideRMSCMMapLayer6->GetYaxis()->SetNdivisions(38);
233 fHistNSideRMSCMMapLayer6->GetXaxis()->SetLabelSize(0.03);
234 fHistNSideRMSCMMapLayer6->GetYaxis()->SetLabelSize(0.03);
235 fHistNSideRMSCMMapLayer6->GetZaxis()->SetTitleOffset(1.6);
236 fHistNSideRMSCMMapLayer6->GetZaxis()->SetTitle("RMS(CM) (n-side)");
237 //==================================================//
239 TChain *chain = new TChain("RAW");
240 chain->Add(filename);
241 Int_t nTotalEvents = chain->GetEntries();
242 if(nEvents == -1) nEvents = nTotalEvents;
244 AliRawReaderRoot *rawReader = new AliRawReaderRoot(filename);
247 for(iEvent = 0; iEvent < nEvents; iEvent++) {
248 cout<<"Event: "<<iEvent+1<<"/"<<nEvents<<endl;
249 rawReader->Select("ITSSSD",-1,-1);
251 rawReader->NextEvent();
253 if(rawReader->GetType() != 7) continue;
256 AliITSRawStreamSSD gSSDStream(rawReader);
257 while (gSSDStream.Next()) {
258 if(gSSDStream.GetModuleID() < 0) continue;
259 AliITSgeomTGeo::GetModuleId(gSSDStream.GetModuleID(),gLayer,gLadder,gModule);
260 //if(gSSDStream.GetModuleID() != 500) continue;
261 //Printf("Module id: %d - Layer: %d - Ladder: %d - Module: %d",gSSDStream.GetModuleID(),gLayer,gLadder,gModule);
263 if(gSSDStream.GetStrip() >= 0) continue;
264 gStripNumber = (gSSDStream.GetSideFlag() == 0) ? gSSDStream.GetStrip() : -gSSDStream.GetStrip() + 2*fgkNumberOfPSideStrips;
265 //Printf("Module id: %d - Strip: %d - strip number: %d - Signal: %lf",gSSDStream.GetModuleID(),gSSDStream.GetStrip(),gStripNumber,signal);
266 if(TMath::Abs(gSSDStream.GetStrip()) < 7)
267 ((TH1*)list->At((gSSDStream.GetModuleID()-500)*fgkNumOfChips+gSSDStream.GetStrip()))->Fill(gSSDStream.GetSignal());
268 if(TMath::Abs(gSSDStream.GetStrip()) > 6)
269 ((TH1*)list->At(fgkSSDMODULES*fgkNumOfChips+(gSSDStream.GetModuleID()-500)*fgkNumOfChips+gSSDStream.GetStrip()-fgkNumOfChips))->Fill(gSSDStream.GetSignal());
273 //compute the rms of the CM values
274 TH1F *gHistCMDummy = new TH1F("gHistCMDummy","",100,-50.,50.);
275 Double_t meanPsideCM = 0.0, meanNsideCM = 0.0;
276 Double_t rmsPsideCM = 0.0, rmsNsideCM = 0.0;
277 for(Int_t iModule = 0; iModule < fgkSSDMODULES; iModule++) {
278 meanPsideCM = 0.0; meanNsideCM = 0.0;
279 rmsPsideCM = 0.0; rmsNsideCM = 0.0;
280 AliITSgeomTGeo::GetModuleId(iModule+500,gLayer,gLadder,gModule);
282 gHistCMDummy->Clear();
283 for(Int_t iChip = 0; iChip < fgkNumOfChips; iChip++) {
284 //cout<<"Name: "<<dynamic_cast<TH1*>(list->At(iModule*fgkNumOfChips+iChip))->GetName()<<endl;
285 gHistCMDummy->Add((TH1*)list->At(iModule*fgkNumOfChips+iChip));
287 meanPsideCM = TMath::Abs(gHistCMDummy->GetMean());
288 rmsPsideCM = gHistCMDummy->GetRMS();
290 gHistCMDummy->Clear();
291 for(Int_t iChip = 0; iChip < fgkNumOfChips; iChip++) {
292 //cout<<"Name: "<<dynamic_cast<TH1*>(list->At(fgkSSDMODULES*fgkNumOfChips+iModule*fgkNumOfChips+iChip))->GetName()<<endl;
293 gHistCMDummy->Add((TH1*)list->At(fgkSSDMODULES*fgkNumOfChips+iModule*fgkNumOfChips+iChip));
295 meanNsideCM = TMath::Abs(gHistCMDummy->GetMean());
296 rmsNsideCM = gHistCMDummy->GetRMS();
298 if(meanPsideCM == 0) meanPsideCM = 0.001;
299 if(meanNsideCM == 0) meanNsideCM = 0.001;
300 if(rmsPsideCM == 0) rmsPsideCM = 0.001;
301 if(rmsNsideCM == 0) rmsNsideCM = 0.001;
304 fHistPSideMeanCMMapLayer5->SetBinContent(gModule,gLadder,meanPsideCM);
305 fHistNSideMeanCMMapLayer5->SetBinContent(gModule,gLadder,meanNsideCM);
306 fHistPSideRMSCMMapLayer5->SetBinContent(gModule,gLadder,rmsPsideCM);
307 fHistNSideRMSCMMapLayer5->SetBinContent(gModule,gLadder,rmsNsideCM);
310 fHistPSideMeanCMMapLayer6->SetBinContent(gModule,gLadder,meanPsideCM);
311 fHistNSideMeanCMMapLayer6->SetBinContent(gModule,gLadder,meanNsideCM);
312 fHistPSideRMSCMMapLayer6->SetBinContent(gModule,gLadder,rmsPsideCM);
313 fHistNSideRMSCMMapLayer6->SetBinContent(gModule,gLadder,rmsNsideCM);
317 TFile *foutput = TFile::Open("SSD.CM.root","recreate");
319 fHistPSideMeanCMMapLayer5->Write(); fHistNSideMeanCMMapLayer5->Write();
320 fHistPSideMeanCMMapLayer6->Write(); fHistNSideMeanCMMapLayer6->Write();
321 fHistPSideRMSCMMapLayer5->Write(); fHistNSideRMSCMMapLayer5->Write();
322 fHistPSideRMSCMMapLayer6->Write(); fHistNSideRMSCMMapLayer6->Write();
326 //__________________________________________________________//
327 void drawSSDCM(const char* filename = "SSD.CM.root") {
328 gStyle->SetPalette(1,0);
330 TFile *f = TFile::Open(filename);
332 TCanvas *c1 = new TCanvas("c1","Mean of CM values",0,0,700,650);
333 c1->SetFillColor(10); c1->SetHighLightColor(10); c1->Divide(2,2);
335 TH2F *fHistPSideMeanCMMapLayer5 = dynamic_cast<TH2F *>(f->Get("fHistPSideMeanCMMapLayer5"));
336 fHistPSideMeanCMMapLayer5->Draw("colz");
338 TH2F *fHistNSideMeanCMMapLayer5 = dynamic_cast<TH2F *>(f->Get("fHistNSideMeanCMMapLayer5"));
339 fHistNSideMeanCMMapLayer5->Draw("colz");
341 TH2F *fHistPSideMeanCMMapLayer6 = dynamic_cast<TH2F *>(f->Get("fHistPSideMeanCMMapLayer6"));
342 fHistPSideMeanCMMapLayer6->Draw("colz");
344 TH2F *fHistNSideMeanCMMapLayer6 = dynamic_cast<TH2F *>(f->Get("fHistNSideMeanCMMapLayer6"));
345 fHistNSideMeanCMMapLayer6->Draw("colz");
347 TCanvas *c2 = new TCanvas("c2","RMS of CM values",100,100,700,650);
348 c2->SetFillColor(10); c2->SetHighLightColor(10); c2->Divide(2,2);
350 TH2F *fHistPSideRMSCMMapLayer5 = dynamic_cast<TH2F *>(f->Get("fHistPSideRMSCMMapLayer5"));
351 fHistPSideRMSCMMapLayer5->Draw("colz");
353 TH2F *fHistNSideRMSCMMapLayer5 = dynamic_cast<TH2F *>(f->Get("fHistNSideRMSCMMapLayer5"));
354 fHistNSideRMSCMMapLayer5->Draw("colz");
356 TH2F *fHistPSideRMSCMMapLayer6 = dynamic_cast<TH2F *>(f->Get("fHistPSideRMSCMMapLayer6"));
357 fHistPSideRMSCMMapLayer6->Draw("colz");
359 TH2F *fHistNSideRMSCMMapLayer6 = dynamic_cast<TH2F *>(f->Get("fHistNSideRMSCMMapLayer6"));
360 fHistNSideRMSCMMapLayer6->Draw("colz");
363 //__________________________________________________________//
364 void checkCM(const char* filename) {
365 //Reads the SSD.CM.root file as an input.
366 //For every chip checks the mean and the rms of the CM distributions.
367 //If the absolute value of the mean is beyond 5 ADC counts or/and the
368 //rms is beyond 10, the corresponding histogram is added to the list
369 //of suspicious chips. This list is written to the output file having
370 //the name: SSD.FaultyChips.root
372 //Hardcoded check values
373 const Double_t meanMax = 5.;
374 const Double_t rmsMax = 10.;
377 TList *listOfSuspiciousChips = new TList();
380 TFile *fInput = TFile::Open(filename);
382 Int_t gLayer = 0,gLadder = 0, gModule = 0;
384 //Double_t meanValue = 0.0, rmsValue = 0.0;
385 TH1F *gHistSSDCMModule = 0x0;
387 for(Int_t iModule = 500; iModule < fgkSSDMODULES + 500; iModule++) {
388 AliITSgeomTGeo::GetModuleId(iModule,gLayer,gLadder,gModule);
389 for(Int_t iChip = 0; iChip < fgkNumOfChips; iChip++) {
390 gTitle = "SSD_CM_PSide_Layer"; gTitle += gLayer;
391 gTitle += "_Ladder"; gTitle += gLadder;
392 gTitle += "_Module"; gTitle += gModule;
393 gTitle += "_Chip"; gTitle += iChip+1;
394 gHistSSDCMModule = dynamic_cast<TH1F *>(fInput->Get(gTitle.Data()));
395 if((TMath::Abs(gHistSSDCMModule->GetMean(1)) > meanMax)||
396 (TMath::Abs(gHistSSDCMModule->GetRMS(1)) > rmsMax)) {
397 Printf("Name: %s, Mean: %lf - rms: %lf",
398 gHistSSDCMModule->GetName(),
399 TMath::Abs(gHistSSDCMModule->GetMean(1)),
400 TMath::Abs(gHistSSDCMModule->GetRMS(1)));
401 listOfSuspiciousChips->Add(gHistSSDCMModule);
407 for(Int_t iModule = 500; iModule < fgkSSDMODULES + 500; iModule++) {
408 AliITSgeomTGeo::GetModuleId(iModule,gLayer,gLadder,gModule);
409 for(Int_t iChip = 0; iChip < fgkNumOfChips; iChip++) {
410 gTitle = "SSD_CM_NSide_Layer"; gTitle += gLayer;
411 gTitle += "_Ladder"; gTitle += gLadder;
412 gTitle += "_Module"; gTitle += gModule;
413 gTitle += "_Chip"; gTitle += iChip+1;
414 gHistSSDCMModule = dynamic_cast<TH1F *>(fInput->Get(gTitle.Data()));
415 if((TMath::Abs(gHistSSDCMModule->GetMean(1)) > meanMax)||
416 (TMath::Abs(gHistSSDCMModule->GetRMS(1)) > rmsMax)) {
417 Printf("Name: %s, Mean: %lf - rms: %lf",
418 gHistSSDCMModule->GetName(),
419 TMath::Abs(gHistSSDCMModule->GetMean(1)),
420 TMath::Abs(gHistSSDCMModule->GetRMS(1)));
421 listOfSuspiciousChips->Add(gHistSSDCMModule);
423 //Printf("Name: %s",gHistSSDCMModule->GetName());
427 Printf("===============================================");
428 Printf("%d suspicious chips were put in the list",
429 listOfSuspiciousChips->GetEntries());
430 Printf("===============================================");
431 TFile *fOutput = new TFile("SSD.FaultyChips.root","recreate");
432 listOfSuspiciousChips->Write();