Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:29:23

0001 void SiPixelRecHitsPlots()
0002 {
0003    gROOT->Reset();
0004    gStyle->SetOptStat(1111111);
0005    char * rfilename = "pixelrechitshisto.root";
0006 
0007    delete gROOT->GetListOfFiles()->FindObject(rfilename);
0008 
0009    TText* te = new TText();
0010    TFile * rfile = new TFile(rfilename);
0011    Char_t histo[200];
0012 
0013    rfile->cd("DQMData/TrackerRecHits/Pixel");
0014   ////////////////////////// 
0015   // Barrel Clusters
0016   //////////////////////////
0017 
0018    // Cluster y-size by module
0019    TCanvas * Pixel = new TCanvas("Pixel", "Pixel",800,1200);
0020    Pixel->Divide(2,4);
0021    TH1* clustYSizeModule_[8];
0022 
0023    for (Int_t i=0; i<8; i++) {
0024       sprintf(histo, "DQMData/TrackerRecHits/Pixel/clustBPIX/Clust_y_size_Module%d;1", i+1);
0025       Pixel->cd(i+1);
0026       rfile->GetObject(histo, clustYSizeModule_[i]);
0027       clustYSizeModule_[i]->Draw();
0028    }
0029 
0030    Pixel->Print("Clust_y_size_by_module.eps");
0031 
0032    // Cluster x-size by layer
0033    TH1* clustXSizeLayer_[3];
0034    Pixel = new TCanvas("Pixel","Pixel",800,1200);
0035    Pixel->Divide(1,3);
0036  
0037    for (Int_t i=0; i<3; i++) {  
0038       sprintf(histo, "DQMData/TrackerRecHits/Pixel/clustBPIX/Clust_x_size_Layer%d;1", i+1);
0039       Pixel->cd(i+1);
0040       rfile->GetObject(histo, clustXSizeLayer_[i]);
0041       clustXSizeLayer_[i]->Draw();
0042    }
0043 
0044    Pixel->Print("Clust_x_size_by_layer.eps");
0045 
0046    // Cluster charge by module for layer1
0047    TH1* clustChargeLayer1Modules_[8];
0048    Pixel = new TCanvas("Pixel","Pixel",800,1200);
0049    Pixel->Divide(2,4);
0050 
0051    for (Int_t i=0; i<8; i++) {
0052     sprintf(histo, "DQMData/TrackerRecHits/Pixel/clustBPIX/Clust_charge_Layer1_Module%d;1", i+1);
0053         Pixel->cd(i+1);
0054     rfile->GetObject(histo, clustChargeLayer1Modules_[i]);
0055     clustChargeLayer1Modules_[i]->Draw();
0056    }
0057 
0058    Pixel->Print("Clust_charge_layer1_modules.eps");
0059 
0060    // Cluster charge by module for layer2
0061    TH1* clustChargeLayer2Modules_[8];
0062    Pixel = new TCanvas("Pixel","Pixel",800,1200);
0063    Pixel->Divide(2,4);
0064 
0065    for (Int_t i=0; i<8; i++) {
0066     sprintf(histo, "DQMData/TrackerRecHits/Pixel/clustBPIX/Clust_charge_Layer2_Module%d;1", i+1);
0067         Pixel->cd(i+1);
0068     rfile->GetObject(histo, clustChargeLayer2Modules_[i]);
0069     clustChargeLayer2Modules_[i]->Draw();
0070    }
0071 
0072    Pixel->Print("Clust_charge_layer2_modules.eps");
0073 
0074    // Cluster charge by module for layer3
0075    TH1* clustChargeLayer3Modules_[8];
0076    Pixel = new TCanvas("Pixel","Pixel",800,1200);
0077    Pixel->Divide(2,4);
0078 
0079    for (Int_t i=0; i<8; i++) {
0080     sprintf(histo, "DQMData/TrackerRecHits/Pixel/clustBPIX/Clust_charge_Layer3_Module%d;1", i+1);
0081         Pixel->cd(i+1);
0082     rfile->GetObject(histo, clustChargeLayer3Modules_[i]);
0083     clustChargeLayer3Modules_[i]->Draw();
0084    }
0085 
0086    Pixel->Print("Clust_charge_layer3_modules.eps");
0087 
0088    //////////////////////////////////
0089    // Forward Clusters
0090    /////////////////////////////////
0091 
0092    // Cluster xsize for Disk1 by plaquette
0093    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0094    Pixel->Divide(2,4);
0095    TH1* clustXSizeDisk1Plaquettes_[7];
0096 
0097    for (Int_t i=0; i<7; i++) {
0098     sprintf(histo, "DQMData/TrackerRecHits/Pixel/clustFPIX/Clust_x_size_Disk1_Plaquette%d;1", i+1);
0099     Pixel->cd(i+1);
0100     rfile->GetObject(histo,clustXSizeDisk1Plaquettes_[i]);
0101     clustXSizeDisk1Plaquettes_[i]->Draw();
0102    }
0103 
0104    Pixel->Print("Clust_xsize_disk1_plaquettes.eps");
0105 
0106    // Cluster xsize for Disk2 by plaquette
0107    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0108    Pixel->Divide(2,4);
0109    TH1* clustXSizeDisk2Plaquettes_[7];
0110 
0111    for (Int_t i=0; i<7; i++) {
0112     sprintf(histo, "DQMData/TrackerRecHits/Pixel/clustFPIX/Clust_x_size_Disk2_Plaquette%d;1", i+1);
0113     Pixel->cd(i+1);
0114     rfile->GetObject(histo,clustXSizeDisk2Plaquettes_[i]);
0115     clustXSizeDisk2Plaquettes_[i]->Draw();
0116    }
0117 
0118    Pixel->Print("Clust_xsize_disk2_plaquettes.eps");
0119 
0120    // Cluster ysize for Disk1 by plaquette
0121    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0122    Pixel->Divide(2,4);
0123    TH1* clustYSizeDisk1Plaquettes_[7];
0124 
0125    for (Int_t i=0; i<7; i++) {
0126     sprintf(histo, "DQMData/TrackerRecHits/Pixel/clustFPIX/Clust_y_size_Disk1_Plaquette%d;1", i+1);
0127     Pixel->cd(i+1);
0128     rfile->GetObject(histo,clustYSizeDisk1Plaquettes_[i]);
0129     clustYSizeDisk1Plaquettes_[i]->Draw();
0130    }
0131 
0132    Pixel->Print("Clust_ysize_disk1_plaquettes.eps");
0133 
0134    // Cluster ysize for Disk2 by plaquette
0135    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0136    Pixel->Divide(2,4);
0137    TH1* clustYSizeDisk2Plaquettes_[7];
0138 
0139    for (Int_t i=0; i<7; i++) {
0140     sprintf(histo, "DQMData/TrackerRecHits/Pixel/clustFPIX/Clust_y_size_Disk2_Plaquette%d;1", i+1);
0141     Pixel->cd(i+1);
0142     rfile->GetObject(histo,clustYSizeDisk2Plaquettes_[i]);
0143     clustYSizeDisk2Plaquettes_[i]->Draw();
0144    }
0145 
0146    Pixel->Print("Clust_ysize_disk2_plaquettes.eps");
0147 
0148    //Cluster charge for Disk1 by plaquette
0149    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0150    Pixel->Divide(2,4);
0151    TH1* clustChargeDisk1Plaquettes_[7];
0152 
0153    for (Int_t i=0; i<7; i++) {
0154     sprintf(histo, "DQMData/TrackerRecHits/Pixel/clustFPIX/Clust_charge_Disk1_Plaquette%d;1", i+1);
0155     Pixel->cd(i+1);
0156     rfile->GetObject(histo,clustChargeDisk1Plaquettes_[i]);
0157     clustChargeDisk1Plaquettes_[i]->Draw();
0158    }
0159 
0160    Pixel->Print("Clust_charge_disk1_plaquettes.eps");
0161 
0162    //Cluster charge for Disk2 by plaquette
0163    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0164    Pixel->Divide(2,4);
0165    TH1* clustChargeDisk2Plaquettes_[7];
0166 
0167    for (Int_t i=0; i<7; i++) {
0168     sprintf(histo, "DQMData/TrackerRecHits/Pixel/clustFPIX/Clust_charge_Disk2_Plaquette%d;1", i+1);
0169     Pixel->cd(i+1);
0170     rfile->GetObject(histo,clustChargeDisk2Plaquettes_[i]);
0171     clustChargeDisk2Plaquettes_[i]->Draw();
0172    }
0173 
0174    Pixel->Print("Clust_charge_disk2_plaquettes.eps");
0175 
0176    //////////////////////////
0177    // RecHit Barrel
0178    ///////////////////////////
0179 
0180    // RecHit xres all
0181    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0182    TH1* recHitXResAll_;
0183 
0184    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitBPIX/RecHit_xres_b_All;1");
0185    rfile->GetObject(histo, recHitXResAll_);
0186    recHitXResAll_->Draw();
0187 
0188    Pixel->Print("RecHit_XRes_b_All.eps");
0189 
0190    // RecHit yres all
0191    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0192    TH1* recHitYResAll_;
0193 
0194    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitBPIX/RecHit_yres_b_All;1");
0195    rfile->GetObject(histo, recHitYResAll_);
0196    recHitYResAll_->Draw();
0197 
0198    Pixel->Print("RecHit_YRes_b_All.eps");
0199 
0200    // RecHit x distribution for full modules
0201    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0202    TH1* recHitXFullModules_;
0203 
0204    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitBPIX/RecHit_x_FullModules;1");
0205    rfile->GetObject(histo, recHitXFullModules_);
0206    recHitXFullModules_->Draw();
0207 
0208    Pixel->Print("RecHit_XDist_FullModules.eps");
0209 
0210    // RecHit x distribution for half modules
0211    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0212    TH1* recHitXHalfModules_;
0213 
0214    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitBPIX/RecHit_x_HalfModules;1");
0215    rfile->GetObject(histo, recHitXHalfModules_);
0216    recHitXHalfModules_->Draw();
0217 
0218    Pixel->Print("RecHit_XDist_HalfModules.eps");
0219 
0220    // RecHit y distribution for all modules
0221    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0222    TH1* recHitYAllModules_;
0223 
0224    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitBPIX/RecHit_y_AllModules;1");
0225    rfile->GetObject(histo, recHitYAllModules_);
0226    recHitYAllModules_->Draw();
0227 
0228    Pixel->Print("RecHit_YDist_AllModules.eps");
0229 
0230    //RecHit XRes Flipped ladders by layer
0231    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0232    Pixel->Divide(1,3);
0233    TH1* recHitXResFlippedLadderLayers_[3];
0234 
0235    for (Int_t i=0; i<3; i++) {
0236     sprintf (histo, "DQMData/TrackerRecHits/Pixel/recHitBPIX/RecHit_XRes_FlippedLadder_Layer%d;1", i+1);
0237     Pixel->cd(i+1);
0238     rfile->GetObject(histo, recHitXResFlippedLadderLayers_[i]);
0239     recHitXResFlippedLadderLayers_[i]->Draw();
0240    }
0241 
0242    Pixel->Print("RecHit_XRes_FlippedLadder_Layers.eps");
0243 
0244    //RecHit XRes UnFlipped ladders by layer
0245    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0246    Pixel->Divide(1,3);
0247    TH1* recHitXResUnFlippedLadderLayers_[3];
0248 
0249    for (Int_t i=0; i<3; i++) {
0250     sprintf (histo, "DQMData/TrackerRecHits/Pixel/recHitBPIX/RecHit_XRes_UnFlippedLadder_Layer%d;1", i+1);
0251     Pixel->cd(i+1);
0252     rfile->GetObject(histo, recHitXResUnFlippedLadderLayers_[i]);
0253     recHitXResUnFlippedLadderLayers_[i]->Draw();
0254    }
0255 
0256    Pixel->Print("RecHit_XRes_UnFlippedLadder_Layers.eps");
0257 
0258    //RecHit Y resolution by module for layer1
0259    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0260    Pixel->Divide(2,4);
0261    TH1* recHitYResLayer1Modules_[8];
0262 
0263    for (Int_t i=0; i<8; i++) {
0264     sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitBPIX/RecHit_YRes_Layer1_Module%d;1", i+1);
0265     Pixel->cd(i+1);
0266     rfile->GetObject(histo, recHitYResLayer1Modules_[i]);
0267     recHitYResLayer1Modules_[i]->Draw();
0268    }
0269 
0270    Pixel->Print("RecHit_YRes_Layer1_Modules.eps");
0271 
0272    //RecHit Y resolution by module for layer2
0273    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0274    Pixel->Divide(2,4);
0275    TH1* recHitYResLayer2Modules_[8];
0276 
0277    for (Int_t i=0; i<8; i++) {
0278     sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitBPIX/RecHit_YRes_Layer2_Module%d;1", i+1);
0279     Pixel->cd(i+1);
0280     rfile->GetObject(histo, recHitYResLayer2Modules_[i]);
0281     recHitYResLayer2Modules_[i]->Draw();
0282    }
0283 
0284    Pixel->Print("RecHit_YRes_Layer2_Modules.eps");
0285 
0286    //RecHit Y resolution by module for layer3
0287    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0288    Pixel->Divide(2,4);
0289    TH1* recHitYResLayer3Modules_[8];
0290 
0291    for (Int_t i=0; i<8; i++) {
0292     sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitBPIX/RecHit_YRes_Layer3_Module%d;1", i+1);
0293     Pixel->cd(i+1);
0294     rfile->GetObject(histo, recHitYResLayer3Modules_[i]);
0295     recHitYResLayer3Modules_[i]->Draw();
0296    }
0297 
0298    Pixel->Print("RecHit_YRes_Layer3_Modules.eps");
0299 
0300    /////////////////////
0301    // RecHit forward
0302    /////////////////////
0303 
0304    //RecHit xres forward
0305    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0306    TH1* recHitXResAll_;
0307 
0308    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitFPIX/RecHit_xres_f_All;1");
0309    rfile->GetObject(histo, recHitXResAll_);
0310    recHitXResAll_->Draw();
0311 
0312    Pixel->Print("RecHit_XRes_f_All.eps");
0313 
0314    //RecHit yres forward
0315    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0316    TH1* recHitYResAll_;
0317 
0318    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitFPIX/RecHit_yres_f_All;1");
0319    rfile->GetObject(histo, recHitYResAll_);
0320    recHitYResAll_->Draw();
0321 
0322    Pixel->Print("RecHit_YRes_f_All.eps");
0323 
0324    // RecHit x distribution for plaquettes x-size 1
0325    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0326 
0327    TH1* recHitXPlaquetteXSize1_;
0328 
0329    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitFPIX/RecHit_x_Plaquette_xsize1;1");
0330    rfile->GetObject(histo, recHitXPlaquetteXSize1_);
0331    recHitXPlaquetteXSize1_->Draw();
0332 
0333    Pixel->Print("RecHit_X_Plaquette_xsize1.eps");
0334 
0335    // RecHit x distribution for plaquettes x-size 2
0336    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0337 
0338    TH1* recHitXPlaquetteXSize2_;
0339 
0340    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitFPIX/RecHit_x_Plaquette_xsize2;1");
0341    rfile->GetObject(histo, recHitXPlaquetteXSize2_);
0342    recHitXPlaquetteXSize2_->Draw();
0343 
0344    Pixel->Print("RecHit_X_Plaquette_xsize2.eps");
0345 
0346    // RecHit y distribution for plaquettes y-size 2
0347    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0348 
0349    TH1* recHitYPlaquetteYSize2_;
0350 
0351    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitFPIX/RecHit_y_Plaquette_ysize2;1");
0352    rfile->GetObject(histo, recHitYPlaquetteYSize2_);
0353    recHitYPlaquetteYSize2_->Draw();
0354 
0355    Pixel->Print("RecHit_Y_Plaquette_ysize2.eps");
0356 
0357    // RecHit y distribution for plaquettes y-size 3
0358    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0359 
0360    TH1* recHitYPlaquetteYSize3_;
0361 
0362    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitFPIX/RecHit_y_Plaquette_ysize3;1");
0363    rfile->GetObject(histo, recHitYPlaquetteYSize3_);
0364    recHitYPlaquetteYSize3_->Draw();
0365 
0366    Pixel->Print("RecHit_Y_Plaquette_ysize3.eps");
0367 
0368    // RecHit y distribution for plaquettes y-size 4
0369    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0370 
0371    TH1* recHitYPlaquetteYSize4_;
0372 
0373    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitFPIX/RecHit_y_Plaquette_ysize4;1");
0374    rfile->GetObject(histo, recHitYPlaquetteYSize4_);
0375    recHitYPlaquetteYSize4_->Draw();
0376 
0377    Pixel->Print("RecHit_Y_Plaquette_ysize4.eps");
0378 
0379    // RecHit y distribution for plaquettes y-size 5
0380    Pixel = new TCanvas("Pixel", "Pixel", 200, 300);
0381 
0382    TH1* recHitYPlaquetteYSize5_;
0383 
0384    sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitFPIX/RecHit_y_Plaquette_ysize5;1");
0385    rfile->GetObject(histo, recHitYPlaquetteYSize5_);
0386    recHitYPlaquetteYSize5_->Draw();
0387 
0388    Pixel->Print("RecHit_Y_Plaquette_ysize5.eps");
0389 
0390    //RecHit x resolution by plaquette for Disk1
0391    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0392    Pixel->Divide(2,4);
0393    TH1* recHitXResDisk1Plaquettes_[7];
0394 
0395    for (Int_t i=0; i<7; i++) {
0396     Pixel->cd(i+1);
0397     sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitFPIX/RecHit_XRes_Disk1_Plaquette%d;1", i+1);
0398     rfile->GetObject(histo, recHitXResDisk1Plaquettes_[i]);
0399     recHitXResDisk1Plaquettes_[i]->Draw();
0400    }
0401 
0402    Pixel->Print("RecHit_XRes_disk1_plaquettes.eps");
0403 
0404    //RecHit x resolution by plaquette for Disk2
0405    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0406    Pixel->Divide(2,4);
0407    TH1* recHitXResDisk2Plaquettes_[7];
0408 
0409    for (Int_t i=0; i<7; i++) {
0410     Pixel->cd(i+1);
0411     sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitFPIX/RecHit_XRes_Disk2_Plaquette%d;1", i+1);
0412     rfile->GetObject(histo, recHitXResDisk2Plaquettes_[i]);
0413     recHitXResDisk2Plaquettes_[i]->Draw();
0414    }
0415 
0416    Pixel->Print("RecHit_XRes_disk2_plaquettes.eps");
0417 
0418    //RecHit y resolution by plaquette for Disk1
0419    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0420    Pixel->Divide(2,4);
0421    TH1* recHitYResDisk1Plaquettes_[7];
0422 
0423    for (Int_t i=0; i<7; i++) {
0424     Pixel->cd(i+1);
0425     sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitFPIX/RecHit_YRes_Disk1_Plaquette%d;1", i+1);
0426     rfile->GetObject(histo, recHitYResDisk1Plaquettes_[i]);
0427     recHitYResDisk1Plaquettes_[i]->Draw();
0428    }
0429 
0430    Pixel->Print("RecHit_YRes_disk1_plaquettes.eps");
0431 
0432    //RecHit y resolution by plaquette for Disk2
0433    Pixel = new TCanvas("Pixel", "Pixel", 800, 1200);
0434    Pixel->Divide(2,4);
0435    TH1* recHitYResDisk2Plaquettes_[7];
0436 
0437    for (Int_t i=0; i<7; i++) {
0438     Pixel->cd(i+1);
0439     sprintf(histo, "DQMData/TrackerRecHits/Pixel/recHitFPIX/RecHit_YRes_Disk2_Plaquette%d;1", i+1);
0440     rfile->GetObject(histo, recHitYResDisk2Plaquettes_[i]);
0441     recHitYResDisk2Plaquettes_[i]->Draw();
0442    }
0443 
0444    Pixel->Print("RecHit_YRes_disk2_plaquettes.eps");
0445 } // end