1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 //-----------------------------------------------------------------------------
19 /// \class AliMUONCheck
21 /// This class check the ESD tree, providing the matching with the trigger
22 /// response and designing useful plots (Pt, Y, ITS vertex, multiplicity).
23 /// Note that there is a special flag to turn on for pdc06 production.
24 /// It also checks the TR tree giving hit densities on the two first and
25 /// last planes of the spectrometer as well as the time of flight on these planes.
26 /// MUONkine() provides event stack and check if the event are generated with
27 /// at least one muon and two muons (for PDC06).
28 /// DumpDigit() as a replacement of the function from MUONCheck.C macro.
30 /// \author Frederic Yermia, INFN Torino
31 //-----------------------------------------------------------------------------
33 #include "AliMUONCheck.h"
34 #include "AliMUONConstants.h"
35 #include "AliMUONTrack.h"
36 #include "AliMUONTrackParam.h"
37 #include "AliMUONTrackExtrap.h"
38 #include "AliMUONMCDataInterface.h"
39 #include "AliMUONDataInterface.h"
40 #include "AliMpSegmentation.h"
41 #include "AliMpVSegmentation.h"
42 #include "AliMpDEManager.h"
44 #include "AliMUONVDigitStore.h"
46 #include "AliRunLoader.h"
47 #include "AliLoader.h"
49 #include "AliTrackReference.h"
50 #include "AliTracker.h"
51 #include "AliESDEvent.h"
52 #include "AliESDMuonTrack.h"
53 #include "AliESDVertex.h"
54 #include "AliMagFMaps.h"
59 #include <TLorentzVector.h>
62 #include <TParticle.h>
65 ClassImp(AliMUONCheck)
68 AliMUONCheck::AliMUONCheck(const char* galiceFile, const char* esdFile,Int_t firstEvent, Int_t lastEvent,const char* outDir)
70 fFileName(galiceFile),
72 fesdFileName(esdFile),
74 fFirstEvent(firstEvent),
80 //_____________________________________________________________________________
81 AliMUONCheck::AliMUONCheck(const char* galiceFile, const char* galiceFileSim,
82 const char* esdFile,Int_t firstEvent, Int_t lastEvent,
85 fFileName(galiceFile),
86 fFileNameSim(galiceFileSim),
87 fesdFileName(esdFile),
89 fFirstEvent(firstEvent),
95 //_____________________________________________________________________________
96 AliMUONCheck::~AliMUONCheck()
101 //_____________________________________________________________________________
103 AliMUONCheck::CheckESD(Bool_t pdc06TriggerResponse)
108 TH1F * fhMUONVertex ; //!
109 TH1F * fhMUONMult ; //!
112 fhMUONVertex = new TH1F("hMUONVertex","ITS Vertex" ,100, -25., 25.);
113 fhMUONMult = new TH1F("hMUONMult" ,"Multiplicity of ESD tracks",10, -0.5, 9.5);
115 TH1F *hY = new TH1F("hY","Rapidity",100,-5.,-1.);
116 TH1F *hPt = new TH1F("hPt","Pt",100, 0.,20.);
118 // ------------->open the ESD file
119 TFile* esdFile = TFile::Open(fesdFileName.Data());
121 if (!esdFile || !esdFile->IsOpen())
123 AliError(Form("Error opening %s file \n",fesdFileName.Data()));
127 Int_t fSPLowpt=0 ; //!
128 Int_t fSPHighpt=0 ; //!
129 Int_t fSPAllpt=0 ; //!
130 Int_t fSMLowpt=0 ; //!
131 Int_t fSMHighpt =0 ; //!
132 Int_t fSMAllpt=0 ; //!
133 Int_t fSULowpt=0 ; //!
134 Int_t fSUHighpt=0 ; //!
135 Int_t fSUAllpt=0 ; //!
136 Int_t fUSLowpt=0 ; //!
137 Int_t fUSHighpt=0 ; //!
138 Int_t fUSAllpt=0 ; //!
139 Int_t fLSLowpt=0 ; //!
140 Int_t fLSHighpt=0 ; //!
141 Int_t fLSAllpt=0 ; //!
143 Int_t fSLowpt=0 ; //!
144 Int_t fSHighpt=0 ; //!
146 Int_t fnTrackTrig=0 ; //!
147 Int_t ftracktot=0 ; //!
148 Int_t effMatch=0 ; //!
151 Float_t muonMass = 0.105658389;
152 Double_t thetaX, thetaY, pYZ;
153 Double_t fPxRec1, fPyRec1, fPzRec1, fE1;
156 AliESDEvent* fESD = new AliESDEvent();
157 TTree* tree = (TTree*) esdFile->Get("esdTree");
160 Error("CheckESD", "no ESD tree found");
161 AliError(Form("CheckESD", "no ESD tree found"));
164 fESD->ReadFromTree(tree);
166 Int_t fnevents = tree->GetEntries();
167 Int_t endOfLoop = fLastEvent+1;
169 if ( fLastEvent == -1 ) endOfLoop = fnevents;
173 for (ievent = fFirstEvent; ievent < endOfLoop; ++ievent )
176 tree->GetEvent(ievent);
179 Error("CheckESD", "no ESD object found for event %d", ievent);
182 AliESDVertex* vertex = (AliESDVertex*) fESD->GetVertex();
184 Double_t zVertex = 0. ;
185 if (vertex) zVertex = vertex->GetZv();
187 Int_t nTracks = (Int_t)fESD->GetNumberOfMuonTracks() ;
188 ULong64_t trigword=fESD->GetTriggerMask();
190 if(pdc06TriggerResponse)
192 if (trigword & 0x01) {
196 if (trigword & 0x02){
199 if (trigword & 0x04){
202 if (trigword & 0x08){
205 if (trigword & 0x010){
208 if (trigword & 0x020){
211 if (trigword & 0x040){
214 if (trigword & 0x080){
217 if (trigword & 0x100){
220 if (trigword & 0x200){
224 if (trigword & 0x400){
227 if (trigword & 0x800){
230 if (trigword & 0x1000){
234 if (trigword & 0x2000){
238 if (trigword & 0x4000){
241 }// if pdc06TriggerResponse
243 if (trigword & 0x01) {
247 if (trigword & 0x02){
250 if (trigword & 0x04){
253 if (trigword & 0x08){
256 if (trigword & 0x010){
259 if (trigword & 0x020){
266 for ( Int_t iTrack1 = 0; iTrack1<nTracks; ++iTrack1 )
268 AliESDMuonTrack* muonTrack = fESD->GetMuonTrack(iTrack1);
271 thetaX = muonTrack->GetThetaX();
272 thetaY = muonTrack->GetThetaY();
273 pYZ = 1./TMath::Abs(muonTrack->GetInverseBendingMomentum());
275 fPzRec1 = - pYZ / TMath::Sqrt(1.0 + TMath::Tan(thetaY)*TMath::Tan(thetaY));
276 fPxRec1 = fPzRec1 * TMath::Tan(thetaX);
277 fPyRec1 = fPzRec1 * TMath::Tan(thetaY);
278 fZ1 = Int_t(TMath::Sign(1.,muonTrack->GetInverseBendingMomentum()));
279 fE1 = TMath::Sqrt(muonMass * muonMass + fPxRec1 * fPxRec1 + fPyRec1 * fPyRec1 + fPzRec1 * fPzRec1);
280 fV1.SetPxPyPzE(fPxRec1, fPyRec1, fPzRec1, fE1);
281 // -----------> transverse momentum
282 Float_t pt1 = fV1.Pt();
283 // ----------->Rapidity
284 Float_t y1 = fV1.Rapidity();
286 if(muonTrack->GetMatchTrigger())
295 fhMUONVertex->Fill(zVertex) ;
296 fhMUONMult->Fill(Float_t(nTracks)) ;
298 } // loop over events
300 AliInfo(Form("Terminate %s:", GetName())) ;
302 effMatch=100*fnTrackTrig/ftracktot;
304 if(pdc06TriggerResponse)
306 printf("=================================================================\n") ;
307 printf("================ %s ESD SUMMARY ==============\n", GetName()) ;
309 printf(" Total number of processed events %d \n", nev) ;
312 printf("Table 1: \n") ;
313 printf(" Global Trigger output Low pt High pt All\n") ;
314 printf(" number of Single Plus :\t");
315 printf("%i\t%i\t%i\t", fSPLowpt, fSPHighpt, fSPAllpt) ;
317 printf(" number of Single Minus :\t");
318 printf("%i\t%i\t%i\t", fSMLowpt, fSMHighpt, fSMAllpt) ;
320 printf(" number of Single Undefined :\t");
321 printf("%i\t%i\t%i\t", fSULowpt, fSUHighpt, fSUAllpt) ;
323 printf(" number of UnlikeSign pair :\t");
324 printf("%i\t%i\t%i\t", fUSLowpt, fUSHighpt, fUSAllpt) ;
326 printf(" number of LikeSign pair :\t");
327 printf("%i\t%i\t%i\t", fLSLowpt, fLSHighpt, fLSAllpt) ;
329 printf("===================================================\n") ;
331 printf("matching efficiency with the trigger for single tracks = %2d %% \n", effMatch);
332 printf("================================================================\n") ; printf("\n") ;
334 }//if(pdc06TriggerResponse)
336 gSystem->cd(foutDir);
338 FILE *outtxt=fopen("output.txt","a");
339 freopen("output.txt","a",outtxt);
341 if(pdc06TriggerResponse){
342 fprintf(outtxt," \n");
343 fprintf(outtxt,"===================================================\n");
344 fprintf(outtxt,"================ ESD SUMMARY ==============\n");
345 fprintf(outtxt," \n");
346 fprintf(outtxt," Total number of processed events %d \n", nev);
347 fprintf(outtxt,"\n");
348 fprintf(outtxt,"\n");
349 fprintf(outtxt,"Table 1: \n");
350 fprintf(outtxt," Global Trigger output Low pt High pt All\n");
351 fprintf(outtxt," number of Single Plus :\t");
352 fprintf(outtxt,"%i\t%i\t%i\t",fSPLowpt,fSPHighpt,fSPAllpt);
353 fprintf(outtxt,"\n");
354 fprintf(outtxt," number of Single Minus :\t");
355 fprintf(outtxt,"%i\t%i\t%i\t",fSMLowpt,fSMHighpt,fSMAllpt);
356 fprintf(outtxt,"\n");
357 fprintf(outtxt," number of Single Undefined :\t");
358 fprintf(outtxt,"%i\t%i\t%i\t",fSULowpt,fSUHighpt,fSUAllpt);
359 fprintf(outtxt,"\n");
360 fprintf(outtxt," number of UnlikeSign pair :\t");
361 fprintf(outtxt,"%i\t%i\t%i\t",fUSLowpt,fUSHighpt,fUSAllpt);
362 fprintf(outtxt,"\n");
363 fprintf(outtxt," number of LikeSign pair :\t");
364 fprintf(outtxt,"%i\t%i\t%i\t",fLSLowpt,fLSHighpt, fLSAllpt);
365 fprintf(outtxt,"\n");
366 fprintf(outtxt,"===================================================\n");
367 fprintf(outtxt,"\n");
368 fprintf(outtxt,"matching efficiency with the trigger for single tracks = %2d %% \n", effMatch);
369 }//if(pdc06TriggerResponse)
373 fprintf(outtxt," \n");
374 fprintf(outtxt,"===================================================\n");
375 fprintf(outtxt,"================ ESD SUMMARY ==============\n");
376 fprintf(outtxt," \n");
377 fprintf(outtxt," Total number of processed events %d \n", nev);
378 fprintf(outtxt,"\n");
379 fprintf(outtxt,"\n");
380 fprintf(outtxt,"Table 1: \n");
381 fprintf(outtxt," Global Trigger output Low pt High pt \n");
382 fprintf(outtxt," number of Single :\t");
383 fprintf(outtxt,"%i\t%i\t",fSLowpt,fSHighpt);
384 fprintf(outtxt,"\n");
385 fprintf(outtxt," number of UnlikeSign pair :\t");
386 fprintf(outtxt,"%i\t%i\t",fUSLowpt,fUSHighpt);
387 fprintf(outtxt,"\n");
388 fprintf(outtxt," number of LikeSign pair :\t");
389 fprintf(outtxt,"%i\t%i\t",fLSLowpt,fLSHighpt);
390 fprintf(outtxt,"\n");
391 fprintf(outtxt,"===================================================\n");
392 fprintf(outtxt,"\n");
393 fprintf(outtxt,"matching efficiency with the trigger for single tracks = %2d %% \n", effMatch);
397 TCanvas * c1 = new TCanvas("c1", "ESD", 400, 10, 600, 700) ;
400 fhMUONVertex->Draw() ;
403 c1->Print("VertexAndMul.eps") ;
404 TCanvas *c2 = new TCanvas("c2","ESD",400,10,600,700);
410 c2->Print("YandPt.eps") ;
413 //_____________________________________________________________________________
415 AliMUONCheck::CheckKine()
419 AliMUONMCDataInterface diSim(fFileNameSim.Data());
420 if (!diSim.IsValid()) return;
422 Int_t fnevents = diSim.NumberOfEvents();
424 Int_t endOfLoop = fLastEvent+1;
426 if ( fLastEvent == -1 ) endOfLoop = fnevents;
433 for ( Int_t ievent = fFirstEvent; ievent < endOfLoop; ++ievent )
438 AliStack* stack = diSim.Stack(ievent);
439 Int_t npa = stack->GetNprimary();
440 Int_t npb = stack->GetNtrack();
441 printf("Primary particles %i \n",npa);
442 printf("Sec particles %i \n",npb);
443 printf("=================================================================\n") ;
444 printf("Primary particles listing: \n");
445 printf("=================================================================\n") ;
446 for (Int_t i=0; i<npa; ++i)
448 TParticle *p = stack->Particle(i);
450 Int_t pdg=p->GetPdgCode();
457 printf("=================================================================\n") ;
458 printf("=================================================================\n") ;
460 printf("Secondaries particles listing: \n");
461 printf("=================================================================\n") ;
462 for (Int_t i=npa; i<npb; ++i)
464 stack->Particle(i)->Print("");
467 printf("=================================================================\n") ;
468 printf(">>> Event %d, Number of primary particles is %d \n",ievent, npa);
469 printf(">>> Event %d, Number of secondary articles is %d \n",ievent, npb-npa);
470 printf("=================================================================\n");
473 printf(">>> Okay!!! Event %d with at least one muon on primary stack! \n",ievent);
479 printf(">>> Warning!!! Event %d without muon on primary stack! \n",ievent);
485 printf(">>> Okay!!! Event %d with at least two muons on primary stack! \n",ievent);
488 printf("=================================================================\n");
493 printf("=================================================================\n") ;
494 printf(" Total number of processed events %d \n", nev) ;
499 printf("---> WARNING!!! <---\n");
500 printf(" %i events without muon on primary stack \n",nmu);
505 printf("---> OKAY!!! <---\n");
506 printf(" %i events generated with at least one muon on primary stack \n",nonemu);
511 printf("---> OKAY!!! <---\n");
512 printf(" %i events generated with at least two muons on primary stack \n",ndimu);
516 printf("*** Leaving MuonKine() *** \n");
517 printf("**************************************************************** \n");
519 gSystem->cd(foutDir);
520 FILE *outtxt=fopen("output.txt","a");
521 freopen("output.txt","a",outtxt);
522 fprintf(outtxt," \n");
523 fprintf(outtxt,"=================================================================\n");
524 fprintf(outtxt,"================ MUONkine SUMMARY ================\n");
525 fprintf(outtxt,"\n");
526 fprintf(outtxt,"=================================================================\n");
527 fprintf(outtxt," Total number of processed events %d \n", nev) ;
528 fprintf(outtxt," \n");
532 fprintf(outtxt," ---> WARNING!!! <--- \n");
533 fprintf(outtxt," %i events without muon on primary stack \n",nmu);
538 fprintf(outtxt," ---> OKAY!!! <--- \n");
539 fprintf(outtxt," %i events generated with at least one muon on primary stack \n",nonemu);
544 fprintf(outtxt," ---> OKAY!!! <--- \n");
545 fprintf(outtxt," %i events generated with at least two muons on primary stack \n",ndimu);
548 fprintf(outtxt," \n") ;
549 fprintf(outtxt,"*** Leaving MuonKine() *** \n");
550 fprintf(outtxt,"**************************************************************** \n");
554 //_____________________________________________________________________________
556 AliMUONCheck::CheckTrackRef()
558 /// Check TrackRef files
560 AliMUONMCDataInterface diSim(fFileNameSim.Data());
561 if ( !diSim.IsValid() ) return;
563 Int_t flag11=0,flag12=0,flag13=0,flag14=0;
565 TH1F *tof01= new TH1F("tof01","TOF for first tracking plane",100,0.,100);
566 tof01->SetXTitle("tof (ns)");
567 TH1F *tof14= new TH1F("tof14","TOF for MT22",100,0.,100);
568 tof14->SetXTitle("tof (ns)");
571 hitDensity[0] = new TH1F("TR_dhits01","",30,0,300);
572 hitDensity[0]->SetFillColor(3);
573 hitDensity[0]->SetXTitle("R (cm)");
574 hitDensity[1] = new TH1F("TR_dhits10","",30,0,300);
575 hitDensity[1]->SetFillColor(3);
576 hitDensity[1]->SetXTitle("R (cm)");
577 hitDensity[2] = new TH1F("TR_dhits11","",30,0,300);
578 hitDensity[2]->SetFillColor(3);
579 hitDensity[2]->SetXTitle("R (cm)");
580 hitDensity[3] = new TH1F("TR_dhits14","",30,0,300);
581 hitDensity[3]->SetFillColor(3);
582 hitDensity[3]->SetXTitle("R (cm)");
584 Int_t fnevents = diSim.NumberOfEvents();
586 Int_t endOfLoop = fLastEvent+1;
588 if ( fLastEvent == -1 ) endOfLoop = fnevents;
591 Int_t ntot=fLastEvent+1-fFirstEvent;
593 for ( Int_t ievent = fFirstEvent; ievent < endOfLoop; ++ievent )
598 Int_t nentries = diSim.NumberOfTrackRefs(ievent);
600 for ( Int_t l=0; l<nentries; ++l )
602 TClonesArray* trackRefs = diSim.TrackRefs(ievent,l);
603 if (!trackRefs) continue;
605 Int_t nnn = trackRefs->GetEntriesFast();
607 for ( Int_t k=0; k<nnn; ++k )
609 AliTrackReference *tref = static_cast<AliTrackReference*>(trackRefs->UncheckedAt(k));
610 Int_t label = tref->GetTrack();
611 Float_t x = tref->X(); // x-pos of hit
612 Float_t y = tref->Y(); // y-pos
613 Float_t z = tref->Z();
615 Float_t r=TMath::Sqrt(x*x+y*y);
616 Float_t time = tref->GetTime();
618 Float_t wgt=1/(2*10*TMath::Pi()*r)/(ntot);
631 if (z<=-521&& z>=-531&&flag11==0){
633 hitDensity[0]->Fill(r,wgt);
634 tof01->Fill(1000000000*time,1);
638 if (z<=-1432&&z>=-1442&&flag12==0){
640 hitDensity[1]->Fill(r,wgt);
644 if (z<=-1598&& z>=-1608&&flag13==0){
646 hitDensity[2]->Fill(r,wgt);
650 if(z<=-1715&&z>=-1725&&flag14==0){
652 hitDensity[3]->Fill(r,wgt);
653 tof14->Fill(1000000000*time,1);
664 gSystem->cd(foutDir);
665 TCanvas *c6 = new TCanvas("c6","TOF",400,10,600,700);
672 c6->Print("tof_on_trigger.ps");
674 TCanvas *c5 = new TCanvas("c5","TRef:Hits Density",400,10,600,700);
677 hitDensity[0]->Draw();
679 hitDensity[1]->Draw();
681 hitDensity[2]->Draw();
683 hitDensity[3]->Draw();
684 c5->Print("TR_Hit_densities.ps");
685 printf("=================================================================\n") ;
686 printf("================ %s Tref SUMMARY ==============\n", GetName()) ;
688 printf(" Total number of processed events %d \n", nev) ;
689 printf("*** Leaving TRef() *** \n");
690 printf("*************************************************** \n");
693 //_____________________________________________________________________________
695 AliMUONCheck::CheckOccupancy(Bool_t perDetEle) const
697 /// Check occupancy for the first event selected
699 Int_t dEoccupancyBending[14][26];
700 Int_t dEoccupancyNonBending[14][26];
701 Int_t cHoccupancyBending[14];
702 Int_t cHoccupancyNonBending[14];
703 Int_t totaloccupancyBending =0;
704 Int_t totaloccupancyNonBending =0;
706 Int_t dEchannelsBending[14][26];
707 Int_t dEchannelsNonBending[14][26];
708 Int_t cHchannelsBending[14];
709 Int_t cHchannelsNonBending[14];
710 Int_t totalchannelsBending =0;
711 Int_t totalchannelsNonBending =0;
713 Int_t nchambers = AliMUONConstants::NCh();
715 AliMUONDataInterface di(fFileNameSim);
717 AliMUONVDigitStore* digitStore = di.DigitStore(fFirstEvent);
719 if ( ! AliMpCDB::LoadMpSegmentation() )
720 AliFatal("Could not access mapping from OCDB !");
723 for (Int_t ichamber=0; ichamber<nchambers; ++ichamber)
725 cHchannelsBending[ichamber]=0;
726 cHchannelsNonBending[ichamber]=0;
727 cHoccupancyBending[ichamber]=0;
728 cHoccupancyNonBending[ichamber]=0;
730 for (Int_t idetele=0; idetele<26; idetele++)
732 Int_t detele = 100*(ichamber +1)+idetele;
734 if ( AliMpDEManager::IsValidDetElemId(detele) )
738 const AliMpVSegmentation* segbend = AliMpSegmentation::Instance()
739 ->GetMpSegmentation(detele, AliMp::kCath0);
740 const AliMpVSegmentation* segnonbend = AliMpSegmentation::Instance()
741 ->GetMpSegmentation(detele, AliMp::kCath1);
743 if (AliMpDEManager::GetPlaneType(detele, AliMp::kCath0) != AliMp::kBendingPlane )
745 const AliMpVSegmentation* tmp = segbend;
746 segbend = segnonbend;
751 Int_t nchannels = segbend->NofPads();
752 Int_t ndigits = digitStore->GetSize(detele,cathode);
753 dEchannelsBending[ichamber][idetele] = nchannels;
754 dEoccupancyBending[ichamber][idetele] = ndigits;
755 cHchannelsBending[ichamber] += nchannels;
756 cHoccupancyBending[ichamber] += ndigits;
757 totalchannelsBending += nchannels;
758 totaloccupancyBending += ndigits;
760 nchannels = segnonbend->NofPads();
761 ndigits = digitStore->GetSize(detele,1-cathode);
763 dEchannelsNonBending[ichamber][idetele] = nchannels;
764 dEoccupancyBending[ichamber][idetele] = ndigits;
765 cHchannelsNonBending[ichamber] += nchannels;
766 cHoccupancyNonBending[ichamber] += ndigits;
767 totalchannelsNonBending += nchannels;
768 totaloccupancyNonBending += ndigits;
772 printf(">>> Detection element %4d has %5d channels in bending and %5d channels in nonbending \n",
773 detele, dEchannelsBending[ichamber][idetele], dEchannelsNonBending[ichamber][idetele] );
776 printf(">>> Chamber %2d has %6d channels in bending and %6d channels in nonbending \n",
777 ichamber+1, cHchannelsBending[ichamber], cHchannelsNonBending[ichamber]);
779 printf(">>Spectrometer has %7d channels in bending and %7d channels in nonbending \n",
780 totalchannelsBending, totalchannelsNonBending);
784 for ( Int_t ichamber = 0; ichamber < 14; ++ichamber )
786 printf(">>> Chamber %2d nChannels Bending %5d nChannels NonBending %5d \n",
788 cHoccupancyBending[ichamber],
789 cHoccupancyNonBending[ichamber]);
790 printf(">>> Chamber %2d Occupancy Bending %5.2f %% Occupancy NonBending %5.2f %% \n",
792 100.*((Float_t) cHoccupancyBending[ichamber])/((Float_t) cHchannelsBending[ichamber]),
793 100.*((Float_t) cHoccupancyNonBending[ichamber])/((Float_t) cHchannelsBending[ichamber]) );
797 for(Int_t idetele=0; idetele<26; idetele++)
799 Int_t detele = idetele + 100*(ichamber+1);
800 if ( AliMpDEManager::IsValidDetElemId(detele) )
802 printf(">>> DetEle %4d nChannels Bending %5d nChannels NonBending %5d \n",
803 idetele+100*(ichamber+1),
804 dEoccupancyBending[ichamber][idetele],
805 dEoccupancyNonBending[ichamber][idetele]);
806 printf(">>> DetEle %4d Occupancy Bending %5.2f %% Occupancy NonBending %5.2f %% \n",
807 idetele+100*(ichamber+1),
808 100.*((Float_t) dEoccupancyBending[ichamber][idetele])/((Float_t) dEchannelsBending[ichamber][idetele]),
809 100.*((Float_t) dEoccupancyNonBending[ichamber][idetele])/((Float_t) dEchannelsBending[ichamber][idetele]));
815 printf(">>> Muon Spectrometer Occupancy Bending %5.2f %% Occupancy NonBending %5.2f %% \n",
816 100.*((Float_t) totaloccupancyBending)/((Float_t) totalchannelsBending),
817 100.*((Float_t) totaloccupancyNonBending)/((Float_t) totalchannelsNonBending) );
821 //_____________________________________________________________________________
823 AliMUONCheck::CheckRecTracks () const
825 /// Reads and dumps rec tracks objects
827 AliWarning("Reimplement me ? or use AliMUONDumper simply ?");
829 // // waiting for mag field in CDB
830 // AliInfoStream() << "Loading field map...\n";
831 // if (!AliTracker::GetFieldMap()) {
832 // AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 1, 1., 10., AliMagFMaps::k5kG);
833 // AliTracker::SetFieldMap(field, kFALSE);
837 // fLoader->LoadTracks("READ");
839 // Int_t endOfLoop = fLastEvent+1;
840 // if ( fLastEvent == -1 ) endOfLoop = fRunLoader->GetNumberOfEvents();
842 // for (Int_t ievent=fFirstEvent; ievent<endOfLoop; ievent++) {
843 // fRunLoader->GetEvent(ievent);
845 // fRecData->SetTreeAddress("RT");
846 // fRecData->GetRecTracks();
847 // TClonesArray* recTracks = fRecData->RecTracks();
849 // Int_t nrectracks = (Int_t) recTracks->GetEntriesFast(); //
850 // printf(">>> Event %d, Number of Recconstructed tracks %d \n",ievent, nrectracks);
852 // // Set the magnetic field for track extrapolations
853 // AliMUONTrackExtrap::SetField(AliTracker::GetFieldMap());
855 // // Loop over tracks
856 // for (Int_t iRecTracks = 0; iRecTracks < nrectracks; iRecTracks++) {
857 // AliMUONTrack* recTrack = (AliMUONTrack*) recTracks->At(iRecTracks);
858 // AliMUONTrackParam* trackParam = (AliMUONTrackParam*) (recTrack->GetTrackParamAtHit())->First();
859 // AliMUONTrackExtrap::ExtrapToZ(trackParam,0.);
860 // recTrack->Print("full");
862 // fRecData->ResetRecTracks();
864 // fLoader->UnloadTracks();
867 //_____________________________________________________________________________
868 void AliMUONCheck::SetEventsToCheck(Int_t firstEvent, Int_t lastEvent)
870 /// Set first and last event number to check
872 fFirstEvent = firstEvent;
873 fLastEvent = lastEvent;