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 /// \class AliMUONRecData
20 /// Class containing MUON data: hits, digits, rawclusters, globaltrigger, localtrigger, etc ..
21 /// The classe makes the lik between the MUON data lists and the event trees from loaders
23 /// \author Gines Martinez, Subatech, September 2003
26 #include "AliMUONRecData.h"
27 #include "AliMUONDataIterator.h"
28 #include "AliMUONConstants.h"
29 #include "AliMUONDigit.h"
30 #include "AliMUONGlobalTrigger.h"
31 #include "AliMUONLocalTrigger.h"
32 #include "AliMUONRegionalTrigger.h"
33 #include "AliMUONTriggerCrateStore.h"
34 #include "AliMUONTriggerCircuit.h"
35 #include "AliMUONGeometryTransformer.h"
36 #include "AliMUONRawCluster.h"
37 #include "AliMUONTrack.h"
38 #include "AliMUONTriggerTrack.h"
40 #include "AliRunLoader.h"
45 #include <TParticle.h>
47 #include <Riostream.h>
51 ClassImp(AliMUONRecData)
54 //_____________________________________________________________________________
55 AliMUONRecData::AliMUONRecData()
59 fRecTriggerTracks(0x0),
64 /// Default constructor
66 //_____________________________________________________________________________
67 AliMUONRecData::AliMUONRecData(AliLoader * loader, const char* name, const char* title)
68 : AliMUONData(loader, name, title),
71 fRecTriggerTracks(0x0),
76 /// Standard constructor
79 //_____________________________________________________________________________
80 AliMUONRecData::AliMUONRecData(const char* galiceFile)
81 : AliMUONData(galiceFile, "MUONFolder"),
84 fRecTriggerTracks(0x0),
89 /// Constructor for loading data from gAlice file
92 //_____________________________________________________________________________
93 AliMUONRecData::~AliMUONRecData()
95 /// Destructor for AliMUONRecData
98 fRawClusters->Delete();
102 fRecTracks->Delete();
105 if (fRecTriggerTracks){
106 fRecTriggerTracks->Delete();
107 delete fRecTriggerTracks;
110 //_____________________________________________________________________________
111 void AliMUONRecData::AddRawCluster(Int_t id, const AliMUONRawCluster& c)
113 /// Add a MUON rawcluster to the list in the detection plane id
115 TClonesArray &lrawcl = *((TClonesArray*) fRawClusters->At(id));
116 new(lrawcl[fNrawclusters[id]++]) AliMUONRawCluster(c);
118 //_____________________________________________________________________________
119 void AliMUONRecData::AddRecTrack(const AliMUONTrack& track)
121 /// Add a MUON rectrack
123 TClonesArray &lrectracks = *fRecTracks;
124 new(lrectracks[fNrectracks++]) AliMUONTrack(track);
126 //_____________________________________________________________________________
127 void AliMUONRecData::AddRecTriggerTrack(const AliMUONTriggerTrack& triggertrack)
129 /// Add a MUON triggerrectrack
131 TClonesArray &lrectriggertracks = *fRecTriggerTracks;
132 new(lrectriggertracks[fNrectriggertracks++]) AliMUONTriggerTrack(triggertrack);
134 //____________________________________________________________________________
135 Bool_t AliMUONRecData::IsRawClusterBranchesInTree()
137 /// Checking if there are RawCluster Branches In TreeR
140 AliError("No treeR in memory");
145 sprintf(branchname,"%sRawClusters1",GetName());
146 TBranch * branch = 0x0;
147 branch = TreeR()->GetBranch(branchname);
148 if (branch) return kTRUE;
152 //____________________________________________________________________________
153 Bool_t AliMUONRecData::IsTrackBranchesInTree()
155 /// Checking if there are Track Branches In TreeT
157 AliError("No treeT in memory");
162 sprintf(branchname,"%sTrack",GetName());
163 TBranch * branch = 0x0;
164 branch = TreeT()->GetBranch(branchname);
165 if (branch) return kTRUE;
169 //____________________________________________________________________________
170 Bool_t AliMUONRecData::IsTriggerBranchesInTree()
172 /// Checking if there are Trigger Branches In TreeR
174 AliError("No treeR in memory");
179 sprintf(branchname,"%sLocalTrigger",GetName());
180 TBranch * branch = 0x0;
181 branch = TreeR()->GetBranch(branchname);
182 if (branch) return kTRUE;
186 //____________________________________________________________________________
187 Bool_t AliMUONRecData::IsTriggerTrackBranchesInTree()
189 /// Checking if there are TriggerTrack Branches In TreeT
191 AliError("No treeT in memory");
196 sprintf(branchname,"%sTriggerTrack",GetName());
197 TBranch * branch = 0x0;
198 branch = TreeT()->GetBranch(branchname);
199 if (branch) return kTRUE;
203 //____________________________________________________________________________
204 void AliMUONRecData::FillOwn(Option_t* option)
206 /// Method to fill the trees
208 const char *cRC = strstr(option,"RC"); // RawCluster branches in TreeR
209 const char *cRT = strstr(option,"RT"); // Reconstructed Track in TreeT
210 const char *cRL = strstr(option,"RL"); // Reconstructed Trigger Track in TreeT
211 const char *cTC = strstr(option,"TC"); // global and local Trigger branches Copy in TreeR
214 TBranch * branch = 0x0;
218 if ( TreeR() && cRC && cTC )
224 if ( TreeR() && cRC )
226 if ( IsTriggerBranchesInTree() )
228 // Branch per branch filling
229 for (int i=0; i<AliMUONConstants::NTrackingCh(); i++)
231 sprintf(branchname,"%sRawClusters%d",GetName(),i+1);
232 branch = TreeR()->GetBranch(branchname);
244 if (IsRawClusterBranchesInTree())
246 // Branch per branch filling
247 sprintf(branchname,"%sLocalTrigger",GetName());
248 branch = TreeR()->GetBranch(branchname);
250 sprintf(branchname,"%sRegionalTrigger",GetName());
251 branch = TreeR()->GetBranch(branchname);
253 sprintf(branchname,"%sGlobalTrigger",GetName());
254 branch = TreeR()->GetBranch(branchname);
266 if ( TreeT() && cRT && cRL )
272 if ( TreeT() && cRT )
274 if (IsTriggerTrackBranchesInTree())
276 sprintf(branchname,"%sTrack",GetName());
277 branch = TreeT()->GetBranch(branchname);
286 if ( TreeT() && cRL )
288 if (IsTrackBranchesInTree())
290 sprintf(branchname,"%sTriggerTrack",GetName());
291 branch = TreeT()->GetBranch(branchname);
302 //_____________________________________________________________________________
303 void AliMUONRecData::MakeOwnBranch(Option_t* option)
305 /// Create Tree branches for the MUON.
307 const Int_t kBufferSize = 4000;
310 //Setting Data Container
311 SetDataContainer(option);
313 const char *cRC = strstr(option,"RC"); // RawCluster branches in TreeR
314 const char *cRT = strstr(option,"RT"); // Reconstructed Track in TreeT
315 const char *cRL = strstr(option,"RL"); // Reconstructed Trigger Track in TreeT
316 //const char *cRP = strstr(option,"RP"); // Reconstructed Particle in TreeP
317 const char *cTC = strstr(option,"TC"); // global and local Trigger branches Copy in TreeR
319 TBranch * branch = 0x0;
321 if (TreeR() && cRC ) {
322 // one branch for raw clusters per tracking detection plane
325 for (i=0; i<AliMUONConstants::NTrackingCh() ;i++) {
326 sprintf(branchname,"%sRawClusters%d",GetName(),i+1);
328 branch = TreeR()->GetBranch(branchname);
330 AliInfo(Form("Branch %s is already in tree.",branchname));
333 branch = TreeR()->Branch(branchname, &((*fRawClusters)[i]),kBufferSize);
334 //Info("MakeBranch","Making Branch %s for rawcluster in detection plane %d\n",branchname,i+1);
338 if (TreeR() && cTC ) {
340 // one branch for global trigger
342 sprintf(branchname,"%sGlobalTrigger",GetName());
344 branch = TreeR()->GetBranch(branchname);
346 AliInfo(Form("Branch GlobalTrigger is already in treeR."));
349 branch = TreeR()->Branch(branchname, &fGlobalTrigger, kBufferSize);
350 //Info("MakeBranch", "Making Branch %s for Global Trigger\n",branchname);
353 // one branch for regional trigger
355 sprintf(branchname,"%sRegionalTrigger",GetName());
357 branch = TreeR()->GetBranch(branchname);
359 AliInfo(Form("Branch RegionalTrigger is already in treeR."));
362 branch = TreeR()->Branch(branchname, &fRegionalTrigger, kBufferSize);
365 // one branch for local trigger
367 sprintf(branchname,"%sLocalTrigger",GetName());
369 branch = TreeR()->GetBranch(branchname);
371 AliInfo(Form("Branch LocalTrigger is already in treeR."));
374 branch = TreeR()->Branch(branchname, &fLocalTrigger, kBufferSize);
375 //Info("MakeBranch", "Making Branch %s for Global Trigger\n",branchname);
378 if (TreeT() && cRT ) {
379 sprintf(branchname,"%sTrack",GetName());
380 branch = TreeT()->GetBranch(branchname);
382 AliInfo(Form("Branch %s is already in tree.",GetName()));
385 branch = TreeT()->Branch(branchname,&fRecTracks,kBufferSize);
386 //Info("MakeBranch","Making Branch %s for tracks \n",branchname);
389 if (TreeT() && cRL ) {
390 sprintf(branchname,"%sTriggerTrack",GetName());
391 branch = TreeT()->GetBranch(branchname);
393 AliInfo(Form("Branch %s is already in tree.",GetName()));
396 branch = TreeT()->Branch(branchname,&fRecTriggerTracks,kBufferSize);
397 //Info("MakeBranch","Making Branch %s for trigger tracks \n",branchname);
400 //____________________________________________________________________________
401 void AliMUONRecData::SetOwnDataContainer(Option_t* option)
403 /// Setting data containers of muon data
405 const char *cRC = strstr(option,"RC"); // RawCluster
406 const char *cRT = strstr(option,"RT"); // Reconstructed Tracks
407 const char *cRL = strstr(option,"RL"); // Reconstructed Trigger Tracks
408 //const char *cRP = strstr(option,"RP"); // Reconstructed Particles
409 const char *cTC = strstr(option,"TC"); // global and local Trigger branches Copy in TreeR
411 AliDebug(1,Form("option=%s",option));
414 // Containers for rawclusters, globaltrigger and local trigger tree
416 if (fRawClusters == 0x0) {
417 fRawClusters = new TObjArray(AliMUONConstants::NTrackingCh());
418 fNrawclusters= new Int_t[AliMUONConstants::NTrackingCh()];
419 for (Int_t i=0; i<AliMUONConstants::NTrackingCh();i++) {
420 TClonesArray* tca = new TClonesArray("AliMUONRawCluster",10000);
422 fRawClusters->AddAt(tca,i);
426 // ResetRawClusters();
427 // It breaks the correct functioning of the combined reconstruction (AZ)
431 if (fLocalTrigger == 0x0) {
432 fLocalTrigger = new TClonesArray("AliMUONLocalTrigger",234);
434 if (fRegionalTrigger == 0x0) {
435 fRegionalTrigger = new TClonesArray("AliMUONRegionalTrigger",16);
437 if (fGlobalTrigger== 0x0) {
438 fGlobalTrigger = new TClonesArray("AliMUONGlobalTrigger",1);
441 // This is not necessary here since trigger info ins copied from digits info on flight to RecPoint output
445 // Containers for rectracks and rectrigger tracks
447 if (fRecTracks == 0x0) {
448 fRecTracks = new TClonesArray("AliMUONTrack",100);
453 if (fRecTriggerTracks == 0x0 && cRL) {
454 fRecTriggerTracks = new TClonesArray("AliMUONTriggerTrack",100);
456 ResetRecTriggerTracks();
460 //____________________________________________________________________________
461 void AliMUONRecData::SetOwnTreeAddress(Option_t* option)
463 // Setting Data containers
464 SetOwnDataContainer(option);
466 /// Setting Addresses to the events trees
468 const char *cRC = strstr(option,"RC"); // RawCluster branches in TreeR
469 const char *cRT = strstr(option,"RT"); // Reconstructed Track in TreeT
470 const char *cRL = strstr(option,"RL"); // Reconstructed Trigger Track in TreeT
471 //const char *cRP = strstr(option,"RP"); // Reconstructed Particle in TreeP
472 const char *cTC = strstr(option,"TC"); // global and local Trigger branches Copy in TreeR
474 // Set branch address for the Hits, Digits, RawClusters, GlobalTrigger and LocalTrigger Tree.
476 TBranch * branch = 0x0;
478 AliDebug(1,Form("option=%s",option));
481 // Branch address for rawclusters, globaltrigger and local trigger tree
482 if ( TreeR() && fRawClusters && cRC && !strstr(cRC,"RCC")) {
483 for (int i=0; i<AliMUONConstants::NTrackingCh(); i++) {
484 sprintf(branchname,"%sRawClusters%d",GetName(),i+1);
486 branch = TreeR()->GetBranch(branchname);
487 if (branch) branch->SetAddress( &((*fRawClusters)[i]) );
488 else AliWarning(Form("(%s) Failed for RawClusters Detection plane %d. Can not find branch in tree.",GetName(),i));
492 if ( TreeR() && fLocalTrigger && cTC) {
493 sprintf(branchname,"%sLocalTrigger",GetName());
494 branch = TreeR()->GetBranch(branchname);
495 if (branch) branch->SetAddress(&fLocalTrigger);
496 else AliWarning(Form("(%s) Failed for LocalTrigger. Can not find branch in treeR.",GetName()));
498 if ( TreeR() && fRegionalTrigger && cTC) {
499 sprintf(branchname,"%sRegionalTrigger",GetName());
500 branch = TreeR()->GetBranch(branchname);
501 if (branch) branch->SetAddress(&fRegionalTrigger);
502 else AliWarning(Form("(%s) Failed for RegionalTrigger. Can not find branch in treeR.",GetName()));
504 if ( TreeR() && fGlobalTrigger && cTC) {
505 sprintf(branchname,"%sGlobalTrigger",GetName());
506 branch = TreeR()->GetBranch(branchname);
507 if (branch) branch->SetAddress(&fGlobalTrigger);
508 else AliWarning(Form("(%s) Failed for GlobalTrigger. Can not find branch in treeR.",GetName()));
512 if ( TreeT() && fRecTracks && cRT ) {
513 sprintf(branchname,"%sTrack",GetName());
514 branch = TreeT()->GetBranch(branchname);
515 if (branch) branch->SetAddress(&fRecTracks);
516 else AliWarning(Form("(%s) Failed for Tracks. Can not find branch in tree.",GetName()));
519 if ( TreeT() && fRecTriggerTracks && cRL ) {
520 sprintf(branchname,"%sTriggerTrack",GetName());
521 branch = TreeT()->GetBranch(branchname);
522 if (branch) branch->SetAddress(&fRecTriggerTracks);
523 else AliWarning(Form("(%s) Failed for Trigger Tracks. Can not find branch in tree.",GetName()));
527 //____________________________________________________________________________
528 void AliMUONRecData::Fill(Option_t* option)
530 /// Method to fill the trees
532 AliMUONData::Fill(option);
536 //_____________________________________________________________________________
537 void AliMUONRecData::MakeBranch(Option_t* option)
539 /// Create Tree branches for the MUON.
541 AliMUONData::MakeBranch(option);
542 MakeOwnBranch(option);
545 //____________________________________________________________________________
546 void AliMUONRecData::SetDataContainer(Option_t* option)
548 /// Setting data containers of muon data
549 AliMUONData::SetDataContainer(option);
550 SetOwnDataContainer(option);
553 //____________________________________________________________________________
554 void AliMUONRecData::SetTreeAddress(Option_t* option)
556 /// Setting Addresses to the events trees
558 AliMUONData::SetTreeAddress(option);
559 SetOwnTreeAddress(option);
562 //____________________________________________________________________________
563 TClonesArray* AliMUONRecData::RawClusters(Int_t DetectionPlane)
565 /// Getting Raw Clusters
568 return ( (TClonesArray*) fRawClusters->At(DetectionPlane) );
573 //_______________________________________________________________________________
574 void AliMUONRecData::ResetRawClusters()
576 /// Reset number of raw clusters and the raw clust array for this detector
578 for ( int i=0;i<AliMUONConstants::NTrackingCh();i++ ) {
579 if ((*fRawClusters)[i]) ((TClonesArray*)fRawClusters->At(i))->Clear();
580 if (fNrawclusters) fNrawclusters[i]=0;
584 //____________________________________________________________________________
585 void AliMUONRecData::ResetRecTracks()
587 /// Reset tracks information
590 if (fRecTracks) fRecTracks->Delete(); // necessary to delete in case of memory allocation
593 //____________________________________________________________________________
594 void AliMUONRecData::ResetRecTriggerTracks()
596 /// Reset tracks information
598 fNrectriggertracks = 0;
599 if (fRecTriggerTracks) fRecTriggerTracks->Delete(); // necessary to delete in case of memory allocation
602 //_____________________________________________________________________________
604 AliMUONRecData::DumpRecPoints(Int_t event2Check, Option_t* opt)
608 fLoader->LoadRecPoints("READ");
611 Int_t nevents = fRunLoader->GetNumberOfEvents();
612 for (Int_t ievent=0; ievent<nevents; ievent++) {
613 if (event2Check!=0) ievent=event2Check;
614 printf(">>> Event %d \n",ievent);
616 // Getting event ievent
617 fRunLoader->GetEvent(ievent);
618 Int_t nchambers = AliMUONConstants::NTrackingCh();
619 SetTreeAddress("RC,TC");
623 for (Int_t ichamber=0; ichamber<nchambers; ichamber++) {
625 sprintf(branchname,"MUONRawClusters%d",ichamber+1);
626 //printf(">>> branchname %s\n",branchname);
628 // Loop on rec points
629 Int_t nrecpoints = (Int_t) RawClusters(ichamber)->GetEntriesFast();
630 // printf(">>> Chamber %2d, Number of recpoints = %6d \n",ichamber+1, nrecpoints);
631 for (Int_t irecpoint=0; irecpoint<nrecpoints; irecpoint++) {
632 AliMUONRawCluster* mRecPoint = static_cast<AliMUONRawCluster*>(RawClusters(ichamber)->At(irecpoint));
633 mRecPoint->Print(opt);
637 if (event2Check!=0) ievent=nevents;
639 fLoader->UnloadRecPoints();
642 //_____________________________________________________________________________
644 AliMUONRecData::DumpTracks(Int_t event2Check, Option_t* opt)
648 fLoader->LoadTracks("READ");
651 Int_t nevents = fRunLoader->GetNumberOfEvents();
653 for (Int_t ievent=0; ievent<nevents; ievent++)
655 if (event2Check!=0) ievent=event2Check;
657 printf(">>> Event %d \n",ievent);
659 // Getting event ievent
660 fRunLoader->GetEvent(ievent);
662 SetTreeAddress("RT");
666 TClonesArray* tracks = RecTracks();
667 Int_t ntracks = (Int_t) tracks->GetEntriesFast();
669 for (Int_t i=0; i<ntracks; ++i)
671 AliMUONTrack* mTrack = static_cast<AliMUONTrack*>(tracks->At(i));
675 if (event2Check!=0) ievent=nevents;
677 fLoader->UnloadTracks();
680 //_____________________________________________________________________________
682 AliMUONRecData::DumpRecTrigger(Int_t event2Check,
683 Int_t write, Bool_t readFromRP)
685 /// Reads and dumps trigger objects from MUON.RecPoints.root
687 TClonesArray * globalTrigger;
688 TClonesArray * localTrigger;
690 // Do NOT print out all the info if the loop runs over all events
691 Int_t printout = (event2Check == 0 ) ? 0 : 1 ;
693 // Book a ntuple for more detailled studies
694 TNtuple *tupleGlo = new TNtuple("TgtupleGlo","Global Trigger Ntuple","ev:global:slpt:shpt:uplpt:uphpt:lplpt:lplpt");
695 TNtuple *tupleLoc = new TNtuple("TgtupleLoc","Local Trigger Ntuple","ev:LoCircuit:LoStripX:LoDev:StripY:LoLpt:LoHpt:y11:y21:x11");
698 Int_t sLowpt=0,sHighpt=0;
699 Int_t uSLowpt=0,uSHighpt=0;
700 Int_t lSLowpt=0,lSHighpt=0;
702 AliMUONTriggerCrateStore* crateManager = new AliMUONTriggerCrateStore();
703 crateManager->ReadFromFile();
705 AliMUONGeometryTransformer* transformer = new AliMUONGeometryTransformer(kFALSE);
706 transformer->ReadGeometryData("volpath.dat", "geometry.root");
708 TClonesArray* triggerCircuit = new TClonesArray("AliMUONTriggerCircuit", 234);
710 for (Int_t i = 0; i < AliMUONConstants::NTriggerCircuit(); i++) {
711 AliMUONTriggerCircuit* c = new AliMUONTriggerCircuit();
712 c->SetTransformer(transformer);
713 c->Init(i,*crateManager);
714 TClonesArray& circuit = *triggerCircuit;
715 new(circuit[circuit.GetEntriesFast()])AliMUONTriggerCircuit(*c);
721 AliInfoStream() << " reading from digits \n";
722 fLoader->LoadDigits("READ");
723 sprintf(fileName,"TriggerCheckFromDigits.root");
725 AliInfoStream() << " reading from RecPoints \n";
726 fLoader->LoadRecPoints("READ");
727 sprintf(fileName,"TriggerCheckFromRP.root");
731 AliMUONGlobalTrigger *gloTrg(0x0);
732 AliMUONLocalTrigger *locTrg(0x0);
734 Int_t nevents = fRunLoader->GetNumberOfEvents();
735 for (Int_t ievent=0; ievent<nevents; ievent++) {
736 if (event2Check!=0) ievent=event2Check;
737 if (ievent%100==0 || event2Check)
738 AliInfoStream() << "Processing event " << ievent << endl;
739 fRunLoader->GetEvent(ievent);
742 SetTreeAddress("D,GLT");
745 SetTreeAddress("RC,TC");
749 globalTrigger = GlobalTrigger();
750 localTrigger = LocalTrigger();
752 Int_t nglobals = (Int_t) globalTrigger->GetEntriesFast(); // should be 1
753 Int_t nlocals = (Int_t) localTrigger->GetEntriesFast(); // up to 234
754 if (printout) printf("###################################################\n");
755 if (printout) printf("event %d nglobal %d nlocal %d \n",ievent,nglobals,nlocals);
757 for (Int_t iglobal=0; iglobal<nglobals; iglobal++) { // Global Trigger
758 gloTrg = static_cast<AliMUONGlobalTrigger*>(globalTrigger->At(iglobal));
760 sLowpt+=gloTrg->SingleLpt() ;
761 sHighpt+=gloTrg->SingleHpt() ;
762 uSLowpt+=gloTrg->PairUnlikeLpt();
763 uSHighpt+=gloTrg->PairUnlikeHpt();
764 lSLowpt+=gloTrg->PairLikeLpt();
765 lSHighpt+=gloTrg->PairLikeHpt();
767 if (printout) gloTrg->Print("full");
769 } // end of loop on Global Trigger
771 for (Int_t ilocal=0; ilocal<nlocals; ilocal++) { // Local Trigger
772 locTrg = static_cast<AliMUONLocalTrigger*>(localTrigger->At(ilocal));
777 if ( locTrg->LoSdev()==1 && locTrg->LoDev()==0 &&
778 locTrg->LoStripX()==0) xTrig=kFALSE; // no trigger in X
779 else xTrig=kTRUE; // trigger in X
780 if (locTrg->LoTrigY()==1 &&
781 locTrg->LoStripY()==15 ) yTrig = kFALSE; // no trigger in Y
782 else yTrig = kTRUE; // trigger in Y
784 if (xTrig && yTrig) { // make Trigger Track if trigger in X and Y
786 if (printout) locTrg->Print("full");
788 AliMUONTriggerCircuit* circuit = (AliMUONTriggerCircuit*)triggerCircuit->At(locTrg->LoCircuit()-1);
790 tupleLoc->Fill(ievent,locTrg->LoCircuit(),locTrg->LoStripX(),locTrg->LoDev(),locTrg->LoStripY(),locTrg->LoLpt(),locTrg->LoHpt(),circuit->GetY11Pos(locTrg->LoStripX()),circuit->GetY21Pos(locTrg->LoStripX()+locTrg->LoDev()+1),circuit->GetX11Pos(locTrg->LoStripY()));
793 } // end of loop on Local Trigger
796 tupleGlo->Fill(ievent,nglobals,gloTrg->SingleLpt(),gloTrg->SingleHpt(),gloTrg->PairUnlikeLpt(),gloTrg->PairUnlikeHpt(),gloTrg->PairLikeLpt(),gloTrg->PairLikeHpt());
799 if (event2Check!=0) ievent=nevents;
800 } // end loop on event
802 // Print out summary if loop ran over all event
806 printf("=============================================\n");
807 printf("================ SUMMARY ==================\n");
809 printf("Total number of events processed %d \n", (event2Check==0) ? nevents : 1);
811 printf(" Global Trigger output Low pt High pt\n");
812 printf(" number of Single :\t");
813 printf("%i\t%i\t",sLowpt,sHighpt);
815 printf(" number of UnlikeSign pair :\t");
816 printf("%i\t%i\t",uSLowpt,uSHighpt);
818 printf(" number of LikeSign pair :\t");
819 printf("%i\t%i\t",lSLowpt,lSHighpt);
821 printf("=============================================\n");
826 TFile *myFile = new TFile(fileName, "RECREATE");
832 fLoader->UnloadRecPoints();
836 delete triggerCircuit;