25.3.2010 Kamil Sedlak

musrRootOutput - removed "_t" from most of the variable names
This commit is contained in:
sedlak 2010-03-25 14:53:11 +00:00
parent d308d597bd
commit 1fe6cd7a2f
2 changed files with 127 additions and 127 deletions

View File

@ -53,21 +53,21 @@ class musrRootOutput {
void SetSpecialSaveVolumeDefined() {boolIsAnySpecialSaveVolumeDefined=true;}; void SetSpecialSaveVolumeDefined() {boolIsAnySpecialSaveVolumeDefined=true;};
// Getting variables (just for debugging) // Getting variables (just for debugging)
G4double GetDecayPositionZ() {return muDecayPosZ_t;}; G4double GetDecayPositionZ() {return muDecayPosZ;};
G4double GetDecayTime() {return muDecayTime_t*microsecond;}; G4double GetDecayTime() {return muDecayTime*microsecond;};
G4double GetTimeInTarget() {return muTargetTime_t*microsecond;}; G4double GetTimeInTarget() {return muTargetTime*microsecond;};
// Setting variables common to the whole event: // Setting variables common to the whole event:
void SetRunID (G4int id) {runID_t = id;}; void SetRunID (G4int id) {runID = id;};
void SetEventID (G4int id) {eventID_t = id;}; void SetEventID (G4int id) {eventID = id;};
void SetTimeToNextEvent(G4double deltaT) {timeToNextEvent_t = deltaT/microsecond;} void SetTimeToNextEvent(G4double deltaT) {timeToNextEvent = deltaT/microsecond;}
void SetDecayDetectorID (std::string detectorName) {muDecayDetID_t = SensDetectorMapping[detectorName];}; void SetDecayDetectorID (std::string detectorName) {muDecayDetID = SensDetectorMapping[detectorName];};
void SetBField (G4double F[6]) {B_t[0]=F[0]/tesla; B_t[1]=F[1]/tesla; B_t[2]=F[2]/tesla; void SetBField (G4double F[6]) {B_t[0]=F[0]/tesla; B_t[1]=F[1]/tesla; B_t[2]=F[2]/tesla;
B_t[3]=F[3]/tesla; B_t[4]=F[4]/tesla; B_t[5]=F[5]/tesla;}; B_t[3]=F[3]/tesla; B_t[4]=F[4]/tesla; B_t[5]=F[5]/tesla;};
void SetDecayPolarisation (G4ThreeVector pol) {muDecayPolX_t=pol.x(); muDecayPolY_t=pol.y(); muDecayPolZ_t=pol.z();}; void SetDecayPolarisation (G4ThreeVector pol) {muDecayPolX=pol.x(); muDecayPolY=pol.y(); muDecayPolZ=pol.z();};
void SetDecayPosition (G4ThreeVector pos) {muDecayPosX_t=pos.x()/mm; muDecayPosY_t=pos.y()/mm; void SetDecayPosition (G4ThreeVector pos) {muDecayPosX=pos.x()/mm; muDecayPosY=pos.y()/mm;
muDecayPosZ_t=pos.z()/mm;}; muDecayPosZ=pos.z()/mm;};
void SetEventWeight (G4double w) {weight_t *= w;} void SetEventWeight (G4double w) {weight *= w;}
void SetDetectorInfo (G4int nDetectors, G4int ID, G4int particleID, G4double edep, void SetDetectorInfo (G4int nDetectors, G4int ID, G4int particleID, G4double edep,
G4double edep_el, G4double edep_pos, G4double edep_el, G4double edep_pos,
G4double edep_gam, G4double edep_mup,G4int nsteps, G4double length, G4double t1, G4double edep_gam, G4double edep_mup,G4int nsteps, G4double length, G4double t1,
@ -84,36 +84,36 @@ class musrRootOutput {
void SetInitialMuonParameters(G4double x, G4double y, G4double z, G4double px, G4double py, G4double pz, void SetInitialMuonParameters(G4double x, G4double y, G4double z, G4double px, G4double py, G4double pz,
G4double xpolaris, G4double ypolaris, G4double zpolaris, G4double particleTime) { G4double xpolaris, G4double ypolaris, G4double zpolaris, G4double particleTime) {
muIniTime_t=particleTime/microsecond; muIniTime=particleTime/microsecond;
muIniPosX_t=x; muIniPosY_t=y; muIniPosZ_t=z; muIniPosX=x; muIniPosY=y; muIniPosZ=z;
muIniMomX_t=px; muIniMomY_t=py; muIniMomZ_t=pz; muIniMomX=px; muIniMomY=py; muIniMomZ=pz;
muIniPolX_t=xpolaris; muIniPolY_t=ypolaris; muIniPolZ_t=zpolaris; muIniPolX=xpolaris; muIniPolY=ypolaris; muIniPolZ=zpolaris;
} }
void PrintInitialMuonParameters() { void PrintInitialMuonParameters() {
G4cout<<"musrRootOutput.hh: Initial muon parameters: x="<<muIniPosX_t<<", y="<<muIniPosY_t<<", z="<<muIniPosZ_t G4cout<<"musrRootOutput.hh: Initial muon parameters: x="<<muIniPosX<<", y="<<muIniPosY<<", z="<<muIniPosZ
<<", px="<<muIniMomX_t << ", py="<<muIniMomY_t<<", pz="<<muIniMomZ_t<<G4endl; <<", px="<<muIniMomX << ", py="<<muIniMomY<<", pz="<<muIniMomZ<<G4endl;
G4cout<<" polx="<<muIniPolX_t<<", poly="<<muIniPolY_t<<", polz="<<muIniPolZ_t<<G4endl; G4cout<<" polx="<<muIniPolX<<", poly="<<muIniPolY<<", polz="<<muIniPolZ<<G4endl;
G4cout<<" time at which muon was generated = "<<muIniTime_t<<G4endl; G4cout<<" time at which muon was generated = "<<muIniTime<<G4endl;
G4cout<<" numberOfGeneratedEvents = "<<GeantParametersD[7]<<G4endl; G4cout<<" numberOfGeneratedEvents = "<<GeantParametersD[7]<<G4endl;
} }
void SetPolInTarget(G4ThreeVector pol) {muTargetPolX_t=pol.x(); muTargetPolY_t=pol.y(); muTargetPolZ_t=pol.z();}; void SetPolInTarget(G4ThreeVector pol) {muTargetPolX=pol.x(); muTargetPolY=pol.y(); muTargetPolZ=pol.z();};
void SetTimeInTarget(G4double time) {muTargetTime_t = time/microsecond;}; void SetTimeInTarget(G4double time) {muTargetTime = time/microsecond;};
void SetMomentumInTarget(G4ThreeVector mom) {muTargetMomX_t=(mom.x())/MeV; muTargetMomY_t=(mom.y())/MeV; muTargetMomZ_t=(mom.z())/MeV;}; void SetMomentumInTarget(G4ThreeVector mom) {muTargetMomX=(mom.x())/MeV; muTargetMomY=(mom.y())/MeV; muTargetMomZ=(mom.z())/MeV;};
void SetPolInM0(G4ThreeVector pol) {muM0PolX_t=pol.x(); muM0PolY_t=pol.y(); muM0PolZ_t=pol.z();}; void SetPolInM0(G4ThreeVector pol) {muM0PolX=pol.x(); muM0PolY=pol.y(); muM0PolZ=pol.z();};
void SetTimeInM0(G4double time) {muM0Time_t = time/microsecond;}; void SetTimeInM0(G4double time) {muM0Time = time/microsecond;};
void SetPolInM1(G4ThreeVector pol) {muM1PolX_t=pol.x(); muM1PolY_t=pol.y(); muM1PolZ_t=pol.z();}; void SetPolInM1(G4ThreeVector pol) {muM1PolX=pol.x(); muM1PolY=pol.y(); muM1PolZ=pol.z();};
void SetTimeInM1(G4double time) {muM1Time_t = time/microsecond;}; void SetTimeInM1(G4double time) {muM1Time = time/microsecond;};
void SetPolInM2(G4ThreeVector pol) {muM2PolX_t=pol.x(); muM2PolY_t=pol.y(); muM2PolZ_t=pol.z();}; void SetPolInM2(G4ThreeVector pol) {muM2PolX=pol.x(); muM2PolY=pol.y(); muM2PolZ=pol.z();};
void SetTimeInM2(G4double time) {muM2Time_t = time/microsecond;}; void SetTimeInM2(G4double time) {muM2Time = time/microsecond;};
void SetInitialPositronMomentum(G4ThreeVector mom) {posIniMomx_t=mom.x(); posIniMomy_t=mom.y(); posIniMomz_t=mom.z();}; void SetInitialPositronMomentum(G4ThreeVector mom) {posIniMomx=mom.x(); posIniMomy=mom.y(); posIniMomz=mom.z();};
void SetDecayTime(G4double time) {muDecayTime_t=time/microsecond;}; void SetDecayTime(G4double time) {muDecayTime=time/microsecond;};
void SetNrFieldNomVal(G4int n) {nFieldNomVal = n;} void SetNrFieldNomVal(G4int n) {nFieldNomVal = n;}
void SetFieldNomVal(G4int i, G4double value); void SetFieldNomVal(G4int i, G4double value);
G4int GetNrOfVolumes() {return det_nMax;} G4int GetNrOfVolumes() {return det_nMax;}
void SetBFieldIntegral(G4double BxInt,G4double ByInt,G4double BzInt,G4double BzInt1,G4double BzInt2,G4double BzInt3) { void SetBFieldIntegral(G4double BxInt,G4double ByInt,G4double BzInt,G4double BzInt1,G4double BzInt2,G4double BzInt3) {
BxIntegral_t=BxInt/m/tesla; ByIntegral_t=ByInt/m/tesla; BzIntegral_t=BzInt/m/tesla; BxIntegral=BxInt/m/tesla; ByIntegral=ByInt/m/tesla; BzIntegral=BzInt/m/tesla;
BzIntegral1_t=BzInt1/m/tesla;BzIntegral2_t=BzInt2/mm;BzIntegral3_t=BzInt3/mm; BzIntegral1=BzInt1/m/tesla;BzIntegral2=BzInt2/mm;BzIntegral3=BzInt3/mm;
} }
void StoreGeantParameter(Int_t i, Double_t value) { void StoreGeantParameter(Int_t i, Double_t value) {
if (i<maxNGeantParameters) { GeantParametersD[i]=value; } if (i<maxNGeantParameters) { GeantParametersD[i]=value; }
@ -229,33 +229,33 @@ class musrRootOutput {
// in case of Turtle nr. of events tried); // in case of Turtle nr. of events tried);
// Variables common to the whole event: // Variables common to the whole event:
Int_t runID_t; Int_t runID;
Int_t eventID_t; Int_t eventID;
Double_t weight_t; Double_t weight;
Double_t timeToNextEvent_t; Double_t timeToNextEvent;
Double_t B_t[6]; Double_t B_t[6];
Double_t muIniTime_t; Double_t muIniTime;
Double_t muIniPosX_t, muIniPosY_t, muIniPosZ_t; Double_t muIniPosX, muIniPosY, muIniPosZ;
Double_t muIniMomX_t, muIniMomY_t, muIniMomZ_t; Double_t muIniMomX, muIniMomY, muIniMomZ;
Double_t muIniPolX_t, muIniPolY_t, muIniPolZ_t; Double_t muIniPolX, muIniPolY, muIniPolZ;
Int_t muDecayDetID_t; Int_t muDecayDetID;
Double_t muDecayPolX_t, muDecayPolY_t, muDecayPolZ_t; Double_t muDecayPolX, muDecayPolY, muDecayPolZ;
Double_t muTargetTime_t, muTargetPolX_t, muTargetPolY_t, muTargetPolZ_t; Double_t muTargetTime, muTargetPolX, muTargetPolY, muTargetPolZ;
Double_t muTargetMomX_t, muTargetMomY_t, muTargetMomZ_t; Double_t muTargetMomX, muTargetMomY, muTargetMomZ;
Double_t muM0Time_t, muM0PolX_t, muM0PolY_t, muM0PolZ_t; Double_t muM0Time, muM0PolX, muM0PolY, muM0PolZ;
Double_t muM1Time_t, muM1PolX_t, muM1PolY_t, muM1PolZ_t; Double_t muM1Time, muM1PolX, muM1PolY, muM1PolZ;
Double_t muM2Time_t, muM2PolX_t, muM2PolY_t, muM2PolZ_t; Double_t muM2Time, muM2PolX, muM2PolY, muM2PolZ;
Double_t muDecayPosX_t, muDecayPosY_t, muDecayPosZ_t; Double_t muDecayPosX, muDecayPosY, muDecayPosZ;
Double_t muDecayTime_t; Double_t muDecayTime;
Double_t posIniMomx_t, posIniMomy_t, posIniMomz_t; Double_t posIniMomx, posIniMomy, posIniMomz;
public: public:
static const Int_t maxNFieldnNominalValues=30; static const Int_t maxNFieldnNominalValues=30;
private: private:
Int_t nFieldNomVal; Int_t nFieldNomVal;
Double_t fieldNomVal[maxNFieldnNominalValues]; Double_t fieldNomVal[maxNFieldnNominalValues];
Double_t BxIntegral_t, ByIntegral_t, BzIntegral_t; Double_t BxIntegral, ByIntegral, BzIntegral;
Double_t BzIntegral1_t, BzIntegral2_t, BzIntegral3_t; Double_t BzIntegral1, BzIntegral2, BzIntegral3;
// Variables for a particle in a given detector within the event // Variables for a particle in a given detector within the event
public: public:

View File

@ -159,63 +159,63 @@ void musrRootOutput::BeginOfRunAction() {
sprintf(RootOutputFileName, "data/musr_%i.root", tmpRunNr); sprintf(RootOutputFileName, "data/musr_%i.root", tmpRunNr);
rootFile=new TFile(RootOutputFileName,"recreate"); rootFile=new TFile(RootOutputFileName,"recreate");
rootTree=new TTree("t1","a simple Tree with simple variables"); rootTree=new TTree("t1","a simple Tree with simple variables");
if (store_runID) {rootTree->Branch("runID",&runID_t,"runID/I");} if (store_runID) {rootTree->Branch("runID",&runID,"runID/I");}
if (store_eventID) {rootTree->Branch("eventID",&eventID_t,"eventID/I");} if (store_eventID) {rootTree->Branch("eventID",&eventID,"eventID/I");}
if (store_weight) {rootTree->Branch("weight",&weight_t,"weight/D");} if (store_weight) {rootTree->Branch("weight",&weight,"weight/D");}
if (store_timeToNextEvent){rootTree->Branch("timeToNextEvent",&timeToNextEvent_t,"timeToNextEvent/D");} if (store_timeToNextEvent){rootTree->Branch("timeToNextEvent",&timeToNextEvent,"timeToNextEvent/D");}
if (store_BFieldAtDecay) {rootTree->Branch("BFieldAtDecay",&B_t,"Bx/D:By:Bz:B3:B4:B5");} if (store_BFieldAtDecay) {rootTree->Branch("BFieldAtDecay",&B_t,"Bx/D:By:Bz:B3:B4:B5");}
if (store_muIniTime) {rootTree->Branch("muIniTime",&muIniTime_t,"muIniTime/D");} if (store_muIniTime) {rootTree->Branch("muIniTime",&muIniTime,"muIniTime/D");}
if (store_muIniPosX) {rootTree->Branch("muIniPosX",&muIniPosX_t,"muIniPosX/D");} if (store_muIniPosX) {rootTree->Branch("muIniPosX",&muIniPosX,"muIniPosX/D");}
if (store_muIniPosY) {rootTree->Branch("muIniPosY",&muIniPosY_t,"muIniPosY/D");} if (store_muIniPosY) {rootTree->Branch("muIniPosY",&muIniPosY,"muIniPosY/D");}
if (store_muIniPosZ) {rootTree->Branch("muIniPosZ",&muIniPosZ_t,"muIniPosZ/D");} if (store_muIniPosZ) {rootTree->Branch("muIniPosZ",&muIniPosZ,"muIniPosZ/D");}
if (store_muIniMomX) {rootTree->Branch("muIniMomX",&muIniMomX_t,"muIniMomX/D");} if (store_muIniMomX) {rootTree->Branch("muIniMomX",&muIniMomX,"muIniMomX/D");}
if (store_muIniMomY) {rootTree->Branch("muIniMomY",&muIniMomY_t,"muIniMomY/D");} if (store_muIniMomY) {rootTree->Branch("muIniMomY",&muIniMomY,"muIniMomY/D");}
if (store_muIniMomZ) {rootTree->Branch("muIniMomZ",&muIniMomZ_t,"muIniMomZ/D");} if (store_muIniMomZ) {rootTree->Branch("muIniMomZ",&muIniMomZ,"muIniMomZ/D");}
if (store_muIniPolX) {rootTree->Branch("muIniPolX",&muIniPolX_t,"muIniPolX/D");} if (store_muIniPolX) {rootTree->Branch("muIniPolX",&muIniPolX,"muIniPolX/D");}
if (store_muIniPolY) {rootTree->Branch("muIniPolY",&muIniPolY_t,"muIniPolY/D");} if (store_muIniPolY) {rootTree->Branch("muIniPolY",&muIniPolY,"muIniPolY/D");}
if (store_muIniPolZ) {rootTree->Branch("muIniPolZ",&muIniPolZ_t,"muIniPolZ/D");} if (store_muIniPolZ) {rootTree->Branch("muIniPolZ",&muIniPolZ,"muIniPolZ/D");}
if (store_muDecayDetID) {rootTree->Branch("muDecayDetID",&muDecayDetID_t,"muDecayDetID/I");} if (store_muDecayDetID) {rootTree->Branch("muDecayDetID",&muDecayDetID,"muDecayDetID/I");}
if (store_muDecayPosX) {rootTree->Branch("muDecayPosX",&muDecayPosX_t,"muDecayPosX/D");} if (store_muDecayPosX) {rootTree->Branch("muDecayPosX",&muDecayPosX,"muDecayPosX/D");}
if (store_muDecayPosY) {rootTree->Branch("muDecayPosY",&muDecayPosY_t,"muDecayPosY/D");} if (store_muDecayPosY) {rootTree->Branch("muDecayPosY",&muDecayPosY,"muDecayPosY/D");}
if (store_muDecayPosZ) {rootTree->Branch("muDecayPosZ",&muDecayPosZ_t,"muDecayPosZ/D");} if (store_muDecayPosZ) {rootTree->Branch("muDecayPosZ",&muDecayPosZ,"muDecayPosZ/D");}
if (store_muDecayTime) {rootTree->Branch("muDecayTime",&muDecayTime_t,"muDecayTime/D");} if (store_muDecayTime) {rootTree->Branch("muDecayTime",&muDecayTime,"muDecayTime/D");}
if (store_muDecayPolX) {rootTree->Branch("muDecayPolX",&muDecayPolX_t,"muDecayPolX/D");} if (store_muDecayPolX) {rootTree->Branch("muDecayPolX",&muDecayPolX,"muDecayPolX/D");}
if (store_muDecayPolY) {rootTree->Branch("muDecayPolY",&muDecayPolY_t,"muDecayPolY/D");} if (store_muDecayPolY) {rootTree->Branch("muDecayPolY",&muDecayPolY,"muDecayPolY/D");}
if (store_muDecayPolZ) {rootTree->Branch("muDecayPolZ",&muDecayPolZ_t,"muDecayPolZ/D");} if (store_muDecayPolZ) {rootTree->Branch("muDecayPolZ",&muDecayPolZ,"muDecayPolZ/D");}
if (store_muTargetTime) {rootTree->Branch("muTargetTime",&muTargetTime_t,"muTargetTime/D");} if (store_muTargetTime) {rootTree->Branch("muTargetTime",&muTargetTime,"muTargetTime/D");}
if (store_muTargetPolX) {rootTree->Branch("muTargetPolX",&muTargetPolX_t,"muTargetPolX/D");} if (store_muTargetPolX) {rootTree->Branch("muTargetPolX",&muTargetPolX,"muTargetPolX/D");}
if (store_muTargetPolY) {rootTree->Branch("muTargetPolY",&muTargetPolY_t,"muTargetPolY/D");} if (store_muTargetPolY) {rootTree->Branch("muTargetPolY",&muTargetPolY,"muTargetPolY/D");}
if (store_muTargetPolZ) {rootTree->Branch("muTargetPolZ",&muTargetPolZ_t,"muTargetPolZ/D");} if (store_muTargetPolZ) {rootTree->Branch("muTargetPolZ",&muTargetPolZ,"muTargetPolZ/D");}
if (store_muTargetMomX) {rootTree->Branch("muTargetMomX",&muTargetMomX_t,"muTargetMomX/D");} if (store_muTargetMomX) {rootTree->Branch("muTargetMomX",&muTargetMomX,"muTargetMomX/D");}
if (store_muTargetMomY) {rootTree->Branch("muTargetMomY",&muTargetMomY_t,"muTargetMomY/D");} if (store_muTargetMomY) {rootTree->Branch("muTargetMomY",&muTargetMomY,"muTargetMomY/D");}
if (store_muTargetMomZ) {rootTree->Branch("muTargetMomZ",&muTargetMomZ_t,"muTargetMomZ/D");} if (store_muTargetMomZ) {rootTree->Branch("muTargetMomZ",&muTargetMomZ,"muTargetMomZ/D");}
if (store_muM0Time) {rootTree->Branch("muM0Time",&muM0Time_t,"muM0Time/D");} if (store_muM0Time) {rootTree->Branch("muM0Time",&muM0Time,"muM0Time/D");}
if (store_muM0PolX) {rootTree->Branch("muM0PolX",&muM0PolX_t,"muM0PolX/D");} if (store_muM0PolX) {rootTree->Branch("muM0PolX",&muM0PolX,"muM0PolX/D");}
if (store_muM0PolY) {rootTree->Branch("muM0PolY",&muM0PolY_t,"muM0PolY/D");} if (store_muM0PolY) {rootTree->Branch("muM0PolY",&muM0PolY,"muM0PolY/D");}
if (store_muM0PolZ) {rootTree->Branch("muM0PolZ",&muM0PolZ_t,"muM0PolZ/D");} if (store_muM0PolZ) {rootTree->Branch("muM0PolZ",&muM0PolZ,"muM0PolZ/D");}
if (store_muM1Time) {rootTree->Branch("muM1Time",&muM1Time_t,"muM1Time/D");} if (store_muM1Time) {rootTree->Branch("muM1Time",&muM1Time,"muM1Time/D");}
if (store_muM1PolX) {rootTree->Branch("muM1PolX",&muM1PolX_t,"muM1PolX/D");} if (store_muM1PolX) {rootTree->Branch("muM1PolX",&muM1PolX,"muM1PolX/D");}
if (store_muM1PolY) {rootTree->Branch("muM1PolY",&muM1PolY_t,"muM1PolY/D");} if (store_muM1PolY) {rootTree->Branch("muM1PolY",&muM1PolY,"muM1PolY/D");}
if (store_muM1PolZ) {rootTree->Branch("muM1PolZ",&muM1PolZ_t,"muM1PolZ/D");} if (store_muM1PolZ) {rootTree->Branch("muM1PolZ",&muM1PolZ,"muM1PolZ/D");}
if (store_muM2Time) {rootTree->Branch("muM2Time",&muM2Time_t,"muM2Time/D");} if (store_muM2Time) {rootTree->Branch("muM2Time",&muM2Time,"muM2Time/D");}
if (store_muM2PolX) {rootTree->Branch("muM2PolX",&muM2PolX_t,"muM2PolX/D");} if (store_muM2PolX) {rootTree->Branch("muM2PolX",&muM2PolX,"muM2PolX/D");}
if (store_muM2PolY) {rootTree->Branch("muM2PolY",&muM2PolY_t,"muM2PolY/D");} if (store_muM2PolY) {rootTree->Branch("muM2PolY",&muM2PolY,"muM2PolY/D");}
if (store_muM2PolZ) {rootTree->Branch("muM2PolZ",&muM2PolZ_t,"muM2PolZ/D");} if (store_muM2PolZ) {rootTree->Branch("muM2PolZ",&muM2PolZ,"muM2PolZ/D");}
if (store_posIniMomX) {rootTree->Branch("posIniMomX",&posIniMomx_t,"posIniMomX/D");} if (store_posIniMomX) {rootTree->Branch("posIniMomX",&posIniMomx,"posIniMomX/D");}
if (store_posIniMomY) {rootTree->Branch("posIniMomY",&posIniMomy_t,"posIniMomY/D");} if (store_posIniMomY) {rootTree->Branch("posIniMomY",&posIniMomy,"posIniMomY/D");}
if (store_posIniMomZ) {rootTree->Branch("posIniMomZ",&posIniMomz_t,"posIniMomZ/D");} if (store_posIniMomZ) {rootTree->Branch("posIniMomZ",&posIniMomz,"posIniMomZ/D");}
// if (store_globalTime) {rootTree->Branch("globalTime",&globalTime_t,"globalTime/D");} // if (store_globalTime) {rootTree->Branch("globalTime",&globalTime,"globalTime/D");}
// if (store_fieldValue) {rootTree->Branch("fieldValue",&fieldValue_t,"fieldValue/D");} // if (store_fieldValue) {rootTree->Branch("fieldValue",&fieldValue,"fieldValue/D");}
if (store_fieldNomVal) { if (store_fieldNomVal) {
rootTree->Branch("nFieldNomVal",&nFieldNomVal,"nFieldNomVal/I"); rootTree->Branch("nFieldNomVal",&nFieldNomVal,"nFieldNomVal/I");
rootTree->Branch("fieldNomVal",&fieldNomVal,"fieldNomVal[nFieldNomVal]/D"); rootTree->Branch("fieldNomVal",&fieldNomVal,"fieldNomVal[nFieldNomVal]/D");
} }
if (store_fieldIntegralBx) {rootTree->Branch("BxIntegral",&BxIntegral_t,"BxIntegral/D");} if (store_fieldIntegralBx) {rootTree->Branch("BxIntegral",&BxIntegral,"BxIntegral/D");}
if (store_fieldIntegralBy) {rootTree->Branch("ByIntegral",&ByIntegral_t,"ByIntegral/D");} if (store_fieldIntegralBy) {rootTree->Branch("ByIntegral",&ByIntegral,"ByIntegral/D");}
if (store_fieldIntegralBz) {rootTree->Branch("BzIntegral",&BzIntegral_t,"BzIntegral/D");} if (store_fieldIntegralBz) {rootTree->Branch("BzIntegral",&BzIntegral,"BzIntegral/D");}
if (store_fieldIntegralBz1) {rootTree->Branch("BzIntegral1",&BzIntegral1_t,"BzIntegral1/D");} if (store_fieldIntegralBz1) {rootTree->Branch("BzIntegral1",&BzIntegral1,"BzIntegral1/D");}
if (store_fieldIntegralBz2) {rootTree->Branch("BzIntegral2",&BzIntegral2_t,"BzIntegral2/D");} if (store_fieldIntegralBz2) {rootTree->Branch("BzIntegral2",&BzIntegral2,"BzIntegral2/D");}
if (store_fieldIntegralBz3) {rootTree->Branch("BzIntegral3",&BzIntegral3_t,"BzIntegral3/D");} if (store_fieldIntegralBz3) {rootTree->Branch("BzIntegral3",&BzIntegral3,"BzIntegral3/D");}
rootTree->Branch("det_n",&det_n,"det_n/I"); rootTree->Branch("det_n",&det_n,"det_n/I");
if (store_det_ID) {rootTree->Branch("det_ID",&det_ID,"det_ID[det_n]/I");} if (store_det_ID) {rootTree->Branch("det_ID",&det_ID,"det_ID[det_n]/I");}
@ -314,9 +314,9 @@ void musrRootOutput::EndOfRunAction() {
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void musrRootOutput::FillEvent() { void musrRootOutput::FillEvent() {
htest5->Fill(atan2(posIniMomy_t,posIniMomx_t)); htest5->Fill(atan2(posIniMomy,posIniMomx));
htest6->Fill(atan2(sqrt(posIniMomx_t*posIniMomx_t+posIniMomy_t*posIniMomy_t),posIniMomz_t)); htest6->Fill(atan2(sqrt(posIniMomx*posIniMomx+posIniMomy*posIniMomy),posIniMomz));
if (weight_t>0.) { if (weight>0.) {
if ( !((musrParameters::storeOnlyEventsWithHits)&&(det_n<=0)) ) { if ( !((musrParameters::storeOnlyEventsWithHits)&&(det_n<=0)) ) {
rootTree->Fill(); rootTree->Fill();
} }
@ -326,27 +326,27 @@ void musrRootOutput::FillEvent() {
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void musrRootOutput::ClearAllRootVariables() { void musrRootOutput::ClearAllRootVariables() {
runID_t=-1000; runID=-1000;
eventID_t=-1000; eventID=-1000;
weight_t=1.; weight=1.;
timeToNextEvent_t = -1000; timeToNextEvent = -1000;
B_t[0]=-1000.;B_t[1]=-1000.;B_t[2]=-1000.;B_t[3]=-1000.;B_t[4]=-1000.;B_t[5]=-1000.; B_t[0]=-1000.;B_t[1]=-1000.;B_t[2]=-1000.;B_t[3]=-1000.;B_t[4]=-1000.;B_t[5]=-1000.;
muIniTime_t=-1000; muIniTime=-1000;
muIniPosX_t=-1000; muIniPosY_t=-1000; muIniPosZ_t=-1000; muIniPosX=-1000; muIniPosY=-1000; muIniPosZ=-1000;
muIniMomX_t=-1000; muIniMomY_t=-1000; muIniMomZ_t=-1000; muIniMomX=-1000; muIniMomY=-1000; muIniMomZ=-1000;
muIniPolX_t=-1000; muIniPolY_t=-1000; muIniPolZ_t=-1000; muIniPolX=-1000; muIniPolY=-1000; muIniPolZ=-1000;
muDecayDetID_t=-1000; muDecayDetID=-1000;
muDecayPolX_t=-1000; muDecayPolY_t=-1000; muDecayPolZ_t=-1000; muDecayPolX=-1000; muDecayPolY=-1000; muDecayPolZ=-1000;
muTargetTime_t=-1000; muTargetPolX_t=-1000; muTargetPolY_t=-1000; muTargetPolZ_t=-1000; muTargetTime=-1000; muTargetPolX=-1000; muTargetPolY=-1000; muTargetPolZ=-1000;
muTargetMomX_t=-1000; muTargetMomY_t=-1000; muTargetMomZ_t=-1000; muTargetMomX=-1000; muTargetMomY=-1000; muTargetMomZ=-1000;
muM0Time_t=-1000; muM0PolX_t=-1000; muM0PolY_t=-1000; muM0PolZ_t=-1000; muM0Time=-1000; muM0PolX=-1000; muM0PolY=-1000; muM0PolZ=-1000;
muM1Time_t=-1000; muM1PolX_t=-1000; muM1PolY_t=-1000; muM1PolZ_t=-1000; muM1Time=-1000; muM1PolX=-1000; muM1PolY=-1000; muM1PolZ=-1000;
muM2Time_t=-1000; muM2PolX_t=-1000; muM2PolY_t=-1000; muM2PolZ_t=-1000; muM2Time=-1000; muM2PolX=-1000; muM2PolY=-1000; muM2PolZ=-1000;
muDecayPosX_t=-1000;muDecayPosY_t=-1000;muDecayPosZ_t=-1000; muDecayPosX=-1000;muDecayPosY=-1000;muDecayPosZ=-1000;
muDecayTime_t=-1000; muDecayTime=-1000;
posIniMomx_t=-1000;posIniMomy_t=-1000;posIniMomz_t=-1000; posIniMomx=-1000;posIniMomy=-1000;posIniMomz=-1000;
BxIntegral_t = -1000; ByIntegral_t = -1000; BzIntegral_t = -1000; BxIntegral = -1000; ByIntegral = -1000; BzIntegral = -1000;
BzIntegral1_t = -1000; BzIntegral2_t = -1000; BzIntegral3_t = -1000; BzIntegral1 = -1000; BzIntegral2 = -1000; BzIntegral3 = -1000;
det_n=0; det_n=0;
save_n=0; save_n=0;