/// /// For questions or suggestions about this module please contact the /// current responsible and CC in the oaAnalysis package manager. /// /// #ifndef TExample2010aAnalysis1Module_hxx_seen #define TExample2010aAnalysis1Module_hxx_seen // set the environment variable // CMTEXTRATAGS to OAANALYSIS_WITHOUT_RECON_CALIB // to enable this code #ifndef OAANALYSIS_WITHOUT_RECON_CALIB #include #include #include #include #include #include #include #include #include #include #include "TClonesArray.h" #include "IAnalysisReconModuleBase.hxx" namespace COMET { class IExample2010aAnalysis1Module; }; class ITPCReco; class COMET::IExample2010aAnalysis1Module : public IAnalysisReconModuleBase { public: public: /// ITrackFromTPCPids /// TPC track info as extracted from the IReconObjectContainer called "TPCPids" class ITrackFromTPCPids : public TObject { public: ITrackFromTPCPids(); virtual ~ITrackFromTPCPids(); Int_t npoint; // track.GetNodes().size() Float_t goodness; // track.GetQuality() Float_t xin; // track.GetNodes().begin().GetState().GetPosition()[0] Float_t yin; // track.GetNodes().begin().GetState().GetPosition()[1] Float_t zin; // track.GetNodes().begin().GetState().GetPosition()[2] // frontstate below is track.GetNodes().begin() Float_t txin; // tangent calculated using custom getTangents(frontstate,...) Float_t tyin; // tangent calculated using custom getTangents(frontstate,...) Float_t xfin; // track.GetNodes().rbegin().GetState().GetPosition()[0] Float_t yfin; // track.GetNodes().rbegin().GetState().GetPosition()[1] Float_t zfin; // track.GetNodes().rbegin().GetState().GetPosition()[2] // backstate below is track.GetNodes().rbegin() Float_t txfin; // tangent calculated using custom getTangents(backstate,...) Float_t tyfin; // tangent calculated using custom getTangents(backstate,...) Float_t dedxmeas; // RealDatum "tpcPid_Craw" for track Float_t dedxcorr; // RealDatum "tpcPid_Ccorr" for track Float_t curvature; // track.GetCurvature() Float_t momentum; // COMET::tman().GetMomentum(frontstate) (from oaRecPack) Float_t momentumerr;// COMET::tman().GetMomentumError(frontstate) (from oaRecPack) Float_t nTrun; // RealDatum "tpcPid_NTrun" for track Float_t SampleLength;// RealDatum "tpcPid_SampleLength" for track Float_t dedxexpele; // RealDatum "tpcPid_dEdxexpEle" for track Float_t dedxexpmuon;// RealDatum "tpcPid_dEdxexpMuon" for track Float_t dedxexppion;// RealDatum "tpcPid_dEdxexpPion" for track Float_t dedxexpkaon;// RealDatum "tpcPid_dEdxexpKaon" for track Float_t dedxexpproton;// RealDatum "tpcPid_dEdxexpProton" for track Float_t sigmaele; // RealDatum "tpcPid_SigmaEle" for track Float_t sigmamuon; // RealDatum "tpcPid_SigmaMuon" for track Float_t sigmapion; // RealDatum "tpcPid_SigmaPion" for track Float_t sigmakaon; // RealDatum "tpcPid_SigmaKaon" for track Float_t sigmaproton;// RealDatum "tpcPid_SigmaProton" for track Float_t pullele; // RealDatum "tpcPid_PullEle" for track Float_t pullmuon; // RealDatum "tpcPid_PullMuon" for track Float_t pullpion; // RealDatum "tpcPid_PullPion" for track Float_t pullkaon; // RealDatum "tpcPid_PullKaon" for track Float_t pullproton; // RealDatum "tpcPid_PullProton" for track Float_t T0; // track.GetPosition().T() + "ReconTPC.Reco.LikFit.TimeOffset" Float_t theta; // track.GetDirection().Theta() Float_t phi; // track.GetDirection().Phi() // MC truth for front of trajectory corresponding to reconstructed TPC track Int_t TruePID; // IG4Trajectory.GetPDGEncoding() Float_t TrueX; // IG4Trajectory.GetInitialPosition().X() Float_t TrueY; // IG4Trajectory.GetInitialPosition().Y() Float_t TrueZ; // IG4Trajectory.GetInitialPosition().Z() Float_t TrueP; // IG4TrajectoryPoint.GetMomentum().Mag() ClassDef(IExample2010aAnalysis1Module::ITrackFromTPCPids, 1); }; public: /// IFGDHit /// All FGD Hit class IFGDHit : public TObject { public: IFGDHit(); virtual ~IFGDHit(); Float_t fgdX; // X position of FGD hit -- 0 if a YHit Float_t fgdY; // Y position of FGD hit -- 0 if an XHit Float_t fgdZ; // X position of FGD hit Float_t fgdT; // Time of FGD hit Float_t fgdCharge; // Charge of FGD hit ClassDef(IExample2010aAnalysis1Module::IFGDHit, 1); }; public: /// IP0DHit /// All P0D Hit class IP0DHit : public TObject { public: IP0DHit(); virtual ~IP0DHit(); Float_t p0dX; // X position of P0D hit -- 0 if a YHit Float_t p0dY; // Y position of P0D hit -- 0 if an XHit Float_t p0dZ; // X position of P0D hit Float_t p0dT; // Time of P0D hit Float_t p0dCharge; // Charge of P0D hit ClassDef(IExample2010aAnalysis1Module::IP0DHit, 1); }; public: /// ISMRDHit /// All SMRD Hit class ISMRDHit : public TObject { public: ISMRDHit(); virtual ~ISMRDHit(); Float_t smrdX; // X position of SMRD hit -- 0 if a YHit Float_t smrdY; // Y position of SMRD hit -- 0 if an XHit Float_t smrdZ; // X position of SMRD hit Float_t smrdT; // Time of SMRD hit Float_t smrdCharge; // Charge of SMRD hit ClassDef(IExample2010aAnalysis1Module::ISMRDHit, 1); }; public: /// ITrueNuVertex /// This replicates info in ITruthVerticesModule but is here for /// consistency with Claudio's original code class ITrueNuVertex : public TObject { public: ITrueNuVertex(); virtual ~ITrueNuVertex(); Float_t TrueVertexX;// true x position of neutrino vertex Float_t TrueVertexY;// true y position of neutrino vertex Float_t TrueVertexZ;// true z position of neutrino vertex Float_t TrueNuEnergy;// true neutrino energy Int_t TrueReaction;// neut-style neutrino reaction code Int_t TrueFamily; // PDG-code of neutrino ClassDef(IExample2010aAnalysis1Module::ITrueNuVertex, 1); }; protected: void getTangents( COMET::IHandle state,double &tx,double &etx,double &ty,double &ety); void getMomentum( COMET::IHandle state,double &p,double &ep); COMET::IG4Trajectory GetTrajectory(COMET::ICOMETEvent& event,COMET::IReconTrack &track); COMET::IG4TrajectoryPoint GetG4Point(COMET::ICOMETEvent& event,double x0,double y0,double z0,double rho, double phi, double tx,COMET::IG4Trajectory &g4traj); int GetNeutrinoFamily (std::string fReactionName) ; int GetReactionCode (std::string fReactionName) ; void GetTrueVertex(COMET::ICOMETEvent& event); void FillFGDHits(COMET::IHandle fgd); void FillP0DHits(COMET::IHandle p0d); void FillSMRDHits(COMET::IHandle smrd); public: IExample2010aAnalysis1Module(const char *name = "Example2010aAnalysis1", const char *title = "2010a Analysis Example 1"); virtual ~IExample2010aAnalysis1Module(); virtual Bool_t ProcessFirstEvent(COMET::ICOMETEvent& event); virtual bool IsFullEventWorthSaving(COMET::ICOMETEvent& event); virtual Bool_t IsEnabledByDefault() const {return kFALSE;} protected: virtual void InitializeModule(); virtual void InitializeBranches(); /// Fills the variables in the TTree. Returns true if analysis didn't utterly fail virtual bool FillTree(COMET::ICOMETEvent&); public: ///Tree Entries Int_t fNTPCHits; //! Int_t fNTracksFromTPCPids; //! Int_t fNFGDHits; //! Int_t fNP0DHits; //! Int_t fNSMRDHits; //! Int_t fNTrueNuVertices; //! /// TClonesArray of TECALRecon Objects TClonesArray *fTracksFromTPCPids; //! ITrackFromTPCPids TClonesArray *fFGDHits; //! IFGDHit TClonesArray *fP0DHits; //! IP0DHit TClonesArray *fSMRDHits; //! ISMRDHit TClonesArray *fTrueNuVertices; //! ITrueNuVertex Double_t fTimeOffset; ITPCReco *fTPCRecon; //! private: ClassDef(IExample2010aAnalysis1Module,1); }; #endif // OAANALYSIS_WITHOUT_RECON_CALIB // set the environment variable // CMTEXTRATAGS to OAANALYSIS_WITHOUT_RECON_CALIB // to avoid this code #endif