- Timestamp:
- 06/13/01 15:29:47 (23 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r850 r851 17 17 * mgui/MParContainer.cc: 18 18 - made Copy-function more readable 19 20 * mhist/MHMcEnergies.[h,cc]: 21 - files added as a container to make handling of several MHMcEnergy easier 22 23 * mbase/MAGIC.h: 24 - encapsulated include of TROOT 25 26 * mbase/MTaskList.cc: 27 - added SetHasChange and Reset to PostProcess 28 29 * mhist/HistLinkDef.h 30 - added MHMcEnergies 31 32 * mhist/MHMcEnergy.[h,cc]: 33 - added name and title to constructor 34 - added number to name of container 35 36 * mmontecarlo/MMcThresholdCalc.cc: 37 - corrected typo in creation of the container names 38 39 * mraw/MRawEvtData.cc: 40 - Set kCanDelete in Draw function 41 19 42 20 43 -
trunk/MagicSoft/Mars/macros/getCollArea.C
r753 r851 1 void getCollArea(char *filename = " /big0/Maggi/CamData/Gamma/gamma_15_on.root" )1 void getCollArea(char *filename = "data/gamma_15_on.root" ) 2 2 { 3 3 // FIXME: Harald, you should tell the people what the result of … … 21 21 parlist.AddToList(&tasklist); 22 22 23 M CollArea *collArea = new MCollArea();23 MHMcCollectionArea *collArea = new MHMcCollectionArea(); 24 24 parlist.AddToList(collArea); 25 25 -
trunk/MagicSoft/Mars/macros/getThreshold.C
r839 r851 1 1 void getThreshold( char* filename = "/hdb1/users/jlopez/temp_loop.root") 2 2 { 3 // This macro fill the container MMcEnerThre using the task 4 // MMcEnerThreCalc and shows the results. 3 5 4 // This macro fill the container MMcEnerThre using the task5 // MMcEnerThreCalc and shows the results.6 MParList parlist; 7 MTaskList tasklist; 6 8 7 MParList parlist; 8 MTaskList tasklist; 9 // Setup the parameter list 10 // - You need create the container MMcEnerThre. 11 // + You need to put the number of trigger conditions when 12 // you declarete the MMcEnerThre 13 // + If you don't put any dimension to MMcEnerThre it works 14 // taking only the trigger information from MMcTrig 15 // - You can control the number of bins in the energy distribution 16 // histogram used to compute the energy threshold using 17 // the SetBins() function. 9 18 10 // Setup the parameter list 11 // - You need create the container MMcEnerThre. 12 // · You need to put the number of trigger conditions when 13 // you declarete the MMcEnerThre 14 // · If you don't put any dimension to MMcEnerThre it works 15 // taking only the trigger information from MMcTrig 16 // - You can control the number of bins in the energy distribution 17 // histogram used to compute the energy threshold using 18 // the SetBins() function. 19 Int_t numtrigcond = 5; 20 MHMcEnergies *hists = new MHMcEnergies(numtrigcond); 19 21 20 Int_t NumTrigCond = 5; 21 MMcEnerThre enerthre(NumTrigCond); 22 enerthre[0].SetBins(60); 23 enerthre[1].SetBins(60); 24 enerthre[2].SetBins(60); 25 enerthre[3].SetBins(60); 26 enerthre[4].SetBins(60); 22 parlist.AddToList(&tasklist); 23 hists->AddEntriesToList(&parlist); 27 24 28 parlist.AddToList(&tasklist); 29 parlist.AddToList(&enerthre); 25 // Setup the task list 26 // - You need the read and the MMcEnerThreCalc tasks 27 // + You need to put the number of trigger conditions when 28 // you declarete the MMcEnerThreCalc 29 // + If you don't put any dimension to MMcEnerThreCalc it works 30 // like one dimension MMcEnerThreCalc 30 31 31 // Setup the task list 32 // - You need the read and the MMcEnerThreCalc tasks 33 // · You need to put the number of trigger conditions when 34 // you declarete the MMcEnerThreCalc 35 // · If you don't put any dimension to MMcEnerThreCalc it works 36 // like one dimension MMcEnerThreCalc 32 MReadTree read("Events", filename); 37 33 34 MMcThresholdCalc tcalc(numtrigcond); 38 35 36 tasklist.AddToList(&read); 37 tasklist.AddToList(&tcalc); 39 38 40 MReadTree read("Events",filename); 39 MEvtLoop evtloop; 40 evtloop.SetParList(&parlist); 41 41 42 MMcEnerThreCalc enerthrecalc(NumTrigCond); 43 44 tasklist.AddToList(&read); 45 tasklist.AddToList(&enerthrecalc); 42 // Begin the loop 46 43 47 MEvtLoop evtloop; 48 evtloop.SetParList(&parlist); 44 evtloop.Eventloop(); 49 45 50 // Begin the loop46 // Now you can display the results 51 47 52 evtloop.Eventloop();48 TCanvas *c; 53 49 54 // Now you can display the results 50 c=new TCanvas("c0","Energy distribution for triggered events", 50, 50, 850, 550); 51 hists[0].Print(); 52 hists[0].Draw(); 53 c->Update(); 55 54 56 gROOT->Reset(); 55 c= new TCanvas("c1","Energy distribution for triggered events", 50, 50, 850, 550); 56 hists[1].Print(); 57 hists[1].Draw(); 58 c->Update(); 57 59 58 c0= new TCanvas("c0","Energy distribution for triggered events",50,50,850,550);59 enerthre[0].Print();60 enerthre[0].Draw();61 c0->Update();60 c= new TCanvas("c2","Energy distribution for triggered events", 50, 50, 850, 550); 61 hists[2].Print(); 62 hists[2].Draw(); 63 c->Update(); 62 64 63 c1= new TCanvas("c1","Energy distribution for triggered events",50,50,850,550);64 enerthre[1].Print();65 enerthre[1].Draw();66 c1->Update();65 c= new TCanvas("c3","Energy distribution for triggered events", 50, 50, 850, 550); 66 hists[3].Print(); 67 hists[3].Draw(); 68 c->Update(); 67 69 68 c2= new TCanvas("c2","Energy distribution for triggered events",50,50,850,550); 69 enerthre[2].Print(); 70 enerthre[2].Draw(); 71 c2->Update(); 72 73 c3= new TCanvas("c3","Energy distribution for triggered events",50,50,850,550); 74 enerthre[3].Print(); 75 enerthre[3].Draw(); 76 c3->Update(); 77 78 c4= new TCanvas("c4","Energy distribution for triggered events",50,50,850,550); 79 enerthre[4].Print(); 80 enerthre[4].Draw(); 81 c4->Update(); 82 70 c= new TCanvas("c4","Energy distribution for triggered events", 50, 50, 850, 550); 71 hists[4].Print(); 72 hists[4].Draw(); 73 c->Update(); 83 74 } 84 85 86 87 -
trunk/MagicSoft/Mars/mbase/MAGIC.h
r690 r851 9 9 /////////////////////////////////////////////////////////////////////////////// 10 10 11 #ifndef ROOT_TROOT 11 12 #include <TROOT.h> 13 #endif 12 14 13 15 // -
trunk/MagicSoft/Mars/mbase/MParContainer.cc
r849 r851 65 65 MParContainer& MParContainer::operator=(const MParContainer& rhs) 66 66 { 67 if (this != &rhs) { 68 TObject::operator=(rhs); 69 *fName = *(rhs.fName); 70 *fTitle = *(rhs.fTitle); 71 fLog = rhs.fLog; 72 fHasChanged = rhs.fHasChanged; 73 } 67 if (this == &rhs) 68 return *this; 69 70 TObject::operator=(rhs); 71 72 *fName = *(rhs.fName); 73 *fTitle = *(rhs.fTitle); 74 75 fLog = rhs.fLog; 76 fHasChanged = rhs.fHasChanged; 77 74 78 return *this; 75 79 } -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r843 r851 227 227 *fLog << "Postprocessing... " << flush; 228 228 229 // FIXME: At the moment all containers are post processed independ of229 // FIXME: At the moment all tasks are post processed independ of 230 230 // whether it was preprocessed or not. 231 232 // 233 // Reset the HasChanged flag. 234 // Reset all containers. 235 // 236 fParList->SetHasChanged(kFALSE); 237 fParList->Reset(); 231 238 232 239 // -
trunk/MagicSoft/Mars/mhist/HistLinkDef.h
r846 r851 10 10 #pragma link C++ class MHStarMap; 11 11 #pragma link C++ class MHMcEnergy; 12 #pragma link C++ class MHMcEnergies; 13 #pragma link C++ class MHMcCollectionArea; 12 14 13 15 #pragma link C++ class MFillHFadc; -
trunk/MagicSoft/Mars/mhist/MHMcEnergy.cc
r846 r851 33 33 ClassImp(MHMcEnergy) 34 34 35 MHMcEnergy::MHMcEnergy(const UInt_t idx )35 MHMcEnergy::MHMcEnergy(const UInt_t idx, const char *name, const char *title) 36 36 { 37 37 // 38 38 // default constructor 39 39 // 40 char aux[15]="MHMcEnergy"; 41 42 if (idx>0) 43 sprintf(aux+10, ";%i", idx); 44 *fName = name ? name : aux; 45 *fTitle = title ? title : "Container for a MC energy histogram" ; 40 46 41 47 // - we initialize the histogram and the gaus function … … 43 49 // root don't allow us to have diferent histograms with the same name 44 50 45 char aux[15]; 51 strcpy(aux, "fLogEnergy"); 52 if (idx>0) 53 sprintf(aux+10, ";%i", idx); 54 fLogEner = new TF1(aux, "gaus", 1., 3.); 46 55 47 56 strcpy(aux, "hLogEnergy"); … … 49 58 sprintf(aux+10, ";%i", idx); 50 59 hLogEner = new TH1F(aux, "", 100, 0.5, 4.5); 51 52 strcpy(aux, "fLogEnergy"); 53 if (idx>0) 54 sprintf(aux+10, ";%i", idx); 55 fLogEner = new TF1(aux, "gaus", 1., 3.); 60 //hLogEner->SetBins(60); 56 61 } 57 62 -
trunk/MagicSoft/Mars/mhist/MHMcEnergy.h
r846 r851 21 21 public: 22 22 23 MHMcEnergy(const UInt_t idx=0 );23 MHMcEnergy(const UInt_t idx=0, const char *name=NULL, const char *title=NULL); 24 24 ~MHMcEnergy(); 25 25 -
trunk/MagicSoft/Mars/mhist/Makefile
r846 r851 35 35 MHHillas.cc \ 36 36 MHStarMap.cc \ 37 MHMcEnergy.cc 37 MHMcCollectionArea.cc \ 38 MHMcEnergy.cc \ 39 MHMcEnergies.cc 38 40 39 41 SRCS = $(SRCFILES) -
trunk/MagicSoft/Mars/mmontecarlo/MMcThresholdCalc.cc
r846 r851 87 87 { 88 88 if (fDimension>1) 89 sprintf(auxname+7, ";%i .", i+1);89 sprintf(auxname+7, ";%i", i+1); 90 90 91 91 fMcTrig[i] = (MMcTrig*)pList->FindObject(auxname); … … 105 105 { 106 106 if (fDimension>1) 107 sprintf(auxname+10, ";%i .", i+1);107 sprintf(auxname+10, ";%i", i+1); 108 108 109 109 fHMcEnergy[i] = (MHMcEnergy*)pList->FindObject(auxname); -
trunk/MagicSoft/Mars/mmontecarlo/Makefile
r846 r851 28 28 .SUFFIXES: .c .cc .cxx .h .hxx .o 29 29 30 SRCFILES = MCollArea.cc \ 31 MCollAreaTrigger.cc \ 30 SRCFILES = MMcCollectionAreaCalc.cc \ 32 31 MMcThresholdCalc.cc 33 32 -
trunk/MagicSoft/Mars/mmontecarlo/MonteCarloLinkDef.h
r846 r851 5 5 #pragma link off all functions; 6 6 7 #pragma link C++ class MCollArea ; 8 #pragma link C++ class MCollAreaTrigger ; 9 #pragma link C++ class MMcThresholdCalc ; 7 #pragma link C++ class MMcThresholdCalc; 8 #pragma link C++ class MMcCollectionAreaCalc; 10 9 11 10 #endif -
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r761 r851 244 244 graph->SetMinimum (0) ; 245 245 246 graph->SetBit(kCanDelete); 246 247 graph->Draw("AC*"); 247 248 … … 272 273 hist->Fill(0.5+i, (*fHiGainFadcSamples)[i + num*GetNumHiGainSamples()]); 273 274 275 hist->SetBit(kCanDelete); 274 276 hist->Draw(); 275 277
Note:
See TracChangeset
for help on using the changeset viewer.