Changeset 764
- Timestamp:
- 04/23/01 15:12:45 (24 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
r749 r764 23 23 \* ======================================================================== */ 24 24 25 ///////////////////////////////////////////////////////////////////////////// 26 // // 27 // MCerPhotCalc // 28 // // 29 ///////////////////////////////////////////////////////////////////////////// 25 ////////////////////////////////////////////////////////////////////////////// 26 // // 27 // MCerPhotCalc // 28 // // 29 // This is a task which calculates the number of photons from the FADC // 30 // time slices. At the moment it integrates simply the FADC values. // 31 // // 32 ////////////////////////////////////////////////////////////////////////////// 30 33 31 34 #include "MCerPhotCalc.h" … … 43 46 ClassImp(MCerPhotCalc) 44 47 45 MRawEvtData *fRawEvt; // raw event data (time slices) 46 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera 47 MCerPhotEvt *fCerPhotEvt; // Cerenkov Photon Event used for calculation 48 48 // -------------------------------------------------------------------------- 49 // 50 // Default constructor. 51 // 49 52 MCerPhotCalc::MCerPhotCalc(const char *name, const char *title) 50 53 { … … 53 56 } 54 57 58 // -------------------------------------------------------------------------- 59 // 60 // The PreProcess searches for the following input containers: 61 // - MRawEvtData 62 // - MPedestalCam 63 // 64 // The following output containers are also searched and created if 65 // they were not found: 66 // - MCerPhotEvt 67 // 55 68 Bool_t MCerPhotCalc::PreProcess( MParList *pList ) 56 69 { … … 76 89 } 77 90 91 // -------------------------------------------------------------------------- 92 // 93 // Calculate the integral of the FADC time slaices and store them as a new 94 // pixel in the MCerPhotEvt container. 95 // 78 96 Bool_t MCerPhotCalc::Process() 79 97 { -
trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
r749 r764 38 38 ClassImp(MCerPhotEvt) 39 39 40 // -------------------------------------------------------------------------- 41 // 42 // Creates a MCerPhotPix object for each pixel in the event 43 // 40 44 MCerPhotEvt::MCerPhotEvt(const char *name, const char *title) : fNumPixels(0) 41 45 { 42 // the default constructor 43 44 46 45 47 *fName = name ? name : "MCerPhotEvt"; 46 48 *fTitle = name ? name : "(Number of Photon)-Event Information"; … … 54 56 } 55 57 58 // -------------------------------------------------------------------------- 59 // 60 // This is not yet implemented like it should. 61 // 56 62 void MCerPhotEvt::Draw(Option_t* option) 57 63 { … … 68 74 } 69 75 76 // -------------------------------------------------------------------------- 77 // 78 // add a new pixel to the list and increase the number 79 // of valid pixels in the list by one 80 // 70 81 void MCerPhotEvt::AddPixel(Int_t id, Float_t nph, Float_t err) 71 82 { 72 //73 // add a new pixel to the list and increase the number74 // of valid pixels in the list by one75 //76 77 83 // TClonesArray -> 'operator new with placement' should be used 78 84 new ((*fPixels)[fNumPixels++]) MCerPhotPix( id, nph, err); 79 85 } 80 86 87 // -------------------------------------------------------------------------- 88 // 89 // reset counter and delete netries in list. 90 // 81 91 void MCerPhotEvt::Clear(Option_t *) 82 92 { 83 //84 // reset counter and delete netries in list.85 //86 93 fNumPixels = 0 ; 87 94 fPixels->Clear() ; 88 95 } 89 96 97 // -------------------------------------------------------------------------- 98 // 99 // Dump the cerenkov photon event to *fLog 100 // 90 101 void MCerPhotEvt::Print(Option_t *) 91 102 { … … 101 112 } 102 113 114 // -------------------------------------------------------------------------- 115 // 116 // Checks if in the pixel list is an entry with pixel id 117 // 103 118 Bool_t MCerPhotEvt::IsPixelExisting(Int_t id) 104 119 { 105 //106 // Checks if in the pixel list is an entry with pixel id107 //108 120 const Int_t entries = fPixels->GetEntries(); 109 121 … … 117 129 } 118 130 131 // -------------------------------------------------------------------------- 132 // 133 // Checks if in the pixel list is an entry with pixel id 134 // 119 135 Bool_t MCerPhotEvt::IsPixelUsed(Int_t id) 120 136 { 121 //122 // Checks if in the pixel list is an entry with pixel id123 //124 137 const Int_t entries = fPixels->GetEntries(); 125 138 … … 135 148 } 136 149 150 // -------------------------------------------------------------------------- 151 // 152 // Checks if in the pixel list is an entry with pixel id 153 // 137 154 Bool_t MCerPhotEvt::IsPixelCore(Int_t id) 138 155 { 139 //140 // Checks if in the pixel list is an entry with pixel id141 //142 156 const Int_t entries = fPixels->GetEntries(); 143 157 … … 153 167 } 154 168 169 // -------------------------------------------------------------------------- 170 // 171 // get the minimum number of photons of all valid pixels in the list 172 // 155 173 Float_t MCerPhotEvt::GetNumPhotonsMin() 156 174 { 157 //158 // get the minimum number of photons of all valid pixels in the list159 //160 175 if (fNumPixels <= 0) 161 176 return -5. ; … … 175 190 } 176 191 192 // -------------------------------------------------------------------------- 193 // 194 // get the maximum number of photons of all valid pixels in the list 195 // 177 196 Float_t MCerPhotEvt::GetNumPhotonsMax() 178 197 { 179 //180 // get the maximum number of photons of all valid pixels in the list181 //182 198 if (fNumPixels <= 0) 183 199 return 50.; -
trunk/MagicSoft/Mars/manalysis/MCerPhotPix.cc
r749 r764 30 30 ClassImp(MCerPhotPix) 31 31 32 MCerPhotPix::MCerPhotPix(Int_t pix, Float_t phot, Float_t errphot ) : 32 // -------------------------------------------------------------------------- 33 // 34 // Default constructor. The pixel is assumed as used and not a core pixel. 35 // 36 MCerPhotPix::MCerPhotPix(Int_t pix, Float_t phot, Float_t errphot) : 33 37 fPixId(pix), fIsUsed(kTRUE), fIsCore(kFALSE), fPhot(phot), fErrPhot(errphot) 34 38 { 35 39 } 36 40 41 // -------------------------------------------------------------------------- 42 // 43 // Sets the information of one pixel. The pixel is assumed as used and 44 // not a core pixel. 45 // 37 46 void MCerPhotPix::SetPixelContent(Int_t pix, Float_t phot, Float_t errphot) 38 47 { 39 fPixId = pix ; 40 fIsUsed = kTRUE ; 41 fIsUsed = kFALSE ; 42 fPhot = phot ; 43 fErrPhot = errphot ; 48 fPixId = pix; 49 fIsUsed = kTRUE; 50 fPhot = phot; 51 fErrPhot = errphot; 44 52 } 45 53 54 // -------------------------------------------------------------------------- 55 // 56 // Print information to gLog. 57 // 46 58 void MCerPhotPix::Print(Option_t *) 47 59 { 48 // information about a pixel49 60 gLog << "MCerPhotPix: Pixel: "<< fPixId ; 50 61 -
trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
r749 r764 41 41 ClassImp(MRawRunHeader) 42 42 43 // -------------------------------------------------------------------------- 44 // 45 // Default constructor. Creates array which stores the pixel assignment. 46 // 47 // 43 48 MRawRunHeader::MRawRunHeader(const char *name, const char *title) : fPixAssignment(NULL) 44 49 { … … 52 57 } 53 58 59 // -------------------------------------------------------------------------- 60 // 61 // Destructor. Deletes the 'pixel-assignment-array' 62 // 54 63 MRawRunHeader::~MRawRunHeader() 55 64 { … … 57 66 } 58 67 68 // -------------------------------------------------------------------------- 69 // 70 // Read in one run header from the binary file 71 // 59 72 void MRawRunHeader::ReadEvt(istream& fin) 60 73 { … … 106 119 } 107 120 121 // -------------------------------------------------------------------------- 122 // 123 // print run header information on *fLog 124 // 108 125 void MRawRunHeader::Print(Option_t *t) 109 126 { 110 //111 // print run header information on screen112 //113 127 *fLog << endl; 114 128 *fLog << "MagicNumber: 0x" << hex << fMagicNumber << " - " << (fMagicNumber==kMagicNumber?"OK":"Wrong!") << endl; … … 145 159 } 146 160 161 // -------------------------------------------------------------------------- 162 // 163 // Return the assigned pixel number for the given FADC channel 164 // 147 165 UShort_t MRawRunHeader::GetPixAssignment(UShort_t i) const 148 166 { … … 151 169 } 152 170 171 // -------------------------------------------------------------------------- 172 // 173 // return the number of pixel in this event. 174 // 153 175 UShort_t MRawRunHeader::GetNumPixel() const 154 176 {
Note:
See TracChangeset
for help on using the changeset viewer.