Changeset 4117
- Timestamp:
- 05/21/04 17:28:02 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mtemp/mifae
- Files:
-
- 4 added
- 2 deleted
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mtemp/mifae/Changelog
r4103 r4117 19 19 -*-*- END OF LINE -*-*- 20 20 21 2004/05/21 Javier Rico 22 * library/MDCA.[cc.h] 23 - removed 24 25 * library/MDisplay.[h,cc], library/MHillasDisplay.[h,cc] 26 - added 27 28 * library/Makefile, library/IFAELinkDef.h 29 - remove MDCA 30 - add MDisplay and MHillasDisplay 31 32 * library/MSrcPlace.[h,cc], library/MSrcRotate.[h,cc], 33 library/MSrcTranslate.[h,cc], library/MSrcPosFromFile.cc 34 - remove MDCA dependences 35 36 * programs/makeHillas.cc, programs/makehillas.datacard 37 - include display and selection cuts options 38 39 * programs/Makefile 40 - include mfbase in the list of includes directory 41 21 42 2004/05/18 Javier Rico 22 43 * macros/plotOptimal.C -
trunk/MagicSoft/Mars/mtemp/mifae/library/IFAELinkDef.h
r4072 r4117 5 5 #pragma link off all functions; 6 6 7 #pragma link C++ class MDCA+; 7 #pragma link C++ class MDisplay+; 8 #pragma link C++ class MHillasDisplay+; 8 9 #pragma link C++ class MPSFFit+; 9 10 #pragma link C++ class MPSFFitCalc+; -
trunk/MagicSoft/Mars/mtemp/mifae/library/MSrcPlace.cc
r4094 r4117 39 39 // Output Containers: 40 40 // MSrcPosCam 41 // MDCA42 41 // 43 42 ////////////////////////////////////////////////////////////////////////////// … … 51 50 #include "MSrcPlace.h" 52 51 #include "MSrcPosCam.h" 53 #include "MDCA.h"54 52 55 53 #include "MLog.h" … … 67 65 // Default constructor. The first argument is the name of the internal histo, 68 66 // the second (third) argument is the name of the input (output) container 69 // containing the source position in the camera plain. Fourth argument is the 70 // name of the output MDCA container. 71 // 72 MSrcPlace::MSrcPlace(const char* srcPosIn, const char* srcPosOut, const char* dca, const char *name, const char *title) 73 : fSrcPosIn(NULL), fSrcPosOut(NULL), fDCA(NULL), fHistoName("SrcPosHist"), 67 // containing the source position in the camera plain. 68 // 69 MSrcPlace::MSrcPlace(const char* srcPosIn, const char* srcPosOut, const char *name, const char *title) 70 : fSrcPosIn(NULL), fSrcPosOut(NULL), fHistoName("SrcPosHist"), 74 71 fHistoBinPrec(1.), fHistPos(NULL) 75 72 { … … 79 76 fSrcPosInName = srcPosIn; 80 77 fSrcPosOutName = srcPosOut; 81 fDCAName = dca;82 78 83 79 fMode=kOn; … … 116 112 fHistPos->GetRandom2(x,y); 117 113 fSrcPosOut->SetXY(x,y); 118 fDCA->SetRefPoint(x,y);119 114 } 120 115 } … … 153 148 fSrcPosOut = (MSrcPosCam*)pList->FindCreateObj("MSrcPosCam", AddSerialNumber(fSrcPosOutName)); 154 149 if(!fSrcPosOut) 155 return kFALSE;156 }157 158 // look for/create MDCA159 fDCA = (MDCA*)pList->FindObject(AddSerialNumber(fDCAName), "MDCA");160 if (!fDCA)161 {162 *fLog << warn << AddSerialNumber(fDCAName) << " [MDCA] not found... creating default container." << endl;163 fDCA = (MDCA*)pList->FindCreateObj("MDCA", AddSerialNumber(fDCAName));164 if(!fDCA)165 150 return kFALSE; 166 151 } -
trunk/MagicSoft/Mars/mtemp/mifae/library/MSrcPlace.h
r4094 r4117 6 6 #endif 7 7 8 class MDCA;9 8 class MSrcPosCam; 10 9 class TH2F; … … 18 17 MSrcPosCam* fSrcPosIn; // Pointer to the input source position container 19 18 MSrcPosCam* fSrcPosOut; // Pointer to the output source position container 20 MDCA* fDCA; // Pointer to the output MDCA container21 19 22 20 TString fSrcPosInName; // Name of the input MSrcPosCam object 23 21 TString fSrcPosOutName; // Name of the output MSrcPosCam object 24 TString fDCAName; // Name of the MDCA object25 22 26 23 TString fHistoName; // Name of internal histogram … … 42 39 public: 43 40 MSrcPlace(const char* srcin="MSrcPosCam",const char* srcout="MSrcPosCam", 44 const char* dcaout="MDCA",45 41 const char* name=NULL, const char* title=NULL); 46 42 … … 50 46 void SetInputSrcPosName(TString name) {fSrcPosInName=name;} 51 47 void SetOutputSrcPosName(TString name) {fSrcPosOutName=name;} 52 void SetDCAName(TString name) {fDCAName=name;}53 48 void SetInternalHistoName(TString name) {fHistoName=name;} 54 49 void SetInternalHistoBinSize(Float_t size){fHistoBinPrec=size;} … … 59 54 MSrcPosCam* GetInputSrcPosCam() {return fSrcPosIn;} 60 55 MSrcPosCam* GetOutputSrcPosCam() {return fSrcPosOut;} 61 MDCA* GetDCA() {return fDCA;}62 56 TString GetInternalHistoName() {return fHistoName;} 63 57 -
trunk/MagicSoft/Mars/mtemp/mifae/library/MSrcPosFromFile.cc
r4094 r4117 42 42 #include "MRawRunHeader.h" 43 43 #include "MSrcPosCam.h" 44 #include "MDCA.h"45 44 46 45 #include "MLog.h" … … 156 155 157 156 GetOutputSrcPosCam()->SetXY(fLastValidSrcPosCam->GetX(),fLastValidSrcPosCam->GetY()); 158 GetDCA()->SetRefPoint(fLastValidSrcPosCam->GetX(),fLastValidSrcPosCam->GetY());159 157 160 158 return kTRUE; -
trunk/MagicSoft/Mars/mtemp/mifae/library/MSrcRotate.cc
r4094 r4117 33 33 // Output Containers: 34 34 // MSrcPosCam 35 // MDCA36 35 // 37 36 ////////////////////////////////////////////////////////////////////////////// … … 48 47 #include "MObservatory.h" 49 48 #include "MSrcPosCam.h" 50 #include "MDCA.h"51 49 52 50 #include "MLog.h" … … 66 64 // camera plain 67 65 // 68 MSrcRotate::MSrcRotate(const char* srcPosIn, const char* srcPosOut, const char * dca, const char*name, const char *title)66 MSrcRotate::MSrcRotate(const char* srcPosIn, const char* srcPosOut, const char *name, const char *title) 69 67 : fRA(0), fDEC(0), fRefMJD(0), fRunNumber(0) 70 68 { … … 74 72 SetInputSrcPosName(srcPosIn); 75 73 SetOutputSrcPosName(srcPosOut); 76 SetDCAName(dca);77 74 78 75 SetInternalHistoName(TString(fName)+"Hist"); … … 181 178 MSrcPosCam* srcposIn = GetInputSrcPosCam(); 182 179 MSrcPosCam* srcposOut = GetOutputSrcPosCam(); 183 MDCA* dca = GetDCA();184 180 185 181 Float_t c = TMath::Cos(rotationAngle); … … 196 192 197 193 srcposOut->SetXY(newX,newY); 198 dca->SetRefPoint(newX,newY);199 194 200 195 return kTRUE; -
trunk/MagicSoft/Mars/mtemp/mifae/library/MSrcRotate.h
r4094 r4117 32 32 public: 33 33 MSrcRotate(const char* srcIn="MSrcPosCam",const char* srcOut="MSrcPosCam", 34 const char* dca="MDCA",35 34 const char* name=NULL, const char* title=NULL); 36 35 -
trunk/MagicSoft/Mars/mtemp/mifae/library/MSrcTranslate.cc
r4094 r4117 36 36 // Output Containers: 37 37 // MSrcPosCam 38 // MDCA39 38 // 40 39 ////////////////////////////////////////////////////////////////////////////// … … 47 46 #include "MSrcTranslate.h" 48 47 #include "MSrcPosCam.h" 49 #include "MDCA.h"50 48 51 49 #include "MLog.h" … … 65 63 // camera plain 66 64 // 67 MSrcTranslate::MSrcTranslate(const char* srcPosIn, const char* srcPosOut, const char * dca, const char*name, const char *title)65 MSrcTranslate::MSrcTranslate(const char* srcPosIn, const char* srcPosOut, const char *name, const char *title) 68 66 : fShiftX(0.), fShiftY(0.), fTranslationIsRelative(kTRUE) 69 67 { … … 73 71 SetInputSrcPosName(srcPosIn); 74 72 SetOutputSrcPosName(srcPosOut); 75 SetDCAName(dca);76 73 77 74 SetInternalHistoName(TString(fName)+"Hist"); … … 84 81 Int_t MSrcTranslate::PreProcess(MParList *pList) 85 82 { 86 // look for/create MSrcPosCam and DCA83 // look for/create MSrcPosCam 87 84 if(!MSrcPlace::PreProcess(pList)) 88 85 return kFALSE; … … 103 100 104 101 MSrcPosCam* srcPosOut = GetOutputSrcPosCam(); 105 MDCA* dca = GetDCA();106 102 107 103 if(fTranslationIsRelative) … … 118 114 119 115 srcPosOut->SetXY(newX,newY); 120 dca->SetRefPoint(newX,newY);121 116 122 117 return kTRUE; -
trunk/MagicSoft/Mars/mtemp/mifae/library/MSrcTranslate.h
r4094 r4117 18 18 public: 19 19 MSrcTranslate(const char* srcIn="MSrcPosCam", const char* srcOut="MSrcPosCam", 20 const char* dca="MDCA",21 20 const char* name=NULL, const char* title=NULL); 22 21 -
trunk/MagicSoft/Mars/mtemp/mifae/library/Makefile
r4072 r4117 48 48 49 49 SRCFILES = \ 50 MDCA.cc \ 50 MDisplay.cc \ 51 MHillasDisplay.cc \ 51 52 MPSFFit.cc \ 52 53 MPSFFitCalc.cc \ -
trunk/MagicSoft/Mars/mtemp/mifae/macros/alpha.C
r4094 r4117 13 13 { 14 14 // constants 15 const Int_t nbins = 18;15 const Int_t nbins = 9; 16 16 TString psname("alphaMrk.gif"); 17 17 // general settings … … 36 36 37 37 // ON data 38 ton->Add("/mnt/users/jrico/magic/mars/mars/mtemp/mifae/ programs/srcPosPrueba.root");38 ton->Add("/mnt/users/jrico/magic/mars/mars/mtemp/mifae/hillas/crab20040215OnRotateCalA-D.root"); 39 39 40 40 TChain* toff= new TChain("Parameters"); 41 41 42 42 // OFF data 43 toff->Add("/mnt/users/jrico/magic/mars/mars/mtemp/mifae/ programs/srcPosOffPrueba.root");43 toff->Add("/mnt/users/jrico/magic/mars/mars/mtemp/mifae/hillas/crab20040215OffRotateCalA-H.root"); 44 44 45 45 TCanvas *c1 = new TCanvas("c1","c1",800,500); … … 54 54 ton->SetAlias("event","MRawEvtHeader.fDAQEvtNumber"); 55 55 ton->SetAlias("alpha","abs(MHillasSrc.fAlpha)"); 56 ton->SetAlias("leakage","MNewImagePar.fInnerLeakage1"); 56 57 57 58 toff->SetAlias("length","MHillas.fLength*0.6/189"); … … 62 63 toff->SetAlias("event","MRawEvtHeader.fDAQEvtNumber"); 63 64 toff->SetAlias("alpha","abs(MHillasSrc.fAlpha)"); 64 65 toff->SetAlias("leakage","MNewImagePar.fInnerLeakage1"); 66 65 67 // define cut(s) 66 // const char* eventcut="event% 3==0 &&";68 // const char* eventcut="event%4==0 &&"; 67 69 const char* eventcut=""; 68 70 const char varcut[512]; 69 71 // sprintf(varcut,"size>%f && size<%f && length>%f &&length<%f && width>%f && width<%f",cutsize,upcutsize,lengthlowcut,lengthcut,widthlowcut,widthcut); 70 sprintf(varcut,"size>%f && size<%f && dist>0.2 && dist<1.1 && le ngth>%f &&length<%f && width>%f && width<%f",cutsize,upcutsize,lengthlowcut,lengthcut,widthlowcut,widthcut);72 sprintf(varcut,"size>%f && size<%f && dist>0.2 && dist<1.1 && leakage==0 && length>%f &&length<%f && width>%f && width<%f",cutsize,upcutsize,lengthlowcut,lengthcut,widthlowcut,widthcut); 71 73 // sprintf(varcut,"size>%f && dist>0.2 && dist<0.8 && length<0.21 && width<0.125",cutsize,upcutsize,lengthcut,widthcut); 72 74 // sprintf(varcut,"size>%f && size<%f && dist>0.2 && dist<0.8 && length<0.21 && width<0.125",cutsize,upcutsize); -
trunk/MagicSoft/Mars/mtemp/mifae/programs/Makefile
r4050 r4117 26 26 -I../library \ 27 27 -I../../../mbase \ 28 -I../../../mfbase \ 28 29 -I../../../mjobs \ 29 30 -I../../../mpedestal \ -
trunk/MagicSoft/Mars/mtemp/mifae/programs/falsesource.datacard
r4094 r4117 39 39 40 40 // Size cut (lower and upper) in # of photons 41 SIZECUT 1200 999999941 SIZECUT 2000 9999999 42 42 43 43 // Dist cut (lower and upper) in degrees -
trunk/MagicSoft/Mars/mtemp/mifae/programs/makeHillas.cc
r4100 r4117 25 25 #include "MFCosmics.h" 26 26 #include "MContinue.h" 27 #include "MFillH.h"28 27 #include "MLog.h" 29 28 #include "MCerPhotEvt.h" … … 44 43 #include "MIslandClean.h" 45 44 #include "MWriteRootFile.h" 46 #include "MProgressBar.h"47 45 #include "MArgs.h" 48 46 #include "MRunIter.h" 49 47 #include "MJPedestal.h" 50 48 #include "MJCalibration.h" 49 #include "MHillasDisplay.h" 50 #include "MF.h" 51 #include "MContinue.h" 52 53 #include "TApplication.h" 51 54 52 55 #include <iostream> … … 68 71 TString outname; 69 72 TString idirname; 73 TString filter; 70 74 MRunIter caliter; 71 75 MRunIter pediter; 72 76 MRunIter datiter; 73 ULong_t nmaxevents=999999999; 74 Short_t calflag=1; 75 Float_t lcore = 3.0; 76 Float_t ltail = 1.5; 77 Int_t islflag = 0; 78 Float_t lnew = 40; 79 Int_t kmethod = 1; 80 Int_t nfiles = 0; 81 82 const TString defaultcard="input.datacard"; 77 Bool_t display = kFALSE; 78 ULong_t nmaxevents= 999999999; 79 Short_t calflag = 1; 80 Float_t lcore = 3.0; 81 Float_t ltail = 1.5; 82 Int_t islflag = 0; 83 Float_t lnew = 40; 84 Int_t kmethod = 1; 85 Int_t nfiles = 0; 86 87 const TString defaultcard="makehillas.datacard"; 83 88 /*************************************************************/ 84 89 static void Usage() … … 93 98 int main(int argc, char **argv) 94 99 { 100 // create a TApplication to be able to 101 TApplication app("Application",0,0); 102 95 103 // evaluate arguments 96 104 MArgs arg(argc, argv); … … 250 258 plist4.AddToList(&hillas); 251 259 plist4.AddToList(&runhead); 260 261 // cuts 262 MF cut(filter); 252 263 253 264 //tasks … … 285 296 MHillasSrcCalc csrc1; 286 297 287 MWriteRootFile write(outname,"RECREATE"); 288 289 write.AddContainer("MHillas" , "Parameters"); 290 write.AddContainer("MHillasSrc" , "Parameters"); 291 write.AddContainer("MHillasExt" , "Parameters"); 292 write.AddContainer("MNewImagePar" , "Parameters"); 293 write.AddContainer("MRawEvtHeader" , "Parameters"); 294 write.AddContainer("MRawRunHeader" , "Parameters"); 295 write.AddContainer("MConcentration" , "Parameters"); 296 write.AddContainer("MSrcPosCam" , "Parameters"); 297 298 if (islflag == 1 || islflag == 2) 299 write.AddContainer("MIslands1" , "Parameters"); 300 if (islflag == 2) 301 write.AddContainer("MIslands2" , "Parameters"); 298 MContinue applycut(&cut); 299 applycut.SetInverted(kTRUE); 300 MWriteRootFile* write=NULL; 301 MDisplay* disphillas=NULL; 302 303 if(!display) 304 { 305 write = new MWriteRootFile(outname,"RECREATE"); 306 307 write->AddContainer("MHillas" , "Parameters"); 308 write->AddContainer("MHillasSrc" , "Parameters"); 309 write->AddContainer("MHillasExt" , "Parameters"); 310 write->AddContainer("MNewImagePar" , "Parameters"); 311 write->AddContainer("MRawEvtHeader" , "Parameters"); 312 write->AddContainer("MRawRunHeader" , "Parameters"); 313 write->AddContainer("MConcentration" , "Parameters"); 314 write->AddContainer("MSrcPosCam" , "Parameters"); 315 316 if (islflag == 1 || islflag == 2) 317 write->AddContainer("MIslands1" , "Parameters"); 318 if (islflag == 2) 319 write->AddContainer("MIslands2" , "Parameters"); 320 } 321 else 322 { 323 disphillas = new MHillasDisplay(&nphot,&geomcam); 324 } 302 325 303 326 tlist4.AddToList(&read4); … … 322 345 //tlist4.AddToList(&blind2); 323 346 tlist4.AddToList(&hcalc); 324 // tlist4.AddToList(&srcposcalc);325 347 tlist4.AddToList(&csrc1); 326 tlist4.AddToList(&write); 348 tlist4.AddToList(&applycut); 349 if(!display) 350 tlist4.AddToList(write); 351 else 352 tlist4.AddToList(disphillas); 327 353 328 354 // Create and setup the eventloop … … 409 435 } 410 436 437 // exclusion cut 438 if(strcmp(word.Data(),"FILTER")==0) 439 { 440 if(filter.Length()) 441 cout << "readDataCards Warning: overriding existing cut" << endl; 442 443 char ch; 444 while((ch=ifun.get())!='\n') 445 filter.Append(ch); 446 } 447 448 // display flag 449 if(strcmp(word.Data(),"DISPLAY")==0) 450 ifun >> display; 451 411 452 // calibration flag 412 453 if(strcmp(word.Data(),"CALFLAG")==0) 413 454 ifun >> calflag; 455 414 456 415 457 // cleaning level … … 454 496 cout << pfile << endl; 455 497 cout << "Maximum number of events: " << nmaxevents << endl; 456 cout << "Output file name: " << outname << endl; 498 if(filter.Length()) 499 cout << "Applying rejection cut: " << filter << endl; 500 if(!display) 501 cout << "Output file name: " << outname << endl; 457 502 cout << "Calibration flag: " << calflag << endl; 458 503 cout << "Cleaning level: ("<<lcore<<","<<ltail<<")" << endl; … … 489 534 return kTRUE; 490 535 } 536 -
trunk/MagicSoft/Mars/mtemp/mifae/programs/makehillas.datacard
r4050 r4117 14 14 // OUTFILE ~/magic/mars/mars/hillasCrab/crab20040215OnA.root 15 15 OUTFILE ./prueba.root 16 17 // Selection cut. 18 // Condition "==" not supported. 19 // Enclose all conditions between brakets, like: "(x<y) && (z<5)" 20 // (see MF description class for more details) 21 FILTER (MHillas.fLength<100) && (MHillas.fLength>50) 22 23 // Display flag (DISPLAY=1 will show event display and skip saving into output file) 24 DISPLAY 1 16 25 17 26 // calibration flag: … … 34 43 // 1: no timing method val: 40, 50, 60... 35 44 ISLANDCLEAN 1 40 45 -
trunk/MagicSoft/Mars/mtemp/mifae/programs/optimizecuts.datacard
r4056 r4117 4 4 5 5 // On data acceptance rate (e.g 4 for taking 1/4 of whole data sample) 6 ONRATE 16 ONRATE 2 7 7 8 8 // Input file name pattern (On data) 9 ONFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/ mrk20040215OnRotateNoCalB.root9 ONFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/crab20040215OnRotateCalA-D.root 10 10 11 11 // Input file name pattern (Off data) 12 OFFFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/ mrk20040215OffRotateNoCalA-C.root12 OFFFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/crab20040215OffRotateCalA-H.root 13 13 14 14 // output file name 15 OUTFILE ./optimize _fine.out15 OUTFILE ./optimizeCrab_cal_fine.out 16 16 17 17 // Preliminar cuts (size in size units, distance in deg) … … 20 20 21 21 // Length initial, final and step values 22 LENGTHCUTS 0.1 0.40.00522 LENGTHCUTS 0.15 0.35 0.005 23 23 24 24 // Width initial, final and step values 25 WIDTHCUTS 0.0 0.30.00525 WIDTHCUTS 0.05 0.15 0.005 26 26 27 27 -
trunk/MagicSoft/Mars/mtemp/mifae/programs/srcpos.datacard
r4094 r4117 4 4 5 5 // Input file name pattern (wildcards allowed) 6 INPUTFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/ mrk20040215OnNoCalB.root6 INPUTFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/crab20040215OnCal*.root 7 7 8 8 // Specify optionally the name of OFF-data files you want to apply the same source position distribution to 9 OFFFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/ mrk20040215OffNoCal*.root9 OFFFILES /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/crab20040215OffCal*.root 10 10 11 11 // output file name (on data) 12 OUTFILE ./srcPosPrueba.root12 OUTFILE /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/crab20040215OnRotateCalA-D.root 13 13 14 14 // output file name (off data) 15 OFFOUTFILE ./srcPosOffPrueba.root15 OFFOUTFILE /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/hillas/crab20040215OffRotateCalA-H.root 16 16 17 17 // X and Y position of the source (degrees) for a MJ date (days) -important only in case of rotation 18 SRCPOS 0. 21 0.176 53050.077318 SRCPOS 0.3 0.1 53049.89 19 19 20 20 // Flag to determine whether source position is absolute (0) or relative to previous position (1) … … 27 27 28 28 // source coordinates (RA DEC in rads) 29 //SRCCOORDS 1.46 0.384 // (Crab)30 SRCCOORDS 2.899 0.667 // (Mrk 421)29 SRCCOORDS 1.46 0.384 // (Crab) 30 // SRCCOORDS 2.899 0.667 // (Mrk 421) 31 31 32 32 33 33 // File containing source position as a function of run number (invalidates SRCPOS, SRCABS, ROTFLAG and SRCCOORDS values) 34 SRCFILE /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/programs/20040215_Mrk421.B.pos34 // SRCFILE /mnt/users/jrico/magic/mars/Mars_Standard02/mtemp/mifae/programs/20040215_Mrk421.B.pos 35 35 36 36
Note:
See TracChangeset
for help on using the changeset viewer.