Changeset 14610 for fact/tools
- Timestamp:
- 11/13/12 17:20:05 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/marsmacros/mc2csv/MonteCarlo.C
r14605 r14610 82 82 mSeparator = " "; 83 83 84 // Änderung !!!84 // source file 85 85 mpRootFile = NULL; 86 // Änderung zuende 87 86 87 // Trees 88 88 mpEventTree = NULL; 89 89 mpHeaderTree = NULL; 90 mpPixel = NULL; 91 92 // Änderung !!!90 91 92 //header data types 93 93 mpIntendedPulsePos = NULL; 94 94 mpMcRunHeader = NULL; … … 97 97 mpCorsikaRunHeader = NULL; 98 98 99 //Evt data types 99 100 mpElectronicNoise = NULL; 100 101 mpRawEventData = NULL; … … 103 104 mpRawEventHeader = NULL; 104 105 mpCorsikaEvtHeader = NULL; 105 // Änderung zuende 106 106 // 107 108 // containers 109 mpPixel = NULL; 107 110 mpSamples = NULL; 108 111 mEventNumber = 0; 109 112 mNumberOfEvents = 2; 110 113 111 mVerbosityLvl = 0;114 mVerbosityLvl = 2; 112 115 113 116 return; … … 149 152 if (mVerbosityLvl > 0) cout << "...closing root file: " << mFileName << endl; 150 153 mpRootFile->Close("R"); 154 mpRootFile=NULL; 151 155 152 156 return; … … 188 192 } 189 193 190 191 192 194 //Set Adresses to Branches in RunHeader-Tree 193 mpHeaderTree->SetBranchAddress("MGeomCam.", &mpGeomCam); 194 mpHeaderTree->SetBranchAddress("IntendedPulsePos.", &mpIntendedPulsePos); 195 mpHeaderTree->SetBranchAddress("MMcRunHeader.", &mpMcRunHeader); 196 mpHeaderTree->SetBranchAddress("ElectronicNoise.", &mpElectronicNoise); 197 mpHeaderTree->SetBranchAddress("MRawRunHeader.", &mpRawRunHeader); 198 mpHeaderTree->SetBranchAddress("MCorsikaRunHeader.",&mpCorsikaRunHeader); 195 if ( mpHeaderTree->GetBranchStatus("MGeomCam.") ) 196 { 197 if (mVerbosityLvl > 1) cout << " ...MGeomCam" << endl; 198 mpHeaderTree->SetBranchAddress("MGeomCam.", &mpGeomCam); 199 } 200 if ( mpHeaderTree->GetBranchStatus("IntendedPulsePos.") ) 201 { 202 if (mVerbosityLvl > 1) cout << " ...IntendedPulsePos" << endl; 203 mpHeaderTree->SetBranchAddress("IntendedPulsePos.", &mpIntendedPulsePos); 204 } 205 if ( mpHeaderTree->GetBranchStatus("MMcRunHeader.") ) 206 { 207 if (mVerbosityLvl > 1) cout << " ...MMcRunHeader" << endl; 208 mpHeaderTree->SetBranchAddress("MMcRunHeader.", &mpMcRunHeader); 209 } 210 if ( mpHeaderTree->GetBranchStatus("ElectronicNoise.") ) 211 { 212 if (mVerbosityLvl > 1) cout << " ...ElectronicNoise" << endl; 213 mpHeaderTree->SetBranchAddress("ElectronicNoise.", &mpElectronicNoise); 214 } 215 if ( mpHeaderTree->GetBranchStatus("MRawRunHeader.") ) 216 { 217 if (mVerbosityLvl > 1) cout << " ...MRawRunHeader" << endl; 218 mpHeaderTree->SetBranchAddress("MRawRunHeader.", &mpRawRunHeader); 219 } 220 if ( mpHeaderTree->GetBranchStatus("MCorsikaRunHeader.") ) 221 { 222 if (mVerbosityLvl > 1) cout << " ...MCorsikaRunHeader" << endl; 223 mpHeaderTree->SetBranchAddress("MCorsikaRunHeader.",&mpCorsikaRunHeader); 224 } 225 199 226 return; 200 227 } … … 266 293 } 267 294 295 268 296 //Set Adresses to Branches in Events-Tree 269 mpEventTree->SetBranchAddress("MRawEvtData.", &mpRawEventData); 270 mpEventTree->SetBranchAddress("IncidentAngle.", &mpIncidentAngle); 271 mpEventTree->SetBranchAddress("MMcEvt.", &mpMcEventMetaData); 272 mpEventTree->SetBranchAddress("MRawEvtHeader.", &mpRawEventHeader); 273 mpEventTree->SetBranchAddress("MCorsikaEvtHeader.", &mpCorsikaEvtHeader); 297 if (mVerbosityLvl > 1) cout << "...SetBranchAddresses:" << endl; 298 299 if ( mpEventTree->GetBranchStatus("MRawEvtData.") != -1 ) 300 { 301 if (mVerbosityLvl > 1) cout << " ...MRawEvtData" << endl; 302 mpEventTree->SetBranchAddress("MRawEvtData.", &mpRawEventData); 303 } 304 if ( mpEventTree->GetBranchStatus("IncidentAngle.") ) 305 { 306 //FIX ME: THIS VALUE IS NOT EXISTANT IN EVERY MC FILE 307 308 if (mVerbosityLvl > 1) cout << " ...IncidentAngle" << endl; 309 mpEventTree->SetBranchAddress("IncidentAngle.", &mpIncidentAngle); 310 } 311 if ( mpEventTree->GetBranchStatus("MMcEvt.") ) 312 { 313 if (mVerbosityLvl > 1) cout << " ...McEvt" << endl; 314 mpEventTree->SetBranchAddress("MMcEvt.", &mpMcEventMetaData); 315 } 316 if ( mpEventTree->GetBranchStatus("MRawEvtHeader.") ) 317 { 318 if (mVerbosityLvl > 1) cout << " ...MRawEventHeader" << endl; 319 mpEventTree->SetBranchAddress("MRawEvtHeader.", &mpRawEventHeader); 320 } 321 if ( mpEventTree->GetBranchStatus("MCorsikaEvtHeader.") ) 322 { 323 if (mVerbosityLvl > 1) cout << " ...MCorsikaEvtHeader" << endl; 324 mpEventTree->SetBranchAddress("MCorsikaEvtHeader.", &mpCorsikaEvtHeader); 325 } 274 326 275 327 return;
Note:
See TracChangeset
for help on using the changeset viewer.