#include <MINFDetector.h>
Inheritance diagram for MINFDetector:

Public Member Functions | |
| MINFDetector (const char *name, const char *title) | |
| MINFDetector () | |
| ~MINFDetector () | |
| virtual TList * | DisplayList () |
| virtual TObjArray * | GetTrkHits (Int_t itrack) |
| virtual TClonesArray * | GetHits () |
| virtual Int_t | GetNdigits () const |
| virtual Int_t | GetNhits () const |
| TList * | Histograms () |
| TList * | Nodes () |
| TClonesArray * | Digits () |
| TClonesArray * | Hits () |
| TObjArray * | Points () |
| Int_t | GetNV () const |
| Int_t | GetNH () const |
| Int_t | GetIshunt () const |
| void | SetIshunt (Int_t ishunt) |
| Bool_t | IsActive () const |
| Bool_t | IsFolder () const |
| virtual void | AddDigit (Int_t *, Int_t *) |
| virtual void | BookHits (REROOT_Event *) |
| virtual void | Browse (TBrowser *b) |
| virtual void | DeEmbellishTrack (Int_t) |
| virtual void | Disable () |
| virtual Int_t | DistancetoPrimitive (Int_t px, Int_t py) |
| virtual void | DumpHit (Int_t) |
| virtual void | EmbellishTrack (Int_t) |
| virtual void | Enable () |
| virtual void | FinishRun () |
| virtual Float_t | GetHitELOSS (Int_t) |
| virtual Float_t | GetHitPartMom (Int_t) |
| virtual Int_t | GetIPDG (Int_t) |
| virtual void | Hits2Digits () |
| virtual void | Init () |
| virtual void | InspectHit (Int_t) |
| virtual void | LoadPoints (Int_t track) |
| virtual void | MakeBranch () |
| virtual void | Paint (Option_t *opt="") |
| virtual void | ResetDigits () |
| virtual void | ResetHits () |
| virtual void | ResetPoints () |
| virtual void | SetTreeAddress () |
Protected Attributes | |
| Bool_t | fActive |
| Int_t | fIshunt |
| Int_t | fNV |
| Int_t | fNH |
| Int_t | fNhits |
| Int_t | fNdigits |
| TList * | fHistograms |
| TList * | fNodes |
| TClonesArray * | fHits |
| TObjArray * | fTrkHits |
| TClonesArray * | fDigits |
| TObjArray * | fPoints |
| TList * | fDisplayList |
Definition at line 32 of file MINFDetector.h.
| MINFDetector::MINFDetector | ( | const char * | name, | |
| const char * | title | |||
| ) |
Definition at line 62 of file MINFDetector.cxx.
References MINFast::Detectors(), fActive, fDigits, fDisplayList, fHistograms, fHits, fNdigits, fNhits, fNodes, fPoints, fTrkHits, and gMINFast.
00063 : TNamed(name,title) 00064 { 00065 00066 // Normal constructor invoked by all Detectors. 00067 // Create the list for detector specific histograms 00068 // Add this Detector to the global list of Detectors in Run. 00069 fActive = kTRUE; 00070 fNhits = 0; 00071 fHits = 0; 00072 fTrkHits = 0; 00073 fDigits = 0; fNdigits = 0; 00074 fHistograms = new TList(); 00075 fNodes = new TList(); 00076 fPoints = 0; 00077 fDisplayList= new TList(); 00078 gMINFast->Detectors()->Add(this); 00079 SetMarkerColor(kBlack); 00080 SetMarkerStyle(1); 00081 }
| MINFDetector::MINFDetector | ( | ) |
Definition at line 47 of file MINFDetector.cxx.
00048 { 00049 fNhits = 0; 00050 fHits = 0; 00051 fTrkHits = 0; 00052 fDigits = 0; 00053 fNdigits = 0; 00054 fHistograms = 0; 00055 fNodes = 0; 00056 fPoints = 0; 00057 fDisplayList= 0; 00058 fActive = kTRUE; 00059 }
| MINFDetector::~MINFDetector | ( | ) |
Definition at line 84 of file MINFDetector.cxx.
References fDisplayList, fHistograms, fNdigits, fNhits, fNodes, and fPoints.
00085 { 00086 fNhits = 0; 00087 fNdigits = 0; 00088 fHistograms = 0; 00089 fNodes->Clear(); 00090 delete fNodes; 00091 if (fPoints) fPoints->Delete(); 00092 delete fPoints; 00093 fPoints = 0; 00094 if (fDisplayList) fDisplayList->Clear(); 00095 delete fDisplayList; 00096 fDisplayList = 0; 00097 }
| virtual void MINFDetector::AddDigit | ( | Int_t * | , | |
| Int_t * | ||||
| ) | [inline, virtual] |
| virtual void MINFDetector::BookHits | ( | REROOT_Event * | ) | [inline, virtual] |
Reimplemented in MINFEMU, MINFFLS, and MINFLST.
Definition at line 63 of file MINFDetector.h.
Referenced by MINFast::ProcessEvent().
| void MINFDetector::Browse | ( | TBrowser * | b | ) | [virtual] |
Definition at line 100 of file MINFDetector.cxx.
References fHits.
00101 { 00102 00103 // Insert Detector objects in the list of objects to be browsed. 00104 char name[64]; 00105 if (fHits == 0) return; 00106 TObject *obj; 00107 Int_t i, nobjects; 00108 00109 nobjects = fHits->GetEntries(); 00110 for (i=0;i<nobjects;i++) { 00111 obj = fHits->At(i); 00112 sprintf(name,"%s_%d",obj->GetName(),i); 00113 b->Add(obj, &name[0]); 00114 } 00115 }
| virtual void MINFDetector::DeEmbellishTrack | ( | Int_t | ) | [inline, virtual] |
Reimplemented in MINFEMU.
Definition at line 65 of file MINFDetector.h.
Referenced by MINFPoints::DeEmbellishTrack().
| TClonesArray* MINFDetector::Digits | ( | ) | [inline] |
| void MINFDetector::Disable | ( | ) | [virtual] |
Definition at line 118 of file MINFDetector.cxx.
References fActive, and fNodes.
Referenced by MINFDisplay::DisableDetector().
00119 { 00120 00121 // Disable detector name 00122 fActive = kFALSE; 00123 TIter next(fNodes); 00124 TNode *node; 00125 while((node = (TNode*)next())) { 00126 node->SetVisibility(0); 00127 } 00128 }
| virtual TList* MINFDetector::DisplayList | ( | ) | [inline, virtual] |
Definition at line 43 of file MINFDetector.h.
References fDisplayList.
Referenced by MINFEMU::DeEmbellishTrack(), and MINFEMU::EmbellishTrack().
00043 {return fDisplayList;}
| Int_t MINFDetector::DistancetoPrimitive | ( | Int_t | px, | |
| Int_t | py | |||
| ) | [virtual] |
| virtual void MINFDetector::DumpHit | ( | Int_t | ) | [inline, virtual] |
Reimplemented in MINFEMU, MINFFLS, and MINFLST.
Definition at line 68 of file MINFDetector.h.
Referenced by MINFPoints::DumpSelectedHit().
| virtual void MINFDetector::EmbellishTrack | ( | Int_t | ) | [inline, virtual] |
Reimplemented in MINFEMU.
Definition at line 69 of file MINFDetector.h.
Referenced by MINFPoints::EmbellishTrack().
| void MINFDetector::Enable | ( | ) | [virtual] |
Definition at line 137 of file MINFDetector.cxx.
References fActive, and fNodes.
Referenced by MINFDisplay::EnableDetector().
00138 { 00139 00140 // Enable detector name 00141 fActive = kTRUE; 00142 TIter next(fNodes); 00143 TNode *node; 00144 while ((node = (TNode*)next())) { 00145 node->SetVisibility(1); 00146 } 00147 }
| void MINFDetector::FinishRun | ( | ) | [virtual] |
| virtual Float_t MINFDetector::GetHitELOSS | ( | Int_t | ) | [inline, virtual] |
Reimplemented in MINFEMU, MINFFLS, and MINFLST.
Definition at line 72 of file MINFDetector.h.
Referenced by MINFPoints::GetObjectInfo().
| virtual Float_t MINFDetector::GetHitPartMom | ( | Int_t | ) | [inline, virtual] |
Reimplemented in MINFEMU, MINFFLS, and MINFLST.
Definition at line 73 of file MINFDetector.h.
Referenced by MINFPoints::GetObjectInfo().
| virtual TClonesArray* MINFDetector::GetHits | ( | ) | [inline, virtual] |
| virtual Int_t MINFDetector::GetIPDG | ( | Int_t | ) | [inline, virtual] |
Reimplemented in MINFEMU, MINFFLS, and MINFLST.
Definition at line 74 of file MINFDetector.h.
Referenced by MINFPoints::GetHitName().
| Int_t MINFDetector::GetIshunt | ( | ) | const [inline] |
| virtual Int_t MINFDetector::GetNdigits | ( | ) | const [inline, virtual] |
| Int_t MINFDetector::GetNH | ( | ) | const [inline] |
| virtual Int_t MINFDetector::GetNhits | ( | ) | const [inline, virtual] |
| Int_t MINFDetector::GetNV | ( | ) | const [inline] |
| virtual TObjArray* MINFDetector::GetTrkHits | ( | Int_t | itrack | ) | [inline, virtual] |
Definition at line 44 of file MINFDetector.h.
References fTrkHits.
Referenced by MINFLST::BookHits(), MINFFLS::BookHits(), MINFEMU::BookHits(), MINFPoints::DistancetoPrimitive(), MINFEMU::LoadPoints(), and LoadPoints().
00045 {return (TObjArray *) (fTrkHits->At(itrack));}
| TList* MINFDetector::Histograms | ( | ) | [inline] |
| TClonesArray* MINFDetector::Hits | ( | ) | [inline] |
| virtual void MINFDetector::Hits2Digits | ( | ) | [inline, virtual] |
| virtual void MINFDetector::Init | ( | void | ) | [inline, virtual] |
| virtual void MINFDetector::InspectHit | ( | Int_t | ) | [inline, virtual] |
Reimplemented in MINFEMU, MINFFLS, and MINFLST.
Definition at line 77 of file MINFDetector.h.
Referenced by MINFPoints::InspectSelectedHit().
| Bool_t MINFDetector::IsActive | ( | ) | const [inline] |
| Bool_t MINFDetector::IsFolder | ( | ) | const [inline] |
| void MINFDetector::LoadPoints | ( | Int_t | track | ) | [virtual] |
Reimplemented in MINFEMU.
Definition at line 157 of file MINFDetector.cxx.
References fPoints, MINFast::GetNtrack(), MINFHit::GetTrack(), GetTrkHits(), gMINFast, MINFPoints::SetDetector(), MINFPoints::SetParticle(), MINFHit::X(), MINFHit::Y(), and MINFHit::Z().
Referenced by MINFEMU::LoadPoints().
00158 { 00159 00160 //gmi printf("MINFDetector::LoadPoints: Enter for track %d\n",track); 00161 00162 // Store x,y,z of all hits in memory 00163 if (fPoints == 0) fPoints = new TObjArray(gMINFast->GetNtrack()); 00164 TObjArray *thits = GetTrkHits(track); 00165 Int_t nhits = thits->GetEntriesFast(); 00166 00167 //gmi printf("MINFDetector::LoadPoints: No. of hits is %d\n",nhits); 00168 00169 if (nhits == 0) return; 00170 MINFHit *ahit; 00171 MINFPoints *points = new MINFPoints(nhits); 00172 fPoints->AddAt(points,track); 00173 points->SetMarkerColor(GetMarkerColor()); 00174 points->SetMarkerStyle(GetMarkerStyle()); 00175 points->SetMarkerSize(GetMarkerSize()); 00176 points->SetDetector(this); 00177 for (Int_t hit=0; hit<nhits; hit++) { 00178 ahit = (MINFHit *) thits->UncheckedAt(hit); 00179 points->SetPoint(hit, ahit->X(), ahit->Y(), ahit->Z()); 00180 if (hit == 0) { 00181 points->SetParticle(ahit->GetTrack()); 00182 } 00183 } 00184 }
| void MINFDetector::MakeBranch | ( | ) | [virtual] |
Definition at line 187 of file MINFDetector.cxx.
References fHits, Nav::GetName(), gMINFast, and MINFast::TreeH().
Referenced by MINFast::MakeTree().
00188 { 00189 00190 // Create a new branch in the current Root Tree. 00191 // The branch of fHits is automatically split 00192 Int_t buffersize = 4000; 00193 char branchname[10]; 00194 sprintf(branchname,"%s",GetName()); 00195 if (fHits && gMINFast->TreeH()) { 00196 gMINFast->TreeH()->Branch(branchname,&fHits, buffersize); 00197 //gmiprintf("Making Branch %s for hits\n",branchname); 00198 } 00199 }
| TList* MINFDetector::Nodes | ( | ) | [inline] |
| void MINFDetector::Paint | ( | Option_t * | opt = "" |
) | [virtual] |
| TObjArray* MINFDetector::Points | ( | ) | [inline] |
| void MINFDetector::ResetDigits | ( | ) | [virtual] |
Definition at line 207 of file MINFDetector.cxx.
References fDigits, and fNdigits.
Referenced by MINFast::ResetDigits().
00208 { 00209 00210 // Reset number of digits and the digits array for this detector 00211 fNdigits = 0; 00212 if (fDigits) fDigits->Clear(); 00213 }
| void MINFDetector::ResetHits | ( | ) | [virtual] |
Definition at line 216 of file MINFDetector.cxx.
References fHits, fNhits, and fTrkHits.
Referenced by MINFast::ResetHits().
00217 { 00218 00219 // Reset number of hits and the hits array for this detector 00220 fNhits = 0; 00221 if (fHits) fHits->Delete(); 00222 00223 // Clear and Delete fTrkHits = TObjArray by track of TObjArrays by hit. 00224 if (fTrkHits) fTrkHits->Delete(); 00225 delete fTrkHits; 00226 fTrkHits = 0; 00227 }
| void MINFDetector::ResetPoints | ( | ) | [virtual] |
Reimplemented in MINFEMU.
Definition at line 230 of file MINFDetector.cxx.
References fDisplayList, and fPoints.
Referenced by MINFEMU::ResetPoints(), and MINFast::ResetPoints().
00231 { 00232 00233 // Reset array of points for this detector 00234 if (fPoints) { 00235 fPoints->Delete(); 00236 delete fPoints; 00237 fPoints = 0; 00238 } 00239 00240 // Reset Display List for this detector 00241 if (fDisplayList) fDisplayList->Clear(); 00242 }
| void MINFDetector::SetIshunt | ( | Int_t | ishunt | ) | [inline] |
| void MINFDetector::SetTreeAddress | ( | ) | [virtual] |
Definition at line 245 of file MINFDetector.cxx.
References fDigits, fHits, Nav::GetName(), gMINFast, MINFast::TreeD(), and MINFast::TreeH().
00246 { 00247 00248 // Set branch address for the Hits and Digits Trees. 00249 TBranch *branch; 00250 char branchname[20]; 00251 sprintf(branchname,"%s",GetName()); 00252 TTree *treeH = gMINFast->TreeH(); 00253 if (treeH && fHits) { 00254 branch = treeH->GetBranch(branchname); 00255 if (branch) branch->SetAddress(&fHits); 00256 } 00257 TTree *treeD = gMINFast->TreeD(); 00258 if (treeD && fDigits) { 00259 branch = treeD->GetBranch(branchname); 00260 if (branch) branch->SetAddress(&fDigits); 00261 } 00262 }
Bool_t MINFDetector::fActive [protected] |
Definition at line 89 of file MINFDetector.h.
Referenced by Disable(), Enable(), IsActive(), and MINFDetector().
TClonesArray* MINFDetector::fDigits [protected] |
Definition at line 109 of file MINFDetector.h.
Referenced by Digits(), MINFDetector(), ResetDigits(), and SetTreeAddress().
TList* MINFDetector::fDisplayList [protected] |
Definition at line 112 of file MINFDetector.h.
Referenced by DisplayList(), MINFDetector(), ResetPoints(), and ~MINFDetector().
TList* MINFDetector::fHistograms [protected] |
Definition at line 95 of file MINFDetector.h.
Referenced by Histograms(), MINFDetector(), and ~MINFDetector().
TClonesArray* MINFDetector::fHits [protected] |
Definition at line 97 of file MINFDetector.h.
Referenced by MINFLST::BookHits(), MINFFLS::BookHits(), MINFEMU::BookHits(), Browse(), GetHits(), Hits(), MakeBranch(), MINFDetector(), MINFEMU::MINFEMU(), MINFFLS::MINFFLS(), MINFLST::MINFLST(), ResetHits(), and SetTreeAddress().
Int_t MINFDetector::fIshunt [protected] |
Definition at line 90 of file MINFDetector.h.
Referenced by MINFLST::BookHits(), MINFFLS::BookHits(), MINFEMU::BookHits(), GetIshunt(), MINFEMU::MINFEMU(), MINFFLS::MINFFLS(), MINFLST::MINFLST(), and SetIshunt().
Int_t MINFDetector::fNdigits [protected] |
Definition at line 94 of file MINFDetector.h.
Referenced by GetNdigits(), MINFDetector(), ResetDigits(), and ~MINFDetector().
Int_t MINFDetector::fNH [protected] |
Definition at line 92 of file MINFDetector.h.
Referenced by GetNH(), MINFEMU::MINFEMU(), MINFFLS::MINFFLS(), and MINFLST::MINFLST().
Int_t MINFDetector::fNhits [protected] |
Definition at line 93 of file MINFDetector.h.
Referenced by MINFLST::BookHits(), MINFFLS::BookHits(), MINFEMU::BookHits(), GetNhits(), MINFDetector(), ResetHits(), and ~MINFDetector().
TList* MINFDetector::fNodes [protected] |
Definition at line 96 of file MINFDetector.h.
Referenced by Disable(), Enable(), MINFDetector(), Nodes(), and ~MINFDetector().
Int_t MINFDetector::fNV [protected] |
Definition at line 91 of file MINFDetector.h.
Referenced by GetNV(), MINFEMU::MINFEMU(), MINFFLS::MINFFLS(), and MINFLST::MINFLST().
TObjArray* MINFDetector::fPoints [protected] |
Definition at line 110 of file MINFDetector.h.
Referenced by LoadPoints(), MINFDetector(), Points(), ResetPoints(), and ~MINFDetector().
TObjArray* MINFDetector::fTrkHits [protected] |
Definition at line 102 of file MINFDetector.h.
Referenced by MINFLST::BookHits(), MINFFLS::BookHits(), MINFEMU::BookHits(), GetTrkHits(), MINFDetector(), and ResetHits().
1.4.7